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