summaryrefslogtreecommitdiff
path: root/misc/e2label.c
Commit message (Collapse)AuthorAgeFilesLines
* mmp: abstract out repeated 'sizeof(buf), buf' usageAndreas Dilger2020-01-241-1/+1
| | | | | | | | | | | | | | | | | | | The printf("%.*s") format requires both the buffer size and buffer pointer to be specified for each use. Since this is repeatedly given as "(int)sizeof(buf), (char *)buf" for mmp_nodename and mmp_bdevname fields, with typecasts to avoid compiler warnings. Add a helper macro EXT2_LEN_STR() to avoid repeated boilerplate code. This can also be used for other superblock buffer fields that may not have NUL-terminated strings (e.g. s_volume_name, s_last_mounted, s_{first,last}_error_func, s_mount_opts) to simplify code and avoid the need for temporary buffers for NUL-termination. Annotate the superblock string fields that may not be NUL-terminated. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Move the check_plausibility() function from misc to lib/supportTheodore Ts'o2015-07-121-1/+1
| | | | | | | | The check_plausibility() function is now used all over the place, so we should move the plausible.c file to lib/support and remove the special case handling for that file that had been in the build system. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Shorten compile commands run by the build systemTheodore Ts'o2011-09-181-0/+1
| | | | | | | | | | | | | | | The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Remove trailing whitespace for the entire source treeTheodore Ts'o2008-08-271-1/+1
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Many files:Theodore Ts'o2000-04-031-0/+3
| | | | | | | | | | | | | badblocks.c, dumpe2fs.c, e2label.c, mke2fs.c, tune2fs.c, uuidgen.c: For platforms that don't define optarg.h, manually define optarg and optind. ChangeLog, main.c: main.c: For platforms that don't define optarg.h, manually define optarg and optind. ChangeLog, unix.c: unix.c: For platforms that don't define optarg.h, manually define optarg and optind.
* Many files:Theodore Ts'o2000-02-081-8/+9
| | | | | | | | | badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c, fsck.c, get_device_by_label.c, lsattr.c, mke2fs.c, mklost+found.c, nls-enable.h, partinfo.c, tune2fs.c, uuidgen.c: Add Internationalization support as suggested by Marco d'Itri <md@linux.it>.
* Many files:Theodore Ts'o1998-03-301-10/+18
| | | | | | | | | | | | | | | | | e2label.c: Fix -Wall warning by making functions static. chattr.1.in: Document that the append-only attribute may only be set or cleared by the superuser. Update all manual pages to that the availability section is up-to-date. e2label.8.in, tune2fs.8.in: Update manual page to state that labels must be no longer than 16 characters, or they will be truncated. e2label.c (change_label), tune2fs.c (main): If the label is longer than 16 characters, print a warning message stating that the label will be truncated. mke2fs.c (PRS): If the user specifies a filesystem size, and it's larger than the apparent size of the device, print a warning message and ask if the user wants to proceed.
* Many files:Theodore Ts'o1997-11-031-1/+17
| | | | | | | | | resize2fs.c, ext2_block_move.c ext2_inode_move.c: Only include printf statements if RESIZE2FS_DEBUG is defined. main.c: Don't read in the bitmaps since resize2fs.c does that. e2label.c, mke2fs.c: Adjust header files.
* ChangeLog, Makefile.in, e2label.c:Theodore Ts'o1997-07-141-0/+92
e2label.c: New file contributed by Andries Brouwer which provides an easy-to-use interface to modify the filesystem label.