svn commit: samba r21079 - in branches/SAMBA_3_0/source: include smbd

vlendec at samba.org vlendec at samba.org
Wed Jan 31 12:42:25 GMT 2007


Author: vlendec
Date: 2007-01-31 12:42:24 +0000 (Wed, 31 Jan 2007)
New Revision: 21079

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

Log:
Minimizing diff: Adopt the Samba4 style ChangeNotify flags.

Volker

Modified:
   branches/SAMBA_3_0/source/include/messages.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/smbd/notify_fam.c
   branches/SAMBA_3_0/source/smbd/notify_hash.c
   branches/SAMBA_3_0/source/smbd/notify_kernel.c
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/messages.h
===================================================================
--- branches/SAMBA_3_0/source/include/messages.h	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/include/messages.h	2007-01-31 12:42:24 UTC (rev 21079)
@@ -73,6 +73,10 @@
 #define MSG_SMB_BLOCKING_LOCK_CANCEL 3013
 #define MSG_SMB_NOTIFY       3014
 #define MSG_SMB_STAT_CACHE_DELETE 3015
+/*
+ * Samba4 compatibility
+ */
+#define MSG_PVFS_NOTIFY       3016
 
 /* winbind messages */
 #define MSG_WINBIND_FINISHED     4001

Modified: branches/SAMBA_3_0/source/include/smb.h
===================================================================
--- branches/SAMBA_3_0/source/include/smb.h	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/include/smb.h	2007-01-31 12:42:24 UTC (rev 21079)
@@ -1379,7 +1379,7 @@
 #define FILE_READ_ONLY_VOLUME           0x00080000
 
 /* ChangeNotify flags. */
-#define FILE_NOTIFY_CHANGE_FILE        0x001
+#define FILE_NOTIFY_CHANGE_FILE_NAME   0x001
 #define FILE_NOTIFY_CHANGE_DIR_NAME    0x002
 #define FILE_NOTIFY_CHANGE_ATTRIBUTES  0x004
 #define FILE_NOTIFY_CHANGE_SIZE        0x008
@@ -1388,7 +1388,9 @@
 #define FILE_NOTIFY_CHANGE_CREATION    0x040
 #define FILE_NOTIFY_CHANGE_EA          0x080
 #define FILE_NOTIFY_CHANGE_SECURITY    0x100
-#define FILE_NOTIFY_CHANGE_FILE_NAME   0x200
+#define FILE_NOTIFY_CHANGE_STREAM_NAME	0x00000200
+#define FILE_NOTIFY_CHANGE_STREAM_SIZE	0x00000400
+#define FILE_NOTIFY_CHANGE_STREAM_WRITE	0x00000800
 
 #define FILE_NOTIFY_CHANGE_NAME \
 	(FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME)

Modified: branches/SAMBA_3_0/source/smbd/notify_fam.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/notify_fam.c	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/smbd/notify_fam.c	2007-01-31 12:42:24 UTC (rev 21079)
@@ -191,8 +191,8 @@
 	struct fam_notify_ctx *ctx;
 	pstring fullpath;
 
-	if ((*filter & FILE_NOTIFY_CHANGE_FILE) == 0) {
-		DEBUG(10, ("filter = %u, no FILE_NOTIFY_CHANGE_FILE\n",
+	if ((*filter & FILE_NOTIFY_CHANGE_FILE_NAME) == 0) {
+		DEBUG(10, ("filter = %u, no FILE_NOTIFY_CHANGE_FILE_NAME\n",
 			   *filter));
 		return NULL;
 	}
@@ -224,7 +224,7 @@
 	 * FAMCreated and FAMDeleted events
 	 */
 
-	ctx->filter = FILE_NOTIFY_CHANGE_FILE;
+	ctx->filter = FILE_NOTIFY_CHANGE_FILE_NAME;
 
 	if (!(ctx->path = talloc_strdup(ctx, fullpath))) {
 		DEBUG(0, ("talloc_strdup failed\n"));
@@ -236,7 +236,7 @@
 	 * Leave the rest to smbd itself
 	 */
 
-	*filter &= ~FILE_NOTIFY_CHANGE_FILE;
+	*filter &= ~FILE_NOTIFY_CHANGE_FILE_NAME;
 
 	DLIST_ADD(fam_notify_list, ctx);
 	talloc_set_destructor(ctx, fam_notify_ctx_destructor);

Modified: branches/SAMBA_3_0/source/smbd/notify_hash.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/notify_hash.c	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/smbd/notify_hash.c	2007-01-31 12:42:24 UTC (rev 21079)
@@ -147,8 +147,7 @@
 		 */
 
 		if (flags & (FILE_NOTIFY_CHANGE_DIR_NAME
-			     |FILE_NOTIFY_CHANGE_FILE_NAME
-			     |FILE_NOTIFY_CHANGE_FILE)) {
+			     |FILE_NOTIFY_CHANGE_FILE_NAME)) {
 			int i;
 			unsigned char tmp_hash[16];
 			mdfour(tmp_hash, (const unsigned char *)fname,

Modified: branches/SAMBA_3_0/source/smbd/notify_kernel.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/notify_kernel.c	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/smbd/notify_kernel.c	2007-01-31 12:42:24 UTC (rev 21079)
@@ -152,7 +152,7 @@
 	kernel_flags = DN_CREATE|DN_DELETE|DN_RENAME; /* creation/deletion
 						       * changes
 						       * everything! */
-	if (flags & FILE_NOTIFY_CHANGE_FILE)        kernel_flags |= DN_MODIFY;
+	if (flags & FILE_NOTIFY_CHANGE_FILE_NAME)   kernel_flags |= DN_MODIFY;
 	if (flags & FILE_NOTIFY_CHANGE_DIR_NAME)    kernel_flags
 							    |= DN_RENAME
 							    |DN_DELETE;

Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c	2007-01-31 12:28:05 UTC (rev 21078)
+++ branches/SAMBA_3_0/source/smbd/reply.c	2007-01-31 12:42:24 UTC (rev 21079)
@@ -1867,7 +1867,7 @@
 		if (SMB_VFS_UNLINK(conn,directory) == 0) {
 			count++;
 			notify_fname(conn, directory,
-				     FILE_NOTIFY_CHANGE_FILE,
+				     FILE_NOTIFY_CHANGE_FILE_NAME,
 				     NOTIFY_ACTION_REMOVED);
 		}
 	} else {
@@ -1930,7 +1930,7 @@
 				DEBUG(3,("unlink_internals: succesful unlink "
 					 "[%s]\n",fname));
 				notify_action(conn, directory, dname,
-					      FILE_NOTIFY_CHANGE_FILE,
+					      FILE_NOTIFY_CHANGE_FILE_NAME,
 					      NOTIFY_ACTION_REMOVED);
 			}
 				



More information about the samba-cvs mailing list