loadparm: rename the variable for "path" from pathname to path
authorMichael Adam <obnox@samba.org>
Sun, 2 Feb 2014 13:05:39 +0000 (14:05 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 3 Feb 2014 00:26:34 +0000 (13:26 +1300)
for consistency docs/variable/function.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/param/loadparm.c
lib/param/param_functions.c
lib/param/param_table.c
source3/param/loadparm.c

index d7306eafafe6223448d582515737766054508577..58712a5248294c020f659cfdfbee438cd88d4363 100644 (file)
@@ -743,11 +743,11 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
        if (service == NULL)
                return false;
 
-       if (!(*(default_service->pathname))
-           || strequal(default_service->pathname, lp_ctx->sDefault->pathname)) {
-               service->pathname = talloc_strdup(service, pszHomedir);
+       if (!(*(default_service->path))
+           || strequal(default_service->path, lp_ctx->sDefault->path)) {
+               service->path = talloc_strdup(service, pszHomedir);
        } else {
-               service->pathname = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
+               service->path = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
        }
 
        if (!(*(service->comment))) {
@@ -757,7 +757,7 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
        service->browseable = default_service->browseable;
 
        DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n",
-                 pszHomename, user, service->pathname));
+                 pszHomename, user, service->path));
 
        return true;
 }
index 868bef3e2b3ae1724317f28bf8fa51c145e326b2..4596eed02c948c9dff857d7000bbefcb879bec19 100644 (file)
@@ -27,7 +27,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-FN_LOCAL_STRING(path, pathname)
+FN_LOCAL_STRING(path, path)
 FN_LOCAL_LIST(hostsallow, hostsallow)
 FN_LOCAL_LIST(hostsdeny, hostsdeny)
 FN_LOCAL_STRING(fstype, fstype)
index f7738143eed8553885d30c2006de5746e774c8b2..2328e7583aad85c685ffe4718b57c5dbf160bd1a 100644 (file)
@@ -310,7 +310,7 @@ static struct parm_struct parm_table[] = {
                .label          = "path",
                .type           = P_STRING,
                .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(pathname),
+               .offset         = LOCAL_VAR(path),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
@@ -319,7 +319,7 @@ static struct parm_struct parm_table[] = {
                .label          = "directory",
                .type           = P_STRING,
                .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(pathname),
+               .offset         = LOCAL_VAR(path),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_HIDE,
index a7fc416d5bdbf21931eeef98984f5a3e237000b9..c9c502d21c28941f559b3e526cff53a95962949e 100644 (file)
@@ -146,7 +146,7 @@ static struct loadparm_service sDefault =
        .usershare = 0,
        .usershare_last_mod = {0, 0},
        .szService = NULL,
-       .pathname = NULL,
+       .path = NULL,
        .username = NULL,
        .invalid_users = NULL,
        .valid_users = NULL,
@@ -1726,10 +1726,10 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
        if (i < 0)
                return false;
 
-       if (!(*(ServicePtrs[iDefaultService]->pathname))
-           || strequal(ServicePtrs[iDefaultService]->pathname,
+       if (!(*(ServicePtrs[iDefaultService]->path))
+           || strequal(ServicePtrs[iDefaultService]->path,
                        lp_path(talloc_tos(), GLOBAL_SECTION_SNUM))) {
-               string_set(&ServicePtrs[i]->pathname, pszHomedir);
+               string_set(&ServicePtrs[i]->path, pszHomedir);
        }
 
        if (!(*(ServicePtrs[i]->comment))) {
@@ -1749,7 +1749,7 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
        ServicePtrs[i]->autoloaded = true;
 
        DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename, 
-              user, ServicePtrs[i]->pathname ));
+              user, ServicePtrs[i]->path ));
 
        return true;
 }
@@ -1784,7 +1784,7 @@ static bool lp_add_ipc(const char *ipc_name, bool guest_ok)
                return false;
        }
 
-       string_set(&ServicePtrs[i]->pathname, tmpdir());
+       string_set(&ServicePtrs[i]->path, tmpdir());
        string_set(&ServicePtrs[i]->username, "");
        string_set(&ServicePtrs[i]->comment, comment);
        string_set(&ServicePtrs[i]->fstype, "IPC");
@@ -2370,7 +2370,7 @@ bool service_ok(int iService)
                        ServicePtrs[iService]->browseable = false;
        }
 
-       if (ServicePtrs[iService]->pathname[0] == '\0' &&
+       if (ServicePtrs[iService]->path[0] == '\0' &&
            strwicmp(ServicePtrs[iService]->szService, HOMES_NAME) != 0 &&
            ServicePtrs[iService]->msdfs_proxy[0] == '\0'
            ) {
@@ -4006,7 +4006,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
                }
        }
 
-       if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->pathname) == 0)) {
+       if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->path) == 0)) {
                /* Path didn't change, no checks needed. */
                *pp_sharepath = sharepath;
                *pp_comment = comment;
@@ -4279,7 +4279,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
 
        /* And note when it was loaded. */
        ServicePtrs[iService]->usershare_last_mod = sbuf.st_ex_mtime;
-       string_set(&ServicePtrs[iService]->pathname, sharepath);
+       string_set(&ServicePtrs[iService]->path, sharepath);
        string_set(&ServicePtrs[iService]->comment, comment);
 
        ret = iService;