diff options
| author | Karel Zak <kzak@redhat.com> | 2025-08-06 14:09:12 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-08-06 15:08:38 +0200 |
| commit | cfebab23ab06cf2b646b4c0afdbc0ebb9e25c6dd (patch) | |
| tree | 854d82601c9d1d57b0cb1aee95928aea5dedfc1b /libmount/src/monitor.c | |
| parent | 938264b1ff764ea60e8c9fb257bddc2070850b86 (diff) | |
| download | util-linux-cfebab23ab06cf2b646b4c0afdbc0ebb9e25c6dd.tar.gz | |
libmount: (monitor) rename public API to "mountinfo"
There will be more kernel monitors in the future. Ensure the API is
easy to understand.
* Rename MNT_MONITOR_TYPE_KERNEL to MNT_MONITOR_TYPE_MOUNTINFO
* Rename mnt_monitor_enable_kernel() to mnt_monitor_enable_mountinfo()
The change is backward compatible; the old names are still usable.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/monitor.c')
| -rw-r--r-- | libmount/src/monitor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c index 6bede6b58f..dca037d46f 100644 --- a/libmount/src/monitor.c +++ b/libmount/src/monitor.c @@ -22,7 +22,7 @@ * const char *filename; * struct libmount_monitor *mn = mnt_new_monitor(); * - * mnt_monitor_enable_kernel(mn, TRUE)); + * mnt_monitor_enable_mountinfo(mn, TRUE)); * * printf("waiting for changes...\n"); * while (mnt_monitor_wait(mn, -1) > 0) { @@ -530,8 +530,8 @@ static struct libmnt_monitor *create_test_monitor(int argc, char *argv[]) goto err; } - } else if (strcmp(argv[i], "kernel") == 0) { - if (mnt_monitor_enable_kernel(mn, TRUE)) { + } else if (strcmp(argv[i], "mountinfo") == 0) { + if (mnt_monitor_enable_mountinfo(mn, TRUE)) { warn("failed to initialize kernel monitor"); goto err; } @@ -658,9 +658,9 @@ static int test_wait(struct libmnt_test *ts __attribute__((unused)), int main(int argc, char *argv[]) { struct libmnt_test tss[] = { - { "--epoll", test_epoll, "<userspace kernel veil ...> monitor in epoll" }, - { "--epoll-clean", test_epoll_cleanup, "<userspace kernel veil ...> monitor in epoll and clean events" }, - { "--wait", test_wait, "<userspace kernel veil ...> monitor wait function" }, + { "--epoll", test_epoll, "<userspace mountinfo veil ...> monitor in epoll" }, + { "--epoll-clean", test_epoll_cleanup, "<userspace mountinfo veil ...> monitor in epoll and clean events" }, + { "--wait", test_wait, "<userspace mountinfo veil ...> monitor wait function" }, { NULL } }; |
