Commit Graph

164 Commits (7833262585b0f9f85915c387fa35708cf3ff3609)

Author SHA1 Message Date
Theodore Ts'o 7833262585 mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
	fchflags without defining UF_NODUMP.  (Addresses Debian
	bug #101361)
2001-06-22 21:20:47 -04:00
Theodore Ts'o d90f3494b2 e2fsck/flushb.c and lib/ext2fs/flushb.c: Use platform independent
method of defining the BLKFLSBUF and FDFLUSH ioctl's.
	Also include sys/mount.h since on newer glibc's BLKFLSBUF
	is defined there.
2001-06-22 21:01:17 -04:00
Theodore Ts'o 16645f802a bitops.h: The C language versions of ext2fs_swab16/32 need to be
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).
2001-06-22 20:54:11 -04:00
Theodore Ts'o 89a1fa831f dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2 since
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.)
2001-06-22 20:40:51 -04:00
Theodore Ts'o f4f75bae85 ChangeLog:
Update for 1.21 release.
2001-06-16 01:14:28 +00:00
Theodore Ts'o d1e66b7936 ChangeLog, Makefile.in:
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.
2001-06-15 22:44:32 +00:00
Theodore Ts'o 997b820e94 ChangeLog, ismounted.c:
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...)
2001-06-15 18:33:43 +00:00
Theodore Ts'o 6bd134809c ChangeLog, ismounted.c:
ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.  Remove
  	unneeded #pragma argsused, since the arguments are always used.
2001-06-14 07:00:55 +00:00
Theodore Ts'o 6579488028 ChangeLog, ext2_types.h.in:
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.
2001-06-14 00:24:42 +00:00
Theodore Ts'o 364a373e16 ChangeLog, setsuper.c:
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.
2001-06-13 23:46:39 +00:00
Theodore Ts'o 83d5abf1d7 ChangeLog:
Add debian bug number reference.
  Add debian bug reference.
2001-06-13 23:31:27 +00:00
Theodore Ts'o 66a461469c ChangeLog, ismounted.c:
ismounted.c (check_mntent_file): Work around GNU hurd brain damage.
2001-06-13 23:26:19 +00:00
Theodore Ts'o 30ae14c9de ChangeLog, Makefile.in:
Makefile.in: Limit some .o files from being included into the library
  	if --disable-debugfs, --disable-swapfs, --disable-imager, or
  	--disable-resizer are used.
2001-06-13 22:38:56 +00:00
Theodore Ts'o cbbf031b6e ChangeLog, dumpe2fs.c, mke2fs.c:
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.
2001-06-13 00:12:04 +00:00
Theodore Ts'o 3034f62a0f ChangeLog, Makefile.in, bitops.h, gen_bitmap.c:
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.
2001-06-11 15:17:45 +00:00
Theodore Ts'o 5df55d7f84 ChangeLog, Makefile.in, swapfs.c, 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.
2001-06-11 07:00:04 +00:00
Theodore Ts'o 349a484a57 ChangeLog, Makefile.in, mkjournal.c:
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.
2001-06-11 00:49:29 +00:00
Theodore Ts'o 30e50b7cdd ChangeLog, icount.c:
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.
2001-06-08 09:43:40 +00:00
Theodore Ts'o f36d14f5f0 ChangeLog, valid_blk.c:
valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks for a
  	symlink to determine whether it is a fast symlink.
2001-06-02 04:13:16 +00:00
Theodore Ts'o 36a23e1806 ChangeLog:
Fix typo in ChangeLog.
2001-06-02 00:54:10 +00:00
Theodore Ts'o 797f5ef14e ChangeLog, wordwrap.pl:
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.
2001-06-01 23:49:46 +00:00
Theodore Ts'o bb185861d1 e2fsprogs.lsm, version.h:
Update version string for 1.20 release
ChangeLog:
  Update Changelogs for 1.20 release.
2001-05-25 17:35:00 +00:00
Theodore Ts'o d5f858dd7f ChangeLog, ismounted.c:
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.
2001-05-25 17:14:23 +00:00
Theodore Ts'o cc86017b59 ChangeLog, ismounted.c:
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.
2001-05-25 16:32:53 +00:00
Theodore Ts'o 4ed8ebe268 ChangeLog, ext2_err.et.in:
ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error code.
2001-05-23 18:30:10 +00:00
Theodore Ts'o b10820cdcd ChangeLog, ext2_fs.h:
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.
2001-05-21 05:23:31 +00:00
Theodore Ts'o 7c2d25699f ChangeLog, ext2fs.h:
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
2001-05-21 02:54:21 +00:00
Theodore Ts'o 9f8046fc6d Many files:
alloc.c, alloc_tables.c, badblocks.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, ext2_fs.h, fileio.c,
  	finddev.c, flushb.c, freefs.c, get_pathname.c, getsize.c, icount.c,
  	imager.c, initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
  	link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c, newdir.c,
  	nt_io.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_byteswap.c,
  	tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c,
  	version.c, write_bb_file.c, ext2_fs.h: Moved file from include/linux.
  	Adjust all files in this directroy to include this file.
2001-05-14 11:35:52 +00:00
Theodore Ts'o 7a34cb01a9 ChangeLog, mkjournal.c:
mkjournal.c (ext2fs_create_journal_superblock): Remove redundant code.
2001-05-14 04:28:35 +00:00
Theodore Ts'o 0f6794591e ChangeLog, fileio.c:
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.
2001-05-05 16:42:24 +00:00
Theodore Ts'o 1cca4d6036 ChangeLog, dirblock.c:
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.
2001-05-05 05:12:14 +00:00
Theodore Ts'o a78926effb Many files:
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.
2001-05-03 04:02:29 +00:00
Theodore Ts'o f955cc1425 ChangeLog, dir_iterate.c:
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.
2001-05-01 19:04:28 +00:00
Theodore Ts'o 954a683dd0 ChangeLog, getsize.c:
getsize.c (ext2fs_get_device_size): Use an unsigned long to query the
  	device sizes using the BLKGETSIZE ioctl.
2001-04-26 01:42:37 +00:00
Theodore Ts'o 52db0b4178 ChangeLog, Makefile.in, ismounted.c:
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().
2001-04-17 02:22:05 +00:00
Theodore Ts'o 036039460f ChangeLog, ext2_err.et.in, mkjournal.c:
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_*.
2001-04-17 00:53:25 +00:00
Theodore Ts'o 9ec53cf4f3 ChangeLog, Makefile.in, bitops.h, tst_byteswap.c:
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.
2001-02-20 16:28:40 +00:00
Theodore Ts'o c5423c5b3e ChangeLog, e2image.c:
e2image.c (main): Add code to write the e2image header.
ChangeLog, e2image.h:
  e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
2001-02-08 05:45:17 +00:00
Theodore Ts'o d23042af75 ChangeLog, mkjournal.c:
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.
2001-02-08 03:37:16 +00:00
Theodore Ts'o 020888625f ChangeLog, mkjournal.c:
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.
2001-01-18 01:44:19 +00:00
Theodore Ts'o a112847b39 ChangeLog, ext2_err.et.in, ext2fs.h, initialize.c, mkjournal.c, openfs.c:
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().
2001-01-16 06:56:14 +00:00
Theodore Ts'o 8077994116 ChangeLog, closefs.c:
closefs.c (ext2fs_flush): Don't write out anything beyond the primary
  	superblock if EXT2_INCOMPAT_JOURNAL_DEV is listed.
2001-01-14 18:03:43 +00:00
Theodore Ts'o b94bd81ae2 ChangeLog, imager.c:
imager.c: Fix gcc -Wall complaints and a series of bugs where retval
  	wasn't set correctly.  (Thanks to Andreas Dilger for pointing this
  	out.)
2001-01-12 17:26:05 +00:00
Theodore Ts'o 4d0f3e17a5 ChangeLog, MCONFIG.in, configure, configure.in:
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.)
2001-01-11 15:48:50 +00:00
Theodore Ts'o 31dbecd482 Many files:
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.
2001-01-11 04:54:39 +00:00
Theodore Ts'o e446d71838 ChangeLog, dirblock.c:
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.
2001-01-05 22:27:06 +00:00
Theodore Ts'o cdaf1fa78f ChangeLog, mkjournal.c:
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.
2001-01-05 22:23:22 +00:00
Theodore Ts'o 4becab6824 ChangeLog, Makefile.in, mkjournal.c:
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.
2001-01-03 19:22:42 +00:00
Theodore Ts'o 43ec8734f2 ChangeLog, ext2fs.h, ismounted.c:
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.
2001-01-03 14:56:46 +00:00
Theodore Ts'o 31a17b36d5 ChangeLog, ext2fs.h, mkjournal.c:
mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
  	ext2fs_add_journal_inode()
2001-01-03 13:04:12 +00:00