summaryrefslogtreecommitdiff
path: root/lib/ext2fs/undo_io.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-18Shorten compile commands run by the build systemTheodore Ts'o1-0/+1
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-16e2fsprogs: Fix some error cleanup path bugsEric Sandeen1-2/+2
In inode_open(), if the allocation of &io fails, we go to cleanup and dereference io to test io->name, which is a bug. Similarly in undo_open() if allocation of &data fails, we go to cleanup and dereference data to test data->real. In the test_open() case we explicitly set retval to the only possible error return from ext2fs_get_mem(), so remove that for tidiness. The other changes just make make earlier returns go through the error goto for consistency. In many cases we returned directly from the first error, but "goto cleanup" etc for every subsequent error. In some cases this leads to "impossible" tests such as: if (ptr) ext2fs_free_mem(&ptr) on paths where ptr cannot be null because we would have returned directly earlier, and Coverity flags this. This isn't really indicative of an error in most cases, but I think it can be clearer to always exit through the error goto if it's used later in the function. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-16libext2fs: Potential null ptr deref in undo_err_handler_initEric Sandeen1-1/+2
In the !undo_io_backing_manager case, undo_err_handler_init will be passed a null data->real, which will be dereferenced. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-06-07Merge branch 'maint' into nextTheodore Ts'o1-2/+2
Conflicts: e2fsck/journal.c e2fsck/pass1.c e2fsck/pass2.c misc/mke2fs.c
2010-05-17libe2p, libext2fs: Update file copyright permission states to match COPYINGTheodore Ts'o1-2/+2
The top-level COPYING file states that the e2p and ext2fs libraries are available under the LGPLv2. The files were incorrectly labelled. Alex Thomas/Luster has been consulted wrt to the ext3_extents.h file; the rest of the files were primarily authored by Theodore Ts'o. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-07Convert to use io_channel_read_blk64() and io_channel_write_blk64()Valerie Aurora Henson1-1/+1
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-12libext2fs: Add 64-bit support to the undo managerTheodore Ts'o1-10/+45
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07Fix gcc -Wall warnings in libext2fsTheodore Ts'o1-16/+27
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27libext2fs: Add undo I/O managerAneesh Kumar K.V1-0/+575
This I/O manager saves the contents of the location being overwritten to a tdb database. This helps in undoing the changes done to the file system. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>