Rev 5297: net conf import: add support for parameter types P_LIST
and P_OCTAL in http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
Michael Adam
ma at sernet.de
Wed Mar 21 16:16:34 GMT 2007
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
------------------------------------------------------------
revno: 5297
revision-id: ma at sernet.de-20070321161632-9f930c76f8ad2815
parent: ma at sernet.de-20070321155901-50f3cb442459b7e5
committer: Michael Adam <ma at sernet.de>
branch nick: SAMBA_3_0-registry.bzr
timestamp: Wed 2007-03-21 17:16:32 +0100
message:
net conf import: add support for parameter types P_LIST and P_OCTAL
code taken more or less from loadparm.c:print_parameter
next steps: replace printing to stdout by putting stuff into the
registry...
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-03-21 15:59:01 +0000
+++ b/source/utils/net_conf.c 2007-03-21 16:16:32 +0000
@@ -361,8 +361,21 @@
}
}
break;
+ case P_OCTAL:
+ d_printf("%s\n", octal_string(*(int *)ptr));
+ break;
case P_LIST:
- d_printf("<type list coming soon...>\n");
+ if ((char ***)ptr && *(char ***)ptr) {
+ char **list = *(char ***)ptr;
+ for (; *list; list++) {
+ /* surround strings with whitespace in double quotes */
+ if ( strchr_m( *list, ' ' ) )
+ d_printf("\"%s\"%s", *list, ((*(list+1))?", ":""));
+ else
+ d_printf("%s%s", *list, ((*(list+1))?", ":""));
+ }
+ }
+ d_printf("\n");
break;
case P_SEP:
break;
More information about the samba-cvs
mailing list