On Tue, May 30, 2023 at 9:36 PM Masatake YAMATO <yamato@xxxxxxxxxx> wrote: > > Signed-off-by: Masatake YAMATO <yamato@xxxxxxxxxx> It might make sense to add the actions option to dispol as well, but I am not sure how much dismod and dispol are actually used. For these four patches: Acked-by: James Carter <jwcart2@xxxxxxxxx> > --- > checkpolicy/test/dismod.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/checkpolicy/test/dismod.c b/checkpolicy/test/dismod.c > index 929ee308..eb090a36 100644 > --- a/checkpolicy/test/dismod.c > +++ b/checkpolicy/test/dismod.c > @@ -66,7 +66,11 @@ static const char *symbol_labels[9] = { > > static __attribute__((__noreturn__)) void usage(const char *progname) > { > - printf("usage: %s binary_pol_file\n\n", progname); > + puts("Usage:"); > + printf(" %s [OPTIONS] binary_pol_file\n\n", progname); > + puts("Options:"); > + puts(" -h, --help print this help message"); > + puts("\n"); > exit(1); > } > > @@ -872,7 +876,7 @@ int main(int argc, char **argv) > FILE *out_fp = stdout; > char ans[81], OutfileName[121]; > > - if (argc != 2) > + if (argc < 2 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) > usage(argv[0]); > > /* read the binary policy */ > -- > 2.40.1 >