diff options
author | kuriyama <kuriyama@FreeBSD.org> | 1999-02-27 12:08:02 +0000 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 1999-02-27 12:08:02 +0000 |
commit | 6df3a4da61c19f60c3a5011b1e9d3206bf2ca36b (patch) | |
tree | ce05c635933979d1dfa1fd011278e76b2d113b48 /usr.sbin/pccard/pccardc/pccardmem.c | |
parent | d7bc8dbf1830427d3489834768adce4d7ce43f83 (diff) | |
download | FreeBSD-src-6df3a4da61c19f60c3a5011b1e9d3206bf2ca36b.zip FreeBSD-src-6df3a4da61c19f60c3a5011b1e9d3206bf2ca36b.tar.gz |
Cleanup usage of err() and warn().
Add error handling for ioctl().
Reviewed by: -current
Obtained from: PAO
Diffstat (limited to 'usr.sbin/pccard/pccardc/pccardmem.c')
-rw-r--r-- | usr.sbin/pccard/pccardc/pccardmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pccard/pccardc/pccardmem.c b/usr.sbin/pccard/pccardc/pccardmem.c index 8461e0e..240cdd6 100644 --- a/usr.sbin/pccard/pccardc/pccardmem.c +++ b/usr.sbin/pccard/pccardc/pccardmem.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$Id: pccardmem.c,v 1.9 1997/11/18 21:08:06 nate Exp $"; + "$Id: pccardmem.c,v 1.10 1999/02/05 16:00:15 kuriyama Exp $"; #endif /* not lint */ #include <err.h> @@ -64,8 +64,8 @@ pccardmem_main(argc, argv) errx(1, "arg error"); } if (ioctl(fd, PIOCRWMEM, &addr)) - warn("ioctl"); + err(1, "ioctl (PIOCRWMEM)"); else printf("PCCARD Memory address set to 0x%x\n", addr); - exit(0); + return 0; } |