Annotation of qemu/hw/9pfs/virtio-9p-synth.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Virtio 9p
                      3:  *
                      4:  * Copyright IBM, Corp. 2011
                      5:  *
                      6:  * Authors:
                      7:  *  Aneesh Kumar K.V <[email protected]>
                      8:  *
                      9:  * This work is licensed under the terms of the GNU GPL, version 2.  See
                     10:  * the COPYING file in the top-level directory.
                     11:  *
                     12:  */
                     13: 
                     14: #include <unistd.h>
                     15: #include <sys/types.h>
                     16: #include <limits.h>
                     17: 
                     18: typedef struct V9fsSynthNode V9fsSynthNode;
                     19: typedef ssize_t (*v9fs_synth_read)(void *buf, int len, off_t offset,
                     20:                                    void *arg);
                     21: typedef ssize_t (*v9fs_synth_write)(void *buf, int len, off_t offset,
                     22:                                     void *arg);
                     23: typedef struct V9fsSynthNodeAttr {
                     24:     int mode;
                     25:     int inode;
                     26:     int nlink;
                     27:     v9fs_synth_read read;
                     28:     v9fs_synth_write write;
                     29: } V9fsSynthNodeAttr;
                     30: 
                     31: struct V9fsSynthNode {
                     32:     QLIST_HEAD(, V9fsSynthNode) child;
                     33:     QLIST_ENTRY(V9fsSynthNode) sibling;
                     34:     char name[NAME_MAX];
                     35:     V9fsSynthNodeAttr *attr;
                     36:     V9fsSynthNodeAttr actual_attr;
                     37:     void *private;
                     38:     int open_count;
                     39: };
                     40: 
                     41: typedef struct V9fsSynthOpenState {
                     42:     off_t offset;
                     43:     V9fsSynthNode *node;
                     44: } V9fsSynthOpenState;
                     45: 
                     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);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.