]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net registry: refactor core of net_registry_getvalue() out
authorMichael Adam <obnox@samba.org>
Thu, 15 May 2008 12:34:21 +0000 (14:34 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 15 May 2008 15:17:55 +0000 (17:17 +0200)
into net_registry_getvalue_internal(), which takes a bool parameter "raw"
controlling the output format.

Michael

source/utils/net_registry.c

index a06a067ee31312ebdff9b9c6c90ba0adaaaba866..73cbbaaa0d3c5b7f432fa2835bb0cc94f70e19eb 100644 (file)
@@ -263,8 +263,8 @@ done:
        return ret;
 }
 
-static int net_registry_getvalue(struct net_context *c, int argc,
-                                const char **argv)
+static int net_registry_getvalue_internal(struct net_context *c, int argc,
+                                         const char **argv, bool raw)
 {
        WERROR werr;
        int ret = -1;
@@ -291,7 +291,7 @@ static int net_registry_getvalue(struct net_context *c, int argc,
                goto done;
        }
 
-       print_registry_value(value, false);
+       print_registry_value(value, raw);
 
        ret = 0;
 
@@ -300,6 +300,12 @@ done:
        return ret;
 }
 
+static int net_registry_getvalue(struct net_context *c, int argc,
+                                const char **argv)
+{
+       return net_registry_getvalue_internal(c, argc, argv, false);
+}
+
 static int net_registry_setvalue(struct net_context *c, int argc,
                                 const char **argv)
 {