dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more paranoid
about validating the directory counts from the block group
information.
all files: Don't include stdlib.h anymore; include it in ext2_fs.h,
since that file requires stdlib.h
ChangeLog, Makefile.in, dirinfo.c:
dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead of
e2fsck_get_num_dirs, which has been removed.
Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want to
compile and install flushb.
ChangeLog, configure.in:
Remove @EXTRA_PROGS@, since we aren't using it in 2fsck/Makefile.in anymore
ChangeLog, Makefile.in:
Install debugfs in /sbin, instead of /usr/sbin.
libext2fs.texinfo:
Update version string to be 1.12
Makefile.in:
Fix bug in find script which made the exclusion list, where a '-' was
missing from an -name option.
pass1.c (e2fsck_pass1_check_device_inode): For now, only check to make
sure the extra i_blocks in a device are cleared if the immutable flag
is set.
util.c (print_resource_track): Fix typo which caused the time/resource
tracking to print "Pass 1 :" instead of "Pass 1: ".
version.h:
Change version to 1.12-WIP, in preparation for an e2fsprogs 1.12 release.
expanddir.c (ext2fs_expand_dir): Check to make sure the block bitmap
is loaded, and return an error if it is not.
expanddir.c (expand_dir_proc): Only use ext2fs_write_dir_block when
writing a directory block, not when writing out a fresh indirect
block.
Fix bug which could cause core dump when expanding the directory, and
the bitmaps hadn't yet been read in. Also, only use
ext2fs_write_dir_block when writing a directory block, not when
writing out a fresh indirect block.
Fix bug where first_block wasn't getting incremented, which caused
user to get a "Programming error?" warning if there was a bad block in
a non-primary superblock/group_descriptor. Also fixed another bug so
that ext2fs_bg_has_super() is consulted, to avoid problems when using
a filesystem with the sparse_groups option set and there are bad
blocks at the beginning of a group which doesn't have a superblock.
pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the progress
indicator function.
pass1.c (scan_callback): Add call to the progress feedback function
(if it exists).
super.c (check_super_block): Skip the device size check if the
get_device_size returns EXT2_EXT_UNIMPLEMENTED.
iscan.c (main): Don't use fatal_error() anymore.
pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of calling
fatal_error(0).
problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT,
PR_3_NO_ROOT_INODE_ABORT): New problem codes.
problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code.
problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code.
problemP.h: New file which separates out the private fix_problem data
structures.
util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c,
swapfs.c util.c: allocate_memory() now takes a e2fsck context as its
first argument, and rename it to be e2fsck_allocate_memory().
problemP.h:
New file which contains the private problem abstraction definitions.
Makefile.pq:
Remove include of MAKEFILE.STD, which doesn't exist at this point.
Makefile.in, tst_getsize.c: Added new file which is used to test the
ext2fs_get_device_size function.
ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
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.
Change ext2fs_read_inode, ext2fs_write_inode to take the e2fsck
context as their first argument.
Change dir_info.c routines to take an e2fsck_context, renamed them to
start with e2fsck_ to avoid namespace issues, and changed them to
store the directory information inside the e2fsck context.
Added e2fsck_run() which calls all of the e2fsck passes in the correct
order, and which handles the return of abort codes.
Added abort processing, both via setjmp/longjmp and via flags in the
e2fsck context.
Use a flag in the e2fsck context instead of the restart_e2fsck global
variable.
Change uses of free and malloc to ext2fs_free_mem and ext2fs_get_mem.
ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
fileio.c (ext2fs_file_get_size, ext2fs_file_set_size, ext2fs_file_get_fs):
New functions added.
bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call com_err
if OMIT_COM_ERR is defined.
Rename new error codes to _ET_ in them for consistency.
ChangeLog, et_c.awk, et_h.awk:
Remove support for non STDC compilers, since the workarounds caused
problems with the header file.
Makefile.pq:
Checkpoint of powerquest work.
Added definition of ext2fs_get_mem, ext2fs_free_mem, and
ext2fs_resize_mem in ext2fs.h, and changed all library routines to use
these wrapper functions.
Fix buggy use of the INLINE macros.
ChangeLog, dblist.c, ext2_err.et.in, mkdir.c:
dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND instead
of the system error messages.
ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
EXT2_DB_NOT_FOUND
Update version.h for interim release
ChangeLog, Makefile.in, test_icount.c:
Makefile.in (PROGS): Remove test_rel from the test programs that we
build for now.
test_icount.c: Fix some random lint warnings.
Makefile.in:
Fix typo in removing brel_ma.o and irel_ma.o from the Makefile
ext2fs.h: Added function declarations and constants for bmap.c and
fileio.c.
ext2_err.et.in: Added new error messages EXT2_FILE_RO and
EXT2_ET_MAGIC_EXT2_FILE
Makefile.in: Added files bmap.c and fileio.c, and temporarily
commented out brel_ma.c and irel_ma.c
bmap.c: New file which maps a file's logical block number to its
physical block number.
fileio.c: New file which implements simple file reading and writing
primitives.
alloc.c (ext2fs_alloc_block): New function which allocates a block,
zeros it, and updates the filesystem accounting records appropriately.
ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL, EXT2_INODE_ALLOC_FAIL,
EXT2_NOT_DIRECTORY
Change various library files to use these errors instead of EINVAL,
ENOENT, etc.
alloc.c (ext2fs_alloc_block): New function which allocates a
block and updates the filesystem accounting records
appropriately.
ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL, EXT2_INODE_ALLOC_FAIL,
EXT2_NOT_DIRECTORY
Change various library files to use these functions instead of EINVAL,
ENOENT, etc.
ChangeLog, pass1.c, pass3.c:
pass3.c (get_lost_and_found): Check error return of
EXT2_FILE_NOT_FOUND instead of ENOTDIR
pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY instead of
ENOTDIR
expect.icount:
Change expected error string to be "Invalid argument passed to ext2 library"
instead of just "Invalid argument"
debugfs.c (main, do_open_filesys):
dump.c (do_dump): Make the variable which getopt returns into be
an int, so that it won't lose on platforms where char is
unsigned.
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.
Added check to see if llseek is declared in unistd.h
ChangeLog, llseek.c:
Check HAVE_LLSEEK_PROTOTYPE to see whether or not we need to declare
llseek().
Fix the type definitions of __s64 and __u64 if long long is used.
ChangeLog, configure, configure.in:
Add tests for sys/stat.h, sys/time.h, and sys/types.h
pass*.c, super.c: Massive changes to avoid using printf and com_err
routines. All diagnostic messages are now routed through the
fix_problem interface.
pass2.c (check_dir_block): Check for duplicate '.' and '..' entries.
problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
PR_2_DUP_DOT_DOT.
problem.c: Added new problem codes for some of the superblock
corruption checks, and for the pass header messages. ("Pass
1: xxxxx")
util.c (print_resource_track): Now takes a description argument.
super.c, unix.c, e2fsck.c: New files to separate out the
operating-specific operations out from e2fsck.c. e2fsck.c now
contains the global e2fsck context management routines, and
super.c contains the "pass 0" initial validation of the
superblock and global block group descriptors.
pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
(nearly) all global variables and moved them to the e2fsck
context structure.
problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS, PR_0_BLOCKS_PER_GROUP,
PR_0_FIRST_DATA_BLOCK
expect.1, expect.2:
Updated tests to align with e2fsck problem.c changes.
llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
icount.c (ext2fs_icount_validate):
bmove.c (process_block): Fix lint error in type for fprintf().
inode.c (ext2fs_check_directory): Add support for the callback
to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
ChangeLog, mke2fs.c:
Make parse_raid_opts return a void, to fix a -Wall warning.
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.)