summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2004-12-22 08:26:48 +0000
committeryongari <yongari@FreeBSD.org>2004-12-22 08:26:48 +0000
commit98dec7d2517d3e3596a4d9e1ab48836d980bc506 (patch)
tree77738a015df1912c83bb17e10301990e855630f7
parent4b0d04a9a626b656487a932a0a37fca8e2eed06e (diff)
downloadFreeBSD-src-98dec7d2517d3e3596a4d9e1ab48836d980bc506.zip
FreeBSD-src-98dec7d2517d3e3596a4d9e1ab48836d980bc506.tar.gz
Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
disk. This is main reason why sysinstall presents SCSI CDROM to available disks in Fdisk/Label menu. In addition, adding a blank SCSI CDROM to the menu generates floating point exception in sparc64. Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI CDROM as a disk is beyond me and that should be investigated. For temporary workaround, ignore SCSI CDROM device. PR: sparc64/72962 Tested by: R. Tyler Ballance < tyler AT tamu DOT edu> MFC after: 1 week
-rw-r--r--usr.sbin/sade/devices.c14
-rw-r--r--usr.sbin/sysinstall/devices.c14
2 files changed, 28 insertions, 0 deletions
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index 42e9ee1..a2318c8 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -457,6 +457,20 @@ skipif:
if (!strncmp(names[i], "md", 2))
continue;
+ /*
+ * XXX
+ * Due to unknown reasons, Disk_Names() returns SCSI CDROM as a
+ * valid disk. This is main reason why sysinstall presents SCSI
+ * CDROM to available disks in Fdisk/Label menu. In addition,
+ * adding a blank SCSI CDROM to the menu generates floating point
+ * exception in sparc64. Disk_Names() just extracts sysctl
+ * "kern.disks". Why GEOM treats SCSI CDROM as a disk is beyond
+ * me and that should be investigated.
+ * For temporary workaround, ignore SCSI CDROM device.
+ */
+ if (!strncmp(names[i], "cd", 2))
+ continue;
+
d = Open_Disk(names[i]);
if (!d) {
msgDebug("Unable to open disk %s\n", names[i]);
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index 42e9ee1..a2318c8 100644
--- a/usr.sbin/sysinstall/devices.c
+++ b/usr.sbin/sysinstall/devices.c
@@ -457,6 +457,20 @@ skipif:
if (!strncmp(names[i], "md", 2))
continue;
+ /*
+ * XXX
+ * Due to unknown reasons, Disk_Names() returns SCSI CDROM as a
+ * valid disk. This is main reason why sysinstall presents SCSI
+ * CDROM to available disks in Fdisk/Label menu. In addition,
+ * adding a blank SCSI CDROM to the menu generates floating point
+ * exception in sparc64. Disk_Names() just extracts sysctl
+ * "kern.disks". Why GEOM treats SCSI CDROM as a disk is beyond
+ * me and that should be investigated.
+ * For temporary workaround, ignore SCSI CDROM device.
+ */
+ if (!strncmp(names[i], "cd", 2))
+ continue;
+
d = Open_Disk(names[i]);
if (!d) {
msgDebug("Unable to open disk %s\n", names[i]);
OpenPOWER on IntegriCloud