Commit Graph

5426 Commits (d6adf070b0e85f209c0d7f310188b134b5cb7180)

Author SHA1 Message Date
Theodore Ts'o 92bcc595dc ChangeLog, badblocks.8.in, mke2fs.c:
badblocks.8: Update documentation to note that output format of
  	badblocks is suitable for use with e2fsck -l or mke2fs -l.
  mke2fs.c (handle_bad_blocks): Fix bug so that all groups with bad
  	superblock backup blocks are printed (not just the first one).
1998-02-16 22:29:34 +00:00
Theodore Ts'o a8519a2dbe Many files:
Major reoganization of how resizing works.  Functions in
  ext2_block_move.c, and ext2_inode_move.c moved into resize2fs.c.
  Multiple passes in those two files also combined into a single inode
  scanning pass.  Made the inode table moving function better handling
  the case where it needs to abort mid-operation.  When moving blocks
  around, made the block allocation function preferentially avoid the
  old group descriptor blocks, to make resize2fs more robust.
1998-02-16 22:16:20 +00:00
Theodore Ts'o 9abd2ce914 ChangeLog, bmove.c, ext2_io.h, ext2fs.h, rw_bitmaps.c, test_io.c:
ext2_io.h, ext2fs.h: Protect against being included multiple times.
  bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
  test_io.c (test_flush): Add a debugging printf when the flush method
  	is called.
  rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already read
  	in, return right away.
1998-02-16 22:00:37 +00:00
Theodore Ts'o 63b44fbe30 Many files:
resize2fs.c, resize2fs.h, ext2_block_move.c, ext2_inode_move.c,
  	main.c: Reorganize how the progress functions are called.
1998-02-13 22:58:18 +00:00
Theodore Ts'o 5953b9de9c ChangeLog, bitops.h, ext2fs.h, icount.c, version.c:
bitops.h: Don't try to do i386 inline asm functions if the compiler
  	isn't GCC.
  ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
  	instead of linux/types.h, and e2_bitops.h instead of ext2fs/bitops.h.
  icount.c, version.c: Don't #include <et/com_err.h>, as it isn't necessary.
1998-02-01 13:23:02 +00:00
Theodore Ts'o 54be2ccc22 ChangeLog, dirinfo.c, e2fsck.c, e2fsck.h, super.c:
dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
  e2fsck.h: Include <time.h> since it is needed
  super.c: If EXT2_SKIP_UUID is defined, then skip the UUID processing.
1998-02-01 12:58:48 +00:00
Theodore Ts'o 24dd4028eb ChangeLog, e2fsck.8.in, unix.c:
unix.c (main): In the case where the filesystem revision is too high,
  	print the message about the superblock possibly being corrupt.
  e2fsck.8.in: Add expanded comments about how the -b option works.
1998-02-01 00:16:40 +00:00
Theodore Ts'o dedf1b2768 ChangeLog, .del-e2fsprogs-1.12.spec~2cb50db6:
Update spec file in preparataion for 1.12 release.
1998-01-19 15:02:12 +00:00
Theodore Ts'o ca8abba7e0 Many files:
resize2fs.h: If EXT2_FLAT_INCLUDES is defined, then assume all
  	of the ext2-specific header files are in a flat directory.
  ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
  	resize2fs.h: Rename variables named "new" to "new_block",
  	"new_inode", or "new_loc" to avoid C++ reserved word
  	clash.
  ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
  	sim_progress.c: Use ext2fs_get_memory(),
  	ext2fs_free_memory(), et. al., instead of malloc() and
  	free().
  ext2_block_move.c, ext2_inode_move.c, extent.c: Explicitly cast
  	all assignments from void * to be compatible with C++.
  banalysis.c, banalysis.h, ext2_inode_move.c, ext2_block_move.c:
  	Change private to priv_data to avoid C++ namespace clash.
ChangeLog, badblocks.8.in:
  badblocks.8.in: Add documentation for the -s option.
1998-01-19 14:55:24 +00:00
Theodore Ts'o 54dc7ca286 Many files:
e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
  	the ext2-specific header files are in a flat directory.
  dirinfo.c, ehandler.c, pass1.c, pass1b.c, pass2.c, pass5.c,
  	super.c, swapfs.c, unix.c: Explicitly cast all assignments
  	from void * to be compatible with C++.
  unix.c (sync_disk): Remove sync_disk and calls to that function,
  	since ext2fs_close() now takes care of this.
  pass1.c, pass1b.c, pass2.c, pass3.c, swapfs, badblocks.c,
  	ehandler.c, unix.c: Change use of private to be priv_data, to
  	avoid C++ reserved name clash.
1998-01-19 14:50:49 +00:00
Theodore Ts'o b5abe6fac9 Many files:
inode.c (ext2fs_open_inode_scan): Initialize the group variables
  	so that we don't need to call get_next_blockgroup() the first
  	time around.  Saves a bit of time, and prevents us from
  	needing to assign -1 to current_group (which is an unsigned
  	value).
  icount.c (insert_icount_el): Cast the estimated number of inodes
  	from a float to an ino_t.
  alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
  	bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
  	check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
  	dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c, expanddir.c,
  	ext2fs.h, fileio.c, freefs.c, get_pathname.c, getsize.c,
  	icount.c, initialize.c, inline.c, inode.c, irel_ma.c,
  	ismounted.c, link.c, lookup.c, mkdir.c, namei.c, native.c,
  	newdir.c, openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
  	rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
  	tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c,
  	version.c: If EXT2_FLAT_INCLUDES is defined, then assume all
  	of the ext2-specific header files are in a flat directory.
  block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
  	all assignments from void * to be compatible with C++.
  closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
  	make sure the contents of the disk are flushed to disk.
  dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
  	avoid C++ namespace clash.
  bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
  	avoid C++ namespace clash.
  ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
  	irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
  	ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
  	unlink.c: Change private to be priv_data (to avoid C++
  	namespace clash)
1998-01-19 14:47:53 +00:00
Theodore Ts'o 45d2161466 ChangeLog, subst.c:
subst.c: Rename "new" to "new_f" to avoid C++ reserved word clash.
  subst.c: Explicitly cast all assignments from void * to be compatible
  	with C++.
1998-01-19 14:40:24 +00:00
Theodore Ts'o 9a740d1982 README:
Update for version 1.12.
configure:
  Reflect recent changes to configure.in
  .
1998-01-17 07:19:38 +00:00
Theodore Ts'o 5be8dc2143 Many files:
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.
1997-12-01 18:24:10 +00:00
Theodore Ts'o 134ea28aaf partinfo.c:
Add preliminary version of the partinfo program.
1997-11-28 14:45:09 +00:00
Theodore Ts'o 7fdfabd321 ChangeLog, pass1.c, util.c:
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.
1997-11-24 11:51:17 +00:00
Theodore Ts'o 5285cab3b5 Many files:
Start preparation for the 1.12 release.
1997-11-24 11:46:33 +00:00
Theodore Ts'o 89270b5531 ChangeLog, expanddir.c:
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.
1997-11-24 11:44:25 +00:00
Theodore Ts'o b8647faa3b ChangeLog, pass3.c:
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.
1997-11-20 21:52:43 +00:00
Theodore Ts'o 8039c4802f ChangeLog, pass1.c:
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.
1997-11-19 21:39:13 +00:00
Theodore Ts'o f8188fff23 Many files:
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.
1997-11-14 05:23:04 +00:00
Theodore Ts'o d36d835b48 ChangeLog, Makefile.in, Makefile.pq, ext2_err.et.in, tst_getsize.c:
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.
1997-11-12 03:48:07 +00:00
Theodore Ts'o c654c76769 configure:
Check for the existence of setjmp.h
1997-11-12 03:45:34 +00:00
Theodore Ts'o a9f95f4ec7 ChangeLog, configure.in:
Add check for setjmp.h
1997-11-10 16:14:16 +00:00
Theodore Ts'o 6822754243 ChangeLog, unix.c:
Add a special case check for the error code EROFS and display an
  appropriate error message for this case.
1997-11-04 04:25:22 +00:00
Theodore Ts'o 0ea01da79c ADD TAG: PQ_SNAPSHOT_971103 1997-11-04 00:31:22 +00:00
Theodore Ts'o 9abf59d282 ChangeLog, resize2fs.h:
Remove STDC magic, since everyone is STDC these days.
1997-11-04 00:31:22 +00:00
Theodore Ts'o 7aec6e061d Makefile.pq:
Add dirinfo.obj to the list of files to compile.
1997-11-04 00:26:14 +00:00
Theodore Ts'o 80c0fc3492 Many files:
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.
1997-11-03 19:46:49 +00:00
Theodore Ts'o 08b213017f Many 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.
1997-11-03 19:42:40 +00:00
Theodore Ts'o 79a90bdad0 ChangeLog, bitops.c, ext2fs.h, fileio.c:
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.
1997-11-03 19:16:55 +00:00
Theodore Ts'o 3b12bf9469 Makefile.pq, libecho.c:
echo function for Windows
1997-10-31 06:25:24 +00:00
Theodore Ts'o 291c9049ba ext2fs.h, ext2_err.et.in, ChangeLog, pass1.c, pass3.c:
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.
1997-10-31 06:17:08 +00:00
Theodore Ts'o 1f0b6c1f89 Many files:
Rename new error codes to have _ET_ in them for consistency.
1997-10-31 06:07:47 +00:00
Theodore Ts'o 7b4e4534f9 Many files:
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.
1997-10-26 03:41:24 +00:00
Theodore Ts'o 78d8f90ffa bmap.c:
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
1997-10-26 01:53:39 +00:00
Theodore Ts'o 4e27d7641a version.h:
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
1997-10-25 23:50:09 +00:00
Theodore Ts'o 6e5eeba573 ChangeLog, script:
Add scripts to skip the e_brel_bma and e_irel_ima tests (since they
  have been removed from the library for now)
1997-10-25 22:43:58 +00:00
Theodore Ts'o 5a51384ef2 ChangeLog, debugfs.c, dump.c:
debugfs.c (copy_file), dump.c (dump_file): Change to use the new
  	fileio primitives in libext2.
1997-10-25 22:41:14 +00:00
Theodore Ts'o 30fab29306 Many files:
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.
1997-10-25 22:37:42 +00:00
Theodore Ts'o 71b97145a3 ext2_err.et.in:
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.
1997-10-25 04:19:14 +00:00
Theodore Ts'o c555aebde4 Many files:
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"
1997-10-25 04:16:53 +00:00
Theodore Ts'o f13048113f ChangeLog, debugfs.c, dump.c, ls.c:
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.
1997-10-25 03:51:53 +00:00
Theodore Ts'o 519149fb45 Many files:
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.
1997-10-25 03:49:49 +00:00
Theodore Ts'o 622f5f272d ChangeLog, pass1b.c:
Fix bug in error reporting in the case where cs.errcode is non-zero.
1997-10-24 04:18:21 +00:00
Theodore Ts'o b0b9c4dece ChangeLog, configure.in, configure:
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().
1997-10-20 23:36:30 +00:00
Theodore Ts'o 8bf191e866 Many files:
Place #ifdef RESOURCE_TRACK around code which uses init_resource_track
  and print_resource_track.  (Not all systems have timeval)
1997-10-20 01:38:32 +00:00
Theodore Ts'o 7668d9b590 Makefile.in:
Don't include the Makefile.pq and the powerquest directories in the tar file.
Makefile.pq:
  Initial version of powerquest-special makefile
1997-10-20 01:23:07 +00:00
Theodore Ts'o b2da22d14b ChangeLog, e2fsck.h, super.c:
super.c: Remove excess #includes which are not necessary.
  e2fsck.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H
1997-10-20 01:16:35 +00:00
Theodore Ts'o 519ee04308 rw_bitmaps.c:
Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
1997-10-20 00:52:43 +00:00