svn commit: samba r25579 - in branches/SAMBA_4_0/source/torture: . nbt smb2

metze at samba.org metze at samba.org
Mon Oct 8 14:22:12 GMT 2007


Author: metze
Date: 2007-10-08 14:22:10 +0000 (Mon, 08 Oct 2007)
New Revision: 25579

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

Log:
BOOL -> bool

metze
Modified:
   branches/SAMBA_4_0/source/torture/locktest2.c
   branches/SAMBA_4_0/source/torture/nbt/browse.c
   branches/SAMBA_4_0/source/torture/smb2/dir.c
   branches/SAMBA_4_0/source/torture/smb2/maxwrite.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/locktest2.c
===================================================================
--- branches/SAMBA_4_0/source/torture/locktest2.c	2007-10-08 14:21:22 UTC (rev 25578)
+++ branches/SAMBA_4_0/source/torture/locktest2.c	2007-10-08 14:22:10 UTC (rev 25579)
@@ -24,10 +24,10 @@
 static fstring username;
 static int got_pass;
 static int numops = 1000;
-static BOOL showall;
-static BOOL analyze;
-static BOOL hide_unlock_fails;
-static BOOL use_oplocks;
+static bool showall;
+static bool analyze;
+static bool hide_unlock_fails;
+static bool use_oplocks;
 
 #define FILENAME "\\locktest.dat"
 #define LOCKRANGE 100
@@ -77,7 +77,7 @@
 	return -1;
 }
 
-static BOOL try_close(struct smbcli_state *c, int fstype, int fd)
+static bool try_close(struct smbcli_state *c, int fstype, int fd)
 {
 	switch (fstype) {
 	case FSTYPE_SMB:
@@ -87,10 +87,10 @@
 		return close(fd) == 0;
 	}
 
-	return False;
+	return false;
 }
 
-static BOOL try_lock(struct smbcli_state *c, int fstype, 
+static bool try_lock(struct smbcli_state *c, int fstype, 
 		     int fd, uint_t start, uint_t len,
 		     enum brl_type op)
 {
@@ -109,10 +109,10 @@
 		return fcntl(fd,F_SETLK,&lock) == 0;
 	}
 
-	return False;
+	return false;
 }
 
-static BOOL try_unlock(struct smbcli_state *c, int fstype, 
+static bool try_unlock(struct smbcli_state *c, int fstype, 
 		       int fd, uint_t start, uint_t len)
 {
 	struct flock lock;
@@ -130,7 +130,7 @@
 		return fcntl(fd,F_SETLK,&lock) == 0;
 	}
 
-	return False;
+	return false;
 }	
 
 /***************************************************** 
@@ -207,7 +207,7 @@
 
 
 
-static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], 
+static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], 
 		     char *nfs[NSERVERS],
 		     int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES],
 		     struct record *rec)
@@ -221,7 +221,7 @@
 	uint_t r2 = rec->r2;
 	enum brl_type op;
 	int server;
-	BOOL ret[NSERVERS];
+	bool ret[NSERVERS];
 
 	if (r1 < READ_PCT) {
 		op = READ_LOCK; 
@@ -243,7 +243,7 @@
 			       op==READ_LOCK?"READ_LOCK":"WRITE_LOCK",
 			       ret[0], ret[1]);
 		}
-		if (ret[0] != ret[1]) return False;
+		if (ret[0] != ret[1]) return false;
 	} else if (r2 < LOCK_PCT+UNLOCK_PCT) {
 		/* unset a lock */
 		for (server=0;server<NSERVERS;server++) {
@@ -257,7 +257,7 @@
 			       start, start+len-1, len,
 			       ret[0], ret[1]);
 		}
-		if (!hide_unlock_fails && ret[0] != ret[1]) return False;
+		if (!hide_unlock_fails && ret[0] != ret[1]) return false;
 	} else {
 		/* reopen the file */
 		for (server=0;server<NSERVERS;server++) {
@@ -266,7 +266,7 @@
 								 O_RDWR|O_CREAT);
 			if (fnum[server][fstype][conn][f] == -1) {
 				printf("failed to reopen on share1\n");
-				return False;
+				return false;
 			}
 		}
 		if (showall) {
@@ -274,7 +274,7 @@
 			       conn, fstype, f);
 		}
 	}
-	return True;
+	return true;
 }
 
 static void close_files(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], 
@@ -369,7 +369,7 @@
 		recorded[n].len *= RANGE_MULTIPLE;
 		recorded[n].r1 = random() % 100;
 		recorded[n].r2 = random() % 100;
-		recorded[n].needed = True;
+		recorded[n].needed = true;
 	}
 
 	reconnect(cli, nfs, fnum, share1, share2);
@@ -388,14 +388,14 @@
 
 		for (i=0;i<n-1;i++) {
 			int m;
-			recorded[i].needed = False;
+			recorded[i].needed = false;
 
 			close_files(cli, nfs, fnum);
 			open_files(cli, nfs, fnum);
 
 			m = retest(cli, nfs, fnum, n);
 			if (m == n) {
-				recorded[i].needed = True;
+				recorded[i].needed = true;
 			} else {
 				if (i < m) {
 					memmove(&recorded[i], &recorded[i+1],
@@ -412,7 +412,7 @@
 	close_files(cli, nfs, fnum);
 	reconnect(cli, nfs, fnum, share1, share2);
 	open_files(cli, nfs, fnum);
-	showall = True;
+	showall = true;
 	n1 = retest(cli, nfs, fnum, n);
 	if (n1 != n-1) {
 		printf("ERROR - inconsistent result (%u %u)\n", n1, n);
@@ -506,19 +506,19 @@
 			seed = atoi(optarg);
 			break;
 		case 'u':
-			hide_unlock_fails = True;
+			hide_unlock_fails = true;
 			break;
 		case 'o':
 			numops = atoi(optarg);
 			break;
 		case 'O':
-			use_oplocks = True;
+			use_oplocks = true;
 			break;
 		case 'a':
-			showall = True;
+			showall = true;
 			break;
 		case 'A':
-			analyze = True;
+			analyze = true;
 			break;
 		case 'h':
 			usage();

Modified: branches/SAMBA_4_0/source/torture/nbt/browse.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/browse.c	2007-10-08 14:21:22 UTC (rev 25578)
+++ branches/SAMBA_4_0/source/torture/nbt/browse.c	2007-10-08 14:22:10 UTC (rev 25579)
@@ -33,7 +33,7 @@
 	struct nbt_name name;
 	TALLOC_CTX *mem_ctx = talloc_new(NULL);
 	NTSTATUS status;
-	BOOL ret = True;
+	bool ret = true;
 	
 	name.name = lp_workgroup();
 	name.type = NBT_NAME_BROWSER;
@@ -45,7 +45,7 @@
 		printf("Failed to resolve %s - %s\n",
 		       name.name, nt_errstr(status));
 		talloc_free(mem_ctx);
-		return False;
+		return false;
 	}
 
 	talloc_free(mem_ctx);

Modified: branches/SAMBA_4_0/source/torture/smb2/dir.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/dir.c	2007-10-08 14:21:22 UTC (rev 25578)
+++ branches/SAMBA_4_0/source/torture/smb2/dir.c	2007-10-08 14:22:10 UTC (rev 25579)
@@ -29,19 +29,19 @@
 /*
   test find continue
 */
-static BOOL torture_smb2_find_dir(struct smb2_tree *tree)
+static bool torture_smb2_find_dir(struct smb2_tree *tree)
 {
 	struct smb2_handle handle;
 	NTSTATUS status;
 	int i;
 	struct smb2_find f;
-	BOOL ret = True;
+	bool ret = true;
 	union smb_search_data *d;
 	uint_t count;
 
 	status = smb2_util_roothandle(tree, &handle);
 	if (!NT_STATUS_IS_OK(status)) {
-		return False;
+		return false;
 	}
 
 	ZERO_STRUCT(f);
@@ -75,14 +75,14 @@
 /* 
    basic testing of directory listing with continue
 */
-BOOL torture_smb2_dir(struct torture_context *torture)
+bool torture_smb2_dir(struct torture_context *torture)
 {
 	TALLOC_CTX *mem_ctx = talloc_new(NULL);
 	struct smb2_tree *tree;
-	BOOL ret = True;
+	bool ret = true;
 
 	if (!torture_smb2_connection(mem_ctx, &tree)) {
-		return False;
+		return false;
 	}
 
 	ret &= torture_smb2_find_dir(tree);

Modified: branches/SAMBA_4_0/source/torture/smb2/maxwrite.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/maxwrite.c	2007-10-08 14:21:22 UTC (rev 25578)
+++ branches/SAMBA_4_0/source/torture/smb2/maxwrite.c	2007-10-08 14:22:10 UTC (rev 25579)
@@ -111,7 +111,7 @@
 /* 
    basic testing of SMB2 connection calls
 */
-BOOL torture_smb2_maxwrite(struct torture_context *torture)
+bool torture_smb2_maxwrite(struct torture_context *torture)
 {
 	TALLOC_CTX *mem_ctx = talloc_new(NULL);
 	struct smb2_tree *tree;
@@ -119,17 +119,17 @@
 	NTSTATUS status;
 
 	if (!torture_smb2_connection(mem_ctx, &tree)) {
-		return False;
+		return false;
 	}
 
 	h1 = torture_smb2_create(tree, FNAME);
 	status = torture_smb2_write(mem_ctx, tree, h1);
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("Write failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	talloc_free(mem_ctx);
 
-	return True;
+	return true;
 }



More information about the samba-cvs mailing list