summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard/pccardc/pccardmem.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-04-10 05:45:39 +0000
committernate <nate@FreeBSD.org>1996-04-10 05:45:39 +0000
commit438d9b3a8b99c5c9ff7fdbd4ddebe8b7e4854770 (patch)
tree580d0fe5a461edf85f2ed3d02c3097b9c8b6fe06 /usr.sbin/pccard/pccardc/pccardmem.c
parent0e0a5fb0139e9f4d25a47e7f00e91be4653ac98d (diff)
downloadFreeBSD-src-438d9b3a8b99c5c9ff7fdbd4ddebe8b7e4854770.zip
FreeBSD-src-438d9b3a8b99c5c9ff7fdbd4ddebe8b7e4854770.tar.gz
Run indent on all these files to make them more readable. (I also went
through by hand and cleaned up some indent bogons.)
Diffstat (limited to 'usr.sbin/pccard/pccardc/pccardmem.c')
-rw-r--r--usr.sbin/pccard/pccardc/pccardmem.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/usr.sbin/pccard/pccardc/pccardmem.c b/usr.sbin/pccard/pccardc/pccardmem.c
index 9ab239c..5174a7d 100644
--- a/usr.sbin/pccard/pccardc/pccardmem.c
+++ b/usr.sbin/pccard/pccardc/pccardmem.c
@@ -4,33 +4,30 @@
#include <sys/ioctl.h>
#include <pccard/card.h>
+
int
pccardmem_main(argc, argv)
-int argc;
-char *argv[];
+ int argc;
+ char *argv[];
{
-int addr = 0;
-int fd;
+ int addr = 0;
+ int fd;
- if (argc > 2)
- {
+ if (argc > 2) {
fprintf(stderr, "usage: %s [ memory-address ]\n", argv[0]);
exit(1);
- }
+ }
fd = open("/dev/card0", 0);
- if (fd < 0)
- {
+ if (fd < 0) {
perror("/dev/card0");
exit(1);
- }
- if (argc == 2)
- {
- if (sscanf(argv[1], "%x", &addr) != 1)
- {
+ }
+ if (argc == 2) {
+ if (sscanf(argv[1], "%x", &addr) != 1) {
fprintf(stderr, "arg error\n");
exit(1);
- }
}
+ }
if (ioctl(fd, PIOCRWMEM, &addr))
perror("ioctl");
else
OpenPOWER on IntegriCloud