diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1999-08-28 12:10:13 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1999-08-28 12:10:13 +0000 |
| commit | 979b9153d4faf740ea0ef82e23699a474e735d30 (patch) | |
| tree | cffe086c71e189dc477cf5044369db0e1d8d7897 /usr.sbin | |
| parent | d447ab3427ba17ea50adef6e08a388fdf33962ee (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/sade/disks.c | 16 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/disks.c | 16 |
2 files changed, 12 insertions, 20 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index f820976a2dcb..fe4ee828b4a5 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -455,20 +455,16 @@ diskPartition(Device *dev) * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ -#if 0 - if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL - && (mbrContents = getBootMgr(d->name)) != NULL) - Set_Boot_Mgr(d, mbrContents); -#else /* * Don't offer to update the MBR on this disk if the first "real" chunk looks like * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. */ - if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && - (mbrContents = getBootMgr(d->name)) != NULL) - Set_Boot_Mgr(d, mbrContents); -#endif - + if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1))) + mbrContents = getBootMgr(d->name); + else + mbrContents = NULL; + Set_Boot_Mgr(d, mbrContents); + if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS) msgConfirm("Disk partition write returned an error status!"); else diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index f820976a2dcb..fe4ee828b4a5 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -455,20 +455,16 @@ diskPartition(Device *dev) * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ -#if 0 - if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL - && (mbrContents = getBootMgr(d->name)) != NULL) - Set_Boot_Mgr(d, mbrContents); -#else /* * Don't offer to update the MBR on this disk if the first "real" chunk looks like * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. */ - if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && - (mbrContents = getBootMgr(d->name)) != NULL) - Set_Boot_Mgr(d, mbrContents); -#endif - + if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1))) + mbrContents = getBootMgr(d->name); + else + mbrContents = NULL; + Set_Boot_Mgr(d, mbrContents); + if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS) msgConfirm("Disk partition write returned an error status!"); else |
