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

------------------------------------------------------------
revno: 5297
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Michael Adam <[EMAIL PROTECTED]>
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;

Reply via email to