From ce19f97efcf130f92584e26e103c6af738f16e0b Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 14 Feb 2010 11:37:31 -0800 Subject: [PATCH] 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' --- sbin/Makefile | 2 +- sbin/{disklabel => disklabel32}/Makefile | 4 ++-- sbin/{disklabel => disklabel32}/disklabel.c | 12 ++++++------ .../disklabel.5 => disklabel32/disklabel32.5} | 0 .../disklabel.8 => disklabel32/disklabel32.8} | 0 sbin/{disklabel => disklabel32}/pathnames.h | 0 sbin/disklabel64/Makefile | 4 ++++ 7 files changed, 13 insertions(+), 9 deletions(-) rename sbin/{disklabel => disklabel32}/Makefile (82%) rename sbin/{disklabel => disklabel32}/disklabel.c (99%) rename sbin/{disklabel/disklabel.5 => disklabel32/disklabel32.5} (100%) rename sbin/{disklabel/disklabel.8 => disklabel32/disklabel32.8} (100%) rename sbin/{disklabel => disklabel32}/pathnames.h (100%) diff --git a/sbin/Makefile b/sbin/Makefile index b380006419..4da27c90b8 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 f428f2a40e..5435f60fee 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 deb78c5091..5c51819c16 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 8d93b09f7d..10f948667e 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 -- 2.41.0