svn commit: r237354 - user/ae/bootcode/sys/boot/i386/libi386
Andrey V. Elsukov
ae at FreeBSD.org
Thu Jun 21 04:39:11 UTC 2012
Author: ae
Date: Thu Jun 21 04:39:10 2012
New Revision: 237354
URL: http://svn.freebsd.org/changeset/base/237354
Log:
BD_LABELOK flag was removed, also internal information from disklabel
now isn't accessible. So, remove its last usage. It seems that doesn't
matter is it SCSI or IDE disk.
Modified:
user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c
Modified: user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c Thu Jun 21 04:28:57 2012 (r237353)
+++ user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c Thu Jun 21 04:39:10 2012 (r237354)
@@ -808,7 +808,7 @@ bd_getdev(struct i386_devdesc *dev)
int major;
int rootdev;
char *nip, *cp;
- int unitofs = 0, i, unit;
+ int i, unit;
biosdev = bd_unit2bios(dev->d_unit);
DEBUG("unit %d BIOS device %d", dev->d_unit, biosdev);
@@ -827,24 +827,11 @@ bd_getdev(struct i386_devdesc *dev)
major = FDMAJOR;
}
} else {
- /* harddisk */
- if ((od->od_flags & BD_LABELOK) && (od->od_disklabel.d_type == DTYPE_SCSI)) {
- /* label OK, disk labelled as SCSI */
- major = DAMAJOR;
- /* check for unit number correction hint, now deprecated */
- if ((nip = getenv("num_ide_disks")) != NULL) {
- i = strtol(nip, &cp, 0);
- /* check for parse error */
- if ((cp != nip) && (*cp == 0))
- unitofs = i;
- }
- } else {
/* assume an IDE disk */
major = WDMAJOR;
- }
}
/* default root disk unit number */
- unit = (biosdev & 0x7f) - unitofs;
+ unit = biosdev & 0x7f;
/* XXX a better kludge to set the root disk unit number */
if ((nip = getenv("root_disk_unit")) != NULL) {
More information about the svn-src-user
mailing list