. 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:
Ben Gras 2007-02-23 18:22:46 +00:00
parent bf08c90e74
commit 3b08825d85
4 changed files with 14 additions and 4 deletions

View file

@ -1,5 +1,5 @@
boot
125 400
130 400
d--755 0 0
bin d--755 0 0
at_wini ---755 0 0 at_wini

View file

@ -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;
/* Macro shorthand to set (port,value)-pair. */
#define pv_set(pv, p, v) ((pv).port = (p), (pv).value = (v))
#define pv_ptr_set(pv_ptr, p, v) ((pv_ptr)->port = (p), (pv_ptr)->value = (v))
#define pv_set(pv, p, v) do { \
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 !!! */
/* Define a number of flags to indicate granularity we are using. */

View file

@ -27,7 +27,7 @@ $(UTIL): $(UTIL_OBJ)
$(CC) -o $@ $(LDFLAGS) $(UTIL_OBJ) $(UTIL_LIBS)
$(SERVER): $(OBJ)
$(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
install -S 110k $@
install -S 120k $@
# install with other servers
install: /bin/$(UTIL) /usr/sbin/$(SERVER)

View file

@ -235,6 +235,7 @@ PRIVATE int parse_arguments(int argc, char **argv)
}
else if (strcmp(argv[i], ARG_DEV)==0) {
if (stat(argv[i+1], &stat_buf) == -1) {
perror(argv[i+1]);
print_usage(argv[ARG_NAME], "couldn't get status of device");
exit(errno);
}