From: Thomas Weißschuh Date: Sun, 24 Dec 2023 12:04:59 +0000 (+0100) Subject: libmount: (tests) fix --filesystems test argument parsing X-Git-Tag: v2.40-rc1~84^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28a77504155987c3348516440d8d06a91fe77228;p=thirdparty%2Futil-linux.git libmount: (tests) fix --filesystems test argument parsing Signed-off-by: Thomas Weißschuh --- diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 2677b18dc0..b6d95696ad 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -1360,11 +1360,10 @@ static int test_filesystems(struct libmnt_test *ts __attribute__((unused)), char **filesystems = NULL; int rc; - if (argc != 2) + if (argc != 1 && argc != 2) return -1; - - rc = mnt_get_filesystems(&filesystems, argc ? argv[1] : NULL); + rc = mnt_get_filesystems(&filesystems, argc == 2 ? argv[1] : NULL); if (!rc) { char **p; for (p = filesystems; *p; p++)