tune2fs.c (update_feature_set): Allow directory indexing flag to
be set. If so, set the default hash to be TEA, and
initialize the hash seed to a random value.
function in get_device_by_label.c to allow the use of
UUID= or LABEL= when creating filesystems which use external
journal dev (e.g. mke2fs -J device=LABEL=<journal_label>).
tune2fs.c: Use superblock s_journal_uuid to locate an external
journal device instead of s_journal_dev when removing it.
Allow opening journal devices to set the label and UUID
in the ext2 superblock.
mke2fs.c, tune2fs.c: Free journal_device after use, as it is
malloc'd in interpret spec.
removing an in-filesystem journal, clear out the journal
inode and update the filesystem accounting structures so
we don't have to run e2fsck to clean up after ourselves
tune2fs.c, mke2fs.c, util.c, util.h (print_check_message): Move the
message which displays how often the filesystem will be checked from
mke2fs into a utility subroutine. Then cause tune2fs to call that
function to display the message after adding a journal to a
filesystem.
mke2fs.8.in: Add manual page fixups and explanation for why it's good
to check filesystems periodically from Andreas Dilger.
badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c, lsattr.c,
mke2fs.c, mklost+found.c, tune2fs.c, util.c: Change location of
ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, resize2fs.h:
resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, debugfs.h:
debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, e2fsck.h, scantest.c:
e2fsck.h, scantest.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
ChangeLog, Makefile.in, tst_uuid.c, uuid_time.c:
tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
ChangeLog, Makefile.in, e2p.h:
e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
Clarify some of the Changelog entries.
ChangeLog, fsck.8.in, mke2fs.8.in, tune2fs.8.in:
fsck.8.in, mke2fs.8.in, tune2fs.8.in: Fix typo's and make other
clarifications suggested by Andreas Dilger.
ChangeLog, tune2fs.c:
tune2fs.c (update_feature_set): Clean up some printf messages.
tune2fs.c (parse_tune2fs_options): Interpret -c 0 as -c -1 (for
backwards compatibility with older kernels). -c 0 makes more sense to
users.
tune2fs.8.in:
Update tune2fs manual papge so that it is up to date.
tune2fs.c (remove_journal_device): If the force flag is given, tune2fs
will remove the journal device information from the superblock even if
tune2fs failed to open the journal device or otherwise other failed to
remove the filesystem from journal device.
(parse_tune2fs_options): Fix -j option so that it works (it was
missing the open_flag being set to EXT2_FLAG_RW).
(main): Accept "-U clear" to set a null UID.
ke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
journal must be bewteen 1024 and 10,240 file system blocks.
mke2fs.c, tune2fs.c: Change to use figure_journal_size()
util.c, util.h (figure_journal_size): Change journal_default_size into
routine which also converts the requested journal size into filesystem
blocks and does bounds checking to make sure the journal is sized
reasonably. Renamed function to journal_default_size.
parse_journal_opts): Remove bounds check for the journal size, since
this is now done in figure_journal_size, and based on the number of
filesystem blocks, as opposed to using the absolute size of the
journal.
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
tune2fs.c: Changed the external journal code so that it simply adds a
filesystem to a journal; the journal must have bene created via
"mke2fs -O journal_dev /dev/XXX".
mke2fs.c: Add support for creating an external journal device by using
the command "mke2fs -O journal_dev /dev/XXX". Also changed the
external journal code so -j device=/dev/XXX it simply adds a
filesystem to that journal; the journal must have been created via
separate step.
dumpe2fs.c (print_journal_information): Add support for dumping
information about an external journal device.
tune2fs.c (add_journal): Minor fixes from Andreas Dilger. Flush stdout
after printing in-progress message.
(main): Exit with status code 1 if we failed to determine the mount
status of the device.
ChangeLog, gcc-wall-cleanup:
gcc-wall-cleanup: Remove additional annoying warning messages emited
by gcc 2.95.2.
ChangeLog, uuid.h:
uuid: Change arguments to make it clear which argument is the source
and which is the destination.
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.)