[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>
This commit is contained in:
Venkateswararao Jujjuri (JV) 2010-06-09 14:02:08 -07:00 committed by Aneesh Kumar K.V
parent b2c224be19
commit 08c60fc9cd
3 changed files with 97 additions and 6 deletions

View file

@ -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");