diff options
| author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-12-24 13:04:59 +0100 |
|---|---|---|
| committer | Thomas Weißschuh <thomas@t-8ch.de> | 2023-12-31 13:06:02 +0100 |
| commit | 28a77504155987c3348516440d8d06a91fe77228 (patch) | |
| tree | aa55274b27e6ecbfe35b317b5a10f32e1edd3450 /libmount/src | |
| parent | 745d0f42777e5f03afa37b0da4865dccceb95055 (diff) | |
| download | util-linux-28a77504155987c3348516440d8d06a91fe77228.tar.gz | |
libmount: (tests) fix --filesystems test argument parsing
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Diffstat (limited to 'libmount/src')
| -rw-r--r-- | libmount/src/utils.c | 5 |
1 files 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++) |
