Rename dirname variable to pathname to eliminate namespace conflict.
This commit is contained in:
parent
4db35647dd
commit
f9d6aa0a86
14
nfsmount.c
14
nfsmount.c
@ -262,7 +262,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
char hostdir[1024];
|
char hostdir[1024];
|
||||||
CLIENT *mclient;
|
CLIENT *mclient;
|
||||||
char *hostname;
|
char *hostname;
|
||||||
char *dirname;
|
char *pathname;
|
||||||
char *old_opts;
|
char *old_opts;
|
||||||
char *mounthost=NULL;
|
char *mounthost=NULL;
|
||||||
char new_opts[1024];
|
char new_opts[1024];
|
||||||
@ -316,7 +316,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
strcpy(hostdir, spec);
|
strcpy(hostdir, spec);
|
||||||
if ((s = strchr(hostdir, ':'))) {
|
if ((s = strchr(hostdir, ':'))) {
|
||||||
hostname = hostdir;
|
hostname = hostdir;
|
||||||
dirname = s + 1;
|
pathname = s + 1;
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
/* Ignore all but first hostname in replicated mounts
|
/* Ignore all but first hostname in replicated mounts
|
||||||
until they can be fully supported. (mack@sgi.com) */
|
until they can be fully supported. (mack@sgi.com) */
|
||||||
@ -662,7 +662,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
mclient = 0;
|
mclient = 0;
|
||||||
}
|
}
|
||||||
if (mclient) {
|
if (mclient) {
|
||||||
/* try to mount hostname:dirname */
|
/* try to mount hostname:pathname */
|
||||||
mclient->cl_auth = authunix_create_default();
|
mclient->cl_auth = authunix_create_default();
|
||||||
|
|
||||||
/* make pointers in xdr_mountres3 NULL so
|
/* make pointers in xdr_mountres3 NULL so
|
||||||
@ -673,14 +673,14 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
if (pm_mnt->pm_vers == 3)
|
if (pm_mnt->pm_vers == 3)
|
||||||
clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
|
clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
|
||||||
(xdrproc_t) xdr_dirpath,
|
(xdrproc_t) xdr_dirpath,
|
||||||
(caddr_t) &dirname,
|
(caddr_t) &pathname,
|
||||||
(xdrproc_t) xdr_mountres3,
|
(xdrproc_t) xdr_mountres3,
|
||||||
(caddr_t) &status,
|
(caddr_t) &status,
|
||||||
total_timeout);
|
total_timeout);
|
||||||
else
|
else
|
||||||
clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
|
clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
|
||||||
(xdrproc_t) xdr_dirpath,
|
(xdrproc_t) xdr_dirpath,
|
||||||
(caddr_t) &dirname,
|
(caddr_t) &pathname,
|
||||||
(xdrproc_t) xdr_fhstatus,
|
(xdrproc_t) xdr_fhstatus,
|
||||||
(caddr_t) &status,
|
(caddr_t) &status,
|
||||||
total_timeout);
|
total_timeout);
|
||||||
@ -720,7 +720,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
if (nfsvers == 2) {
|
if (nfsvers == 2) {
|
||||||
if (status.nfsv2.fhs_status != 0) {
|
if (status.nfsv2.fhs_status != 0) {
|
||||||
error_msg("%s:%s failed, reason given by server: %s",
|
error_msg("%s:%s failed, reason given by server: %s",
|
||||||
hostname, dirname,
|
hostname, pathname,
|
||||||
nfs_strerror(status.nfsv2.fhs_status));
|
nfs_strerror(status.nfsv2.fhs_status));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -738,7 +738,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
fhandle3 *my_fhandle;
|
fhandle3 *my_fhandle;
|
||||||
if (status.nfsv3.fhs_status != 0) {
|
if (status.nfsv3.fhs_status != 0) {
|
||||||
error_msg("%s:%s failed, reason given by server: %s",
|
error_msg("%s:%s failed, reason given by server: %s",
|
||||||
hostname, dirname,
|
hostname, pathname,
|
||||||
nfs_strerror(status.nfsv3.fhs_status));
|
nfs_strerror(status.nfsv3.fhs_status));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
char hostdir[1024];
|
char hostdir[1024];
|
||||||
CLIENT *mclient;
|
CLIENT *mclient;
|
||||||
char *hostname;
|
char *hostname;
|
||||||
char *dirname;
|
char *pathname;
|
||||||
char *old_opts;
|
char *old_opts;
|
||||||
char *mounthost=NULL;
|
char *mounthost=NULL;
|
||||||
char new_opts[1024];
|
char new_opts[1024];
|
||||||
@ -316,7 +316,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
strcpy(hostdir, spec);
|
strcpy(hostdir, spec);
|
||||||
if ((s = strchr(hostdir, ':'))) {
|
if ((s = strchr(hostdir, ':'))) {
|
||||||
hostname = hostdir;
|
hostname = hostdir;
|
||||||
dirname = s + 1;
|
pathname = s + 1;
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
/* Ignore all but first hostname in replicated mounts
|
/* Ignore all but first hostname in replicated mounts
|
||||||
until they can be fully supported. (mack@sgi.com) */
|
until they can be fully supported. (mack@sgi.com) */
|
||||||
@ -662,7 +662,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
mclient = 0;
|
mclient = 0;
|
||||||
}
|
}
|
||||||
if (mclient) {
|
if (mclient) {
|
||||||
/* try to mount hostname:dirname */
|
/* try to mount hostname:pathname */
|
||||||
mclient->cl_auth = authunix_create_default();
|
mclient->cl_auth = authunix_create_default();
|
||||||
|
|
||||||
/* make pointers in xdr_mountres3 NULL so
|
/* make pointers in xdr_mountres3 NULL so
|
||||||
@ -673,14 +673,14 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
if (pm_mnt->pm_vers == 3)
|
if (pm_mnt->pm_vers == 3)
|
||||||
clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
|
clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
|
||||||
(xdrproc_t) xdr_dirpath,
|
(xdrproc_t) xdr_dirpath,
|
||||||
(caddr_t) &dirname,
|
(caddr_t) &pathname,
|
||||||
(xdrproc_t) xdr_mountres3,
|
(xdrproc_t) xdr_mountres3,
|
||||||
(caddr_t) &status,
|
(caddr_t) &status,
|
||||||
total_timeout);
|
total_timeout);
|
||||||
else
|
else
|
||||||
clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
|
clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
|
||||||
(xdrproc_t) xdr_dirpath,
|
(xdrproc_t) xdr_dirpath,
|
||||||
(caddr_t) &dirname,
|
(caddr_t) &pathname,
|
||||||
(xdrproc_t) xdr_fhstatus,
|
(xdrproc_t) xdr_fhstatus,
|
||||||
(caddr_t) &status,
|
(caddr_t) &status,
|
||||||
total_timeout);
|
total_timeout);
|
||||||
@ -720,7 +720,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
if (nfsvers == 2) {
|
if (nfsvers == 2) {
|
||||||
if (status.nfsv2.fhs_status != 0) {
|
if (status.nfsv2.fhs_status != 0) {
|
||||||
error_msg("%s:%s failed, reason given by server: %s",
|
error_msg("%s:%s failed, reason given by server: %s",
|
||||||
hostname, dirname,
|
hostname, pathname,
|
||||||
nfs_strerror(status.nfsv2.fhs_status));
|
nfs_strerror(status.nfsv2.fhs_status));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -738,7 +738,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
fhandle3 *my_fhandle;
|
fhandle3 *my_fhandle;
|
||||||
if (status.nfsv3.fhs_status != 0) {
|
if (status.nfsv3.fhs_status != 0) {
|
||||||
error_msg("%s:%s failed, reason given by server: %s",
|
error_msg("%s:%s failed, reason given by server: %s",
|
||||||
hostname, dirname,
|
hostname, pathname,
|
||||||
nfs_strerror(status.nfsv3.fhs_status));
|
nfs_strerror(status.nfsv3.fhs_status));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user