Skip to content

Commit 934f20b

Browse files
committed
check_readonlyfs: -x/--exclude new option fixes
Signed-off-by: Davide Madrisan <d.madrisan@proton.me>
1 parent 87ab340 commit 934f20b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

plugins/check_readonlyfs.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ main (int argc, char **argv)
295295
set_program_name (argv[0]);
296296

297297
while ((c = getopt_long (argc, argv,
298-
"alT:X:v" GETOPT_HELP_VERSION_STRING, longopts, NULL)) != -1)
298+
"alT:xX:v" GETOPT_HELP_VERSION_STRING, longopts, NULL)) != -1)
299299
{
300300
switch (c)
301301
{
@@ -391,15 +391,10 @@ main (int argc, char **argv)
391391
putchar ('\n');
392392
return status;
393393
}
394-
else if (exclude_mode)
395-
{
396-
char **arg;
397-
for (arg = argv + optind; *arg; arg++)
398-
printf("remaining argv = %s\n", *arg);
399-
status = check_all_entries (&ro_filesystems, argv + optind);
400-
}
401394
else
402-
status = check_all_entries (&ro_filesystems, NULL);
395+
status =
396+
check_all_entries (&ro_filesystems,
397+
exclude_mode ? argv + optind : NULL);
403398

404399
if (STATE_CRITICAL == status)
405400
{

0 commit comments

Comments
 (0)