From 6d34f701522d352c95e975863e39189ab37183be Mon Sep 17 00:00:00 2001 From: yongari Date: Wed, 22 Dec 2004 08:26:48 +0000 Subject: [PATCH] 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 --- usr.sbin/sade/devices.c | 14 ++++++++++++++ usr.sbin/sysinstall/devices.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index 42e9ee19e4ef..a2318c8e8ded 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -457,6 +457,20 @@ deviceGetAll(void) 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 42e9ee19e4ef..a2318c8e8ded 100644 --- a/usr.sbin/sysinstall/devices.c +++ b/usr.sbin/sysinstall/devices.c @@ -457,6 +457,20 @@ deviceGetAll(void) 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]);