svn commit: samba r23549 - in branches: SAMBA_3_0/source/utils
SAMBA_3_0_26/source/utils
obnox at samba.org
obnox at samba.org
Tue Jun 19 21:40:29 GMT 2007
Author: obnox
Date: 2007-06-19 21:40:27 +0000 (Tue, 19 Jun 2007)
New Revision: 23549
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23549
Log:
Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from
"net conf setparm <section> <param> <type> <value>"
to
"net conf setparm <section> <param> <value>".
Micheal
Modified:
branches/SAMBA_3_0/source/utils/net_conf.c
branches/SAMBA_3_0_26/source/utils/net_conf.c
Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_conf.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_conf.c 2007-06-19 21:08:46 UTC (rev 23548)
+++ branches/SAMBA_3_0/source/utils/net_conf.c 2007-06-19 21:40:27 UTC (rev 23549)
@@ -82,8 +82,7 @@
static int net_conf_setparm_usage(int argc, const char **argv)
{
- d_printf("USAGE: net conf setparm <section> <param> <type> <value>\n"
- "\t(Supported types are 'dword' and 'sz' by now.)\n");
+ d_printf("USAGE: net conf setparm <section> <param> <value>\n");
return -1;
}
@@ -918,20 +917,18 @@
struct registry_key *key = NULL;
char *service = NULL;
char *param = NULL;
- char *type = NULL;
const char *value_str = NULL;
TALLOC_CTX *ctx;
ctx = talloc_init("setparm");
- if (argc != 4) {
+ if (argc != 3) {
net_conf_setparm_usage(argc, argv);
goto done;
}
service = strdup_lower(argv[0]);
param = strdup_lower(argv[1]);
- type = strdup_lower(argv[2]);
- value_str = argv[3];
+ value_str = argv[2];
if (!smbconf_key_exists(ctx, service)) {
werr = reg_createkey_internal(ctx, service, &key);
@@ -943,7 +940,7 @@
goto done;
}
- werr = reg_setvalue_internal(key, param, type, value_str);
+ werr = reg_setvalue_internal(key, param, "sz", value_str);
if (!W_ERROR_IS_OK(werr)) {
d_fprintf(stderr, "Error setting value '%s': %s\n",
param, dos_errstr(werr));
Modified: branches/SAMBA_3_0_26/source/utils/net_conf.c
===================================================================
--- branches/SAMBA_3_0_26/source/utils/net_conf.c 2007-06-19 21:08:46 UTC (rev 23548)
+++ branches/SAMBA_3_0_26/source/utils/net_conf.c 2007-06-19 21:40:27 UTC (rev 23549)
@@ -82,8 +82,7 @@
static int net_conf_setparm_usage(int argc, const char **argv)
{
- d_printf("USAGE: net conf setparm <section> <param> <type> <value>\n"
- "\t(Supported types are 'dword' and 'sz' by now.)\n");
+ d_printf("USAGE: net conf setparm <section> <param> <value>\n");
return -1;
}
@@ -918,20 +917,18 @@
struct registry_key *key = NULL;
char *service = NULL;
char *param = NULL;
- char *type = NULL;
const char *value_str = NULL;
TALLOC_CTX *ctx;
ctx = talloc_init("setparm");
- if (argc != 4) {
+ if (argc != 3) {
net_conf_setparm_usage(argc, argv);
goto done;
}
service = strdup_lower(argv[0]);
param = strdup_lower(argv[1]);
- type = strdup_lower(argv[2]);
- value_str = argv[3];
+ value_str = argv[2];
if (!smbconf_key_exists(ctx, service)) {
werr = reg_createkey_internal(ctx, service, &key);
@@ -943,7 +940,7 @@
goto done;
}
- werr = reg_setvalue_internal(key, param, type, value_str);
+ werr = reg_setvalue_internal(key, param, "sz", value_str);
if (!W_ERROR_IS_OK(werr)) {
d_fprintf(stderr, "Error setting value '%s': %s\n",
param, dos_errstr(werr));
More information about the samba-cvs
mailing list