From 28a77504155987c3348516440d8d06a91fe77228 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sun, 24 Dec 2023 13:04:59 +0100 Subject: [PATCH] libmount: (tests) fix --filesystems test argument parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- libmount/src/utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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++) -- 2.47.3