From 664268a2877dc49a84eb140e837e01f08979c471 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Fri, 27 Feb 2009 14:47:47 -0800 Subject: s3 OneFS: Refactor config code and cleanup includes --- source3/modules/onefs_system.c | 54 ++++-------------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) (limited to 'source3/modules/onefs_system.c') diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c index 43ebed8d44..b8b059bce9 100644 --- a/source3/modules/onefs_system.c +++ b/source3/modules/onefs_system.c @@ -18,10 +18,14 @@ * along with this program; if not, see . */ +#include "includes.h" #include "onefs.h" +#include "onefs_config.h" +#include "oplock_onefs.h" #include #include +#include /* * Initialize the sm_lock struct before passing it to ifs_createfile. @@ -656,53 +660,3 @@ out: return ret; } - -/** - * Set the per-process encoding, ignoring errors. - */ -void onefs_sys_config_enc(void) -{ - int ret; - - ret = enc_set_proc(ENC_UTF8); - if (ret) { - DEBUG(0, ("Setting process encoding failed: %s", - strerror(errno))); - } -} - -/** - * Set the per-process .snpashot directory options, ignoring errors. - */ -void onefs_sys_config_snap_opt(struct onefs_vfs_global_config *global_config) -{ - struct ifs_dotsnap_options dso; - int ret; - - dso.per_proc = 1; - dso.sub_accessible = global_config->dot_snap_child_accessible; - dso.sub_visible = global_config->dot_snap_child_visible; - dso.root_accessible = global_config->dot_snap_root_accessible; - dso.root_visible = global_config->dot_snap_root_visible; - - ret = ifs_set_dotsnap_options(&dso); - if (ret) { - DEBUG(0, ("Setting snapshot visibility/accessibility " - "failed: %s", strerror(errno))); - } -} - -/** - * Set the per-process flag saying whether or not to accept ~snapshot - * as an alternative name for .snapshot directories. - */ -void onefs_sys_config_tilde(struct onefs_vfs_global_config *global_config) -{ - int ret; - - ret = ifs_tilde_snapshot(global_config->dot_snap_tilde); - if (ret) { - DEBUG(0, ("Setting snapshot tilde failed: %s", - strerror(errno))); - } -} -- cgit