diff options
-rw-r--r-- | include/net/9p/client.h | 3 | ||||
-rw-r--r-- | net/9p/client.c | 51 |
2 files changed, 1 insertions, 53 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index d1aa2cfb30f0..7f63d5ab7b44 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -212,15 +212,12 @@ struct p9_dirent { | |||
212 | 212 | ||
213 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); | 213 | int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); |
214 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); | 214 | int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, char *name); |
215 | int p9_client_version(struct p9_client *); | ||
216 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 215 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
217 | void p9_client_destroy(struct p9_client *clnt); | 216 | void p9_client_destroy(struct p9_client *clnt); |
218 | void p9_client_disconnect(struct p9_client *clnt); | 217 | void p9_client_disconnect(struct p9_client *clnt); |
219 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
220 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
221 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
222 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, | ||
223 | u32 n_uname, char *aname); | ||
224 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, |
225 | int clone); | 222 | int clone); |
226 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
diff --git a/net/9p/client.c b/net/9p/client.c index b5e1aa8d718e..83bf0541d66f 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -671,7 +671,7 @@ static void p9_fid_destroy(struct p9_fid *fid) | |||
671 | kfree(fid); | 671 | kfree(fid); |
672 | } | 672 | } |
673 | 673 | ||
674 | int p9_client_version(struct p9_client *c) | 674 | static int p9_client_version(struct p9_client *c) |
675 | { | 675 | { |
676 | int err = 0; | 676 | int err = 0; |
677 | struct p9_req_t *req; | 677 | struct p9_req_t *req; |
@@ -730,7 +730,6 @@ error: | |||
730 | 730 | ||
731 | return err; | 731 | return err; |
732 | } | 732 | } |
733 | EXPORT_SYMBOL(p9_client_version); | ||
734 | 733 | ||
735 | struct p9_client *p9_client_create(const char *dev_name, char *options) | 734 | struct p9_client *p9_client_create(const char *dev_name, char *options) |
736 | { | 735 | { |
@@ -887,54 +886,6 @@ error: | |||
887 | } | 886 | } |
888 | EXPORT_SYMBOL(p9_client_attach); | 887 | EXPORT_SYMBOL(p9_client_attach); |
889 | 888 | ||
890 | struct p9_fid * | ||
891 | p9_client_auth(struct p9_client *clnt, char *uname, u32 n_uname, char *aname) | ||
892 | { | ||
893 | int err; | ||
894 | struct p9_req_t *req; | ||
895 | struct p9_qid qid; | ||
896 | struct p9_fid *afid; | ||
897 | |||
898 | P9_DPRINTK(P9_DEBUG_9P, ">>> TAUTH uname %s aname %s\n", uname, aname); | ||
899 | err = 0; | ||
900 | |||
901 | afid = p9_fid_create(clnt); | ||
902 | if (IS_ERR(afid)) { | ||
903 | err = PTR_ERR(afid); | ||
904 | afid = NULL; | ||
905 | goto error; | ||
906 | } | ||
907 | |||
908 | req = p9_client_rpc(clnt, P9_TAUTH, "dss?d", | ||
909 | afid ? afid->fid : P9_NOFID, uname, aname, n_uname); | ||
910 | if (IS_ERR(req)) { | ||
911 | err = PTR_ERR(req); | ||
912 | goto error; | ||
913 | } | ||
914 | |||
915 | err = p9pdu_readf(req->rc, clnt->proto_version, "Q", &qid); | ||
916 | if (err) { | ||
917 | p9pdu_dump(1, req->rc); | ||
918 | p9_free_req(clnt, req); | ||
919 | goto error; | ||
920 | } | ||
921 | |||
922 | P9_DPRINTK(P9_DEBUG_9P, "<<< RAUTH qid %x.%llx.%x\n", | ||
923 | qid.type, | ||
924 | (unsigned long long)qid.path, | ||
925 | qid.version); | ||
926 | |||
927 | memmove(&afid->qid, &qid, sizeof(struct p9_qid)); | ||
928 | p9_free_req(clnt, req); | ||
929 | return afid; | ||
930 | |||
931 | error: | ||
932 | if (afid) | ||
933 | p9_fid_destroy(afid); | ||
934 | return ERR_PTR(err); | ||
935 | } | ||
936 | EXPORT_SYMBOL(p9_client_auth); | ||
937 | |||
938 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 889 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, |
939 | int clone) | 890 | int clone) |
940 | { | 891 | { |