mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-27 03:54:19 +08:00
f85b4526f6
Implement support for FS_IOC_SETFSLABEL and FS_IOC_GETFSLABEL ioctls. Try to use the ioctls if possible even before we open the file system since we don't need it. Only fall back to the old method in the case the file system is not mounted, is mounted read only in the set label case, or the ioctls are not suppported by the kernel. The new ioctls can also be supported by file system drivers other than ext4. As a result tune2fs and e2label will work for those file systems as well as long as the file system is mounted. Note that we still truncate the label exceeds the supported lenghth on extN file system family, while we keep the label intact for others. Update tune2fs and e2label as well. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
59 lines
1.4 KiB
Groff
59 lines
1.4 KiB
Groff
.\" -*- nroff -*-
|
|
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
|
|
.\" This file may be copied under the terms of the GNU Public License.
|
|
.\"
|
|
.TH E2LABEL 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
|
|
.SH NAME
|
|
e2label \- Change the label on an ext2/ext3/ext4 file system
|
|
.SH SYNOPSIS
|
|
.B e2label
|
|
.I device
|
|
[
|
|
.I volume-label
|
|
]
|
|
.SH DESCRIPTION
|
|
.B e2label
|
|
will display or change the volume label on the ext2, ext3, or ext4
|
|
file system located on
|
|
.I device.
|
|
.PP
|
|
If the optional argument
|
|
.I volume-label
|
|
is not present,
|
|
.B e2label
|
|
will simply display the current volume label.
|
|
.PP
|
|
If the optional argument
|
|
.I volume-label
|
|
is present, then
|
|
.B e2label
|
|
will set the volume label to be
|
|
.IR volume-label .
|
|
Ext2 volume labels can be at most 16 characters long; if
|
|
.I volume-label
|
|
is longer than 16 characters,
|
|
.B e2label
|
|
will truncate it and print a warning message. For other file systems that
|
|
support online label manipulation and are mounted
|
|
.B e2label
|
|
will work as well, but it will not attempt to truncate the
|
|
.I volume-label
|
|
at all.
|
|
.PP
|
|
It is also possible to set the volume label using the
|
|
.B \-L
|
|
option of
|
|
.BR tune2fs (8).
|
|
.PP
|
|
.SH AUTHOR
|
|
.B e2label
|
|
was written by Theodore Ts'o (tytso@mit.edu).
|
|
.SH AVAILABILITY
|
|
.B e2label
|
|
is part of the e2fsprogs package and is available from
|
|
http://e2fsprogs.sourceforge.net.
|
|
.SH SEE ALSO
|
|
.BR mke2fs (8),
|
|
.BR tune2fs (8)
|
|
|