e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c, uuidgen.c: Fix
gcc -Wall complaints, including one bug in tune2fs caused by a block
automatic shadowing version of the variable we really wanted to use,
which broke the logic testing to see if the filesystem was mounted.
ChangeLog, MCONFIG.in:
(gcc-wall-new): Added new target which forgoes the make clean so we
only check the newly modified .c files.
Makefile.in, tune2fs.c: Move e2label functionality into tune2fs, using
argv[0] as a dispatch. This allows e2label to be (more) safely used
on mounted filesystems.
tune2fs.c (update_feature_set, add_journal): Moved to separate
functions. Added ability to add and remove the journal while the
filesystem is live. Added support for setting a time-based UUID.
Removed zero-initialized static variables.
mke2fs.c, util.c, util.h (strcasecmp, proceed_question,
check_plausibility, parse_journal_opts, check_mount): Moved functions
to util.c so they can be used by tune2fs.
mke2fs.c (main): Change ext2fs_add_journal_fs() to
ext2fs_add_journal_inode() to reflect function renaming.
tune2fs.c (main): Add support to allow HAS_JOURNAL flag to be cleared,
but only if the filesystem is unmounted or mounted read-only. Changed
struct ext2fs_sb to struct ext2_super, and cleaned up old code which
was needed for old versions of ext2_fs.h (not needed since we're using
our own version now).
tune2fs.8.in: Update manual page to document what happens if
max_mount_count is negative.
tune2fs.c (main): Allow setting the maximal count value to be
negative, since the kernel interprets that as forcing a check.
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.
chattr.1.in:
lsattr.1.in: Change "version" to "version/generation number".
chattr.1.in: Fix stupid file vs filesystem typo.
tune2fs.c Fix spelling error (spare vs sparse).
mke2fs.c (PRS): Add safety check to make sure the number of blocks
doesn't exceed 32 bits on a 64 bit machine.
chattr.c: Random cleanup; file-only variables are now static. Options
for setting/clearings flags put into order, and #ifdef's removed
(since we now use a built-in header file). Add error message if user
tries to set and reset the same flag.
lsattr.c: Random cleanup; file-only variables are now static. The -l
"long" listing has been changed to look nicer. Options names have
been renamed to be more descriptive.
tune2fs.c (main): Add a new option -O which allows the user to set and
clear certain "safe" filsystem feature flags. Currently, the only
ones which are supported for modification are sparse_superblock and
filetype.
mke2fs.c (PRS): Add new option -O which allows the user to request
filesystems with specific filesystem options. By default on 2.2 and
later systems, create filesystems that have both file type information
and sparse superblocks.
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
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.
fsck.c:
chattr.c: Remove #include of getopt.h, since it's not needed.
tune2fs.c (main):
lsattr.c (main):
badblocks.c (main):
dumpe2fs.c (main):
mke2fs.c (PRS): Make the variable which getopt returns into be
an int, so that it won't lose on platforms where char is
unsigned.
ChangeLog, unix.c:
Make the variable which getopt returns into be an int, so that it
won't lose on platforms where char is unsigned.
Declare main() to return an int, as required. Make sure main() always
ends with an exit(0). (Some programs weren't doing this, and thus
were returning a random exit value.)