Skip to content

Commit

Permalink
libmount: map unsupported LISTMOUNT_REVERSE to ENOSYS
Browse files Browse the repository at this point in the history
For testing purposes, report the missing LISTMOUNT_REVERSE as missing
in the complete listmount() function.

Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information
karelzak committed Jan 8, 2025
1 parent 5291243 commit 76376d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions libmount/src/tab_listmount.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 76376d3

Please sign in to comment.