summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-10-05 00:39:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-10-05 00:39:28 +0000
commit7dc47b08c8935b36c594692788aa758c646b2ce6 (patch)
treebd1b1fb3f80dca69c88b805c4e05f7f9de2952d4
parent4158dd1a40ddb031493325f0dfbfebbd1b4eaa04 (diff)
make DIOCGPDINFO equivalent to DIOCGDINFO for cd's
-rw-r--r--sys/dev/isa/mcd.c10
-rw-r--r--sys/scsi/cd.c11
2 files changed, 4 insertions, 17 deletions
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 023bbff9b54..fd4e85e6d4a 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.26 1998/10/04 21:25:41 millert Exp $ */
+/* $OpenBSD: mcd.c,v 1.27 1998/10/05 00:39:27 millert Exp $ */
/* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */
/*
@@ -608,14 +608,8 @@ mcdioctl(dev, cmd, addr, flag, p)
return EIO;
switch (cmd) {
- case DIOCGPDINFO: {
- struct cpu_disklabel osdep;
-
- mcdgetdisklabel(dev, sc, (struct disklabel *)addr,
- &osdep, 1);
- return 0;
- }
case DIOCGDINFO:
+ case DIOCGPDINFO:
*(struct disklabel *)addr = *(sc->sc_dk.dk_label);
return 0;
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index cb50bb78742..e2d5d34bf71 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.34 1998/10/04 01:37:55 millert Exp $ */
+/* $OpenBSD: cd.c,v 1.35 1998/10/05 00:39:27 millert Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -728,15 +728,8 @@ cdioctl(dev, cmd, addr, flag, p)
return EIO;
switch (cmd) {
- case DIOCGPDINFO: {
- struct cpu_disklabel osdep;
-
- cdgetdisklabel(dev, cd, (struct disklabel *)addr,
- &osdep, 1);
- return 0;
- }
-
case DIOCGDINFO:
+ case DIOCGPDINFO:
*(struct disklabel *)addr = *(cd->sc_dk.dk_label);
return 0;