[SCM] Samba Shared Repository - branch master updated - 3994c42f1938e35218cd5708fcc5a22b1b9a761d

Jelmer Vernooij jelmer at samba.org
Sun Oct 12 17:47:33 GMT 2008


The branch, master has been updated
       via  3994c42f1938e35218cd5708fcc5a22b1b9a761d (commit)
      from  99fba0ca69516e571d88ecaea3937f1f73287cf3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3994c42f1938e35218cd5708fcc5a22b1b9a761d
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Oct 12 19:46:38 2008 +0200

    Fix number of arguments for file_load() functions.

-----------------------------------------------------------------------

Summary of changes:
 lib/util/tests/file.c                     |    2 +-
 libcli/nbt/tools/{ => }/tools/nmblookup.c |    0 
 source4/lib/torture/torture.h             |    4 ++--
 source4/librpc/tools/ndrdump.c            |   12 ++----------
 source4/torture/auth/pac.c                |    2 +-
 source4/torture/basic/misc.c              |    2 +-
 source4/torture/locktest.c                |    2 +-
 source4/torture/util_smb.c                |    2 +-
 8 files changed, 9 insertions(+), 17 deletions(-)
 rename libcli/nbt/tools/{ => }/tools/nmblookup.c (100%)


Changeset truncated at 500 lines:

diff --git a/lib/util/tests/file.c b/lib/util/tests/file.c
index 3377e83..9a303bf 100644
--- a/lib/util/tests/file.c
+++ b/lib/util/tests/file.c
@@ -42,7 +42,7 @@ static bool test_file_load_save(struct torture_context *tctx)
 	torture_assert_file_contains_text(tctx, TEST_FILENAME, TEST_DATA, 
 								      "file contents");
 
-	data = file_load(TEST_FILENAME, &len, mem_ctx);
+	data = file_load(TEST_FILENAME, &len, 0, mem_ctx);
 	torture_assert(tctx, data, "loading file");
 
 	torture_assert_int_equal(tctx, len, strlen(TEST_DATA), "Length");
diff --git a/libcli/nbt/tools/tools/nmblookup.c b/libcli/nbt/tools/nmblookup.c
similarity index 100%
rename from libcli/nbt/tools/tools/nmblookup.c
rename to libcli/nbt/tools/nmblookup.c
diff --git a/source4/lib/torture/torture.h b/source4/lib/torture/torture.h
index f023f31..0f966a5 100644
--- a/source4/lib/torture/torture.h
+++ b/source4/lib/torture/torture.h
@@ -267,7 +267,7 @@ void torture_result(struct torture_context *test,
 	char *__got; \
 	const char *__expected = (expected); \
 	size_t __size; \
-	__got = file_load(filename, &__size, torture_ctx); \
+	__got = file_load(filename, &__size, 0, torture_ctx); \
 	if (__got == NULL) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 			       __location__": unable to open %s: %s\n", \
@@ -288,7 +288,7 @@ void torture_result(struct torture_context *test,
 #define torture_assert_file_contains(torture_ctx,filename,expected,cmt)\
 	do { const char *__got, *__expected = (expected); \
 	size_t __size; \
-	__got = file_load(filename, *size, torture_ctx); \
+	__got = file_load(filename, *size, 0, torture_ctx); \
 	if (strcmp_safe(__got, __expected) != 0) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 					   __location__": %s contained:\n%sExpected: %s%s\n", \
diff --git a/source4/librpc/tools/ndrdump.c b/source4/librpc/tools/ndrdump.c
index bc14369..b24868e 100644
--- a/source4/librpc/tools/ndrdump.c
+++ b/source4/librpc/tools/ndrdump.c
@@ -291,11 +291,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
 			exit(1);
 		}
 			
-#if (_SAMBA_BUILD_ >= 4)
-		data = (uint8_t *)file_load(ctx_filename, &size, mem_ctx);
-#else
-		data = (uint8_t *)file_load(ctx_filename, &size, 0);
-#endif
+		data = (uint8_t *)file_load(ctx_filename, &size, 0, mem_ctx);
 		if (!data) {
 			perror(ctx_filename);
 			exit(1);
@@ -322,11 +318,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
 	} 
 
 	if (filename)
-#if (_SAMBA_BUILD_ >= 4)
-		data = (uint8_t *)file_load(filename, &size, mem_ctx);
-#else
-		data = (uint8_t *)file_load(filename, &size, 0);
-#endif
+		data = (uint8_t *)file_load(filename, &size, 0, mem_ctx);
 	else
 		data = (uint8_t *)stdin_load(mem_ctx, &size);
 
diff --git a/source4/torture/auth/pac.c b/source4/torture/auth/pac.c
index 42901f1..f6f2fcb 100644
--- a/source4/torture/auth/pac.c
+++ b/source4/torture/auth/pac.c
@@ -379,7 +379,7 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
 
 	pac_file = torture_setting_string(tctx, "pac_file", NULL);
 	if (pac_file) {
-		tmp_blob.data = (uint8_t *)file_load(pac_file, &tmp_blob.length, mem_ctx);
+		tmp_blob.data = (uint8_t *)file_load(pac_file, &tmp_blob.length, 0, mem_ctx);
 		torture_comment(tctx, "(saved test) Loaded pac of size %ld from %s\n", (long)tmp_blob.length, pac_file);
 	} else {
 		tmp_blob = data_blob_talloc(mem_ctx, saved_pac, sizeof(saved_pac));
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index c129fd5..3a09fa7 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -448,7 +448,7 @@ static int init_benchrw_params(struct torture_context *tctx,
 	p = torture_setting_string(tctx, "unclist", NULL);
 	if (p) {
 		char *h, *s;
-		unc_list = file_lines_load(p, &num_unc_names, NULL);
+		unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
 		if (!unc_list || num_unc_names <= 0) {
 			torture_comment(tctx, "Failed to load unc names list "
 					"from '%s'\n", p);
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index a511e26..69b966b 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -137,7 +137,7 @@ static struct smbcli_state *connect_one(struct event_context *ev,
 		p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
 		if (p) {
 			char *h, *s;
-			unc_list = file_lines_load(p, &num_unc_names, NULL);
+			unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
 			if (!unc_list || num_unc_names <= 0) {
 				printf("Failed to load unc names list from '%s'\n", p);
 				exit(1);
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 22fdfec..3d9c5e3 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -514,7 +514,7 @@ _PUBLIC_ bool torture_get_conn_index(int conn_index,
 		return true;
 	}
 
-	unc_list = file_lines_load(p, &num_unc_names, NULL);
+	unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
 	if (!unc_list || num_unc_names <= 0) {
 		DEBUG(0,("Failed to load unc names list from '%s'\n", p));
 		return false;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list