Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ofw Fix __HAVE_OLD_DISKLABEL bits so they at least c...
details: https://anonhg.NetBSD.org/src/rev/307b373b5648
branches: trunk
changeset: 744184:307b373b5648
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jan 26 21:43:52 2020 +0000
description:
Fix __HAVE_OLD_DISKLABEL bits so they at least compile.
diffstat:
sys/dev/ofw/ofdisk.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 5c394f571d79 -r 307b373b5648 sys/dev/ofw/ofdisk.c
--- a/sys/dev/ofw/ofdisk.c Sun Jan 26 19:08:09 2020 +0000
+++ b/sys/dev/ofw/ofdisk.c Sun Jan 26 21:43:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdisk.c,v 1.53 2019/03/27 19:13:34 martin Exp $ */
+/* $NetBSD: ofdisk.c,v 1.54 2020/01/26 21:43:52 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.53 2019/03/27 19:13:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.54 2020/01/26 21:43:52 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -404,11 +404,11 @@
error = setdisklabel(of->sc_dk.dk_label,
lp, /*of->sc_dk.dk_openmask */0,
of->sc_dk.dk_cpulabel);
- if (error == 0 && cmd == DIOCWDINFO
+ if (error == 0 && (cmd == DIOCWDINFO
#ifdef __HAVE_OLD_DISKLABEL
- || xfer == ODIOCWDINFO
+ || cmd == ODIOCWDINFO
#endif
- )
+ ))
error = writedisklabel(MAKEDISKDEV(major(dev),
DISKUNIT(dev), RAW_PART), ofdisk_strategy,
of->sc_dk.dk_label, of->sc_dk.dk_cpulabel);
@@ -422,7 +422,7 @@
ofdisk_getdefaultlabel(of, (struct disklabel *)data);
return 0;
#ifdef __HAVE_OLD_DISKLABEL
- case DIOCGDEFLABEL:
+ case ODIOCGDEFLABEL:
ofdisk_getdefaultlabel(of, &newlabel);
if (newlabel.d_npartitions > OLDMAXPARTITIONS)
return ENOTTY;
Home |
Main Index |
Thread Index |
Old Index