diff options
author | Uri Simchoni <uri@samba.org> | 2016-01-18 06:56:43 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-01-26 15:58:11 +0100 |
commit | 798fcfdabc70d02667d982c648fef08114aac72b (patch) | |
tree | 3d9ffe2a4036446ee34e474b83b44abd30335d8e /source3/param/loadparm.c | |
parent | 7a890a785547361e609c135bf65bf364f2eaf23f (diff) | |
download | samba-798fcfdabc70d02667d982c648fef08114aac72b.tar.gz |
loadparm: introduce lp_parm_ulonglong() and lpcfg_parm_ulonglong()
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f8ecab716b4..31d9e2ddb3a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1245,6 +1245,22 @@ unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsi /* Return parametric option from a given service. Type is a part of option before ':' */ /* Parametric option has following syntax: 'Type: option = value' */ +unsigned long long lp_parm_ulonglong(int snum, const char *type, + const char *option, unsigned long long def) +{ + struct parmlist_entry *data = get_parametrics(snum, type, option); + + if (data && data->value && *data->value) { + return lp_ulonglong(data->value); + } + + return def; +} + +/* Return parametric option from a given service. Type is a part of option + * before ':' */ +/* Parametric option has following syntax: 'Type: option = value' */ + bool lp_parm_bool(int snum, const char *type, const char *option, bool def) { struct parmlist_entry *data = get_parametrics(snum, type, option); |