Theodore Ts'o [Sat, 10 Dec 2005 00:16:40 +0000 (19:16 -0500)]
Fix bogus spaces before '!' and '?' characters in unused programs.
On Mon, Oct 31, 2005 at 01:23:53PM +0000, Martin Michlmayr wrote:
> Package: e2fsprogs
> Version: 1.38-2
> Severity: minor
>
> e2fsprogs isn't consistent in its use of spaces before an exclamation
> mark. The patch below fixed this by removing some spaces.
> (Interestingly, I couldn't find the error message in the sources where
> I noticed this inconsistency, namely "group descriptors corrupted !").
Patch applied, but none of the source files you touched are actually
compiled in e2fsprogs, and most of them weren't written by me. :-)
Theodore Ts'o [Fri, 9 Dec 2005 23:18:06 +0000 (18:18 -0500)]
Clarify the e2fsck man page regarding the -c option
A user was confused about whether or not e2fsck -c performed a destructive
test on the filesystem, since it stated that -cc resulted in a non-destructive
read/write test. Clarify that -c does a read/only test.
Theodore Ts'o [Mon, 21 Nov 2005 05:04:31 +0000 (00:04 -0500)]
Fix gcc compilation on sparc architectures in bitops.h
We no longer have the sparc assembly code in the header file any more, so we
shouldn't set _EXT2_HAVE_AS_BITOPS_. This would break compiles on the sparc
architectures when using gcc.
Theodore Ts'o [Sun, 13 Nov 2005 04:30:39 +0000 (23:30 -0500)]
Fix writing external journals on big-endian machines
Fix a bug when writing an external journal device on an big
endian machine (such as a S/390), where when the number of
block groups is zero, we never end up writing out the
primary superblock at all.
Theodore Ts'o [Wed, 9 Nov 2005 22:37:07 +0000 (18:37 -0400)]
Fix cross-compilation problems when CFLAGS contain target-specific options
Use BUILD_CCFLAGS and BUILD_LDFLAGS instead of CCFLAGS and LDFLAGS in
the build system when building files in the util directory which are
needed during the build process. This avoids potential problems when
cross-compiling some of the options are not recognized as valid by the
host compiler. (Addresses Sourceforge Bug #1261547)
Generalize the time parsing code and move it to
util.c:string_to_time(). Add new command, set_current_time, which
sets the time used to set the filesystems's time fields.
If fs->now is non-zero, use that as the time instead of the system
time when setting various filesystem fields (last modified time, last
write time, etc.)
Add extra spaces when printing the "done" message to clear out the
block number to fix a display corruption when the -s option is used to
display the progress of the test. (Addresses Debian Bug #322231)
Karel Zak [Tue, 6 Sep 2005 12:13:35 +0000 (08:13 -0400)]
Improve VFAT detection to support filesystems w/o a magic string in the superblock
The current libblkid code expects that there's magic string in FAT super
block (like "FAT12", "FAT16", ...). It's very often right, but valid FAT
super block may be without magic string too :-(
The patch from attachment fix this problem. It's inspired by HAL and
Linux kernel.
Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
That bug doesn't appear when libblkid creates new cache and checks for
all possible filesystems, because it tries ext3 before ext2. BUT when
the library only revalidate the cache it first probes for old cached
filesystem (e.g. ext2).
Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 8 Aug 2005 23:57:04 +0000 (18:57 -0500)]
Fix fencepost error in resize2fs caught by valgrind
There was a off-by-one fencepost error in the logic used to check if
we avoid copying zero-filled blocks when moving an inode table down by
a block or two. Thanks to valgrind for catching it. As far as I know
this fencepost error wasn't causing any actual problems, but it was
definitely a bug.
Fix Debian build rules to reflect changes in texi2html (Debian Bug #317862)
Texi2html's behavior changed recently: if it is invoked with
-split=chapter, old versions place the HTML files in the same
directory as the documentation source, whereas new versions place the
generated files in a subdirectory.
In ext2fs_add_journal_inode() check for the case where the filesystem
appears to be unmounted, but the device is still apparently busy.
This can happen when the luser doesn't bother to mount /proc and has a
bogus /etc/mtab, but still wants to mount the filesystem before using
tune2fs(?!?). Add a safety check to save him from his own stupidity,
at least on 2.6 kernels. (Addresses Debian Bug #319002)
Change gen_tarball to ignore Mercurial/quilt files (and remove BK ignores).
Since e2fsprogs is now being managed by Mercurial instead of BK,
remove BitKeeper and add ".hg", ".hgignore", ".pc", and "patches" to
the list of files/directories not included in the tar file.
Andreas Dilger [Sun, 10 Jul 2005 03:06:59 +0000 (22:06 -0500)]
This patch adds a check to use fstat or fstat64 in getsize.c if the
target is a regular file, instead of doing binary searching. It also
fixes a couple of cases where a file descriptor is leaked in the
ext2fs_getsize() routine on error.
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
This file descripts the signed-off-by procedure first used by Linus
for the Linux kernel patch submissions, and which will now be used for
e2fsprogs as well.
[BUGFIX]: E2fsck will segfault on disconnected inode with extended attribute(s)
This was actually caused by two bugs. The first bug is that if the
inode has been fully fixed up, the code will attempt to remove the
inode from the inode_bad_map without checking to see if this bitmap is
present. Since it is cleared at the end of pass 2, if
e2fsck_process_bad_inode is called in pass 4 (as it is for
disconnected inodes), this would result in a core dump.
The first bug was mostly hidden by a second bug, which caused
e2fsck_process_bad_inode() to consider all inodes without an extended
attribute to be not fixed.
Fix debugfs's set_inode_fields command from silently failing.
The set_inodes_field command was silently failing when setting one of
the following fields: frag, fsize, uid_high, gid_high, and author.
The type size for these fields were set to an incorrect value in the
inode_fields table.
Theodore Ts'o [Thu, 30 Jun 2005 23:40:18 +0000 (19:40 -0400)]
Change the function prototypes of ext2fs_set_bit, ext2fs_clear_bit, and
ext2fs_test_bit to take an unsigned int for the bit number. Negative
bit numbers were never allowed (and didn't make any sense), so this should
be a safe change. This is needed to allow safe use of block numbers
greater than or equal to 2**31.
Theodore Ts'o [Mon, 27 Jun 2005 17:54:08 +0000 (13:54 -0400)]
Fix blkid's debugging/TEST_PROGRAM code so that it is sufficiently
standalone that "make check" will compile without errors even
when configure "--enable-blkid-debug" is not specified.
Stephen Tweedie [Mon, 27 Jun 2005 15:47:21 +0000 (11:47 -0400)]
ext2fs_resize_mem() is suffering from C99 strict type aliasing problems.
The trouble is that it is modifying pointers in place, but doing so via
"void *" types which alias the pointers passed in (which are typically
pointers to a struct.) The inline ext2fs_resize_mem() code may update
the pointer, but the caller is not required to reload the old value it
may have cached in a register, according to the type aliasing rules.
This is causing the caller to dereference the old pointer when compiled
with -O2, resulting in reproducible SEGV, on at least one ia64
configuration.
The compiler *is* required to reload if it sees an update to a dereferenced
char value, though, as chars are defined to alias anything; and memcpy()
is defined to operate on chars. So using memcpy() to copy the pointer
values is guaranteed to force the caller to reload. This has been
verified to fix the problem in practice.
Theodore Ts'o [Mon, 20 Jun 2005 21:59:06 +0000 (17:59 -0400)]
error_message.c, init_et.c: Segregate error tables registered
via add_error_table() and the other dynamic methods from
the ones allocated via initialize_xxx_error_table() so
that we won't fail even for error tables created using old
versions of compile_et. Thanks to Nalin Dahyabhai for
this suggested patch.
Theodore Ts'o [Mon, 20 Jun 2005 20:24:04 +0000 (16:24 -0400)]
et_c.awk: Use a dynamically allocated structure in
initialize_xxx_error_table(), to prevent segfaults if an
old library calls initialize_xxx_error_table, and another
library/application calls add_error_table() on the same
error table, and then calls remove_error_table().
(Addresses Sourcefroge Bug #1150146)
Theodore Ts'o [Mon, 20 Jun 2005 12:23:55 +0000 (08:23 -0400)]
Remove the findsuper and partinfo programs from the list of C files to be
internationalized, as they are not installed by default (nor should they be).
Theodore Ts'o [Mon, 20 Jun 2005 01:04:12 +0000 (21:04 -0400)]
Make the e2fsck man page clear that the -c, -l, and -L options are
never safe to use on a mounted filesystem, and in general, running
e2fsck on mounted filesystems is a bad idea.
Theodore Ts'o [Thu, 16 Jun 2005 22:41:06 +0000 (18:41 -0400)]
Makefile.in: Add an include path specifier when building
tst_ostype so that "make check" will build correctly on
systems without the include files from e2fsprogs installed
in the system include directory.
Theodore Ts'o [Thu, 16 Jun 2005 19:08:00 +0000 (15:08 -0400)]
defaults/e_script, run_e2fsck, d_loaddump, f_resize_inode,
f_swapfs, f_move_itable, f_resize_inode, test_config:
Allow the diff options to be set in test_config so that
diff -u can be used on platforms that have it. (To be
done: checking whether diff can support -u in the
configure script.)
Theodore Ts'o [Sun, 5 Jun 2005 20:46:19 +0000 (16:46 -0400)]
Fix a minor spelling typo in blkid's man page, and update e2fsck's REPORTING
BUGS section to request that e2fsck's messages printed in English, and to
send a raw e2image filesystem dump if possible.
Theodore Ts'o [Sun, 5 Jun 2005 20:05:22 +0000 (16:05 -0400)]
On Linux 2.6 systems, mke2fs and badblocks will check to see whether
the filesystem appears to be busy; if so, the programs will print an
error message and abort. (Addresses Debian Bug #308594).
Theodore Ts'o [Sat, 21 May 2005 03:10:35 +0000 (23:10 -0400)]
filefrag.c (frag_report, get_bmap): The FIBMAP and FIGETBSZ ioctls return
an integer, not an unsigned long. Fix this to avoid problems on 64-bit
platforms where the size of an integer != the size of a long.
(Addresses Debian Bug #309655)
Theodore Ts'o [Tue, 10 May 2005 02:25:39 +0000 (22:25 -0400)]
Change the default journal size to be bigger for larger filesystems,
given modern memory sizes. Now, for filesystems greater than 4GB, we
use a journal of 128 MB instead 32 MB.
Theodore Ts'o [Tue, 10 May 2005 00:39:02 +0000 (20:39 -0400)]
Modify the script which generates the e2fsprogs.pot translations template
file to include comments that expand the '@' abbrevations in e2fsck/problem.c
Theodore Ts'o [Sun, 8 May 2005 06:15:02 +0000 (02:15 -0400)]
Fix bug in the secure getenv function so that the ss library will corrently
honor the PAGER and SS_READLINE_PATH environtment variables, and the
test_io io_manager in the ext2fs library honors the TEST_IO_LOGFILE,
TEST_IO_FLAGS, TEST_IO_BLOCK, and TEST_IO_READ_ABORT environment variables.
Theodore Ts'o [Sat, 7 May 2005 18:22:38 +0000 (14:22 -0400)]
Clean up the debugging code in the blkid library so that we don't use
the inline functions DEB_DUMP_* and instead use the private functions
blkid_debug_dump_*().
Theodore Ts'o [Sat, 7 May 2005 17:32:47 +0000 (13:32 -0400)]
Add new two new functions to the blkid library: blkid_dev_set_search(), and
blkid_dev_has_tag(), and change the blkid program to take advantage of these
functions.
Theodore Ts'o [Fri, 6 May 2005 20:26:13 +0000 (16:26 -0400)]
When determining the libraries needed for Debian's initrd, unset
LD_PRELOAD and LD_LIBRARY_PATH and filter out libraries found in
/etc/ld.so.preload. (Addresses Debian Bug: #304003)
Theodore Ts'o [Fri, 6 May 2005 13:42:34 +0000 (09:42 -0400)]
If the .c and .h file already exist, and they have not changed, use the
original versions of the files, so as to avoid rebuilding files when not
necessary. Also fixes a potential SMP/Parallel build problem when one
make process runs compile_et to generate the .h file, and a partially
generated .c file is compiled by another make process. (Addresses
Sourceforge Bug: #1157933)