svn commit: samba r21104 - in branches: SAMBA_3_0/source/smbd SAMBA_4_0/source/ntvfs/sysdep

vlendec at samba.org vlendec at samba.org
Thu Feb 1 10:59:36 GMT 2007


Author: vlendec
Date: 2007-02-01 10:59:35 +0000 (Thu, 01 Feb 2007)
New Revision: 21104

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21104

Log:
Rename struct watch_context to struct inotify_watch_context
Modified:
   branches/SAMBA_3_0/source/smbd/notify_inotify.c
   branches/SAMBA_4_0/source/ntvfs/sysdep/inotify.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/notify_inotify.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/notify_inotify.c	2007-02-01 01:27:02 UTC (rev 21103)
+++ branches/SAMBA_3_0/source/smbd/notify_inotify.c	2007-02-01 10:59:35 UTC (rev 21104)
@@ -61,11 +61,11 @@
 struct inotify_private {
 	struct sys_notify_context *ctx;
 	int fd;
-	struct watch_context *watches;
+	struct inotify_watch_context *watches;
 };
 
-struct watch_context {
-	struct watch_context *next, *prev;
+struct inotify_watch_context {
+	struct inotify_watch_context *next, *prev;
 	struct inotify_private *in;
 	int wd;
 	void (*callback)(struct sys_notify_context *ctx, 
@@ -92,7 +92,8 @@
   see if a particular event from inotify really does match a requested
   notify event in SMB
 */
-static BOOL filter_match(struct watch_context *w, struct inotify_event *e)
+static BOOL filter_match(struct inotify_watch_context *w,
+			 struct inotify_event *e)
 {
 	DEBUG(10, ("filter_match: e->mask=%x, w->mask=%x, w->filter=%x\n",
 		   e->mask, w->mask, w->filter));
@@ -141,7 +142,7 @@
 			     uint32_t prev_cookie,
 			     struct inotify_event *e2)
 {
-	struct watch_context *w, *next;
+	struct inotify_watch_context *w, *next;
 	struct notify_event ne;
 
 	DEBUG(10, ("inotify_dispatch called with mask=%x, name=[%s]\n",
@@ -320,7 +321,7 @@
 /*
   destroy a watch
 */
-static int watch_destructor(struct watch_context *w)
+static int watch_destructor(struct inotify_watch_context *w)
 {
 	struct inotify_private *in = w->in;
 	int wd = w->wd;
@@ -357,7 +358,7 @@
 	struct inotify_private *in;
 	int wd;
 	uint32_t mask;
-	struct watch_context *w;
+	struct inotify_watch_context *w;
 	uint32_t filter = e->filter;
 	void **handle = (void **)handle_p;
 
@@ -391,7 +392,7 @@
 	DEBUG(10, ("inotify_add_watch for %s mask %x returned wd %d\n",
 		   e->path, mask, wd));
 
-	w = talloc(in, struct watch_context);
+	w = talloc(in, struct inotify_watch_context);
 	if (w == NULL) {
 		inotify_rm_watch(in->fd, wd);
 		e->filter = filter;

Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/inotify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/sysdep/inotify.c	2007-02-01 01:27:02 UTC (rev 21103)
+++ branches/SAMBA_4_0/source/ntvfs/sysdep/inotify.c	2007-02-01 10:59:35 UTC (rev 21104)
@@ -64,11 +64,11 @@
 struct inotify_private {
 	struct sys_notify_context *ctx;
 	int fd;
-	struct watch_context *watches;
+	struct inotify_watch_context *watches;
 };
 
-struct watch_context {
-	struct watch_context *next, *prev;
+struct inotify_watch_context {
+	struct inotify_watch_context *next, *prev;
 	struct inotify_private *in;
 	int wd;
 	sys_notify_callback_t callback;
@@ -93,7 +93,8 @@
   see if a particular event from inotify really does match a requested
   notify event in SMB
 */
-static BOOL filter_match(struct watch_context *w, struct inotify_event *e)
+static BOOL filter_match(struct inotify_watch_context *w,
+			 struct inotify_event *e)
 {
 	if ((e->mask & w->mask) == 0) {
 		/* this happens because inotify_add_watch() coalesces watches on the same
@@ -139,7 +140,7 @@
 			     uint32_t prev_cookie,
 			     struct inotify_event *e2)
 {
-	struct watch_context *w, *next;
+	struct inotify_watch_context *w, *next;
 	struct notify_event ne;
 
 	/* ignore extraneous events, such as unmount and IN_IGNORED events */
@@ -312,7 +313,7 @@
 /*
   destroy a watch
 */
-static int watch_destructor(struct watch_context *w)
+static int watch_destructor(struct inotify_watch_context *w)
 {
 	struct inotify_private *in = w->in;
 	int wd = w->wd;
@@ -342,7 +343,7 @@
 	struct inotify_private *in;
 	int wd;
 	uint32_t mask;
-	struct watch_context *w;
+	struct inotify_watch_context *w;
 	uint32_t filter = e->filter;
 	void **handle = (void **)handle_p;
 
@@ -372,7 +373,7 @@
 		return map_nt_error_from_unix(errno);
 	}
 
-	w = talloc(in, struct watch_context);
+	w = talloc(in, struct inotify_watch_context);
 	if (w == NULL) {
 		inotify_rm_watch(in->fd, wd);
 		e->filter = filter;



More information about the samba-cvs mailing list