mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
[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:
parent
b2c224be19
commit
08c60fc9cd
3 changed files with 97 additions and 6 deletions
|
@ -15,6 +15,8 @@
|
|||
enum {
|
||||
P9_TSTATFS = 8,
|
||||
P9_RSTATFS,
|
||||
P9_TSYMLINK = 16,
|
||||
P9_RSYMLINK,
|
||||
P9_TGETATTR = 24,
|
||||
P9_RGETATTR,
|
||||
P9_TSETATTR = 26,
|
||||
|
@ -294,6 +296,18 @@ typedef struct V9fsWstatState
|
|||
V9fsString nname;
|
||||
} V9fsWstatState;
|
||||
|
||||
typedef struct V9fsSymlinkState
|
||||
{
|
||||
V9fsPDU *pdu;
|
||||
size_t offset;
|
||||
V9fsString name;
|
||||
V9fsString symname;
|
||||
V9fsString fullname;
|
||||
V9fsFidState *dfidp;
|
||||
V9fsQID qid;
|
||||
struct stat stbuf;
|
||||
} V9fsSymlinkState;
|
||||
|
||||
typedef struct V9fsIattr
|
||||
{
|
||||
int32_t valid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue