mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
cmd_list_journal: Add -v (verbose)
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
b6fc4864a7
commit
bec3a26565
@ -579,6 +579,7 @@ static void list_journal_usage(void)
|
|||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -a Read entire journal, not just dirty entries\n"
|
" -a Read entire journal, not just dirty entries\n"
|
||||||
" -n Number of journal entries to print, starting from the most recent\n"
|
" -n Number of journal entries to print, starting from the most recent\n"
|
||||||
|
" -v Verbose mode\n"
|
||||||
" -h Display this help and exit\n"
|
" -h Display this help and exit\n"
|
||||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||||
}
|
}
|
||||||
@ -608,7 +609,7 @@ int cmd_list_journal(int argc, char *argv[])
|
|||||||
opt_set(opts, keep_journal, true);
|
opt_set(opts, keep_journal, true);
|
||||||
opt_set(opts, read_journal_only,true);
|
opt_set(opts, read_journal_only,true);
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "an:h")) != -1)
|
while ((opt = getopt(argc, argv, "an:vh")) != -1)
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'a':
|
case 'a':
|
||||||
opt_set(opts, read_entire_journal, true);
|
opt_set(opts, read_entire_journal, true);
|
||||||
@ -617,6 +618,9 @@ int cmd_list_journal(int argc, char *argv[])
|
|||||||
nr_entries = kstrtouint(optarg, 10, &nr_entries);
|
nr_entries = kstrtouint(optarg, 10, &nr_entries);
|
||||||
opt_set(opts, read_entire_journal, true);
|
opt_set(opts, read_entire_journal, true);
|
||||||
break;
|
break;
|
||||||
|
case 'v':
|
||||||
|
opt_set(opts, verbose, true);
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
list_journal_usage();
|
list_journal_usage();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
Loading…
Reference in New Issue
Block a user