From: Karel Zak Date: Wed, 8 Jan 2025 09:51:02 +0000 (+0100) Subject: libmount: map unsupported LISTMOUNT_REVERSE to ENOSYS X-Git-Tag: v2.42-start~97^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e1190d466394fefaa89962b300332813e68bfe6c;p=thirdparty%2Futil-linux.git libmount: map unsupported LISTMOUNT_REVERSE to ENOSYS For testing purposes, report the missing LISTMOUNT_REVERSE as missing in the complete listmount() function. Signed-off-by: Karel Zak --- diff --git a/libmount/src/tab_listmount.c b/libmount/src/tab_listmount.c index a9116da8a..e55786f27 100644 --- a/libmount/src/tab_listmount.c +++ b/libmount/src/tab_listmount.c @@ -100,6 +100,7 @@ static int table_init_listmount(struct libmnt_table *tb, size_t stepsiz) DBG(TAB, ul_debugobj(tb, "listmount: unsuppported")); if (errno == EINVAL) DBG(TAB, ul_debugobj(tb, "listmount: reverse unsuppported")); + errno = ENOSYS; return -ENOSYS; } } diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c index f23f9111a..7cda1178f 100644 --- a/tests/helpers/test_sysinfo.c +++ b/tests/helpers/test_sysinfo.c @@ -163,7 +163,7 @@ static int hlp_listmount_ok(void) #else errno = ENOSYS; #endif - printf("%d\n", errno != ENOSYS); + printf("%d\n", !(errno == ENOSYS || errno == EINVAL)); return 0; }