. service tells you which device it couldn't stat
. bigger rs and ramdisk for drivers . sanity check for pv_set macro for oversized arguments
This commit is contained in:
parent
bf08c90e74
commit
3b08825d85
@ -1,5 +1,5 @@
|
|||||||
boot
|
boot
|
||||||
125 400
|
130 400
|
||||||
d--755 0 0
|
d--755 0 0
|
||||||
bin d--755 0 0
|
bin d--755 0 0
|
||||||
at_wini ---755 0 0 at_wini
|
at_wini ---755 0 0 at_wini
|
||||||
|
@ -24,8 +24,17 @@ typedef struct { u16_t port; u16_t value; } pvw_pair_t;
|
|||||||
typedef struct { u16_t port; u32_t value; } pvl_pair_t;
|
typedef struct { u16_t port; u32_t value; } pvl_pair_t;
|
||||||
|
|
||||||
/* Macro shorthand to set (port,value)-pair. */
|
/* Macro shorthand to set (port,value)-pair. */
|
||||||
#define pv_set(pv, p, v) ((pv).port = (p), (pv).value = (v))
|
#define pv_set(pv, p, v) do { \
|
||||||
#define pv_ptr_set(pv_ptr, p, v) ((pv_ptr)->port = (p), (pv_ptr)->value = (v))
|
u32_t _p = (p), _v = (v); \
|
||||||
|
(pv).port = _p; \
|
||||||
|
(pv).value = _v; \
|
||||||
|
if((pv).port != _p || (pv).value != _v) { \
|
||||||
|
printf("%s:%d: actual port: %x != %x || " \
|
||||||
|
"actual value: %x != %x\n", \
|
||||||
|
__FILE__, __LINE__, (pv).port, _p, (pv).value, _v); \
|
||||||
|
panic(__FILE__, "pv_set(" #pv ", " #p ", " #v ")", NO_NUM); \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#if 0 /* no longer in use !!! */
|
#if 0 /* no longer in use !!! */
|
||||||
/* Define a number of flags to indicate granularity we are using. */
|
/* Define a number of flags to indicate granularity we are using. */
|
||||||
|
@ -27,7 +27,7 @@ $(UTIL): $(UTIL_OBJ)
|
|||||||
$(CC) -o $@ $(LDFLAGS) $(UTIL_OBJ) $(UTIL_LIBS)
|
$(CC) -o $@ $(LDFLAGS) $(UTIL_OBJ) $(UTIL_LIBS)
|
||||||
$(SERVER): $(OBJ)
|
$(SERVER): $(OBJ)
|
||||||
$(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
|
$(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
|
||||||
install -S 110k $@
|
install -S 120k $@
|
||||||
|
|
||||||
# install with other servers
|
# install with other servers
|
||||||
install: /bin/$(UTIL) /usr/sbin/$(SERVER)
|
install: /bin/$(UTIL) /usr/sbin/$(SERVER)
|
||||||
|
@ -235,6 +235,7 @@ PRIVATE int parse_arguments(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else if (strcmp(argv[i], ARG_DEV)==0) {
|
else if (strcmp(argv[i], ARG_DEV)==0) {
|
||||||
if (stat(argv[i+1], &stat_buf) == -1) {
|
if (stat(argv[i+1], &stat_buf) == -1) {
|
||||||
|
perror(argv[i+1]);
|
||||||
print_usage(argv[ARG_NAME], "couldn't get status of device");
|
print_usage(argv[ARG_NAME], "couldn't get status of device");
|
||||||
exit(errno);
|
exit(errno);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user