Skip to content

Commit

Permalink
qubes-fs-tree-check: add --help
Browse files Browse the repository at this point in the history
This improves UX.
  • Loading branch information
DemiMarie committed Nov 10, 2024
1 parent e734630 commit 4210c63
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qubes-rpc/qubes-fs-tree-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const struct option opts[] = {
{"no-allow-directories", no_argument, NULL, 'D'},
{"allow-all-names", no_argument, NULL, 'u'},
{"no-allow-all-names", no_argument, NULL, 'U'},
{"help", no_argument, NULL, 'h'},
{0, 0, NULL, 0},
};

Expand Down Expand Up @@ -240,6 +241,19 @@ int main(int argc, char **argv)
case 'U':
flags &= ~COPY_ALLOW_UNSAFE_CHARACTERS;
break;
case 'h':
fputs("Usage:\n"
" --help Print this message\n"
" --machine-readable Print the number of bytes to copy on stdout\n"
" --ignore-symlinks Ignore symbolic links; overrides previous --no-ignore-symlinks\n"
" --no-ignore-symlinks Do not ignore symbolic links; overrides previous --ignore-symlinks\n"
" --allow-directories Allow directories; overrides previous --no-allow-directories\n"
" --no-allow-directories Do not allow directories; overrides previous --allow-directories\n"
" --allow-all-names Allow all-names; overrides previous --no-allow-all-names\n"
" --no-allow-all-names Do not allow all-names; overrides previous --allow-all-names\n",
stderr);
fflush(stderr);
return ferror(stderr) ? 1 : 0;
default:
abort();
}
Expand Down

0 comments on commit 4210c63

Please sign in to comment.