]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
added -L <label> option to mkfs.xfs.
authorNathan Scott <nathans@sgi.com>
Tue, 1 May 2001 04:26:18 +0000 (04:26 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 1 May 2001 04:26:18 +0000 (04:26 +0000)
VERSION
debian/changelog
doc/CHANGES
man/man8/mkfs.xfs.8
mkfs/xfs_mkfs.c

diff --git a/VERSION b/VERSION
index b0acc8677df813aed68eb91f4287dba5045ad1a9..fdea923bb0d1fb9842a009af54032a0ee3713aa5 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=1
 PKG_MINOR=2
-PKG_REVISION=3
+PKG_REVISION=4
 PKG_BUILD=0
index 12f9c4fcb74410233cbaba9b2cd4b88770779134..95f89d3bb17632fb5ee8afd113a86c1a10da014b 100644 (file)
@@ -1,3 +1,9 @@
+xfsprogs (1.2.4) unstable; urgency=low
+
+  * Add -L option to mkfs.xfs (filesystem label)
+
+  -- Nathan Scott <nathans@debian.org>  Tue,  1 May 2001 14:03:14 +1000
+
 xfsprogs (1.2.3) unstable; urgency=low
 
   * Add dquot and quotaoff log item support into xfs_logprint
index 0968ef905cfc4e01b6b3e57123d09a2994b44815..996143818948e28a10b80b2b8d7dab87b234cb21 100644 (file)
@@ -1,4 +1,7 @@
 
+xfsprogs-1.2.4 (01 May 2001)
+       - added -L option to mkfs.xfs (filesystem label)
+
 xfsprogs-1.2.3 (27 April 2001)
        - add dquot and quotaoff log item support into xfs_logprint
        - fix logprint core dump reporting AGI in "continue"'d transactions
index 7e9f3939b752d44b909b1b585203bb3f33bdc920..4461bd95fd86133612eaad039116ee4c35fc33d8 100644 (file)
@@ -3,12 +3,10 @@
 mkfs.xfs \- construct an XFS filesystem
 .SH SYNOPSIS
 .nf
-\f3mkfs.xfs\f1 [ \f3\-b\f1 subopt=value ] \c
-[ \f3\-d\f1 subopt[=value] ] [ \f3\-i\f1 subopt=value ]
-       [ \f3\-l\f1 subopt[=value] ] \c
-[ \f3\-n\f1 subopt[=value] ] \c
-[ \f3\-p\f1 protofile ] [ \f3\-q\f1 ] 
-       [ \f3\-r\f1 subopt[=value] ] [ \f3\-C\f1 ] device
+\f3mkfs.xfs\f1 [ \f3\-b\f1 subopt=value ] [ \f3\-d\f1 subopt[=value] ]
+       [ \f3\-i\f1 subopt=value ] [ \f3\-l\f1 subopt[=value] ]
+       [ \f3\-n\f1 subopt[=value] ] [ \f3\-p\f1 protofile ] [ \f3\-q\f1 ]
+       [ \f3\-r\f1 subopt[=value] ] [ \f3\-C\f1 ] [ \f3\-L\f1 label ] device
 .fi
 .SH DESCRIPTION
 .I mkfs.xfs
@@ -490,7 +488,21 @@ to the command's execution time.  For situations where command performance is
 necessary, this switch may be used to disable the safeguards.  Due to the
 potential for user-error causing corrupted filesystems or other on-disk
 data corruption, we strongly discourage use of this switch in normal operation.
+.TP
+\f3\-L\f1 \f2label\f1
+Set the filesystem label.
+XFS filesystem labels can be at most 12 characters long; if
+.I label
+is longer than 12 characters,
+.I mkfs.xfs
+will not proceed with creating the filesystem.  Refer to the
+.IR mount (8)
+and
+.IR xfs_admin (8)
+manual entries for additional information.
 .SH SEE ALSO
-mkfs(8).
+mkfs(8),
+mount(8),
+xfs_admin(8).
 .SH BUGS
 With a prototype file, it is not possible to specify hard links.
index 28d3d8118867f4b9d93ce483860bec9c16db7527..92dfecebfc07bc2d76c8bdc059b31c622fbce2e2 100644 (file)
@@ -406,6 +406,7 @@ main(int argc, char **argv)
        int                     ipflag;
        int                     isflag;
        int                     isize;
+       char                    *label = NULL;
        int                     laflag;
        int                     lalign;
        int                     ldflag;
@@ -474,7 +475,7 @@ main(int argc, char **argv)
        force_fs_overwrite = 0;
        worst_freelist = 0;
 
-       while ((c = getopt(argc, argv, "b:d:i:l:n:p:qr:CfV")) != EOF) {
+       while ((c = getopt(argc, argv, "b:d:i:l:L:n:p:qr:CfV")) != EOF) {
                switch (c) {
                case 'C':
                        do_overlap_checks = 0;
@@ -761,6 +762,11 @@ main(int argc, char **argv)
                                }
                        }
                        break;
+               case 'L':
+                       if (strlen(optarg) > sizeof(sbp->sb_fname))
+                               illegal(optarg, "L");
+                       label = optarg;
+                       break;
                case 'n':
                        p = optarg;
                        while (*p != '\0') {
@@ -1502,6 +1508,8 @@ main(int argc, char **argv)
                }
        } else
                logstart = 0;
+       if (label)
+               strncpy(sbp->sb_fname, label, sizeof(sbp->sb_fname));
        sbp->sb_magicnum = XFS_SB_MAGIC;
        sbp->sb_blocksize = blocksize;
        sbp->sb_dblocks = dblocks;
@@ -1982,13 +1990,14 @@ usage(void)
 /* inode size */       [-i log=n|perblock=n|size=num,maxpct=n]\n\
 /* log subvol */       [-l agnum=n,internal,size=num,logdev=xxx]\n\
 /* naming */           [-n log=n|size=num|version=n]\n\
+/* label */            [-L label (maximum 12 characters)]\n\
 /* prototype file */   [-p fname]\n\
 /* quiet */            [-q]\n\
 /* version */          [-V]\n\
 /* realtime subvol */  [-r extsize=num,size=num,rtdev=xxx]\n\
                        devicename\n\
 devicename is required unless -d name=xxx is given\n\
-internal 1000 block log is default unless overridden or using a volume\
+internal 1000 block log is default unless overridden or using a volume\n\
 manager with log\n\
 num is xxx (bytes), or xxxb (blocks), or xxxk (xxx KB), or xxxm (xxx MB)\n\
 value is xxx (512 blocks)\n",