diff options
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index fc1b0579016a..2bc99e9031e7 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1870,3 +1870,29 @@ error: | |||
1870 | return err; | 1870 | return err; |
1871 | } | 1871 | } |
1872 | EXPORT_SYMBOL(p9_client_getlock_dotl); | 1872 | EXPORT_SYMBOL(p9_client_getlock_dotl); |
1873 | |||
1874 | int p9_client_readlink(struct p9_fid *fid, char **target) | ||
1875 | { | ||
1876 | int err; | ||
1877 | struct p9_client *clnt; | ||
1878 | struct p9_req_t *req; | ||
1879 | |||
1880 | err = 0; | ||
1881 | clnt = fid->clnt; | ||
1882 | P9_DPRINTK(P9_DEBUG_9P, ">>> TREADLINK fid %d\n", fid->fid); | ||
1883 | |||
1884 | req = p9_client_rpc(clnt, P9_TREADLINK, "d", fid->fid); | ||
1885 | if (IS_ERR(req)) | ||
1886 | return PTR_ERR(req); | ||
1887 | |||
1888 | err = p9pdu_readf(req->rc, clnt->proto_version, "s", target); | ||
1889 | if (err) { | ||
1890 | p9pdu_dump(1, req->rc); | ||
1891 | goto error; | ||
1892 | } | ||
1893 | P9_DPRINTK(P9_DEBUG_9P, "<<< RREADLINK target %s\n", *target); | ||
1894 | error: | ||
1895 | p9_free_req(clnt, req); | ||
1896 | return err; | ||
1897 | } | ||
1898 | EXPORT_SYMBOL(p9_client_readlink); | ||