Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/qbus Pull up revisions 1.6-1.7 (requested by fv...
details: https://anonhg.NetBSD.org/src/rev/76e9a87a0fa0
branches: netbsd-1-5
changeset: 491532:76e9a87a0fa0
user: he <he%NetBSD.org@localhost>
date: Tue May 01 12:27:29 2001 +0000
description:
Pull up revisions 1.6-1.7 (requested by fvdl):
Increase the number of BSD disklabel partitions on i386 to 16.
diffstat:
sys/dev/qbus/rl.c | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diffs (71 lines):
diff -r 0bc7848228ac -r 76e9a87a0fa0 sys/dev/qbus/rl.c
--- a/sys/dev/qbus/rl.c Tue May 01 12:27:26 2001 +0000
+++ b/sys/dev/qbus/rl.c Tue May 01 12:27:29 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rl.c,v 1.5 2000/06/05 00:09:18 matt Exp $ */
+/* $NetBSD: rl.c,v 1.5.2.1 2001/05/01 12:27:29 he Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -379,12 +379,24 @@
struct rl_softc *rc = rl_cd.cd_devs[DISKUNIT(dev)];
struct disklabel *lp = rc->rc_disk.dk_label;
int err = 0;
+#ifdef __HAVE_OLD_DISKLABEL
+ struct disklabel newlabel;
+#endif
switch (cmd) {
case DIOCGDINFO:
bcopy(lp, addr, sizeof (struct disklabel));
break;
+#ifdef __HAVE_OLD_DISKLABEL
+ case ODIOCGDINFO:
+ newlabel = *lp;
+ if (newlabel.d_npartitions > OLDMAXPARTITIONS)
+ return ENOTTY;
+ bcopy(&newlabel, addr, sizeof (struct olddisklabel));
+ break;
+#endif
+
case DIOCGPART:
((struct partinfo *)addr)->disklab = lp;
((struct partinfo *)addr)->part =
@@ -393,13 +405,34 @@
case DIOCSDINFO:
case DIOCWDINFO:
+#ifdef __HAVE_OLD_DISKLABEL
+ case ODIOCWDINFO:
+ case ODIOCSDINFO:
+#endif
+ {
+ struct disklabel *tp;
+
+#ifdef __HAVE_OLD_DISKLABEL
+ if (cmd == ODIOCSDINFO || cmd == ODIOCWDINFO) {
+ memset(&newlabel, 0, sizeof newlabel);
+ memcpy(&newlabel, addr, sizeof (struct olddisklabel));
+ tp = &newlabel;
+ } else
+#endif
+ tp = (struct disklabel *)addr;
+
if ((flag & FWRITE) == 0)
err = EBADF;
else
- err = (cmd == DIOCSDINFO ?
- setdisklabel(lp, (struct disklabel *)addr, 0, 0) :
+ err = ((
+#ifdef __HAVE_OLD_DISKLABEL
+ cmd == ODIOCSDINFO ||
+#endif
+ cmd == DIOCSDINFO) ?
+ setdisklabel(lp, tp, 0, 0) :
writedisklabel(dev, rlstrategy, lp, 0));
break;
+ }
case DIOCWLABEL:
if ((flag & FWRITE) == 0)
Home |
Main Index |
Thread Index |
Old Index