From 94aa81437241e0b3d3bd290ded0cc2b9338a9a04 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Fri, 9 Oct 2020 01:26:07 +0900 Subject: [PATCH] sbin/fsck_hammer2: Support >1 paths --- sbin/fsck_hammer2/fsck_hammer2.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sbin/fsck_hammer2/fsck_hammer2.c b/sbin/fsck_hammer2/fsck_hammer2.c index 67898db372..234a859fd5 100644 --- a/sbin/fsck_hammer2/fsck_hammer2.c +++ b/sbin/fsck_hammer2/fsck_hammer2.c @@ -108,7 +108,7 @@ usage(void) int main(int ac, char **av) { - int ch; + int i, ch; while ((ch = getopt(ac, av, "dfvqebpPl:c:")) != -1) { switch(ch) { @@ -169,8 +169,15 @@ main(int ac, char **av) /* not reached */ } - if (test_hammer2(av[0]) == -1) - exit(1); + for (i = 0; i < ac; i++) { + if (ac != 1) + printf("%s\n", av[i]); + if (test_hammer2(av[i]) == -1) + exit(1); + if (i != ac - 1) + printf("----------------------------------------" + "----------------------------------------\n"); + } cleanup_pfs_names(); -- 2.11.4.GIT