* Like mnt_resolve_path(), unless @cache is not NULL and
* mnt_cache_set_targets(cache, mtab) was called: if @path is found in the
* cached @mtab and the matching entry was provided by the kernel, assume that
- * @path is already canonicalized. By avoiding a call to canonicalize_path() on
+ * @path is already canonicalized. By avoiding a call to realpath(2) on
* known mount points, there is a lower risk of stepping on a stale mount
* point, which can result in an application freeze. This is also faster in
* general, as stat(2) on a mount point is slower than on a regular file.
extern int mnt_monitor_close_fd(struct libmnt_monitor *mn);
extern int mnt_monitor_wait(struct libmnt_monitor *mn, int timeout);
-extern int mnt_monitor_next_changed(struct libmnt_monitor *mn,
+extern int mnt_monitor_next_change(struct libmnt_monitor *mn,
const char **filename, int *type);
extern int mnt_monitor_event_cleanup(struct libmnt_monitor *mn);
*
* The file descriptor is associated with all monitored files and it's usable
* for example for epoll. You have to call mnt_monitor_event_cleanup() or
- * mnt_monitor_next_changed() after each event.
+ * mnt_monitor_next_change() after each event.
*
* Returns: >=0 (fd) on success, <0 on error
*/
}
/**
- * mnt_monitor_next_changed:
+ * mnt_monitor_next_change:
* @mn: monitor
* @filename: returns changed file (optional argument)
* @type: returns MNT_MONITOR_TYPE_* (optional argument)
*
* Returns: 0 on success, 1 no change, <0 on error
*/
-int mnt_monitor_next_changed(struct libmnt_monitor *mn,
+int mnt_monitor_next_change(struct libmnt_monitor *mn,
const char **filename,
int *type)
{
continue;
printf(" top-level FD active\n");
- while (mnt_monitor_next_changed(mn, &filename, NULL) == 0)
+ while (mnt_monitor_next_change(mn, &filename, NULL) == 0)
printf(" %s: change detected\n", filename);
} while (1);
while (mnt_monitor_wait(mn, -1) > 0) {
printf("notification detected\n");
- while (mnt_monitor_next_changed(mn, &filename, NULL) == 0)
+ while (mnt_monitor_next_change(mn, &filename, NULL) == 0)
printf(" %s: change detected\n", filename);
}