summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-07-21 17:20:16 +0200
committerMichael Adam <obnox@samba.org>2011-07-21 17:24:18 +0200
commitcf50df5c6915395ceba1e78aa860ac26e6434aae (patch)
treee9339e5f63b2ba4bb5cec475030d9cb95040d266 /source3
parent5158fd1688cdf42fdf1f08b31e7231f06825b8ba (diff)
downloadsamba-cf50df5c6915395ceba1e78aa860ac26e6434aae.tar.gz
samba-cf50df5c6915395ceba1e78aa860ac26e6434aae.tar.bz2
samba-cf50df5c6915395ceba1e78aa860ac26e6434aae.zip
s3:loadparm: add support for P_BYTES to lp_do_parameter() - fix a build warning
(taken from s4 loadparm)
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index aee8349dbd..85caf20712 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7391,6 +7391,21 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
}
break;
+ case P_BYTES:
+ {
+ uint64_t val;
+ if (conv_str_size_error(pszParmValue, &val)) {
+ if (val <= INT_MAX) {
+ *(int *)parm_ptr = (int)val;
+ break;
+ }
+ }
+
+ DEBUG(0,("lp_do_parameter(%s): value is not "
+ "a valid size specifier!\n", pszParmValue));
+ return false;
+ }
+
case P_LIST:
case P_CMDLIST:
TALLOC_FREE(*((char ***)parm_ptr));