diff options
Diffstat (limited to 'source3/utils/net_registry.c')
-rw-r--r-- | source3/utils/net_registry.c | 58 |
1 files changed, 38 insertions, 20 deletions
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 3958d2165d1..c118b733107 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -130,9 +130,12 @@ static int net_registry_enumerate(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage:"),_(" net registry enumerate <path>\n")); - d_printf(_("Example:"), _(" net registry enumerate " - "'HKLM\\Software\\Samba'\n")); + d_printf("%s\n%s", + _("Usage:"), + _("net registry enumerate <path>\n")); + d_printf("%s\n%s", + _("Example:"), + _("net registry enumerate 'HKLM\\Software\\Samba'\n")); goto done; } @@ -182,9 +185,13 @@ static int net_registry_createkey(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage:"),_(" net registry createkey <path>\n")); - d_printf(_("Example:"), _(" net registry createkey " - "'HKLM\\Software\\Samba\\smbconf.127.0.0.1'\n")); + d_printf("%s\n%s", + _("Usage:"), + _("net registry createkey <path>\n")); + d_printf("%s\n%s", + _("Example:"), + _("net registry createkey " + "'HKLM\\Software\\Samba\\smbconf.127.0.0.1'\n")); goto done; } if (strlen(argv[0]) == 0) { @@ -235,8 +242,12 @@ static int net_registry_deletekey(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage:"),_(" net registry deletekey <path>\n")); - d_printf(_("Example:"),_(" net registry deletekey " + d_printf("%s\n%s", + _("Usage:"), + _("net registry deletekey <path>\n")); + d_printf("%s\n%s", + _("Example:"), + _("net registry deletekey " "'HKLM\\Software\\Samba\\smbconf.127.0.0.1'\n")); goto done; } @@ -247,14 +258,14 @@ static int net_registry_deletekey(struct net_context *c, int argc, werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_hive ", _("failed"), - ": %s\n", win_errstr(werr)); + d_fprintf(stderr, "open_hive %s: %s\n", _("failed"), + win_errstr(werr)); goto done; } werr = reg_deletekey(hivekey, subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "reg_deletekey ", _("failed"), ": %s\n", + d_fprintf(stderr, "reg_deletekey %s: %s\n", _("failed"), win_errstr(werr)); goto done; } @@ -276,8 +287,9 @@ static int net_registry_getvalue_internal(struct net_context *c, int argc, TALLOC_CTX *ctx = talloc_stackframe(); if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("Usage:"),_(" net rpc registry getvalue <key> " - "<valuename>\n")); + d_fprintf(stderr, "%s\n%s", + _("Usage:"), + _("net rpc registry getvalue <key> <valuename>\n")); goto done; } @@ -325,8 +337,10 @@ static int net_registry_setvalue(struct net_context *c, int argc, TALLOC_CTX *ctx = talloc_stackframe(); if (argc < 4 || c->display_usage) { - d_fprintf(stderr, _("Usage:"),_(" net rpc registry setvalue <key> " - "<valuename> <type> [<val>]+\n")); + d_fprintf(stderr, "%s\n%s", + _("Usage:"), + _("net rpc registry setvalue <key> <valuename> " + "<type> [<val>]+\n")); goto done; } @@ -380,8 +394,9 @@ static int net_registry_deletevalue(struct net_context *c, int argc, int ret = -1; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("Usage:"),_(" net rpc registry deletevalue <key> " - "<valuename>\n")); + d_fprintf(stderr, "%s\n%s", + _("Usage:"), + _("net rpc registry deletevalue <key> <valuename>\n")); goto done; } @@ -424,9 +439,12 @@ static int net_registry_getsd(struct net_context *c, int argc, access_mask = REG_KEY_READ; if (argc != 1 || c->display_usage) { - d_printf(_("Usage:"),_(" net registry getsd <path>\n")); - d_printf(_("Example:"),_(" net registry getsd " - "'HKLM\\Software\\Samba'\n")); + d_printf("%s\n%s", + _("Usage:"), + _("net registry getsd <path>\n")); + d_printf("%s\n%s", + _("Example:"), + _("net registry getsd 'HKLM\\Software\\Samba'\n")); goto done; } if (strlen(argv[0]) == 0) { |