]> git.proxmox.com Git - qemu.git/blobdiff - fsdev/file-op-9p.h
hw/9pfs: Add fs driver specific details to fscontext
[qemu.git] / fsdev / file-op-9p.h
index 8a7dbdbea48c8ce18a504354eba53a5352627393..8de8abfd5b32955b4aa15a9a0f4ea74a338a0322 100644 (file)
@@ -19,6 +19,7 @@
 #include <sys/stat.h>
 #include <sys/uio.h>
 #include <sys/vfs.h>
+
 #define SM_LOCAL_MODE_BITS    0600
 #define SM_LOCAL_DIR_MODE_BITS    0700
 
@@ -49,12 +50,18 @@ typedef struct FsCred
 
 struct xattr_operations;
 
+/* FsContext flag values */
+#define PATHNAME_FSCONTEXT 0x1
+
 typedef struct FsContext
 {
+    int flags;
     char *fs_root;
     SecModel fs_sm;
     uid_t uid;
     struct xattr_operations **xops;
+    /* fs driver specific data */
+    void *private;
 } FsContext;
 
 typedef struct V9fsPath {
@@ -66,6 +73,7 @@ void cred_init(FsCred *);
 
 typedef struct FileOperations
 {
+    int (*init)(struct FsContext *);
     int (*lstat)(FsContext *, V9fsPath *, struct stat *);
     ssize_t (*readlink)(FsContext *, V9fsPath *, char *, size_t);
     int (*chmod)(FsContext *, V9fsPath *, FsCred *);