aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p-debug.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-06-09 14:02:08 -0700
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-08 22:56:40 +0530
commit08c60fc9cd5823a1660b3e3cd50c8f019e6cc1ac (patch)
tree051f5a681040f17441a6d1d6bef3b66441d1ee88 /hw/virtio-9p-debug.c
parentb2c224be1941200e87df73bd937925f3bdf8cddc (diff)
[virtio-9p] Define and implement TSYMLINK for 9P2000.L
This patch implements creating a symlink for TSYMLINK request and responds with RSYMLINK. In the case of error, we return RERROR. SYNOPSIS size[4] Tsymlink tag[2] fid[4] name[s] symtgt[s] gid[4] size[4] Rsymlink tag[2] qid[13] DESCRIPTION Create a symbolic link named 'name' pointing to 'symtgt'. gid represents the effective group id of the caller. The permissions of a symbolic link are irrelevant hence it is omitted from the protocol. 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/virtio-9p-debug.c b/hw/virtio-9p-debug.c
index 2e61e9d11a..54179aa090 100644
--- a/hw/virtio-9p-debug.c
+++ b/hw/virtio-9p-debug.c
@@ -464,6 +464,17 @@ void pprint_pdu(V9fsPDU *pdu)
pprint_qid(pdu, 1, &offset, "qid");
pprint_int32(pdu, 1, &offset, ", iounit");
break;
+ case P9_TSYMLINK:
+ fprintf(llogfile, "TSYMLINK: (");
+ pprint_int32(pdu, 0, &offset, "fid");
+ pprint_str(pdu, 0, &offset, ", name");
+ pprint_str(pdu, 0, &offset, ", symname");
+ pprint_int32(pdu, 0, &offset, ", gid");
+ break;
+ case P9_RSYMLINK:
+ fprintf(llogfile, "RSYMLINK: (");
+ pprint_qid(pdu, 1, &offset, "qid");
+ break;
case P9_TREAD:
fprintf(llogfile, "TREAD: (");
pprint_int32(pdu, 0, &offset, "fid");