1# 2# Copyright (C) 1993 Theodore Ts'o. This file may be redistributed 3# under the terms of the GNU Public License. 4# 5command_table debug_cmds; 6 7request do_show_debugfs_params, "Show debugfs parameters", 8 show_debugfs_params, params; 9 10request do_open_filesys, "Open a filesystem", 11 open_filesys, open; 12 13request do_close_filesys, "Close the filesystem", 14 close_filesys, close; 15 16request do_freefrag, "Report free space fragmentation", 17 freefrag, e2freefrag; 18 19request do_features, "Set/print superblock features", 20 feature, features; 21 22request do_dirty_filesys, "Mark the filesystem as dirty", 23 dirty_filesys, dirty; 24 25request do_init_filesys, "Initialize a filesystem (DESTROYS DATA)", 26 init_filesys; 27 28request do_show_super_stats, "Show superblock statistics", 29 show_super_stats, stats; 30 31request do_ncheck, "Do inode->name translation", 32 ncheck; 33 34request do_icheck, "Do block->inode translation", 35 icheck; 36 37request do_chroot, "Change root directory", 38 change_root_directory, chroot; 39 40request do_change_working_dir, "Change working directory", 41 change_working_directory, cd; 42 43request do_list_dir, "List directory", 44 list_directory, ls; 45 46request do_stat, "Show inode information ", 47 show_inode_info, stat; 48 49request do_dump_extents, "Dump extents information ", 50 dump_extents, extents, ex; 51 52request do_blocks, "Dump blocks used by an inode ", 53 blocks; 54 55request do_filefrag, "Report fragmentation information for an inode", 56 filefrag; 57 58request do_link, "Create directory link", 59 link, ln; 60 61request do_unlink, "Delete a directory link", 62 unlink; 63 64request do_mkdir, "Create a directory", 65 mkdir; 66 67request do_rmdir, "Remove a directory", 68 rmdir; 69 70request do_rm, "Remove a file (unlink and kill_file, if appropriate)", 71 rm; 72 73request do_kill_file, "Deallocate an inode and its blocks", 74 kill_file; 75 76request do_copy_inode, "Copy the inode structure", 77 copy_inode; 78 79request do_clri, "Clear an inode's contents", 80 clri; 81 82request do_freei, "Clear an inode's in-use flag", 83 freei; 84 85request do_seti, "Set an inode's in-use flag", 86 seti; 87 88request do_testi, "Test an inode's in-use flag", 89 testi; 90 91request do_freeb, "Clear a block's in-use flag", 92 freeb; 93 94request do_setb, "Set a block's in-use flag", 95 setb; 96 97request do_testb, "Test a block's in-use flag", 98 testb; 99 100request do_modify_inode, "Modify an inode by structure", 101 modify_inode, mi; 102 103request do_find_free_block, "Find free block(s)", 104 find_free_block, ffb; 105 106request do_find_free_inode, "Find free inode(s)", 107 find_free_inode, ffi; 108 109request do_print_working_directory, "Print current working directory", 110 print_working_directory, pwd; 111 112request do_expand_dir, "Expand directory", 113 expand_dir, expand; 114 115request do_mknod, "Create a special file", 116 mknod; 117 118request do_lsdel, "List deleted inodes", 119 list_deleted_inodes, lsdel; 120 121request do_undel, "Undelete file", 122 undelete, undel; 123 124request do_write, "Copy a file from your native filesystem", 125 write; 126 127request do_dump, "Dump an inode out to a file", 128 dump_inode, dump; 129 130request do_cat, "Dump an inode out to stdout", 131 cat; 132 133request do_lcd, "Change the current directory on your native filesystem", 134 lcd; 135 136request do_rdump, "Recursively dump a directory to the native filesystem", 137 rdump; 138 139request do_set_super, "Set superblock value", 140 set_super_value, ssv; 141 142request do_set_inode, "Set inode field", 143 set_inode_field, sif; 144 145request do_set_block_group_descriptor, "Set block group descriptor field", 146 set_block_group, set_bg; 147 148request do_logdump, "Dump the contents of the journal", 149 logdump; 150 151request do_htree_dump, "Dump a hash-indexed directory", 152 htree_dump, htree; 153 154request do_dx_hash, "Calculate the directory hash of a filename", 155 dx_hash, hash; 156 157request do_dirsearch, "Search a directory for a particular filename", 158 dirsearch; 159 160request do_bmap, "Calculate the logical->physical block mapping for an inode", 161 bmap; 162 163request do_fallocate, "Allocate uninitialized blocks to an inode", 164 fallocate; 165 166request do_punch, "Punch (or truncate) blocks from an inode by deallocating them", 167 punch, truncate; 168 169request do_symlink, "Create a symbolic link", 170 symlink; 171 172request do_imap, "Calculate the location of an inode", 173 imap; 174 175request do_dump_unused, "Dump unused blocks", 176 dump_unused; 177 178request do_set_current_time, "Set current time to use when setting filesystem fields", 179 set_current_time; 180 181request do_supported_features, "Print features supported by this version of e2fsprogs", 182 supported_features; 183 184request do_dump_mmp, "Dump MMP information", 185 dump_mmp; 186 187request do_set_mmp_value, "Set MMP value", 188 set_mmp_value, smmp; 189 190request do_extent_open, "Open inode for extent manipulation", 191 extent_open, eo; 192 193request do_zap_block, "Zap block: fill with 0, pattern, flip bits etc.", 194 zap_block, zap; 195 196request do_block_dump, "Dump contents of a block", 197 block_dump, bdump, bd; 198 199request do_list_xattr, "List extended attributes of an inode", 200 ea_list; 201 202request do_get_xattr, "Get an extended attribute of an inode", 203 ea_get; 204 205request do_set_xattr, "Set an extended attribute of an inode", 206 ea_set; 207 208request do_rm_xattr, "Remove an extended attribute of an inode", 209 ea_rm; 210 211request do_list_quota, "List quota", 212 list_quota, lq; 213 214request do_get_quota, "Get quota", 215 get_quota, gq; 216 217request do_idump, "Dump the inode structure in hex", 218 inode_dump, idump, id; 219 220request do_journal_open, "Open the journal", 221 journal_open, jo; 222 223request do_journal_close, "Close the journal", 224 journal_close, jc; 225 226request do_journal_write, "Write a transaction to the journal", 227 journal_write, jw; 228 229request do_journal_run, "Recover the journal", 230 journal_run, jr; 231 232end; 233 234