]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Add missing information to debugfs man pages and usage texts
authorTyson Nottingham <tgnottingham@gmail.com>
Thu, 14 Dec 2017 07:13:11 +0000 (23:13 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 15 Dec 2017 05:28:58 +0000 (00:28 -0500)
Add descriptions for dump_unused, get_quota, list_quota,
set_current_time, show_debugfs_params, and supported_features
commands to debugfs man page. Add various missing command
arguments and correct a few typos in man page and usage texts.

Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.8.in
debugfs/debugfs.c
debugfs/do_journal.c
debugfs/logdump.c
debugfs/ls.c
debugfs/set_fields.c
debugfs/xattrs.c

index 55abd718b1e5ce60d7fcc50d7537ae8c4fe7ed71..4b5f472e9256a65e9a08fa7fe7dcceda3111f8e1 100644 (file)
@@ -143,7 +143,7 @@ Before overwriting a file system block, write the old contents of the block to
 an undo file.  This undo file can be used with e2undo(8) to restore the old
 contents of the file system should something go wrong.  If the empty string is
 passed as the undo_file argument, the undo file will be written to a file named
-resize2fs-\fIdevice\fR.e2undo in the directory specified via the
+debugfs-\fIdevice\fR.e2undo in the directory specified via the
 \fIE2FSPROGS_UNDO_DIR\fR environment variable.
 
 WARNING: The undo file cannot be used to recover from a power or system crash.
@@ -237,8 +237,11 @@ Search the directory
 for
 .IR filename .
 .TP
-.B dirty
+.BI dirty " [-clean]"
 Mark the filesystem as dirty, so that the superblocks will be written on exit.
+Additionally, clear the superblock's valid flag, or set it if
+.I -clean
+is specified.
 .TP
 .BI dump " [-p] filespec out_file"
 Dump the contents of the inode
@@ -290,7 +293,10 @@ not stored in filesystem data structures.   Hence, the values displayed
 may not necessarily by accurate and does not indicate a problem or
 corruption in the file system.)
 .TP
-.BI ea_get " [-f outfile] filespec attr_name"
+.B dump_unused
+Dump unused blocks which contain non-null bytes.
+.TP
+.BI ea_get " [-f outfile]|[-xVC] [-r] filespec attr_name"
 Retrieve the value of the extended attribute
 .I attr_name
 in the file
@@ -302,7 +308,7 @@ List the extended attributes associated with the file
 .I filespec
 to standard output.
 .TP
-.BI ea_set " [-f infile] filespec attr_name attr_value
+.BI ea_set " [-f infile] [-r] filespec attr_name attr_value
 Set the value of the extended attribute
 .I attr_name
 in the file
@@ -402,6 +408,9 @@ If
 .I num
 is specified, also clear num-1 inodes after the specified inode.
 .TP
+.BI get_quota " quota_type id"
+Display quota information for given quota type (user, group, or project) and ID.
+.TP
 .B help
 Print a list of commands understood by
 .BR debugfs .
@@ -437,7 +446,7 @@ the superblock and block descriptors.
 .BI journal_close
 Close the open journal.
 .TP
-.BI journal_open " [-c] [-v ver] [-j ext_jnl]
+.BI journal_open " [-c] [-v ver] [-f ext_jnl]
 Opens the journal for reading and writing.  Journal checksumming can
 be enabled by supplying \fI-c\fR; checksum formats 2 and 3 can be
 selected with the \fI-v\fR option.  An external journal can be loaded
@@ -469,6 +478,9 @@ process to
 .I directory
 on the native filesystem.
 .TP
+.BI list_quota " quota_type"
+Display quota information for given quota type (user, group, or project).
+.TP
 .BI ln " filespec dest_file"
 Create a link named
 .I dest_file
@@ -476,7 +488,7 @@ which is a hard link to
 .IR filespec .
 Note this does not adjust the inode reference counts.
 .TP
-.BI logdump " [-acsO] [-b block] [-i filespec] [-f journal_file] [output_file]"
+.BI logdump " [-acsOS] [-b block] [-i filespec] [-f journal_file] [output_file]"
 Dump the contents of the ext3 journal.  By default, dump the journal inode as
 specified in the superblock.  However, this can be overridden with the
 .I \-i
@@ -490,6 +502,12 @@ option utilizes the backup information in the superblock to locate the
 journal.
 .IP
 The
+.I \-S
+option causes
+.B logdump
+to print the contents of the journal superblock.
+.IP
+The
 .I \-a
 option causes the
 .B logdump
@@ -498,7 +516,7 @@ The
 .I \-b
 option causes
 .B logdump
-to print all journal records that are refer to the specified block.
+to print all journal records that refer to the specified block.
 The
 .I \-c
 option will print out the contents of all of the data blocks selected by
@@ -570,7 +588,7 @@ to those inodes.  The
 flag will enable checking the file type information in the directory
 entry to make sure it matches the inode's type.
 .TP
-.BI open " [-weficD] [-b blocksize] [-s superblock] [-z undo_file] device"
+.BI open " [-weficD] [-b blocksize] [-d image_filename] [-s superblock] [-z undo_file] device"
 Open a filesystem for editing.  The
 .I -f
 flag forces the filesystem to be opened even if there are some unknown
@@ -578,7 +596,7 @@ or incompatible filesystem features which would normally
 prevent the filesystem from being opened.  The
 .I -e
 flag causes the filesystem to be opened in exclusive mode.  The
-.IR -b ", " -c ", " -i ", " -s ", " -w ", and " -D
+.IR -b ", " -c ", " -d ", " -i ", " -s ", " -w ", and " -D
 options behave the same as the command-line options to
 .BR debugfs .
 .TP
@@ -649,6 +667,10 @@ has value
 Also available as
 .BR set_bg .
 .TP
+.BI set_current_time " time"
+Set current time in seconds since Unix epoch to use when setting filesystem
+fields.
+.TP
 .BI seti " filespec [num]"
 Mark inode
 .I filespec
@@ -691,6 +713,11 @@ can be displayed by using the command:
 Also available as
 .BR ssv .
 .TP
+.B show_debugfs_params
+Display
+.B debugfs
+parameters such as information about currently opened filesystem.
+.TP
 .BI show_super_stats " [-h]"
 List the contents of the super block and the block group descriptors.  If the
 .I -h
@@ -701,6 +728,10 @@ flag is given, only print out the superblock contents. Also available as
 Display the contents of the inode structure of the inode
 .IR filespec .
 .TP
+.B supported_features
+Display filesystem features supported by this version of
+.BR debugfs .
+.TP
 .BI testb " block [count]"
 Test if the block number
 .I block
index 453f5b52281543d135c56d61417767c0c6ac927c..6ea14c3392f5763b0505bef17772393533d20717 100644 (file)
@@ -292,7 +292,7 @@ void do_open_filesys(int argc, char **argv)
 
 print_usage:
        fprintf(stderr, "%s: Usage: open [-s superblock] [-b blocksize] "
-               "[-d image_filename] [-c] [-i] [-f] [-e] [-D] "
+               "[-d image_filename] [-z undo_file] [-c] [-i] [-f] [-e] [-D] "
 #ifndef READ_ONLY
                "[-w] "
 #endif
@@ -514,7 +514,7 @@ void do_show_super_stats(int argc, char *argv[])
        close_pager(out);
        return;
 print_usage:
-       fprintf(stderr, "%s: Usage: show_super [-h]\n", argv[0]);
+       fprintf(stderr, "%s: Usage: show_super_stats [-h]\n", argv[0]);
 }
 
 #ifndef READ_ONLY
@@ -1693,7 +1693,7 @@ void do_find_free_inode(int argc, char *argv[])
        char            *tmp;
 
        if (argc > 3 || (argc>1 && *argv[1] == '?')) {
-               com_err(argv[0], 0, "Usage: find_free_inode [dir] [mode]");
+               com_err(argv[0], 0, "Usage: find_free_inode [dir [mode]]");
                return;
        }
        if (check_fs_open(argv[0]))
@@ -2425,11 +2425,11 @@ int main(int argc, char **argv)
        int             retval;
        const char      *usage = 
                "Usage: %s [-b blocksize] [-s superblock] [-f cmd_file] "
-               "[-R request] [-V] ["
+               "[-R request] [-d data_source_device] [-i] [-n] [-D] [-V] ["
 #ifndef READ_ONLY
                "[-w] [-z undo_file] "
 #endif
-               "[-c] device]";
+               "[-c]] [device]";
        int             c;
        int             open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
        char            *request = 0;
index 40c473cee3cf2b68a04a05482b42d5064c9e24bb..d7ab916150e1ae21c5294f0b2309189158e39440 100644 (file)
@@ -899,7 +899,7 @@ void do_journal_open(int argc, char *argv[])
                        printf("%s: [-c] [-v ver] [-f ext_jnl]\n", argv[0]);
                        printf("-c: Enable journal checksumming.\n");
                        printf("-v: Use this version checksum format.\n");
-                       printf("-j: Load this external journal.\n");
+                       printf("-f: Load this external journal.\n");
                }
        }
 
index 864f234cb4565c93978d844b02c1c05dbb65db05..03edb44b71fcb0ece3a2aa0bd81e66a5eab72f0a 100644 (file)
@@ -275,7 +275,7 @@ errout:
        return;
 
 print_usage:
-       fprintf(stderr, "%s: Usage: logdump [-acsO] [-b<block>] [-i<filespec>]\n\t"
+       fprintf(stderr, "%s: Usage: logdump [-acsOS] [-b<block>] [-i<filespec>]\n\t"
                "[-f<journal_file>] [output_file]\n", argv[0]);
 }
 
index 61b6319675d07d9655ea1d7cf924b7fe57388f48..bfc28cb689ed4d3c8d6e5649c54968bf73910921 100644 (file)
@@ -228,7 +228,7 @@ void do_list_dir(int argc, char *argv[])
 
        if (argc > optind+1) {
        print_usage:
-               com_err(0, 0, "Usage: ls [-l] [-d] [-p] file");
+               com_err(0, 0, "Usage: ls [-c] [-d] [-l] [-p] [-r] file");
                return;
        }
 
index af7a0ab3b99fd8183df16cd1c370b517d8818b86..de9600c28ee5ef8441a924fe7c93d94515666e9f 100644 (file)
@@ -788,7 +788,7 @@ void do_set_inode(int argc, char *argv[])
 void do_set_block_group_descriptor(int argc, char *argv[])
 {
        const char *usage = "<bg number> <field> <value>\n"
-               "\t\"set_block_group_descriptor -l\" will list the names of "
+               "\t\"set_block_group -l\" will list the names of "
                "the fields in a block group descriptor\n\twhich can be set.";
        struct field_set_info   *table;
        struct field_set_info   *ss;
@@ -819,7 +819,7 @@ void do_set_block_group_descriptor(int argc, char *argv[])
                return;
        }
 
-       if (common_args_process(argc, argv, 4, 4, "set_block_group_descriptor",
+       if (common_args_process(argc, argv, 4, 4, "set_block_group",
                                usage, CHECK_FS_RW))
                return;
 
index 9b87d14551dca89498c9415415692f8bdeae2757..92bd4e5c6e356775f1bf648d96b0463f2d8d2957 100644 (file)
@@ -267,7 +267,7 @@ void do_set_xattr(int argc, char **argv)
 
        if (!(fp && optind == argc - 2) && !(!fp && optind == argc - 3)) {
        print_usage:
-               printf("Usage:\t%s <file> <attr> <value>\n", argv[0]);
+               printf("Usage:\t%s [-r] <file> <attr> <value>\n", argv[0]);
                printf("\t%s -f <value_file> [-r] <file> <attr>\n", argv[0]);
                goto out2;
        }