From: Ben Gras Date: Fri, 23 Feb 2007 18:22:46 +0000 (+0000) Subject: . service tells you which device it couldn't stat X-Git-Tag: v3.1.3~57 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=3b08825d85ee44bd30351aae678bf383e2bd73ff;p=minix.git . service tells you which device it couldn't stat . bigger rs and ramdisk for drivers . sanity check for pv_set macro for oversized arguments --- diff --git a/drivers/memory/ramdisk/proto b/drivers/memory/ramdisk/proto index bbe4c0bb8..2fd3fea7d 100644 --- a/drivers/memory/ramdisk/proto +++ b/drivers/memory/ramdisk/proto @@ -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 diff --git a/include/minix/devio.h b/include/minix/devio.h index ae8918c32..e123f8521 100644 --- a/include/minix/devio.h +++ b/include/minix/devio.h @@ -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. */ diff --git a/servers/rs/Makefile b/servers/rs/Makefile index f644950f9..94f466551 100644 --- a/servers/rs/Makefile +++ b/servers/rs/Makefile @@ -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) diff --git a/servers/rs/service.c b/servers/rs/service.c index b2d1f48a4..0cca65781 100644 --- a/servers/rs/service.c +++ b/servers/rs/service.c @@ -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); }