summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-31 01:03:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:47 -0500
commit0128bd6d3f06fd433ec3747686da1e1a1133ab3d (patch)
treef27c840d4351bab0005b9ef0493b43fa55e05aa3 /source4/ntvfs/posix
parent00c7f9eed81866568abe1ec8a908fb4bc9274b59 (diff)
downloadsamba-0128bd6d3f06fd433ec3747686da1e1a1133ab3d.tar.gz
samba-0128bd6d3f06fd433ec3747686da1e1a1133ab3d.tar.bz2
samba-0128bd6d3f06fd433ec3747686da1e1a1133ab3d.zip
r4423: give lp_parm_int() and lp_parm_ulong() default values
metze (This used to be commit c44f4d44b51789916e50c9da93046d0a15245edc)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c2
-rw-r--r--source4/ntvfs/posix/vfs_posix.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index c0fc2fb136..9efd1cec85 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -604,7 +604,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
memset(ctx->prefix_cache, 0, sizeof(char *)*MANGLE_CACHE_SIZE);
memset(ctx->prefix_cache_hashes, 0, sizeof(uint32_t)*MANGLE_CACHE_SIZE);
- ctx->mangle_prefix = lp_parm_int(-1, "mangle", "prefix");
+ ctx->mangle_prefix = lp_parm_int(-1, "mangle", "prefix", -1);
if (ctx->mangle_prefix < 0 || ctx->mangle_prefix > 6) {
ctx->mangle_prefix = DEFAULT_MANGLE_PREFIX;
}
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 6f4de1e038..eecc379064 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -34,7 +34,6 @@
static void pvfs_setup_options(struct pvfs_state *pvfs)
{
int snum = pvfs->tcon->service;
- int delay;
const char *eadb;
if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN;
@@ -53,11 +52,7 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
if (lp_parm_bool(snum, "posix", "xattr", True)) pvfs->flags |= PVFS_FLAG_XATTR_ENABLE;
#endif
- pvfs->sharing_violation_delay = 1000000;
- delay = lp_parm_int(snum, "posix", "sharedelay");
- if (delay != -1) {
- pvfs->sharing_violation_delay = delay;
- }
+ pvfs->sharing_violation_delay = lp_parm_int(snum, "posix", "sharedelay", 1000000);
pvfs->share_name = talloc_strdup(pvfs, lp_servicename(snum));
@@ -81,7 +76,6 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
}
}
-
if (pvfs->flags & PVFS_FLAG_XATTR_ENABLE) {
pvfs->fs_attribs |= FS_ATTR_NAMED_STREAMS;
}