diff options
author | phk <phk@FreeBSD.org> | 1995-08-25 09:46:01 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-08-25 09:46:01 +0000 |
commit | 7f28a516d851374d8758320894f497a356cdbdcb (patch) | |
tree | f682392ec98f5609e98b99859aa3f11019bd0e09 /usr.sbin/pccard/pccardc/enabler.c | |
parent | 649141cd25d2f2fff89e9273621b908d74701a6e (diff) | |
download | FreeBSD-src-7f28a516d851374d8758320894f497a356cdbdcb.zip FreeBSD-src-7f28a516d851374d8758320894f497a356cdbdcb.tar.gz |
Shut a bunch of warnings.
Diffstat (limited to 'usr.sbin/pccard/pccardc/enabler.c')
-rw-r--r-- | usr.sbin/pccard/pccardc/enabler.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pccard/pccardc/enabler.c b/usr.sbin/pccard/pccardc/enabler.c index c96b853..56f1730 100644 --- a/usr.sbin/pccard/pccardc/enabler.c +++ b/usr.sbin/pccard/pccardc/enabler.c @@ -7,6 +7,7 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> +#include <fcntl.h> #include <sys/ioctl.h> #include <pccard/card.h> @@ -22,7 +23,7 @@ char *argv[]; struct drv_desc drv; struct mem_desc mem; struct io_desc io; -int fd, err, slot, i, card_addr; +int fd, slot, i, card_addr; char name[32]; char *p; @@ -50,7 +51,7 @@ char *p; usage("Memory argument error"); if (sscanf(argv[1], "%x", &card_addr)!=1) usage("Bad card address"); - if (sscanf(argv[2], "%x", &drv.mem)!=1) + if (sscanf(argv[2], "%lx", &drv.mem)!=1) usage("Bad memory address"); if (sscanf(argv[3], "%d", &i)!=1) usage("Bad memory size"); @@ -80,7 +81,7 @@ char *p; } if (argc) usage("no parameter for argument"); - printf("drv %s%d, mem 0x%x, size %d, io %d, irq 0x%x, flags 0x%x\n", + printf("drv %s%d, mem 0x%lx, size %d, io %d, irq 0x%x, flags 0x%x\n", drv.name, drv.unit, drv.mem, drv.memsize, drv.iobase, drv.irqmask, drv.flags); sprintf(name, "/dev/card%d", slot); @@ -121,6 +122,7 @@ char *p; if (ioctl(fd, PIOCSDRV, &drv)) perror("set driver"); close(fd); + return 0; } /* * usage - print usage and exit |