net (registry util): refactor printing of value without name out.
authorMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 10:29:34 +0000 (12:29 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 21:52:34 +0000 (23:52 +0200)
This renames print_registry_value() to print_registry_value_with_name().
The new function is called print_registry_value().

Michael
(This used to be commit 88c4851ad7240bc4f72a5ef92e21629e6a4c99c6)

source3/utils/net_registry.c
source3/utils/net_registry_util.c
source3/utils/net_registry_util.h
source3/utils/net_rpc_registry.c

index 8a45dec21caf92b7a22a3e6901db9ad16eaade32..c7cc5af4933ea969e612c54b0a7685a9ba9c4648 100644 (file)
@@ -156,7 +156,7 @@ static int net_registry_enumerate(int argc, const char **argv)
             W_ERROR_IS_OK(werr);
             count++)
        {
-               print_registry_value(valname, valvalue);
+               print_registry_value_with_name(valname, valvalue);
        }
        if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
                goto done;
index 948f8b6153f38417e99812a09133fbbb9ef4e5ba..ca80e60ec33a9e04ad952aee076c88077fc12d35 100644 (file)
@@ -32,10 +32,8 @@ void print_registry_key(const char *keyname, NTTIME *modtime)
        d_printf("\n");
 }
 
-void print_registry_value(const char *valname,
-                         const struct registry_value *valvalue)
+void print_registry_value(const struct registry_value *valvalue)
 {
-       d_printf("Valuename  = %s\n", valname);
        d_printf("Type       = %s\n",
                 reg_type_lookup(valvalue->type));
        switch(valvalue->type) {
@@ -62,6 +60,13 @@ void print_registry_value(const char *valname,
                d_printf("Value      = <unprintable>\n");
                break;
        }
+}
+
+void print_registry_value_with_name(const char *valname,
+                                   const struct registry_value *valvalue)
+{
+       d_printf("Valuename  = %s\n", valname);
+       print_registry_value(valvalue);
        d_printf("\n");
 }
 
index 13ec6ebfcdd23535a7c4387d70a82580d3713782..09aaa8394b4c4229496152489a20f37a72a94a82 100644 (file)
 
 void print_registry_key(const char *keyname, NTTIME *modtime);
 
-void print_registry_value(const char *valname,
-                         const struct registry_value *valvalue);
+void print_registry_value(const struct registry_value *valvalue);
+
+void print_registry_value_with_name(const char *valname,
+                                   const struct registry_value *valvalue);
 
 /**
  * Split path into hive name and subkeyname
index da078f4d3619817c295d9b993ba220b4447f64e2..564d79e9f9d594ca15b0f604d23f257fa1e9496d 100644 (file)
@@ -661,7 +661,7 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid,
        }
 
        for (i=0; i<num_values; i++) {
-               print_registry_value(names[i], values[i]);
+               print_registry_value_with_name(names[i], values[i]);
        }
 
        rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key, NULL);