summaryrefslogtreecommitdiffstats
path: root/hw/virtio-9p.h
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.h
parent08c60fc9cd5823a1660b3e3cd50c8f019e6cc1ac (diff)
downloadhqemu-c1568af597d71b2171c9b2ffffb336c2fdee205e.zip
hqemu-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.h')
-rw-r--r--hw/virtio-9p.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h
index 3671863..ad4d216 100644
--- a/hw/virtio-9p.h
+++ b/hw/virtio-9p.h
@@ -15,6 +15,8 @@
enum {
P9_TSTATFS = 8,
P9_RSTATFS,
+ P9_TLCREATE = 14,
+ P9_RLCREATE,
P9_TSYMLINK = 16,
P9_RSYMLINK,
P9_TGETATTR = 24,
@@ -185,6 +187,17 @@ typedef struct V9fsCreateState {
int iounit;
} V9fsCreateState;
+typedef struct V9fsLcreateState {
+ V9fsPDU *pdu;
+ size_t offset;
+ V9fsFidState *fidp;
+ V9fsQID qid;
+ int32_t iounit;
+ struct stat stbuf;
+ V9fsString name;
+ V9fsString fullname;
+} V9fsLcreateState;
+
typedef struct V9fsStatState {
V9fsPDU *pdu;
size_t offset;
OpenPOWER on IntegriCloud