diff options
author | nate <nate@FreeBSD.org> | 1996-04-10 05:45:39 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-04-10 05:45:39 +0000 |
commit | 438d9b3a8b99c5c9ff7fdbd4ddebe8b7e4854770 (patch) | |
tree | 580d0fe5a461edf85f2ed3d02c3097b9c8b6fe06 /usr.sbin/pccard/pccardc/wrattr.c | |
parent | 0e0a5fb0139e9f4d25a47e7f00e91be4653ac98d (diff) | |
download | FreeBSD-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/wrattr.c')
-rw-r--r-- | usr.sbin/pccard/pccardc/wrattr.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/usr.sbin/pccard/pccardc/wrattr.c b/usr.sbin/pccard/pccardc/wrattr.c index 5974119..50577d2 100644 --- a/usr.sbin/pccard/pccardc/wrattr.c +++ b/usr.sbin/pccard/pccardc/wrattr.c @@ -9,38 +9,34 @@ int wrattr_main(argc, argv) -int argc; -char *argv[]; + int argc; + char *argv[]; { -int reg,value; -char name[64], c; -int fd; -off_t offs; + int reg, value; + char name[64], c; + int fd; + off_t offs; - if (argc != 4) - { + if (argc != 4) { fprintf(stderr, "usage: wrmem slot offs value\n"); exit(1); - } + } sprintf(name, "/dev/card%d", atoi(argv[1])); fd = open(name, 2); - if (fd < 0) - { + if (fd < 0) { perror(name); exit(1); - } + } reg = MDF_ATTR; - if (ioctl(fd, PIOCRWFLAG, ®)) - { + if (ioctl(fd, PIOCRWFLAG, ®)) { perror("ioctl (PIOCRWFLAG)"); exit(1); - } + } if (sscanf(argv[2], "%x", ®) != 1 || - sscanf(argv[3], "%x", &value) != 1) - { + sscanf(argv[3], "%x", &value) != 1) { fprintf(stderr, "arg error\n"); exit(1); - } + } offs = reg; c = value; lseek(fd, offs, SEEK_SET); |