summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-10-27 13:26:35 +0000
committerJeremy Allison <jra@samba.org>2014-12-09 04:12:09 +0100
commitf530d6d97bfb7c64ede37ad8d2ee33118ddcf3d1 (patch)
treefcf7542e5ef22ebe3b489302e83ff53dceade94d /source3/modules/vfs_default.c
parent9b474456b8133bd82c14cd097a6df2380b55b423 (diff)
downloadsamba-f530d6d97bfb7c64ede37ad8d2ee33118ddcf3d1.tar.gz
samba-f530d6d97bfb7c64ede37ad8d2ee33118ddcf3d1.tar.xz
samba-f530d6d97bfb7c64ede37ad8d2ee33118ddcf3d1.zip
notify_inotify: Make inotify_watch return 0/errno
More like a cleanup, but I want to use inotify_watch in notifyd that I would like to keep as light as possible Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index dad6bb7440..eaa1c2be4f 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2119,11 +2119,16 @@ static NTSTATUS vfswrap_notify_watch(vfs_handle_struct *vfs_handle,
*/
#ifdef HAVE_INOTIFY
if (lp_kernel_change_notify(vfs_handle->conn->params)) {
+ int ret;
if (!lp_parm_bool(-1, "notify", "inotify", True)) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
- return inotify_watch(ctx, path, filter, subdir_filter,
- callback, private_data, handle);
+ ret = inotify_watch(ctx, path, filter, subdir_filter,
+ callback, private_data, handle);
+ if (ret != 0) {
+ return map_nt_error_from_unix(ret);
+ }
+ return NT_STATUS_OK;
}
#endif
/*