diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-10-14 18:26:56 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-10-14 18:26:56 +0000 |
commit | 96ee2c0ce14e00c10965754a14657eea70d67843 (patch) | |
tree | cc217d277d268d85e06d38959173bc74744c8bee /sbin/disklabel/disklabel.c | |
parent | 8bfacbeb6c30a242d3201d81f7b40115a8284653 (diff) |
Friends don't let friends look for disklabels in Free/NetBSD MBR
partitions since the kernel doesn't put them or look for them there
anymore.
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-rw-r--r-- | sbin/disklabel/disklabel.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 22e68636fcb..86e1099a972 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.101 2006/09/27 00:40:43 krw Exp $ */ +/* $OpenBSD: disklabel.c,v 1.102 2006/10/14 18:26:55 krw Exp $ */ /* * Copyright (c) 1987, 1993 @@ -39,7 +39,7 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.101 2006/09/27 00:40:43 krw Exp $"; +static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.102 2006/10/14 18:26:55 krw Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -418,10 +418,7 @@ writelabel(int f, char *boot, struct disklabel *lp) * In this case, partition 'a' had better start at 0, * otherwise we reject the request as meaningless. -wfj */ - if (dosdp && pp->p_size && - (dosdp->dp_typ == DOSPTYP_OPENBSD || - dosdp->dp_typ == DOSPTYP_FREEBSD || - dosdp->dp_typ == DOSPTYP_NETBSD)) { + if (dosdp && pp->p_size && (dosdp->dp_typ == DOSPTYP_OPENBSD)) { sectoffset = (off_t)letoh32(dosdp->dp_start) * lp->d_secsize; } else { @@ -624,24 +621,6 @@ readmbr(int f) return (&dp[part]); } } - for (part = 0; part < NDOSPART; part++) { - if (letoh32(dp[part].dp_size) && dp[part].dp_typ == DOSPTYP_FREEBSD) { - fprintf(stderr, "# Inside MBR partition %d: " - "type %02X start %u size %u\n", - part, dp[part].dp_typ, - letoh32(dp[part].dp_start), letoh32(dp[part].dp_size)); - return (&dp[part]); - } - } - for (part = 0; part < NDOSPART; part++) { - if (letoh32(dp[part].dp_size) && dp[part].dp_typ == DOSPTYP_NETBSD) { - fprintf(stderr, "# Inside MBR partition %d: " - "type %02X start %u size %u\n", - part, dp[part].dp_typ, - letoh32(dp[part].dp_start), letoh32(dp[part].dp_size)); - return (&dp[part]); - } - } /* * If there is no signature and no OpenBSD partition this is probably |