diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-09-05 00:48:40 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-09-05 00:48:40 +0000 |
commit | fce0339e25d60b70523c3fd6ca778dff89e93720 (patch) | |
tree | 37a2e8f87296691dad5043704e04d2c61f6377de /sys/arch/vax/vsa | |
parent | fc28b8935aa496ce905d6b41cd4f1e1f5fd33064 (diff) |
Make DIOCSDINFO code consistant everywhere.
ok miod@ deraadt@
Diffstat (limited to 'sys/arch/vax/vsa')
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index 10151a5eae3..126cf8700a6 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.24 2009/08/13 15:23:13 deraadt Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.25 2009/09/05 00:48:39 krw Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -715,10 +715,11 @@ hdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) case DIOCSDINFO: if ((flag & FWRITE) == 0) return EBADF; - else - err = (cmd == DIOCSDINFO ? - setdisklabel(lp, (struct disklabel *)addr, 0) : - writedisklabel(dev, hdstrategy, lp)); + error = setdisklabel(lp, (struct disklabel *)addr, 0) : + if (error == 0) { + if (cmd == DIOCWDINFO) + error = writedisklabel(dev, hdstrategy, lp)); + } break; case DIOCWLABEL: |