mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-28 07:50:32 +00:00
btrfs-progs: quota rescan: add long options for status and wait
Add more descriptive long options to 'btrfs quota rescan'. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
447f976472
commit
eb439bb833
@ -52,9 +52,9 @@ rescan [-s] <path>
|
||||
|
||||
``Options``
|
||||
|
||||
-s
|
||||
-s|--status
|
||||
show status of a running rescan operation.
|
||||
-w
|
||||
-w|--wait
|
||||
wait for rescan operation to finish(can be already in progress).
|
||||
|
||||
EXIT STATUS
|
||||
|
14
cmds/quota.c
14
cmds/quota.c
@ -109,8 +109,8 @@ static const char * const cmd_quota_rescan_usage[] = {
|
||||
"btrfs quota rescan [-sw] <path>",
|
||||
"Trash all qgroup numbers and scan the metadata again with the current config.",
|
||||
"",
|
||||
"-s show status of a running rescan operation",
|
||||
"-w wait for rescan operation to finish (can be already in progress)",
|
||||
"-s|--status show status of a running rescan operation",
|
||||
"-w|--wait wait for rescan operation to finish (can be already in progress)",
|
||||
HELPINFO_INSERT_GLOBALS,
|
||||
HELPINFO_INSERT_QUIET,
|
||||
NULL
|
||||
@ -129,9 +129,17 @@ static int cmd_quota_rescan(const struct cmd_struct *cmd, int argc, char **argv)
|
||||
|
||||
optind = 0;
|
||||
while (1) {
|
||||
int c = getopt(argc, argv, "sw");
|
||||
static const struct option long_options[] = {
|
||||
{"status", no_argument, NULL, 's'},
|
||||
{"wait", no_argument, NULL, 'w'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int c;
|
||||
|
||||
c = getopt_long(argc, argv, "sw", long_options, NULL);
|
||||
if (c < 0)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 's':
|
||||
ioctlnum = BTRFS_IOC_QUOTA_RESCAN_STATUS;
|
||||
|
Loading…
Reference in New Issue
Block a user