1997-04-26 21:21:57 +08: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-30 00:15:03 +08:00
|
|
|
request do_close_filesys, "Close the filesystem",
|
1997-04-26 21:21:57 +08:00
|
|
|
close_filesys, close;
|
|
|
|
|
1999-09-15 04:55:37 +08:00
|
|
|
request do_features, "Set/print superblock features",
|
|
|
|
feature, features;
|
|
|
|
|
1997-04-30 00:15:03 +08:00
|
|
|
request do_dirty_filesys, "Mark the filesystem as dirty",
|
|
|
|
dirty_filesys, dirty;
|
|
|
|
|
1997-04-26 21:21:57 +08:00
|
|
|
request do_init_filesys, "Initalize a filesystem (DESTROYS DATA)",
|
|
|
|
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;
|
|
|
|
|
|
|
|
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 21:58:21 +08:00
|
|
|
request do_mknod, "Create a special file",
|
|
|
|
mknod;
|
|
|
|
|
1997-04-26 21:32:25 +08:00
|
|
|
request do_lsdel, "List deleted inodes",
|
|
|
|
list_deleted_inodes, lsdel;
|
|
|
|
|
2002-01-03 17:55:25 +08:00
|
|
|
request do_undel, "Undelete file",
|
|
|
|
undelete, undel;
|
|
|
|
|
1997-04-26 21:58:21 +08:00
|
|
|
request do_write, "Copy a file from your native filesystem",
|
|
|
|
write;
|
|
|
|
|
1997-04-26 21:32:25 +08: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 23:15:40 +08: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 04:37:09 +08:00
|
|
|
request do_set_super, "Set superblock value",
|
|
|
|
set_super_value, ssv;
|
|
|
|
|
2004-12-22 09:37:36 +08:00
|
|
|
request do_set_inode, "Set inode field",
|
2005-01-08 10:14:12 +08:00
|
|
|
set_inode_field, sif;
|
2004-12-22 09:37:36 +08:00
|
|
|
|
2007-04-14 03:56:00 +08:00
|
|
|
request do_set_block_group_descriptor, "Set block group descriptor field",
|
|
|
|
set_block_group, set_bg;
|
|
|
|
|
2001-03-30 04:49:58 +08:00
|
|
|
request do_logdump, "Dump the contents of the journal",
|
|
|
|
logdump;
|
|
|
|
|
2002-02-25 17:28:45 +08: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 10:13:20 +08:00
|
|
|
request do_bmap, "Calculate the logical->physical block mapping for an inode",
|
|
|
|
bmap;
|
|
|
|
|
2003-05-05 23:35:04 +08:00
|
|
|
request do_imap, "Calculate the location of an inode",
|
|
|
|
imap;
|
|
|
|
|
2003-05-22 05:58:36 +08:00
|
|
|
request do_dump_unused, "Dump unused blocks",
|
|
|
|
dump_unused;
|
|
|
|
|
2005-09-25 09:56:38 +08:00
|
|
|
request do_set_current_time, "Set current time to use when setting filesystme fields",
|
|
|
|
set_current_time;
|
|
|
|
|
2008-08-24 11:42:46 +08:00
|
|
|
request do_supported_features, "Print features supported by this version of e2fsprogs",
|
|
|
|
supported_features;
|
|
|
|
|
1997-04-26 21:21:57 +08:00
|
|
|
end;
|
|
|
|
|