diff --git a/cmds/subvolume-list.c b/cmds/subvolume-list.c index c942450705..750fc4e635 100644 --- a/cmds/subvolume-list.c +++ b/cmds/subvolume-list.c @@ -47,38 +47,34 @@ static const char * const cmd_subvolume_list_usage[] = { "List subvolumes and snapshots in the filesystem.", "", "Path filtering:", - "-o print only subvolumes below specified path", - "-a print all the subvolumes in the filesystem and", - " distinguish absolute and relative path with respect", - " to the given ", + OPTLINE("-o", "print only subvolumes below specified path"), + OPTLINE("-a", "print all the subvolumes in the filesystem and " + "distinguish absolute and relative path with respect to the given "), "", "Field selection:", - "-p print parent ID", - "-c print the ogeneration of the subvolume", - "-g print the generation of the subvolume", - "-u print the uuid of subvolumes (and snapshots)", - "-q print the parent uuid of the snapshots", - "-R print the uuid of the received snapshots", + OPTLINE("-p", "print parent ID"), + OPTLINE("-c", "print the ogeneration of the subvolume"), + OPTLINE("-g", "print the generation of the subvolume"), + OPTLINE("-u", "print the uuid of subvolumes (and snapshots)"), + OPTLINE("-q", "print the parent uuid of the snapshots"), + OPTLINE("-R", "print the uuid of the received snapshots"), "", "Type filtering:", - "-s list only snapshots", - "-r list readonly subvolumes (including snapshots)", - "-d list deleted subvolumes that are not yet cleaned", + OPTLINE("-s", "list only snapshots"), + OPTLINE("-r", "list readonly subvolumes (including snapshots)"), + OPTLINE("-d", "list deleted subvolumes that are not yet cleaned"), "", "Other:", - "-t print the result as a table", + OPTLINE("-t", "print the result as a table"), "", "Sorting:", - "-G [+|-]value", - " filter the subvolumes by generation", - " (+value: >= value; -value: <= value; value: = value)", - "-C [+|-]value", - " filter the subvolumes by ogeneration", - " (+value: >= value; -value: <= value; value: = value)", - "--sort=gen,ogen,rootid,path", - " list the subvolume in order of gen, ogen, rootid or path", - " you also can add '+' or '-' in front of each items.", - " (+:ascending, -:descending, ascending default)", + OPTLINE("-G [+|-]value", "filter the subvolumes by generation " + "(+value: >= value; -value: <= value; value: = value)"), + OPTLINE("-C [+|-]value", "filter the subvolumes by ogeneration " + "(+value: >= value; -value: <= value; value: = value)"), + OPTLINE("--sort=gen,ogen,rootid,path", "list the subvolume in order of gen, ogen, rootid or path " + "you also can add '+' or '-' in front of each items. " + "(+:ascending, -:descending, ascending default)"), NULL, }; diff --git a/cmds/subvolume.c b/cmds/subvolume.c index e194ded54b..8bb21f9f60 100644 --- a/cmds/subvolume.c +++ b/cmds/subvolume.c @@ -91,8 +91,7 @@ static const char * const cmd_subvolume_create_usage[] = { "Create a subvolume in . If is not given", "subvolume will be created in the current directory.", "", - "-i add the newly created subvolume to a qgroup. This", - " option can be given multiple times.", + OPTLINE("-i ", "add the newly created subvolume to a qgroup. This option can be given multiple times."), HELPINFO_INSERT_GLOBALS, HELPINFO_INSERT_QUIET, NULL @@ -239,10 +238,10 @@ static const char * const cmd_subvolume_delete_usage[] = { "after a crash). Use one of the --commit options to wait until the", "operation is safely stored on the media.", "", - "-c|--commit-after wait for transaction commit at the end of the operation", - "-C|--commit-each wait for transaction commit after deleting each subvolume", - "-i|--subvolid subvolume id of the to be removed subvolume", - "-v|--verbose deprecated, alias for global -v option", + OPTLINE("-c|--commit-after", "wait for transaction commit at the end of the operation"), + OPTLINE("-C|--commit-each", "wait for transaction commit after deleting each subvolume"), + OPTLINE("-i|--subvolid", "subvolume id of the to be removed subvolume"), + OPTLINE("-v|--verbose", "deprecated, alias for global -v option"), HELPINFO_INSERT_GLOBALS, HELPINFO_INSERT_VERBOSE, HELPINFO_INSERT_QUIET, @@ -517,9 +516,8 @@ static const char * const cmd_subvolume_snapshot_usage[] = { "", "When only is given, the subvolume will be named the basename of .", "", - "-r Make the new snapshot readonly.", - "-i Add the new snapshot to a qgroup (a quota group). This", - " option can be given multiple times.", + OPTLINE("-r", "make the new snapshot readonly"), + OPTLINE("-i ", "Add the new snapshot to a qgroup (a quota group). This option can be given multiple times."), HELPINFO_INSERT_GLOBALS, HELPINFO_INSERT_QUIET, NULL @@ -1239,8 +1237,8 @@ static const char * const cmd_subvolume_show_usage[] = { "The subvolume can be specified by path, or by root id or UUID that are", "looked up relative to the given path", "", - "-r|--rootid ID root id of the subvolume", - "-u|--uuid UUID UUID of the subvolum", + OPTLINE("-r|--rootid ID", "root id of the subvolume"), + OPTLINE("-u|--uuid UUID", "UUID of the subvolum"), HELPINFO_UNITS_SHORT_LONG, NULL }; @@ -1514,7 +1512,7 @@ static const char * const cmd_subvolume_sync_usage[] = { "are completed, but do not wait for subvolumes deleted meanwhile.", "The status of subvolume ids is checked periodically.", "", - "-s sleep N seconds between checks (default: 1)", + OPTLINE("-s ", "sleep N seconds between checks (default: 1)"), NULL };