From: Ronnie Sahlberg Date: Thu, 26 Dec 2013 17:08:26 +0000 (-0800) Subject: Change rpc_set_context_args to nfs_set_context_args and make it static X-Git-Tag: upstream/1.9.6^2~158 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=20d6926ed61a18ae50186794cb69916cbf3d124d;p=deb_libnfs.git Change rpc_set_context_args to nfs_set_context_args and make it static It only makes sense to pass url arguments to an nfs URL and thus a nfs context. While some arguments may apply to the underlying raw rpc context (uid, gid, tcp settings etc) some future arguments may need to apply to the nfs context instead, such as selecting nfs version, whether or not to force sync writes etc. --- diff --git a/lib/libnfs.c b/lib/libnfs.c index b90205d..c183a46 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -173,14 +173,14 @@ char *nfs_get_error(struct nfs_context *nfs) return rpc_get_error(nfs->rpc); }; -int rpc_set_context_args(struct rpc_context *rpc, char *arg, char *val) +static int nfs_set_context_args(struct nfs_context *nfs, char *arg, char *val) { if (!strncmp(arg, "tcp-syncnt", 10)) { - rpc_set_tcp_syncnt(rpc, atoi(val)); + rpc_set_tcp_syncnt(nfs_get_rpc_context(nfs), atoi(val)); } else if (!strncmp(arg, "uid", 3)) { - rpc_set_uid(rpc, atoi(val)); + rpc_set_uid(nfs_get_rpc_context(nfs), atoi(val)); } else if (!strncmp(arg, "gid", 3)) { - rpc_set_gid(rpc, atoi(val)); + rpc_set_gid(nfs_get_rpc_context(nfs), atoi(val)); } return 0; } @@ -292,8 +292,7 @@ flags: if (strp2) { *strp2 = 0; strp2++; - rpc_set_context_args(nfs_get_rpc_context(nfs), - strp, strp2); + nfs_set_context_args(nfs, strp, strp2); } }