1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

net (registry util): refactor printing of value without name out.

This renames print_registry_value() to print_registry_value_with_name().
The new function is called print_registry_value().

Michael
This commit is contained in:
Michael Adam 2008-04-09 12:29:34 +02:00
parent 6cee347035
commit 88c4851ad7
4 changed files with 14 additions and 7 deletions

View 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;

View 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");
}

View File

@ -24,8 +24,10 @@
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

View 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);