From: Michael Adam Date: Thu, 15 May 2008 12:34:21 +0000 (+0200) Subject: net registry: refactor core of net_registry_getvalue() out X-Git-Tag: samba-3.3.0pre1~1230 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=889e19303e141e226898f837a637a2d591c75ad9;p=thirdparty%2Fsamba.git net registry: refactor core of net_registry_getvalue() out into net_registry_getvalue_internal(), which takes a bool parameter "raw" controlling the output format. Michael --- diff --git a/source/utils/net_registry.c b/source/utils/net_registry.c index a06a067ee31..73cbbaaa0d3 100644 --- a/source/utils/net_registry.c +++ b/source/utils/net_registry.c @@ -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) {