Rev 5320: polish output of net conf import in testmode in http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/

Michael Adam ma at sernet.de
Mon Apr 2 13:54:56 GMT 2007


At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/

------------------------------------------------------------
revno: 5320
revision-id: ma at sernet.de-20070402135453-499ab678aad8a949
parent: ma at sernet.de-20070402105238-159cb4e91b4c929d
committer: Michael Adam <ma at sernet.de>
branch nick: SAMBA_3_0-registry.bzr
timestamp: Mon 2007-04-02 15:54:53 +0200
message:
  polish output of net conf import in testmode
modified:
  source/utils/net_conf.c        net_conf.c-20070228210606-uywdn1acd043wgvt-1
=== modified file 'source/utils/net_conf.c'
--- a/source/utils/net_conf.c	2007-04-02 10:48:21 +0000
+++ b/source/utils/net_conf.c	2007-04-02 13:54:53 +0000
@@ -300,8 +300,7 @@
 		GLOBAL_NAME : lp_servicename(share->service);
 
 	if (opt_testmode) {
-		d_printf("TEST: snum    %i : [%s]\n", share->service, 
-			servicename);
+		d_printf("[%s]\n", servicename);
 	}
 	else {
 		if (share->service == GLOBAL_SECTION_SNUM) {
@@ -406,8 +405,7 @@
 
 		if (parm->type != P_SEP) {
 			if (opt_testmode) {
-				d_printf("TEST: param %3d : %s = %s\n", 
-					pnum, parm->label, valstr);
+				d_printf("\t%s = %s\n", parm->label, valstr);
 			}
 			else {
 				werr = reg_setvalue_internal(key, parm->label, 
@@ -420,7 +418,7 @@
 	}
 
 	if (opt_testmode) {
-		d_printf("TEST: -----------\n");
+		d_printf("\n");
 	}
 
 	ret = 0;
@@ -538,6 +536,10 @@
 		goto done;
 	}
 
+	if (opt_testmode) {
+		d_printf("\nTEST MODE - would import the following configuration:\n\n");
+	}
+
 	if ((servicename == NULL) || strequal(servicename, GLOBAL_NAME)) {
 		service_found = True;
 		if (import_process_service(ctx, &global_share) != 0) {



More information about the samba-cvs mailing list