The iterate_on_dir function in libe2p has been changed to be more
general, so it relies less on the layout of struct dirent. We also
make sure the errno returned by the ioctl is returned by
fgetversion() and fsetversion().
the kernel version is 2.4.10 -- 2.4.17, since otherwise an
old version of glibc (built against 2.2 headers) will
interact badly with the workaround to actually cause more
problems. I hate it when the glibc folks think they're
being smarter than the kernel....
8192-byte and 16384-byte blocksize filesystems.
Change the default bytes-per-inode ratio of a new filesystem to be at most
one inode per block for large blocksizes.
Pratt. Fixed a selection bug and added checks to make
sure volumes are not mounted when creating the list of
volumes which can be mkfs'ed by the ext2/3 plugin.
the EXT2_SB() macro instead. Remove kernel function
prototypes also. This matches the 2.5 kernel, and
is also cleaner for other reasons. Whitespace cleanup.
mapping for a particular inode.
Fixed a bug in the libext2 library which broke ext2fs_bmap if no inode structre
was passed inside for here.
Fixed bad calling parameters to parse_ulong which broken the -b and -s
options to debugfs, as well as do_init, and the testb, setb, clearb functions.
file we are checking is a block device file before looking
at st_rdev, since it's not valid for normal files.
(is_swap_device): Move so that it is outside the
HAVE_MNTENT_H, so that it is always built.
functions which take an extra flags argument. The flag
EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
field is byte swampped on big-endian machines, since in
the V2 structure, name_len is a char field which is
doesn't need to be byte swapped --- except if an
old-style kernel had byte-swapped the name_len field
as part of the V1 structure.
Also fixed a bug in debugfs which used ext2_dir_entry_2 without
worrying about the above issue, with the net result that "ls -l"
would print an incorrect file type on big-endian systems.
an I/O object.
Export ext2_file_flush as a public interface.
Also minor cleanups to tighten code in other I/O abstractions, and to
mark a void * pointer as const in the ext2_file_write interface.
Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
which will return deleted directory entries.
ext2fs_dir_iterate2 takes a new callback function which
is identical with the one used by
ext2fs_dblist_dir_iterate(). If the directory entry is
deleted, the callback function will be called with the
entry paraemter set to DIRENT_DELETED_FILE.
Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
ext2fs_block_alloc_stats): New functions which update
block/inode allocation statistics in the bitmaps, block
group descriptors, and superblock.
mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
expanddir.c (expand_dir_proc), bb_inode.c
(clear_bad_block_proc, set_bad_block_proc,
ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
Update to use new block/inode allocation statistics.
ext2fs_check_if_mounted and ext2fs_check_mount_point which
determines whether or not the specified device is a swap
device by using /proc/swaps. More bulletproofing for
idiotic/careless system administrators!
since files which get dropped into that directory may have come
from a protected directory, and the system administrator may not
deal with immediately. (Addresses Debian bug #118443)
- Renamed linux/list.h to be linux/linked_list.h to work around a
problem caused by diet libc insistence to search the kernel
header files ahead of all other files in the include path,
including the user specified include files.
- Worked around a bug in diet libc which core dumps when using
putc with stderr by using fputs instead. As a bonus, this
also shaved a few bytes off of com_err.o.
- Fixed a real bug in debugfs which was detected because diet libc
was more sensitive than glibc when incorrectly using fclose()
where pclose() is required.
trying to unset the filesize limit if at all possible,
if a block device is getting opened. (The filesize limit
shouldn't be applied against writes to a block device, but
starting in 2.4.10, the kernel is doing this.)
file on adding a journal to an already-mounted filesystem,
try to clear the ext2 file attributes on an already
existing .journal file so that we don't fail if on a
partially added journal to the filesystem.
which signals that a particular inode should not have the
last bits of data (the "tail") be merged with another
file. This is necessary to keep programs like LILO happy.
Add a copyright statement to the libuuid man page which identifies it
as being under LGPL. While this is conveyed in the source code, it is
not mentioned anywhere in the man pages or other documentation.
/etc/mtab to make sure the filesystem is really mounted,
since some broken distributions (read: Slackware) have
buggy boot scripts that don't initialize /etc/mtab before
checking non-root filesystems. (Slackware also doesn't
check the root filesystem separately, and reboot if the
root filesystem had changes applied to it, which is
dangerous and broken.)
the a valid .info file can be made. Use @deftypefun to
define functions. Change the e-mail address where bug
reports to be sent to be is the e2fsprogs maintainer.
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
unconditional ext2_flush() call. Also made ext2_flush() more
efficient when the superblock is modified after the filesystem has
been flushed, and make it clear the superblock dirty flag
after doing the superblock/block group descriptor flush.
included if EXT2FS_ENABLE_SWAPFS is defined, since we need to support
byte swapping even if we don't support the conversion functions.
(Fixes Debian bug #101686).
the byte-swapping code all assumes the ext2_dir_entry structure.
(It's a question of whether or not name_len should be byte-swapped or
not, and whether it's a 16 bit or 8 bit field.)
Makefile.in: Fix bug in installation of ext2_types.h. It is a file
which is generated and is therefore found in the build directory, not
source directory.
ismounted.c (check_mntent_file): Use a test file in / to check to see
if the root filesystem is mounted read-only. This protects against
the case where /etc might not be on /, as well as the case where
/etc/mtab doesn't exist. (Both are should-never happen scenarios, but
you never know...)
ext2_types.h.in: If linux/types.h has been defined, then don't try to
redefine the typedefs.
ChangeLog, Makefile.in:
Makefile.in: Make the install target depend on $(SUBS) to accomodate
the fools who want to compile and install e2fsprogs as root using just
one command.
setsuper.c: Add s_lastcheck field to the fields which can be modified
using set_super_value. (Suggested by Andreas Dilger)
ChangeLog, Makefile.in:
Makefile.in (HFILES): Add ext2_types.h to the list of files which
should be installed.
Makefile.in: Limit some .o files from being included into the library
if --disable-debugfs, --disable-swapfs, --disable-imager, or
--disable-resizer are used.
dumpe2fs.c: Use WORDS_BIGENDIAN to determine whether or not we're
(not) using i386 byte order.
dumpe2fs.c, mke2fs.c: Stop using the compatibility badblocks function,
and use the ext2fs_badblocks_* functions instead.
ChangeLog, inode.c, tst_iscan.c:
inode.c, tst_iscan.c: Stop using the compatibility badblocks function,
and use the ext2fs_badblocks_* functions instead.
ChangeLog, badblocks.c:
badblocks.c: Stop using the compatibility badblocks function, and use
the ext2fs_badblocks_* functions instead.
Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
ext2fs_mark_generic_bitmap and ext2fs_unmark_generic_bitmap to
gen_bitmap.c as normal functions. (This saves space and doesn't
significantly change the speed of e2fsck on a P-III.)
ChangeLog:
Add missing log entry for unix.c.
Makefile.in: Add message.c and swapfs.c to the list of source files to
build the make depend.
swapfs.c, unix.c: Only support the -s and -S options to e2fsck if
ENABLE_SWAPFS is defined.
Many files:
ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c, inode.c,
native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only include the
byte-swapping logic if ENABLE_SWAPFS is turned on or if we're on a
big-endian machine.
initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to set
EXT2_FLAG_SWAP_BYTES, instead of using ext2fs_native_flag.
native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
autoconf to determine whether or not return EXT2_FLAG_SWAP_BYTES.
Makefile.in: Remove the dependence on the libe2p library.
mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags with
direct usage of the ioctl/fchflags so that we don't have to depend on
the libe2p library.
icount.c (insert_icount_el): Fix the code used to estimate the size of
the new icount array to be more intelligent, to avoid reallocating the
array too many times.
ChangeLog, ext2_types.h.in:
ext2_types.h.in: Use unsigned ints in favor of unsigned longs when
trying to find a 32-bit wide type.
Makefile.in: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
wordwrap.pl: Add some rules which help fix up the dependencies.
Many files:
Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
ismounted.c: More cleanups for ismounted.c, some from Andreas, some to
clean up Andreas's patches. Use strncpy instead of strcpy to save the
root's mountpoint. Clean up #ifdef structure. Remove uneeded
variable in testing/debug driver.
ismounted.c: Add check for root device which doesn't depend on
/etc/fstab or /proc/mounts to be correct. Don't call endmntent()
before we are done with mnt struct.
ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to make
room for pre-existing usage of EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag
EXT2_INDEX_FL with the same codepoint as EXT2_BTREE_FL.
ext2fs.h: #include <> instead of "" for ext2fs and et header files,
since they will be installed in /usr/include
ChangeLog, e2p.h:
e2p.h: #include <> instead of "" for ext2fs and et header files, since
they will be installed in /usr/include
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
ls.c (print_features): Added missing space when printing (none) as the
filesystem feature.
(list_super2): If the filesystem revision is unknown, say so.
fileio.c (ext2fs_file_read): Factored out common code and cleaned up
function. Fixed a bug where if there was an error reading from the
disk, the number of bytes read wasn't reliably set. (Fixes Debian bug
#79163)
(ext2fs_file_write): Factored out common code and made function more
efficient; if writing a full block, don't bother to do a
read-modify-write cycle.
dirblock.c (ext2fs_read_dir_block): Check for an directory record
length which isn't a multiple four, and treat that as an invalid.
Scan the directory and return an error (EXT2_ET_DIR_CORRUPTED) if the
directory records are orrupted.
(ext2fs_write_dir_block): If while byte-swapping the directory block,
if there's an error, abort and return EXT2_ET_DIR_CORRUPTED.
ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add image_header
field in the ext2_filsys structure
block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
inode.c (ext2fs_read_inode):
rw_bitmaps.c (read_bitmaps):
openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make sure
the full bitmap is saved.
dir_iterate.c (ext2fs_process_dir_block): Add a double-check to make
sure the rec_len is a multiple of 4, to prevent bus-errors on
architectures which care about mis-aligned pointer references.
parse.c, compare.c: Include string.h to fix gcc -Wall complaints.
gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors because some
required structures wouldn't be otherwise defined. Fix a minor gcc
-Wall nit in the declaration of get_random_fd().
ismounted.c (check_mntent): Check /proc/mounts on Linux systems before
checking /etc/mtab. The EXT2_MF_READONLY flag is now set from the
/etc/mtab options field for all filesystems, not just the root
filesystem. Add debugging code to make it easier to test
ext2fs_check_if_mounted().
mkjournal.c (ext2fs_create_journal_superblock): Add safety check;
return an error if there's an attempt to create a journal less than
1024 filesystem blocks.
ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly inline
functions.
tst_byteswap.c: New function to test the byteswap functions. Add to
regression test suite.
mkjournal.c (ext2fs_create_journal_superblock): Fix the setting of
s_first for external devices to always be 1, since jsb->s_first is
always relative to the start of the journal superblock. Use htonl(1)
when setting s_nr_users.
mkjournal.c (ext2fs_add_journal_device): Fix bug where the device
number of the filesystem (instead of the journal) was being dropped
into s_journal_dev.
ChangeLog, dumpe2fs.c:
dumpe2fs.c (print_journal_information): Use s_first_data_block to find
the correct block to read the journal superblock.
initialize.c (ext2fs_initialize): Add support for initializing the
ext2 superblock for external journal devices. This basically means we
don't bother to allocate any block group descriptors.
openfs.c (ext2fs_open): Only open external journal devices if the new
flag EXT2_FLAG_JOURNAL_DEV_OK is passed to ext2fs_open. When opening
such devices, don't try to read the block group descriptors, since
they're not there.
ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
mkjournal.c: Export a new function,
ext2fs_create_journal_superblock(), which allocates and returns a
buffer containing a journal superblock. This is needed by mke2fs to
create an external journal. Rewrote ext2fs_add_journal_device() so
that it no longer creates the external journal, but rather adds a
filesystem to an existing external journal. It handles all of the
UUID manipulation.
ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported by the
library. Define the EXT2_FLAG_JOURNAL_DEV_OK. Changed function
prototype for ext2fs_add_journal_device().
feature.c: Remove backward compatibility #ifdef's for old ext2_fs.h
header files.
.del-ext2_fs.h~7a460879, ChangeLog:
ext2_fs.h (EXT3_FEATURE_INCOMPAT_JOURNAL_DEV): Add definition for use
with external journal devices.
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.
uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints.
copy.c (uuid_copy): Change arguments to make it clear which argument
is the source and which is the destination.
gen_uuid.c (get_random_fd): Use gettimeofday to seed the PRNG, so we
can take advantage of tv_usec to do (slightly) better at seeding it.
MCONFIG.in: Change --enable-gcc-wall handling so that it's no longer a
configure option, but something which is done when the developer uses
the command "make gcc-wall".
configure.in: Remove test for ino_t, since we don't use it any more
(we always use our own ext2_ino_t). Remove --enable-gcc-wall support.
Add test for sys/ioctl.h
.del-types.h.in~ca55114a:
Remove definition of ino_t
ChangeLog, Makefile.in, ext2fs.h, flushb.c, jump.funcs:
flushb.c (ext2fs_sync_device): New function which centralizes all of
the places which might try to use the BLKFLSBUF or FDFLUSH ioctls (and
usually failing to define them since the system header files don't
usually do this for us, and we're trying to avoid usage of kernel
include files now.)
alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c, bmove.c,
brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c, dir_iterate.c,
expanddir.c, ext2fs.h, ext2fsP.h, fileio.c, finddev.c, get_pathname.c,
icount.c, inode.c, irel.h, irel_ma.c, ismounted.c, link.c, lookup.c,
mkdir.c, mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to ext2_ino_t,
to protect applications that attempt to compile
-D_FILE_OFFSET_BITS=64, since this inexplicably changes ino_t(!?). So
we use ext2_ino_t to avoid an unexpected ABI change.
dirblock.c (ext2fs_read_dir_block): Fix a potential case where we may
overrun allocated memory in case of a corrupted filesystem (or an
e2fsck test case :-) when byte-swapping the directory block.
mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
complaints including a missing return 0 at the end of
ext2fs_add_journal_device.
ChangeLog, ext2fs.h:
ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
Makefile.in: Link in libe2p when creating libext2fs as a shared
library, since mkjournal.c now references fsetflags().
mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas Dilger's
changes (with fixups) to allow on-line creation of a journal file.
.del-types.h.in~ca55114a:
Change what we use to protect the header file to be _ASM_TYPES_H
instead of _LINUX_TYPES_H. (Needed to make libc5 builds happy).
version.h:
Update for WIP release.
ismounted.c: add ext2fs_check_mount_point() function, which will
optionally return the mount point of a device if mounted
ChangeLog, closefs.c, ext2fs.h:
ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
EXT2_FLAG_SUPER_ONLY, which the close routines to only update the
superblock, and not the group descriptors.
ext2fs.h: Remove definition of ext2fs_sb. Note: this may break source
(but not binary) compatibility of some users of the ext2 library.
They should just simply do a global search and replace of struct
ext2fs_sb with struct ext2_super_block, and use their own private copy
of ext2_fs.h if they aren't already.
closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c: Replace
use of ext2fs_sb with ext2_super_block.
ChangeLog, main.c:
main.c (main): Replace use of struct ext2fs_sb with struct ext2_super_block.
ext2fs.h: Cleaned up header file by removing definitions of feature
flags that might not have been defined in older ext2 header files.
Now that we're using our own include/linux/ext2fs.h header file, this
can never happen.
jfs_dat.h: Removed old header file which is no longer needed.
ChangeLog:
jfs_compat.h: Remove uneeded header file.
ext2fs.h, mkjournal.c (ext2fs_add_journal_fs,
ext2fs_add_journal_device): Add a new argument to the APIs of these
function, which is a flags word. This is used to allow the creation
of a V1 superblock for those folks who are using ext3 0.3b in
production. Note, the user-land interface for getting at this flag
won't be documented, as the V1 superblock is deprecated.
jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h. The jfs.h file has
been moved to the include/linux directory.
journal.c, revoke.c, recovery.c: Updated files from Stephen to support
the V2 superblock and revoke processing. The journal.c and revoke.c
files are copies from the ext3 kernel source.
Makefile.in: Added revoke.c to the list of source/object files.
Makefile.in:
Fix up some mistakes in the source file list, and regenerate the
dependencies.
Update Makefile dependencies.
ChangeLog, jfs.h:
jfs.h: Remove excess #include of JFS_DEBUG. Not needed for e2fsprogs,
since we optioanlly define it in the configuration file system.
mkjournal.c (init_journal_superblock): Sync Stephen's changes which
creates a V2 superblock instead of a V1 superblock.
ChangeLog, jfs.h, jfs_compat.h, list.h:
jfs.h, jfs_compat.h, list.h: New files added to support ext3.
fgetflags.c (fgetflags):
fgetversion.c (fgetversion):
fsetflags.c (fsetflags):
fsetversion.c (fsetversion): Use the LFS API if available so that the
files are opened with O_LARGEFILE. Addresses Debian bug #72690.
imager.c (ext2fs_image_{inode,super,bitmap}_{read,write}, ext2_fs.h,
Makefile.in: New file that has routines that save ext2fs metadata to a
file.
ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
e2image.h: New file which defines the file format for the ext2 image
file. (Saved copy of ext2 metadata to a file as a saving throw
against worst-case damage.)
ChangeLog, Makefile.in, e2image.c:
e2image.c, Makefile.in: New program which saves ext2 metadata to a
file for people who need a last-ditch saving throw.
inode.c (ext2fs_flush_icache): Add new function ext2fs_flush_icache()
which flushes the internal inode cache. Applications which modify the
inode table blocks directly must call this function.
ext2_io.h (io_channel_write_byte): Add new interface to allow callers
to write specific byte ranges. This is an optional interface, which
not all IO channels may implement.
unix_io.c (unix_write_byte): test_io.c (test_write_byte): Add
implementation of the write_byte function.
closefs.c (write_primary_superblock, ext2fs_flush): Add a new function
which writes the primary superblock. If the IO channel supports
writing raw bytes directly, only fields which were modified are
written to the disk. This makes it safe(r) to use utilities like
tune2fs on a mounted filesystem.
freefs.c (ext2fs_free): Free the original superblock if it is available.
openfs.c (ext2fs_open): Store a copy of the original superblock when
opening it.
ext2fs.h: Add a field to store the original superblock in the ext2
context structure.
e2fsprogs.spec: Update spec file for Red Hat 7.0 compatibility
configure.in: When compiling shared libraries for Solaris, use a
special-case Makefile fragment to deal with it.
Makefile.solaris-lib:
New file for Solaris shared library builds.
llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we don't
need to use llseek).
ChangeLog, fsck.c:
fsck.c (device_already_active): Add a special case check for MD
devices, so we don't try to check them in parallel with other devices.
finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
provides the function ext2fs_find_block_device(). This function
returns the pathname to a block device, given its device number.
ls.c (list_super): Use better description of s_last_orphan
.del-ext2_fs.h~7a460879, ChangeLog:
ext2_fs.h: Add comment explaining when journal fields are valid.
Commit this file for future use; contains a configure.in script for when
libuuid gets separtead out into its own package.
libext2fs.texinfo:
Update version numbers for 1.19 release.
TODO:
Commit TODO list for 1.19 release.
README:
Update file for 1.19 release.
ChangeLog, e2fsprogs.spec:
e2fsprogs.spec: Merge in a few changes from the Red Hat 6.2 spec file,
now that we're using a modern rpm to build e2fsprogs. Also updated
version number to 1.19.
version.h:
Update version number for 1.19 release.
ChangeLog:
Check in changes for 1.19 release.
ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the list of
filesystem flags supported by the library.
ChangeLog, e2fsprogs.spec:
e2fsprogs.spec (%post): Remove resize2fs from its old location in
/usr/sbin in the postinstall script.
RELEASE-NOTES, version.h:
Update for WIP release.
Makefile.in (uuid_time): Fix compilation rule so that uuid_time.o
doesn't get bashed in order to build the command-line version of
uuid_time.
.del-ext2_fs.h~7a460879, ChangeLog:
ext2_fs.h: Update ext3 extension feature #define's.
fsck.c (execute, wait_one): Treat fsck.ext3 the same as fsck.ext2
(because they are the same) for the purposes of the progress bar
display logic.
ChangeLog, ls.c:
ls.c (list_super): Display the journal information fields in the
superblock if the filesystem has a journal.
ext2fs.h: Update to include latest journalling additions to the superblock.
.del-ext2_fs.h~7a460879, ChangeLog:
ext2_fs.h: Update to include latest journalling additions to the
superblock.
tst_badblocks.c: Update test program to test ext2fs_read_bb_FILE2 and
ext2fs_write_FILE.
write_bb_file.c (ext2fs_write_bb_FILE): New function which writes out
bad blocks list to a file.
read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which changes
the callback function to take two additional arguments; a private
blind pointer supplied by the caller, and pointer to a char *
containing a pointer to the invalid string.
badblocks.c (ext2fs_badblocks_equal): Add new function which returns
true if two badblocks list are equal.
Makefile.in: Remove explicit link of -lc in the shared library. (It
shouldn't be necessary, and is harmful in some cases).
jump.funcs:
dll/jump.funcs: Add new jumptable entries for ext2fs_write_bb_FILE,
ext2fs_read_bb_FILE2, and ext2fs_badblocks_equal.
ct_c.awk: Work around a bug in gawk 3.05
mk_cmds.sh.in: Allow the build system to override the standard
location for finding the ct_c.* files by setting the _SS_DIR_OVERRIDE
environment variable.
Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the version in
the source tree.
ChangeLog, Makefile.in:
Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the
mk_cmds support files from the source tree.
gen_uuid.c (get_random_bytes): Use O_NONBLOCK when trying to open
/dev/random. Break out the /dev/random initialization code into a
get_random_fd() function, and use that function in uuid_generate() to
determine whether to use uuid_generate_random() or
uuid_generate_time().
Fix stupid dependency bug.
ChangeLog, debugfs.c, debugfs.h, util.c:
debugfs.c (do_testb, do_testi): Call check_fs_bitmaps to avoid
coredumping if the bitmaps aren't loaded.
util.c (check_fs_bitmaps): New function which checks whether or not
the bitmaps are loaded.
debugfs.8.in: Documented new behaviour.
ls.c (ls_l_file): Fix Y2K bug -- was printing 22-May-100 for recent
files. Switched to 4-digit years.
dump.c, debug_cmds.ct (do_rdump): Add new debugfs command "rdump",
which recursively dumps a directory and its contents.
(fix_perms): New function. Break permission-fixing code out of
dump_file() so it can be called by rdump code as well.
(dump_file): Call fix_perms().
debugfs.c, debug_cmds.ct (do_lcd): Add new debugfs command "lcd",
which changes the cwd on the native filesystem.
debugfs.c (open_filesystem): Extra args for superblock, blocksize, and
catastrophic mode. Changed callers.
(do_open_filesys, main): Accept new -b, -s, -c options for
open_filesystem.
ChangeLog, mkdir.c:
mkdir.c (ext2fs_mkdir): Read the parent directory's inode earlier, so
that if there's an error reading it, we can more cleanly back out of
the operation.
version.h:
Update version file for WIP release.
getsize.c: Under linux, manually define the ioctl for BLKGETSIZE if it
isn't already defined and it's safe to do so.
.cvsignore:
Ignore build files when builddir==srcdir
getsize.c (ext2fs_get_device_size): Use open64() instead of open() if
it exists.
unix_io.c (unix_open): Use open64() instead of open() if it exists.
llseek.c: Simplify header includes of unistd.h. If lseek64 is
available (and prototypes are defined) use it in preference to llseek.
problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem code.
super.c (check_super_block): If the OS type in the superblock is the
Hurd, check to see if the filetype feature is set, and offer to clear
it if so. This needs to be done since the Hurd doesn't properly
support the filetype feature. (And since the hurd allows the
transmogrification of files to special files and vice versa --- for no
good reason that I can understand --- it can't support the filetype
feature for the forseeable future, either.)
ChangeLog, mke2fs.c:
mke2fs.c (main): We forcibly turn off the filetype feature if the OS
is the hurd, since the hurd doesn't support it. (And since the hurd
allows the transmogrification of files to special files and vice versa
--- for no good reason that I can understand --- it can't support the
filetype feature for the forseeable future, either.)
mke2fs.c (proceed_question): Fix reversed sense of proceed_question
that was busted due to the internationalization patch. Fixed bug
where if proceed_question was called twice, the input buffer wasn't
cleared of the previous question's newline.
ChangeLog, expect.1, expect.2, image.gz, name:
f_hurd: Add test for Hurd-specific features (right now, just checks to
make sure the filetype feature is cleared)
ChangeLog, ls.c:
ls.c (list_super): Change the string displayed for the Hurd to be
GNU/Hurd, instead of just "GNU".
Makefile.in (uuid_time): Compile uuid_time in two steps (first create
.o, then link it against the libraries) to work around bug in a.out
linker.
dll/jump.funcs, dll/jump.import, dll/jump.params: Update a.out shared
library control files to reflect new added files.
ChangeLog, feature.c, jump.funcs:
feature.c: Make feature_list static; it shouldn't be exported.
dll/jump.funcs: Update a.out shared library control file.
ChangeLog, badblocks.c:
badblocks.c (flush_bufs): Use fsync() if the system doesn't support
fdatasync().
ext2_fs.h (EXT2_NOCOMPR_FL): Rename EXT2_NOCOMP_FL to EXT2_NOCOMPR_FL.
ChangeLog, Makefile.in, pf.c:
pf.c (print_flags): Rename EXT2_NOCOMP_FL to EXT2_NOCOMPR_FL.
Makefile.in: Add "set -e" so that any errors in installing header
files causes an immediate exit.
gen_uuid.c (get_random_bytes): Make more paranoid about misbehaving
/dev/urandom. If we get a return of zero without an error more than 8
times in a row, we break out and return an error. Also, if
/dev/urandom doesn't exist, try /dev/random.
ChangeLog, ext2fs.h:
ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine how
to define __s64 and __u64. Turn off "compression is experimental"
warning if the cpp macro I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is
defined.
ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
Conditionally include Compression as a supported type if
ENABLE_COMPRESSION (via --enable-compression) is turned on.
Makefile.in: Install the e2p.h header.
e2p.h, pf.c (print_flags): Change the third parameter of print_flags()
to be an option parameter, although we only support one option at this
point.
pf.c (print_flags): Updated to use a more generic structure for
storing the ext2 inode flags. Add support for the (current) set of
compression flags.
bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap): Change to
return the previous state of the bit that is being marked or unmarked.
For speed optimization.
ChangeLog, pass3.c:
pass3.c (check_directory): Only do the loop detection algorithm if
we've searched over 2048 parent directories and haven't found the end
yet. This means that in the common case, we don't allocate or clear
the inode_loop_detection bitmap, which for large systems, merely
clearing the bitmap for each directory was turning out to be quite
expensive. Thanks to Jani Jaakkola (jjaakkol@cs.helsinki.fi) for
identifying this problem.
ChangeLog, Makefile.in, e2fsck.h, unix.c:
Makefile.in: Call sync after finishing building all in this directory.
unix.c (PRS): sync the filesystem before trying to use BLKFLSBUF, to
minimize the chance of causing dirty blocks to get dropped.
e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on a
Linux/i386 system.
debugfs.c (dump_inode): Remove #ifdef for i_version vs. i_generation
since we know it will always be i_generation now.
ChangeLog, e2fsck.h, flushb.c, scantest.c:
e2fsck.h, flushb.c, scantest.c: Remove uneeded include of linux/fs.h
bmap.c:
Fix silly spelling typo.
ChangeLog, getsize.c, ismounted.c, swapfs.c:
getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not needed
any more; we know it will always be i_generation. Add support for
swapping the high bits of the uid and gid.
MCONFIG.in (DEPLIBUUID): Since LIBUUID can sometimes include
"-lsocket" we need a separate DEPLIBUUID that can be used in
Makefile's dependency rules.
ChangeLog, Makefile.in:
Makefile.in: Since LIBUUID can sometimes include "-lsocket" we need a
separate DEPLIBUUID that can be used in Makefile's dependency rules.
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
source directory. Also, when making the .exclude file for the
source_tar_file, exclude those two files as well.
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
source directory.
Makefile.in (tst_badblocks): Add freefs.o to the object list, since
ext2fs_badblocks_list_free was moved to freefs.c.
tst_badblocks.c: Use the newer badblocks API names. Add duplicate
blocks to the test inputs to test dealing with adding blocks which are
already in the badblocks list.
badblocks.c (ext2fs_badblocks_list_add): If appending to the end of
the list, use a shortcut O(1) operations instead of an O(n) operation.
(Idea suggested by David Beattie.)
freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead of
badblocks_list_free(), to save a procedure call.
feature.c: Fix GCC warnings; add const to the char * types in the
function prototypes for e2p_feature2string and e2p_edit_feature.
ChangeLog, uuid.h, uuid_time.c:
uuid_time.c (variant_string): Declare to be static to avoid gcc warnings.
uuid.h: Add function prototypes for uuid_generate_random() and
uuid_generate_time().
ChangeLog, chattr.c:
chattr.c: Add hack to compile in a definition for S_ISLNK so we can
successfully compile even with warnings turned on.
gen_uuid_nt.c (uuid_generate): W2K strikes again! An incompatible
interface change means we need to detect whether the code is running
on an NT4 or NT5 system.
config.h, ChangeLog:
config.h: Add #define's for strcasecmp and strncasecmp
nt_io.c (_OpenNtName): Open the device using
FILE_SYNCHRONOUS_IO_NONALERT instead of FILE_SYNCHRONOUS_IO_ALERT
(nt_open): At the end of the device open routine, unlock the drive but
do not dismount it.
ext2_fs.h (i_reserved2): Use __GNU__ instead of __hurd__ to detect the
Hurd OS. To protect against future irrationality on the part of the
FSF concerning whether Linux is GNU or not, on a system which defines
both __linux__ and __GNU___, __linux__ takes precedence.
ChangeLog, initialize.c:
initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to detect
the Hurd OS.
ChangeLog, debugfs.c:
debugfs.c (do_dirty_filesys): Make the "dirty" command clear the valid
bit on the superblock. (And with a -clean option to set the valid
bit.) Originally it was used just to set the "needs to be written"
bit in the in-core version of the fs structure.
feature.c (e2p_edit_feature), e2p.h: Add a new argument which allows
the calling application to limit what features the user is allowed to
set or clear using this function. Also add support for comma
separated lists.
mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
link.c (ext2fs_link): This call now uses the low three bits of the
flags parameter to pass the directory filetype information; it will
set the directory entry FILETYPE information if the filesystem
supports it.
newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock option is
set, then create the '.' and '..' entries with the filetype set to
EXT2_FT_DIR.
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
pass4.c (e2fsck_pass4): If an inode is set in the inode_imagic_map
bitmap, don't check to see if it is disconnected from the inode tree
(because it almost certainly will be). Free inode_imagic_map at the
end of pass 4.
pass2.c (check_dir_block, check_filetype): If the FILETYPE feature is
set, check the directory entry's filetype information field, and
fix/set it if necessary. (e2fsck_pass2): Free the inode_reg_map
bitmap at the end of pass 2.
pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
information for inode_reg_map and inode_imagic_map, which indicates
which inodes are regular files and AFS inodes, respectively.
Since only the master superblock is written during a restart, force
that superblock to be used after a restart; otherwise changes to the
block group descriptors end up getting ignored.
problem.c, problemP.h: If e2fsck is run -n, make def_yn variable be 0
for "no". Add support for a new flag, PR_NO_NOMSG, which supresses
the problem message if e2fsck is run with the -n option.
problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add new
problem codes.
message.c (expand_dirent_expression): Add support for %dt which prints
the dirent type information.
e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map and
inode_imagic_map).
e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map to the
context structure.
ChangeLog, nt_io.c:
nt_io.c: New file which supports I/O under Windows NT.
ChangeLog, gen_uuid_nt.c:
gen_uuid_nt.c: New file which creates a UUID under Windows NT.
Many files:
Add support for non-Unix compiles
ext2fs.h: Add new fields for journalling and define new feature bits
used by newer filesystems: IMAGIC_INODES, HAS_JOURNAL, RECOVER.
expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where we
update the inode block count and size files so that the block count
field is updated correctly when we create an indirect block.
Makefile.in, feature.c, e2p.h: New file which is used for displaying
and editing superblock feature sets.
ls.c (print_features, list_super): Add new function print_features
which is used to display the feature bits in the superblock.
partinfo.c: Fix minor compilation bugs pointed out by Yann Dirson.
mke2fs.c: Don't turn on sparse superblocks by default on pre-2.2 kernels.
mke2fs.8.in: Add the possible valid block sizes for mke2fs. Document
the -n flag, and the new defaults for the -s flag.
dumpe2fs.c, dumpe2fs.8.in: Add new options -f (force) and -h (header-only).
mke2fs.c (PRS): Fix logic for turning on/off the sparse superblock option.
Many files:
Updated copyright statements to reflect the GPL with permission of the
original authors.
MCONFIG.in (BUILD_CC):
configure.in (BUILD_CC): If cross compiling, find the native C
compiler and set it to BUILD_CC so that we can successfully build
util/subst.
ChangeLog, Makefile.in:
Makefile.in (subst): Build subst using $(BUILD_CC), since it's a
helper program which must be built using the native C compiler during
a cross-compilation.
Makefile.in:
Update dependencies.
e2fsck.h:
pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
pass1_check_directory, e2fsck_use_inode_shortcuts): Make pass1_* be
private static functions, and create new function
e2fsck_use_inode_shortcuts which sets and clears the inode shortcut
functions in the fs structure.
e2fsck.h:
pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
exported function.
pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check if a
disconnected inode has any problems before connecting it to
/lost+found. Bug and suggested fix by Pavel Machek <pavel@bug.ucw.cz>
ChangeLog, swapfs.c:
swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3 kernels
that use i_generation instead of i_version. Patch supplied by Jon
Bright <sircus@sircus.demon.co.uk>.
ChangeLog, mke2fs.8.in:
mke2fs.8.in: Fix typo in man page which caused the badblocks command
to not show up in the "SEE ALSO" section.
ChangeLog, expect.1, expect.2, image.gz, name:
f_recnect_bad: New test which checks the case where a disconnect inode
also bad inode fields; we need to make sure e2fsck offers to fix the
inode (or clear the inode, as necessary).
dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
directory entry before calling the callback function. This should
prevent some core dumps of insufficiently paranoid callback functions.
ChangeLog, unix.c:
unix.c (main): Add missing space in the disk write-protected message.
* gen_uuid.c (get_random_bytes): Use a while loop when reading from
/dev/urandom so that if we get interrupted while reading the right
thing happens.
(uuid_generate_random): Add new function which uses the new UUID
format which uses 122 random bits to form the 128-bit UUID.
(uuid_generate): Rename the old uuid_generate to be
uuid_generate_time, and create a new uuid_generate function which
calls either uuid_generate_random or uuid_genereate_time depending on
whether /dev/urandom is present.
uuid_generate.3.in: Update to reflect changesin uuid_generate and its
two new variants.
tst_uuid.c: Updated to test new uuid_generate functions, and to
reflect new semantics of uuid_compare. Added tests to make sure the
UUID type and variant created by UUID generate is correct.
uuid_time.c (uuid_variant, uuid_type): Added new functions to return
the UUID variant and type information. The debugging program now
prints the UUID variant and type, and warns if the unparsed time
information is likely to be incorrect.
uuid_parse.3.in, libuuid.3.in: Miscellaneous text cleanups.
uuidgen.1.in:
Miscellaneous text cleanups.
compare.c (uuid_compare): Change sense of uuid_compare so that its
return values match that of memcpy and the uuid_compare() found in
Paul Leach's internet-draft.
fileio.c (ext2fs_file_open): Remove obsolete comment stating that we
don't handle writing yet (we do). Fixed bug where we weren't
allocating a big enough buffer for ext2_bmap.
ChangeLog, ext2fs.h:
ext2fs.h: Add feature definition for AFS IMAGIC inodes.
ChangeLog, MCONFIG.in, config.sub:
MCONFIG.in: Define man1dir, man3dir, and man8dir in terms of mandir.
config.sub: Update config.sub from autoconf 2.13 so that it will
recognize new machine types from the Alpha.
configure:
Update to match latest changes to configure.in
message.c (safe_print): New function which prints strings, converting
non-printable characters using the '^' and M-notation. This function
is now used to print directory name entries and pathnames.
ChangeLog:
Update for release of E2fsprogs 1.14.
inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if the
inode number is zero; if it's zero, return EXT2_ET_BAD_INODE_NUM.
ChangeLog, fsck.c:
fsck.c (load_fs_info): If the pass number field is missing, it needs
to be treated as zero.
libext2fs.texinfo, README:
Update for 1.14 release.
unix.c (main): Reset the context before calling ext2fs_close(), to
avoid referencing already freed memory.
ChangeLog, llseek.c:
llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the non-Linux case
to use EINVAL by default, unless it isn't defined, in which case we
use EXT2_ET_INVALID_ARGUMENT instead.
ChangeLog, mk_cmds.sh.in:
mk_cmds.sh.in: Fixed portability bug in shell script; we were
depending on a bash'ism.
ChangeLog, uuid.c:
uuid.c: Use asm/types.h instead of linux/types.h, to be consistent
with other locations where we've had to do this to work around glibc.
Makefile.in: Update version numbers of the UUID shared library, since
we've added a new function (uuid_time()).
uuid_time.c: New file which returns the time field of a UUID. (Good
for debugging purposes)
libext2fs.texinfo:
Update version number for 1.13 release.
pass3.c (get_lost_and_found): If the filesystem is not opened
read-only, then force /lost+found to be created if it is not present.
problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen operation.
ChangeLog, Makefile.in:
Makefile.in: Updated dependencies.
ChangeLog, fsck.c:
fsck.c (load_fs_info): Parse /etc/fstab ourselves, instead of relying
on getmntent(). This has the advantage of allowing us to properly
handle missing pass numbers correctly.
ChangeLog, configure.in:
configure.in: Add paths.h to header files for which we search.