summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard/pccardc/wrattr.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/wrattr.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/wrattr.c')
-rw-r--r--usr.sbin/pccard/pccardc/wrattr.c32
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, &reg))
- {
+ if (ioctl(fd, PIOCRWFLAG, &reg)) {
perror("ioctl (PIOCRWFLAG)");
exit(1);
- }
+ }
if (sscanf(argv[2], "%x", &reg) != 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);
OpenPOWER on IntegriCloud