summaryrefslogtreecommitdiff
path: root/hw/virtio-9p-debug.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-06-17 18:27:24 -0700
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-08 22:56:40 +0530
commitc1568af597d71b2171c9b2ffffb336c2fdee205e (patch)
tree999c0996fad90f8f4bdba112039c77b1d216f147 /hw/virtio-9p-debug.c
parent08c60fc9cd5823a1660b3e3cd50c8f019e6cc1ac (diff)
downloadqemu-c1568af597d71b2171c9b2ffffb336c2fdee205e.tar.gz
[virtio-9p] This patch implements TLCREATE for 9p2000.L protocol.
SYNOPSIS size[4] Tlcreate tag[2] fid[4] name[s] flags[4] mode[4] gid[4] size[4] Rlcreate tag[2] qid[13] iounit[4] DESCRIPTION The Tlreate request asks the file server to create a new regular file with the name supplied, in the directory (dir) represented by fid. The mode argument specifies the permissions to use. New file is created with the uid if the fid and with supplied gid. The flags argument represent Linux access mode flags with which the caller is requesting to open the file with. Protocol allows all the Linux access modes but it is upto the server to allow/disallow any of these acess modes. If the server doesn't support any of the access mode, it is expected to return error. To start with we will not restricit/limit any Linux flags on this server. If needed, We can start restricting as we move forward with various use cases. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-9p-debug.c')
-rw-r--r--hw/virtio-9p-debug.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/virtio-9p-debug.c b/hw/virtio-9p-debug.c
index 54179aa090..a8abdd2d82 100644
--- a/hw/virtio-9p-debug.c
+++ b/hw/virtio-9p-debug.c
@@ -475,6 +475,19 @@ void pprint_pdu(V9fsPDU *pdu)
fprintf(llogfile, "RSYMLINK: (");
pprint_qid(pdu, 1, &offset, "qid");
break;
+ case P9_TLCREATE:
+ fprintf(llogfile, "TLCREATE: (");
+ pprint_int32(pdu, 0, &offset, "dfid");
+ pprint_str(pdu, 0, &offset, ", name");
+ pprint_int32(pdu, 0, &offset, ", flags");
+ pprint_int32(pdu, 0, &offset, ", mode");
+ pprint_int32(pdu, 0, &offset, ", gid");
+ break;
+ case P9_RLCREATE:
+ fprintf(llogfile, "RLCREATE: (");
+ pprint_qid(pdu, 1, &offset, "qid");
+ pprint_int32(pdu, 1, &offset, ", iounit");
+ break;
case P9_TREAD:
fprintf(llogfile, "TREAD: (");
pprint_int32(pdu, 0, &offset, "fid");