1997-04-26 17:21:57 +04:00
|
|
|
#
|
|
|
|
# Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
|
|
|
|
# under the terms of the GNU Public License.
|
|
|
|
#
|
|
|
|
command_table debug_cmds;
|
|
|
|
|
|
|
|
request do_show_debugfs_params, "Show debugfs parameters",
|
|
|
|
show_debugfs_params, params;
|
|
|
|
|
|
|
|
request do_open_filesys, "Open a filesystem",
|
|
|
|
open_filesys, open;
|
|
|
|
|
1997-04-29 20:15:03 +04:00
|
|
|
request do_close_filesys, "Close the filesystem",
|
1997-04-26 17:21:57 +04:00
|
|
|
close_filesys, close;
|
|
|
|
|
2011-11-15 08:31:24 +04:00
|
|
|
request do_freefrag, "Report free space fragmentation",
|
|
|
|
freefrag, e2freefrag;
|
|
|
|
|
1999-09-15 00:55:37 +04:00
|
|
|
request do_features, "Set/print superblock features",
|
|
|
|
feature, features;
|
|
|
|
|
1997-04-29 20:15:03 +04:00
|
|
|
request do_dirty_filesys, "Mark the filesystem as dirty",
|
|
|
|
dirty_filesys, dirty;
|
|
|
|
|
2009-05-30 21:56:31 +04:00
|
|
|
request do_init_filesys, "Initialize a filesystem (DESTROYS DATA)",
|
1997-04-26 17:21:57 +04:00
|
|
|
init_filesys;
|
|
|
|
|
|
|
|
request do_show_super_stats, "Show superblock statistics",
|
|
|
|
show_super_stats, stats;
|
|
|
|
|
|
|
|
request do_ncheck, "Do inode->name translation",
|
|
|
|
ncheck;
|
|
|
|
|
|
|
|
request do_icheck, "Do block->inode translation",
|
|
|
|
icheck;
|
|
|
|
|
|
|
|
request do_chroot, "Change root directory",
|
|
|
|
change_root_directory, chroot;
|
|
|
|
|
|
|
|
request do_change_working_dir, "Change working directory",
|
|
|
|
change_working_directory, cd;
|
|
|
|
|
|
|
|
request do_list_dir, "List directory",
|
|
|
|
list_directory, ls;
|
|
|
|
|
|
|
|
request do_stat, "Show inode information ",
|
|
|
|
show_inode_info, stat;
|
|
|
|
|
2009-07-27 06:29:47 +04:00
|
|
|
request do_dump_extents, "Dump extents information ",
|
|
|
|
dump_extents, extents, ex;
|
|
|
|
|
2011-07-09 20:13:40 +04:00
|
|
|
request do_blocks, "Dump blocks used by an inode ",
|
|
|
|
blocks;
|
|
|
|
|
2011-11-18 00:15:38 +04:00
|
|
|
request do_filefrag, "Report fragmentation information for an inode",
|
|
|
|
filefrag;
|
|
|
|
|
1997-04-26 17:21:57 +04:00
|
|
|
request do_link, "Create directory link",
|
|
|
|
link, ln;
|
|
|
|
|
|
|
|
request do_unlink, "Delete a directory link",
|
|
|
|
unlink;
|
|
|
|
|
|
|
|
request do_mkdir, "Create a directory",
|
|
|
|
mkdir;
|
|
|
|
|
|
|
|
request do_rmdir, "Remove a directory",
|
|
|
|
rmdir;
|
|
|
|
|
|
|
|
request do_rm, "Remove a file (unlink and kill_file, if appropriate)",
|
|
|
|
rm;
|
|
|
|
|
|
|
|
request do_kill_file, "Deallocate an inode and its blocks",
|
|
|
|
kill_file;
|
|
|
|
|
|
|
|
request do_clri, "Clear an inode's contents",
|
|
|
|
clri;
|
|
|
|
|
|
|
|
request do_freei, "Clear an inode's in-use flag",
|
|
|
|
freei;
|
|
|
|
|
|
|
|
request do_seti, "Set an inode's in-use flag",
|
|
|
|
seti;
|
|
|
|
|
|
|
|
request do_testi, "Test an inode's in-use flag",
|
|
|
|
testi;
|
|
|
|
|
|
|
|
request do_freeb, "Clear a block's in-use flag",
|
|
|
|
freeb;
|
|
|
|
|
|
|
|
request do_setb, "Set a block's in-use flag",
|
|
|
|
setb;
|
|
|
|
|
|
|
|
request do_testb, "Test a block's in-use flag",
|
|
|
|
testb;
|
|
|
|
|
|
|
|
request do_modify_inode, "Modify an inode by structure",
|
|
|
|
modify_inode, mi;
|
|
|
|
|
|
|
|
request do_find_free_block, "Find free block(s)",
|
|
|
|
find_free_block, ffb;
|
|
|
|
|
|
|
|
request do_find_free_inode, "Find free inode(s)",
|
|
|
|
find_free_inode, ffi;
|
|
|
|
|
|
|
|
request do_print_working_directory, "Print current working directory",
|
|
|
|
print_working_directory, pwd;
|
|
|
|
|
|
|
|
request do_expand_dir, "Expand directory",
|
|
|
|
expand_dir, expand;
|
|
|
|
|
1997-04-26 17:58:21 +04:00
|
|
|
request do_mknod, "Create a special file",
|
|
|
|
mknod;
|
|
|
|
|
1997-04-26 17:32:25 +04:00
|
|
|
request do_lsdel, "List deleted inodes",
|
|
|
|
list_deleted_inodes, lsdel;
|
|
|
|
|
2002-01-03 12:55:25 +03:00
|
|
|
request do_undel, "Undelete file",
|
|
|
|
undelete, undel;
|
|
|
|
|
1997-04-26 17:58:21 +04:00
|
|
|
request do_write, "Copy a file from your native filesystem",
|
|
|
|
write;
|
|
|
|
|
1997-04-26 17:32:25 +04:00
|
|
|
request do_dump, "Dump an inode out to a file",
|
|
|
|
dump_inode, dump;
|
|
|
|
|
|
|
|
request do_cat, "Dump an inode out to stdout",
|
|
|
|
cat;
|
|
|
|
|
ChangeLog, debug_cmds.ct, debugfs.8.in, debugfs.c, dump.c, ls.c:
debugfs.8.in: Documented new behaviour.
ls.c (ls_l_file): Fix Y2K bug -- was printing 22-May-100 for recent
files. Switched to 4-digit years.
dump.c, debug_cmds.ct (do_rdump): Add new debugfs command "rdump",
which recursively dumps a directory and its contents.
(fix_perms): New function. Break permission-fixing code out of
dump_file() so it can be called by rdump code as well.
(dump_file): Call fix_perms().
debugfs.c, debug_cmds.ct (do_lcd): Add new debugfs command "lcd",
which changes the cwd on the native filesystem.
debugfs.c (open_filesystem): Extra args for superblock, blocksize, and
catastrophic mode. Changed callers.
(do_open_filesys, main): Accept new -b, -s, -c options for
open_filesystem.
ChangeLog, mkdir.c:
mkdir.c (ext2fs_mkdir): Read the parent directory's inode earlier, so
that if there's an error reading it, we can more cleanly back out of
the operation.
version.h:
Update version file for WIP release.
2000-05-27 19:15:40 +04:00
|
|
|
request do_lcd, "Change the current directory on your native filesystem",
|
|
|
|
lcd;
|
|
|
|
|
|
|
|
request do_rdump, "Recursively dump a directory to the native filesystem",
|
|
|
|
rdump;
|
|
|
|
|
2000-08-15 00:37:09 +04:00
|
|
|
request do_set_super, "Set superblock value",
|
|
|
|
set_super_value, ssv;
|
|
|
|
|
2004-12-22 04:37:36 +03:00
|
|
|
request do_set_inode, "Set inode field",
|
2005-01-08 05:14:12 +03:00
|
|
|
set_inode_field, sif;
|
2004-12-22 04:37:36 +03:00
|
|
|
|
2007-04-13 23:56:00 +04:00
|
|
|
request do_set_block_group_descriptor, "Set block group descriptor field",
|
|
|
|
set_block_group, set_bg;
|
|
|
|
|
2001-03-30 00:49:58 +04:00
|
|
|
request do_logdump, "Dump the contents of the journal",
|
|
|
|
logdump;
|
|
|
|
|
2002-02-25 12:28:45 +03:00
|
|
|
request do_htree_dump, "Dump a hash-indexed directory",
|
|
|
|
htree_dump, htree;
|
|
|
|
|
|
|
|
request do_dx_hash, "Calculate the directory hash of a filename",
|
|
|
|
dx_hash, hash;
|
|
|
|
|
|
|
|
request do_dirsearch, "Search a directory for a particular filename",
|
|
|
|
dirsearch;
|
|
|
|
|
2002-05-12 06:13:20 +04:00
|
|
|
request do_bmap, "Calculate the logical->physical block mapping for an inode",
|
|
|
|
bmap;
|
|
|
|
|
2010-07-22 17:39:04 +04:00
|
|
|
request do_punch, "Punch (or truncate) blocks from an inode by deallocating them",
|
|
|
|
punch, truncate;
|
|
|
|
|
2013-01-05 00:00:59 +04:00
|
|
|
request do_symlink, "Create a symbolic link",
|
|
|
|
symlink;
|
|
|
|
|
2003-05-05 19:35:04 +04:00
|
|
|
request do_imap, "Calculate the location of an inode",
|
|
|
|
imap;
|
|
|
|
|
2003-05-22 01:58:36 +04:00
|
|
|
request do_dump_unused, "Dump unused blocks",
|
|
|
|
dump_unused;
|
|
|
|
|
2012-08-18 04:10:46 +04:00
|
|
|
request do_set_current_time, "Set current time to use when setting filesystem fields",
|
2005-09-25 05:56:38 +04:00
|
|
|
set_current_time;
|
|
|
|
|
2008-08-24 07:42:46 +04:00
|
|
|
request do_supported_features, "Print features supported by this version of e2fsprogs",
|
|
|
|
supported_features;
|
|
|
|
|
2011-09-24 21:48:55 +04:00
|
|
|
request do_dump_mmp, "Dump MMP information",
|
|
|
|
dump_mmp;
|
|
|
|
|
|
|
|
request do_set_mmp_value, "Set MMP value",
|
|
|
|
set_mmp_value, smmp;
|
|
|
|
|
2012-12-23 03:50:33 +04:00
|
|
|
request do_extent_open, "Open inode for extent manipulation",
|
|
|
|
extent_open, eo;
|
|
|
|
|
2013-01-11 11:40:25 +04:00
|
|
|
request do_zap_block, "Zap block: fill with 0, pattern, flip bits etc.",
|
2012-12-24 09:22:10 +04:00
|
|
|
zap_block, zap;
|
|
|
|
|
2013-01-14 23:41:46 +04:00
|
|
|
request do_block_dump, "Dump contents of a block",
|
2014-07-22 20:44:42 +04:00
|
|
|
block_dump, bdump, bd;
|
2012-12-24 09:22:10 +04:00
|
|
|
|
2014-03-12 07:49:58 +04:00
|
|
|
request do_list_xattr, "List extended attributes of an inode",
|
|
|
|
ea_list;
|
|
|
|
|
|
|
|
request do_get_xattr, "Get an extended attribute of an inode",
|
|
|
|
ea_get;
|
|
|
|
|
|
|
|
request do_set_xattr, "Set an extended attribute of an inode",
|
|
|
|
ea_set;
|
|
|
|
|
|
|
|
request do_rm_xattr, "Remove an extended attribute of an inode",
|
|
|
|
ea_rm;
|
|
|
|
|
2014-05-11 07:28:10 +04:00
|
|
|
request do_list_quota, "List quota",
|
|
|
|
list_quota, lq;
|
|
|
|
|
|
|
|
request do_get_quota, "Get quota",
|
|
|
|
get_quota, gq;
|
|
|
|
|
2014-07-22 20:44:42 +04:00
|
|
|
request do_idump, "Dump the inode structure in hex",
|
|
|
|
inode_dump, idump, id;
|
|
|
|
|
2014-09-09 03:12:54 +04:00
|
|
|
request do_journal_open, "Open the journal",
|
|
|
|
journal_open, jo;
|
|
|
|
|
|
|
|
request do_journal_close, "Close the journal",
|
|
|
|
journal_close, jc;
|
|
|
|
|
|
|
|
request do_journal_write, "Write a transaction to the journal",
|
|
|
|
journal_write, jw;
|
|
|
|
|
|
|
|
request do_journal_run, "Recover the journal",
|
|
|
|
journal_run, jr;
|
2014-07-22 20:44:42 +04:00
|
|
|
|
1997-04-26 17:21:57 +04:00
|
|
|
end;
|
|
|
|
|