e2fsprogs/e2fsck
Eric Sandeen fe65f1ecfc e2fsprogs: Don't try to close an fd which is negative
These reflect either file descriptors which aren't tested
for failure, or closures of fd's which may have failed.

In setup_tdb(), test for failure of mkstemp and return
without trying to open the file (again).

In reserve_stdio_fds, rather than closing the "extra"
fd == 3 due to the way the loop is written, just
don't go that far by using while (fd <= 2).

In logsave, it forks and retries forever if open fails,
but at least make coverity happy by explicitly not
trying to close a negative file descriptor.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-16 19:55:55 -04:00
..
CHANGES Many files: 1997-04-26 13:21:57 +00:00
Makefile.in e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
argv_parse.c remove useless if-before-free tests 2009-03-08 20:37:12 -04:00
argv_parse.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
badblocks.c Convert uses of super->s_*_blocks_count to ext2fs_*_blocks_count() 2009-09-07 20:46:34 -04:00
crc32.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
crc32defs.h Only use __builtin_expect if __GNUC__ > 3 2008-07-13 16:06:56 -04:00
dict.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dict.h Fixx gcc -Wall nitpicks. 2003-07-06 00:36:48 -04:00
dirinfo.c e2fsprogs: Don't try to close an fd which is negative 2011-09-16 19:55:55 -04:00
dx_dirinfo.c e2fsck: fix miscellaneous memory leaks 2009-06-15 03:54:06 -04:00
e2fsck.8.in Merge branch 'master' into next 2010-12-16 23:20:11 -05:00
e2fsck.c e2fsck: Skip time-based checks if the time looks insane or broken_system_clock 2010-05-13 17:36:36 -04:00
e2fsck.conf.5.in e2fsprogs: man page typo fixes 2011-03-18 15:03:15 -04:00
e2fsck.h e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
ea_refcount.c e2fsck, resize2fs: fix a fp precision error that can lead to a seg fault 2010-07-05 20:40:41 -04:00
ehandler.c Convert to use io_channel_read_blk64() and io_channel_write_blk64() 2009-09-07 21:14:24 -04:00
emptydir.c e2fsck: Fix up to be 64-bit block number safe 2010-06-13 17:00:00 -04:00
extend.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
flushb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
gen_crc32table.c Fix gcc -Wall warnings in e2fsck 2008-06-07 11:04:10 -04:00
iscan.c e2freefrag: Fix getopt bug on machines with unsigned chars 2010-07-05 14:53:58 -04:00
jfs_user.h e2fsck: Fix up to be 64-bit block number safe 2010-06-13 17:00:00 -04:00
journal.c ext2fs: Handle internal journal over 2^32 bytes 2011-06-11 12:17:29 -04:00
message.c e2fsck: handle null fs in print_pathname() 2011-09-16 18:43:04 -04:00
mtrace.awk Many files: 1997-04-26 13:21:57 +00:00
mtrace.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
mtrace.h ChangeLog, super.c: 2001-01-12 21:05:57 +00:00
pass1.c e2fsck: Don't store old_op from ehandler_operation if we don't restore it. 2011-09-16 18:43:05 -04:00
pass1b.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
pass2.c e2fsck: Don't store old_op from ehandler_operation if we don't restore it. 2011-09-16 18:43:05 -04:00
pass3.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
pass4.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
pass5.c e2fsck: fix error in computing blocks of the ending group 2011-09-16 09:28:44 -04:00
problem.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
problem.h e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
problemP.h e2fsck: Add the ability to force a problem to not be fixed 2010-12-06 10:10:33 -05:00
prof_err.et Add the profile library code to e2fsck 2005-12-30 23:57:32 -05:00
profile.c e2fsck: Fix leaks in error paths 2011-09-16 19:55:55 -04:00
profile.h mke2fs: Allow specifying reserved_ratio via mke2fs.conf 2011-05-14 23:34:48 -04:00
profile_helpers.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
profile_helpers.h Simplify profile core functionality 2006-01-02 22:04:41 -05:00
quota.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
recovery.c e2fsprogs: fix type-punning warnings 2010-12-16 17:15:30 -05:00
region.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
rehash.c misc: clean up compiler warnings 2011-06-11 10:58:25 -04:00
revoke.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
scantest.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
sigcatcher.c e2fsck: fix valgrind commit in sigcatcher 2011-09-03 09:43:50 -04:00
super.c e2fsck: add support for checking the built-in quota files 2011-08-31 16:31:13 -04:00
unix.c e2fsprogs: Don't try to close an fd which is negative 2011-09-16 19:55:55 -04:00
util.c Merge branch 'maint' into next 2011-05-07 23:24:55 -04:00