mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
Add an option to list_journal to list entire contents of journal
This commit is contained in:
parent
05408b6f8f
commit
1d4bb7f4d1
@ -400,6 +400,7 @@ static void list_journal_usage(void)
|
|||||||
"Usage: bcachefs list_journal [OPTION]... <devices>\n"
|
"Usage: bcachefs list_journal [OPTION]... <devices>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
|
" -a Read entire journal, not just dirty entries\n"
|
||||||
" -h Display this help and exit\n"
|
" -h Display this help and exit\n"
|
||||||
"Report bugs to <linux-bcache@vger.kernel.org>");
|
"Report bugs to <linux-bcache@vger.kernel.org>");
|
||||||
}
|
}
|
||||||
@ -416,8 +417,11 @@ int cmd_list_journal(int argc, char *argv[])
|
|||||||
opt_set(opts, fix_errors, FSCK_OPT_YES);
|
opt_set(opts, fix_errors, FSCK_OPT_YES);
|
||||||
opt_set(opts, keep_journal, true);
|
opt_set(opts, keep_journal, true);
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "h")) != -1)
|
while ((opt = getopt(argc, argv, "ah")) != -1)
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
case 'a':
|
||||||
|
opt_set(opts, read_entire_journal, true);
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
list_journal_usage();
|
list_journal_usage();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user