Commit Graph

1805 Commits (32138187f08d1f1dc03feb269f987982db76f3db)

Author SHA1 Message Date
Theodore Ts'o 32138187f0 Add fs->now to override time(0) in libext2fs
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.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24 20:14:51 -04:00
Theodore Ts'o 6a7075df30 Fix mke2fs man page's description of the -L option
Fix mke2fs man page to properly document the fact that mke2fs -L takes
an argument.  (Addresses Debian Bug #322188)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24 18:47:39 -04:00
Theodore Ts'o 5f51d1c1eb Fix display bug in badblocks -w
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)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24 18:28:00 -04:00
Theodore Ts'o 2f79e5193f Search the root directory of FAT filesystems for the label information
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 21:51:20 -04:00
Theodore Ts'o ca7498596f Generic blkid library cleanup
Change superblock and generic i/o functions to be more generic.  Clean
up interface to the probe function.  Fix memory leak.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 21:07:23 -04:00
Theodore Ts'o 1e5630abab Add a regression test suite for the blkid library
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 15:55:14 -04:00
Theodore Ts'o 45a3fa8738 Add support to extract basic iso9660 label information to the blkid library
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 15:46:57 -04:00
Theodore Ts'o bb626bcd54 Add support for detecting the reiser4 filesystem in the blkid library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 11:48:38 -04:00
Theodore Ts'o 038d2bedaa Improve blkid's VFAT/FAT filesystem probe code
Collapse vfat and fat code and make it more paranoid when probing for
vat/fat filesystems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-07 12:14:53 -04:00
Theodore Ts'o 45d1d889b9 Remove unneeded probe.h header file in lib/blkid/resolve.c
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-07 12:12:21 -04:00
Karel Zak c4c740ff48 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>
2005-09-06 08:13:35 -04:00
Karel Zak abaa11240a Add support for detecting software suspend partitions to blkid
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-06 06:42:49 -04:00
Karel Zak 05a6edf4fd Fix blkid library so that the cache validation notices ext2 to ext3 conversion
There's mistake in blkid ext2 detection code. The libblkid doesn't
check for journal when revalidate the cache information about an ext2
device.

        # rm -f /etc/blkid.tab

        # mkfs.ext2 /dev/loop0 &> /dev/null
        # blkid -s TYPE /dev/loop0
        /dev/loop0: TYPE="ext2"

        # mkfs.ext3 /dev/loop0 &> /dev/null
        # blkid -s TYPE /dev/loop0
        /dev/loop0: TYPE="ext2"

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>
2005-09-06 06:26:45 -04:00
Matthias Andree 68a7f959c0 Fix compiler warnings about missing memcpy prototypes.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-06 05:59:52 -04:00
Theodore Ts'o 38d732bb5a Fix debugfs's set_inode_field so it can properly set i_size
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-06 05:42:44 -04:00
Theodore Ts'o f2b74cdad1 Update Debian changelog for 1.38-2 release. 2005-08-22 01:20:23 -04:00
Theodore Ts'o cfe7ba4978 Add valgrind support to the regression test suite
Add the --valgrind option to the tests/test_script which allows us to
run the e2fsprogs regression test suite under valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-08-08 19:29:15 -05:00
Theodore Ts'o 2787276ec5 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.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-08-08 18:57:04 -05:00
Theodore Ts'o b28a6e96af Fix use-after-free bug of e2fsck context structure.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25 11:36:43 -05:00
Theodore Ts'o 2743159572 Fix false positives from valgrind: memcpy via no-op structure copy
Don't do a structure copy via an assignment in e2fsck's pass #1 when
it is a no-op in order to avoid false positives from valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25 11:36:43 -05:00
Theodore Ts'o 583d1f8328 Fix false positives from valgrind: prctl(PR_GET_DUMPABLE)
Pass in zero to the unusued arguments of prctl(PR_GET_DUMPABLE) to
avoid false positives from valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25 11:36:43 -05:00
Theodore Ts'o 8c5829fb8e 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.

Reported by Matt Kraai.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-21 19:32:36 -05:00
Theodore Ts'o 29af314d3f Check for a busy device when creating a journal.
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)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-19 15:04:22 -05:00
Theodore Ts'o 424131d7e9 Make the helper scripts in the config directory executable.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-19 14:30:48 -05:00
Theodore Ts'o 99200c6b0f 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.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-19 13:21:34 -05:00
Theodore Ts'o 2f614c8009 Ignore quilt work files
Add .pc and patches to the .hgignore file.
2005-07-19 08:41:27 -05:00
Theodore Ts'o 5bf9b4cd51 Fix com_err bug in compile_et: # of error messages can be wrong
Fixed bug where error messages using continuations wouldn't increment
the message count.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-19 08:24:59 -05:00
Andreas Dilger 9b7d811dda 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>
2005-07-09 22:06:59 -05:00
Andreas Dilger 2524785d5d Miscellaneous mke2fs cleanup
Reorder some mke2fs arg parsing to be more alphabetical, and remove
use of atoi() (which doesn't report errors) in favour of strtoul().

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
2005-07-06 12:58:15 -05:00
Andreas Dilger ce911145ed Allow fractional percentages to the -m option in mke2fs and tune2fs
Allow the reserved blocks ratio to be specified in fractional
percentages.  

Addresses-Debian-Bug: #80205
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
2005-07-06 11:50:08 -05:00
Theodore Ts'o 1f81f05a41 Added SUBMITTING-PATCHES file
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.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-05 22:30:13 -05:00
Theodore Ts'o 8b889f8ce0 Set the executible bit on the configure script. 2005-07-05 22:14:20 -05:00
Theodore Ts'o 49809dd863 Make e2fsck Pass 1C header consistent with the other headers
Removed the period from the Pass 1C header to make it consistent with
the other e2fsck pass headers.
2005-07-04 13:08:37 -05:00
Theodore Ts'o 70f75dd76b Add missing changelog file for previous commit (hg changeset: 0502b63a5be9) 2005-07-04 13:04:05 -05:00
Theodore Ts'o f76344fb6f [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.

Note: This bug was introduced in e2fsprogs 1.36.

(Addresses Debian Bug: #316736)
2005-07-04 12:53:36 -05:00
Theodore Ts'o caf037a456 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.
2005-07-04 12:24:40 -05:00
Theodore Ts'o fea95ffc20 Fix typo in RELEASE-NOTES (wrong date, extra comment) 2005-07-01 17:31:55 -05:00
Theodore Ts'o ed88746b36 Create .hgignore file 2005-07-01 17:30:58 -05:00
Theodore Ts'o f96a0c363b ADD TAG: E2FSPROGS-1_38 2005-06-30 20:06:45 -04:00
Theodore Ts'o 1f965c8d96 Update for e2fsprogs 1.38 release. 2005-06-30 20:06:45 -04:00
Theodore Ts'o 675b79c47f Change mke2fs to refuse to create filesystems greater than 2*31-1 blocks,
at least unless forced.
2005-06-30 20:00:41 -04:00
Theodore Ts'o 80af12e180 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.
2005-06-30 19:40:18 -04:00
Theodore Ts'o 55080a7637 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.
2005-06-27 13:54:08 -04:00
Stephen Tweedie 39c191f5b3 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.

Fixes Red Hat bug #161183.
2005-06-27 11:47:21 -04:00
Theodore Ts'o d9781cee2d Fix minor typos in tune2fs's man page pointed out by Benno Schulenberg. 2005-06-26 22:16:21 -04:00
Theodore Ts'o 5327bb499a Update typos in changelog 2005-06-26 22:12:40 -04:00
Theodore Ts'o 886017aa76 Update French, Dutch, Polish, Swedish, and Turkish translations. 2005-06-26 22:11:46 -04:00
Theodore Ts'o a6b1bd7ba2 ADD TAG: E2FSPROGS-1_38-WIP-0620 2005-06-20 18:00:55 -04:00
Theodore Ts'o feb1219f79 Update for e2fsprogs 1.38-WIP-0620 release. 2005-06-20 18:00:55 -04:00
Theodore Ts'o 197abba0c5 Update po files before WIP release. 2005-06-20 18:00:23 -04:00