disklabel[32,64] utilities - Change the default disklabel program
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 14 Feb 2010 19:37:31 +0000 (11:37 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 14 Feb 2010 19:37:31 +0000 (11:37 -0800)
* '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
sbin/disklabel32/Makefile [moved from sbin/disklabel/Makefile with 82% similarity]
sbin/disklabel32/disklabel.c [moved from sbin/disklabel/disklabel.c with 99% similarity]
sbin/disklabel32/disklabel32.5 [moved from sbin/disklabel/disklabel.5 with 100% similarity]
sbin/disklabel32/disklabel32.8 [moved from sbin/disklabel/disklabel.8 with 100% similarity]
sbin/disklabel32/pathnames.h [moved from sbin/disklabel/pathnames.h with 100% similarity]
sbin/disklabel64/Makefile

index b380006..4da27c9 100644 (file)
@@ -15,7 +15,7 @@ SUBDIR=       adjkerntz \
        devd \
        devfsctl \
        dhclient \
-       disklabel \
+       disklabel32 \
        disklabel64 \
        diskinfo \
        dmesg \
similarity index 82%
rename from sbin/disklabel/Makefile
rename to sbin/disklabel32/Makefile
index f428f2a..5435f60 100644 (file)
@@ -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 <bsd.prog.mk>
similarity index 99%
rename from sbin/disklabel/disklabel.c
rename to sbin/disklabel32/disklabel.c
index deb78c5..5c51819 100644 (file)
@@ -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]) {
index 8d93b09..10f9486 100644 (file)
@@ -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 <bsd.prog.mk>