aboutsummaryrefslogtreecommitdiff
path: root/debugfs/util.c
AgeCommit message (Collapse)Author
2007-05-25Fix gcc -Wall warnings, especially on 64-bit systemsAndreas Dilger
Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-10Fix debugfs's date parser so that it accepts integer valuesTheodore Ts'o
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-10Handle large setb/testb/freeb commands in debugfsEric Sandeen
Fix a signed vs. unsigned problem by using blk_t instead of int Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2006-05-29Add missing backwards compatibility for ancient Linux systemsTheodore Ts'o
This fixes some (but not all) of the compatibility bugs which prevented e2fsprogs from being compiled on a Linux 2.0.35 system. There are still some unprotected use of long long's, and apparently some type problems with the uuid library, but these can be fixed up later. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24New debugfs command: set_current_timeTheodore Ts'o
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. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-03-20Fix e2fsck, debugfs, and the ext2fs_mkdir function so that when we createTheodore Ts'o
a new inode we make sure that the extra information in the inode (any extra fields in a large inode and any ea-in-inode information) is cleared. This can happen when e2fsck creates a new root inode or a new lost+found directory, or when the user uses the debugfs write, mknod, or mkdir commands. Otherwise, the newly create inode could inherit garbage (or old EA information) from a previously deleted inode.
2005-03-20Enhance debugfs's stat command so it can dump extended attributesTheodore Ts'o
which are stored in the inode body.
2004-12-15Fix stupid core dumping bug if the TZ environment variable isn't set.Theodore Ts'o
2004-11-30If the TZ environment variable is set to GMT, use gmtime() Theodore Ts'o
instead of localtime() or ctime() to force the use of GMT. This is because the dietlibc doesn't honor the TZ environment variable.
2004-04-11util.c (open_pager): Use DEBUGFS_PAGER in preference to PAGERTheodore Ts'o
(Addresses Debian Bug #239547)
2004-01-24For debugfs, use the "more" pager in preference to "less", Theodore Ts'o
since "less" doesn't work terribly well for debugfs's purpose. Document the DEBUGFS_PAGER and PAGER environment variables.
2003-12-25Try to use the DEBUGFS_PAGER environmentTheodore Ts'o
variable first, and then fall back to the PAGER environment variable. Finally, search for an appropriate pager executable.
2003-12-07util.c (open_pager): Search for the pager to use, starting withTheodore Ts'o
'pager', and then falling back to 'less' and then 'more'. (Addresses Debian Bug: #221977)
2003-05-13util.c, ls.c, logdump.c, htree.c, dump.c, debugfs.h, debugfs.c, ChangeLog:Theodore Ts'o
util.c (reset_getopt), debugfs.c (do_open_filesys, do_show_super_stats), ls.c (do_list_dir), dump.c (do_dump), htree.c (do_htree_dump, do_dx_hash), logdump.c (do_logdump): Define and use a new function, reset_getopt(), which does whatever is necessary to reset getopt() again. This is different for different implementations, so the portabilty issues are a bit of a nightmare. (Addresses Debian bug #192834)
2002-05-11Add a new command "bmap" to debugfs which calculates the logical->physical ↵Theodore Ts'o
block mapping for a particular inode. Fixed a bug in the libext2 library which broke ext2fs_bmap if no inode structre was passed inside for here. Fixed bad calling parameters to parse_ulong which broken the -b and -s options to debugfs, as well as do_init, and the testb, setb, clearb functions.
2002-04-01util.c (parse_ulong): Fix typo which cases parse_ulong toTheodore Ts'o
coredump if the err variable is filled in (for example, if the -b or -s options are passed to the debugfs's command-line invocation).
2002-02-25Add initial support in debugfs for examining directory indexingTheodore Ts'o
information.
2002-01-03Add new debugfs commands and arguments which make it easier to Theodore Ts'o
recover deleted files. The lsdel command now takes an optional argument which allows the user to only see the most recently deleted files. Also added a new command, undel, which automates undeleting a deleted inode and linking it back to a directory. Also added an optional count argument to the testb, freeb, setb, and find_free_block commands. The ls command now takes a new option, -d, which lists deleted directory entries. Factored out out commonly used code into utility subroutines for ease of maintenance and to make the executable size smaller.
2001-12-02Fixes necessary for e2fsprogs to work using the diet libc.Theodore Ts'o
- Renamed linux/list.h to be linux/linked_list.h to work around a problem caused by diet libc insistence to search the kernel header files ahead of all other files in the include path, including the user specified include files. - Worked around a bug in diet libc which core dumps when using putc with stderr by using fputs instead. As a bonus, this also shaved a few bytes off of com_err.o. - Fixed a real bug in debugfs which was detected because diet libc was more sensitive than glibc when incorrectly using fclose() where pclose() is required.
2001-01-11Many files:Theodore Ts'o
debugfs.c, debugfs.h, dump.c, icheck.c, ls.c, lsdel.c, ncheck.c, setsuper.c, util.c: Change ino_t to ext2_ino_t. Fix a few minor gcc-wall complaints while we're at it.
2000-08-23ChangeLog, util.c:Theodore Ts'o
util.c (string_to_inode): Use strtoul instead of atoi, so that hex inode numbers will be accepted.
2000-08-19debugfs.c:Theodore Ts'o
Fixup one more missing use of lb->f instead stdout when printing the comma separator. ChangeLog, util.c: util.c (open_pager): Set SIGPIPE to be ignored, so that quitting out of the pager doesn't blow away debugfs.
2000-08-14Makefile.in, debug_cmds.ct, setsuper.c, ChangeLog:Theodore Ts'o
setsuper.c: New function which implements the set_super_value command. Allows the user to set arbitrary superblock fields. ChangeLog, util.c: util.c (open_pager): If the PAGER environment variable is not set, default to using "more".
2000-05-27Makefile.in:Theodore Ts'o
Fix stupid dependency bug. ChangeLog, debugfs.c, debugfs.h, util.c: debugfs.c (do_testb, do_testi): Call check_fs_bitmaps to avoid coredumping if the bitmaps aren't loaded. util.c (check_fs_bitmaps): New function which checks whether or not the bitmaps are loaded.
1997-04-29Many files:Theodore Ts'o
Checked in e2fsprogs 1.05
1997-04-26Many files:nougat-mr1-arcTheodore Ts'o
Checkin of e2fsprogs 0.5b