diff options
author | Karel Zak | 2014-12-16 11:25:52 +0100 |
---|---|---|
committer | Karel Zak | 2015-01-06 16:19:02 +0100 |
commit | f7ca1a6433eb42eb3cf0e3e7af9e7c1fa989d590 (patch) | |
tree | b48be55964a14f0013cd6d52331dc64d698f1bbb /libmount/src/libmount.h.in | |
parent | libmount: monitor unref function refactoring (diff) | |
download | kernel-qcow2-util-linux-f7ca1a6433eb42eb3cf0e3e7af9e7c1fa989d590.tar.gz kernel-qcow2-util-linux-f7ca1a6433eb42eb3cf0e3e7af9e7c1fa989d590.tar.xz kernel-qcow2-util-linux-f7ca1a6433eb42eb3cf0e3e7af9e7c1fa989d590.zip |
libmount: make public top-level monitor FD only
We need full control on changes evaluation, so it's better to
hide all in our private epoll. This change also significantly
simplify the API.
mn = mnt_new_monitor();
mnt_monitor_enable_userapce(mn, TRUE, NULL);
mnt_monitor_enable_kenrel(mn, TRUE);
fd = mnt_monitor_get_fd(mn);
...
<use 'fd' in epoll controlled by your application>
...
while (mnt_monitor_next_changed(mn, &filename, NULL) == 0)
printf("%s: change detected\n", filename);
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/libmount.h.in')
-rw-r--r-- | libmount/src/libmount.h.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in index db9b2542d..316baa97d 100644 --- a/libmount/src/libmount.h.in +++ b/libmount/src/libmount.h.in @@ -544,7 +544,7 @@ extern void mnt_unref_monitor(struct libmnt_monitor *mn); extern int mnt_monitor_enable_userspace(struct libmnt_monitor *mn, int enable, const char *filename); -extern int mnt_monitor_userspace_get_fd(struct libmnt_monitor *mn); +extern int mnt_monitor_get_fd(struct libmnt_monitor *mn); /* context.c */ |