4 * Copyright IBM, Corp. 2011
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
15 #include <sys/types.h>
18 typedef struct V9fsSynthNode V9fsSynthNode;
19 typedef ssize_t (*v9fs_synth_read)(void *buf, int len, off_t offset,
21 typedef ssize_t (*v9fs_synth_write)(void *buf, int len, off_t offset,
23 typedef struct V9fsSynthNodeAttr {
28 v9fs_synth_write write;
31 struct V9fsSynthNode {
32 QLIST_HEAD(, V9fsSynthNode) child;
33 QLIST_ENTRY(V9fsSynthNode) sibling;
35 V9fsSynthNodeAttr *attr;
36 V9fsSynthNodeAttr actual_attr;
41 typedef struct V9fsSynthOpenState {
46 extern int qemu_v9fs_synth_mkdir(V9fsSynthNode *parent, int mode,
47 const char *name, V9fsSynthNode **result);
48 extern int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode,
49 const char *name, v9fs_synth_read read,
50 v9fs_synth_write write, void *arg);