aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/client.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index e37e64cb9394..cdfbd6740796 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1622,3 +1622,34 @@ error:
1622 return err; 1622 return err;
1623} 1623}
1624EXPORT_SYMBOL(p9_client_readdir); 1624EXPORT_SYMBOL(p9_client_readdir);
1625
1626int p9_client_mknod_dotl(struct p9_fid *fid, char *name, int mode,
1627 dev_t rdev, gid_t gid, struct p9_qid *qid)
1628{
1629 int err;
1630 struct p9_client *clnt;
1631 struct p9_req_t *req;
1632
1633 err = 0;
1634 clnt = fid->clnt;
1635 P9_DPRINTK(P9_DEBUG_9P, ">>> TMKNOD fid %d name %s mode %d major %d "
1636 "minor %d\n", fid->fid, name, mode, MAJOR(rdev), MINOR(rdev));
1637 req = p9_client_rpc(clnt, P9_TMKNOD, "dsdddd", fid->fid, name, mode,
1638 MAJOR(rdev), MINOR(rdev), gid);
1639 if (IS_ERR(req))
1640 return PTR_ERR(req);
1641
1642 err = p9pdu_readf(req->rc, clnt->proto_version, "Q", qid);
1643 if (err) {
1644 p9pdu_dump(1, req->rc);
1645 goto error;
1646 }
1647 P9_DPRINTK(P9_DEBUG_9P, "<<< RMKNOD qid %x.%llx.%x\n", qid->type,
1648 (unsigned long long)qid->path, qid->version);
1649
1650error:
1651 p9_free_req(clnt, req);
1652 return err;
1653
1654}
1655EXPORT_SYMBOL(p9_client_mknod_dotl);