From: Matthew Dillon Date: Sun, 14 Feb 2010 19:37:31 +0000 (-0800) Subject: disklabel[32,64] utilities - Change the default disklabel program X-Git-Tag: v2.7.1~143 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ce19f97efcf130f92584e26e103c6af738f16e0b disklabel[32,64] utilities - Change the default disklabel program * 'disklabel' is now the 64-bit disklabel program. * The 32 bit disklabel program can be accessed via 'disklabel32' * The 64 bit disklabel program can also be accessed via 'disklabel64' --- diff --git a/sbin/Makefile b/sbin/Makefile index b380006..4da27c9 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -15,7 +15,7 @@ SUBDIR= adjkerntz \ devd \ devfsctl \ dhclient \ - disklabel \ + disklabel32 \ disklabel64 \ diskinfo \ dmesg \ diff --git a/sbin/disklabel/Makefile b/sbin/disklabel32/Makefile similarity index 82% rename from sbin/disklabel/Makefile rename to sbin/disklabel32/Makefile index f428f2a..5435f60 100644 --- a/sbin/disklabel/Makefile +++ b/sbin/disklabel32/Makefile @@ -2,8 +2,8 @@ # $FreeBSD: src/sbin/disklabel/Makefile,v 1.3.14.3 2001/04/25 10:58:15 ru Exp $ # $DragonFly: src/sbin/disklabel/Makefile,v 1.5 2006/10/17 02:18:51 pavalos Exp $ -PROG= disklabel +PROG= disklabel32 SRCS= disklabel.c -MAN= disklabel.5 disklabel.8 +MAN= disklabel32.5 disklabel32.8 .include diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel32/disklabel.c similarity index 99% rename from sbin/disklabel/disklabel.c rename to sbin/disklabel32/disklabel.c index deb78c5..5c51819 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel32/disklabel.c @@ -404,7 +404,7 @@ writelabel(int f, const char *boot, struct disklabel32 *lp) return (1); } lseek(f, (off_t)0, SEEK_SET); - + /* * write enable label sector before write * (if necessary), disable after writing. @@ -1417,7 +1417,7 @@ checklabel(struct disklabel32 *lp) } } else { /* allow them to be out of order for old-style tables */ - if (pp->p_offset < current_offset && + if (pp->p_offset < current_offset && seen_default_offset && i != RAW_PART && pp->p_fstype != FS_VINUM) { fprintf(stderr, @@ -1428,8 +1428,8 @@ checklabel(struct disklabel32 *lp) errors++; } else if (pp->p_offset != current_offset && i != RAW_PART && seen_default_offset) { - /* - * this may give unneeded warnings if + /* + * this may give unneeded warnings if * partitions are out-of-order */ Warning( @@ -1438,7 +1438,7 @@ checklabel(struct disklabel32 *lp) } } if (i != RAW_PART) - current_offset = pp->p_offset + pp->p_size; + current_offset = pp->p_offset + pp->p_size; } } @@ -1487,7 +1487,7 @@ checklabel(struct disklabel32 *lp) /* this will check for all possible overlaps once and only once */ for (j = 0; j < i; j++) { pp2 = &lp->d_partitions[j]; - if (j != RAW_PART && i != RAW_PART && + if (j != RAW_PART && i != RAW_PART && pp->p_fstype != FS_VINUM && pp2->p_fstype != FS_VINUM && part_set[i] && part_set[j]) { diff --git a/sbin/disklabel/disklabel.5 b/sbin/disklabel32/disklabel32.5 similarity index 100% rename from sbin/disklabel/disklabel.5 rename to sbin/disklabel32/disklabel32.5 diff --git a/sbin/disklabel/disklabel.8 b/sbin/disklabel32/disklabel32.8 similarity index 100% rename from sbin/disklabel/disklabel.8 rename to sbin/disklabel32/disklabel32.8 diff --git a/sbin/disklabel/pathnames.h b/sbin/disklabel32/pathnames.h similarity index 100% rename from sbin/disklabel/pathnames.h rename to sbin/disklabel32/pathnames.h diff --git a/sbin/disklabel64/Makefile b/sbin/disklabel64/Makefile index 8d93b09..10f9486 100644 --- a/sbin/disklabel64/Makefile +++ b/sbin/disklabel64/Makefile @@ -6,4 +6,8 @@ PROG= disklabel64 SRCS= disklabel64.c crc32.c MAN= disklabel64.5 disklabel64.8 +LINKS= ${BINDIR}/disklabel64 ${BINDIR}/disklabel +MLINKS+= disklabel64.8 disklabel.8 +MLINKS+= disklabel64.5 disklabel.5 + .include