Statistics
| Branch: | Revision:

root / fsdev / qemu-fsdev.h @ 42138043

History | View | Annotate | Download (1.1 kB)

1 74db920c Gautham R Shenoy
/*
2 74db920c Gautham R Shenoy
 * Virtio 9p
3 74db920c Gautham R Shenoy
 *
4 74db920c Gautham R Shenoy
 * Copyright IBM, Corp. 2010
5 74db920c Gautham R Shenoy
 *
6 74db920c Gautham R Shenoy
 * Authors:
7 74db920c Gautham R Shenoy
 *  Gautham R Shenoy <ego@in.ibm.com>
8 74db920c Gautham R Shenoy
 *
9 74db920c Gautham R Shenoy
 * This work is licensed under the terms of the GNU GPL, version 2.  See
10 74db920c Gautham R Shenoy
 * the COPYING file in the top-level directory.
11 74db920c Gautham R Shenoy
 *
12 74db920c Gautham R Shenoy
 */
13 74db920c Gautham R Shenoy
#ifndef QEMU_FSDEV_H
14 74db920c Gautham R Shenoy
#define QEMU_FSDEV_H
15 74db920c Gautham R Shenoy
#include "qemu-option.h"
16 353ac78d Aneesh Kumar K.V
#include "file-op-9p.h"
17 74db920c Gautham R Shenoy
18 74db920c Gautham R Shenoy
19 74db920c Gautham R Shenoy
/*
20 74db920c Gautham R Shenoy
 * A table to store the various file systems and their callback operations.
21 74db920c Gautham R Shenoy
 * -----------------
22 74db920c Gautham R Shenoy
 * fstype | ops
23 74db920c Gautham R Shenoy
 * -----------------
24 74db920c Gautham R Shenoy
 *  local | local_ops
25 74db920c Gautham R Shenoy
 *  .     |
26 74db920c Gautham R Shenoy
 *  .     |
27 74db920c Gautham R Shenoy
 *  .     |
28 74db920c Gautham R Shenoy
 *  .     |
29 74db920c Gautham R Shenoy
 * -----------------
30 74db920c Gautham R Shenoy
 *  etc
31 74db920c Gautham R Shenoy
 */
32 74db920c Gautham R Shenoy
typedef struct FsTypeTable {
33 74db920c Gautham R Shenoy
    const char *name;
34 74db920c Gautham R Shenoy
    FileOperations *ops;
35 74db920c Gautham R Shenoy
} FsTypeTable;
36 74db920c Gautham R Shenoy
37 74db920c Gautham R Shenoy
/*
38 74db920c Gautham R Shenoy
 * Structure to store the various fsdev's passed through command line.
39 74db920c Gautham R Shenoy
 */
40 74db920c Gautham R Shenoy
typedef struct FsTypeEntry {
41 74db920c Gautham R Shenoy
    char *fsdev_id;
42 74db920c Gautham R Shenoy
    char *path;
43 9ce56db6 Venkateswararao Jujjuri (JV)
    char *security_model;
44 74db920c Gautham R Shenoy
    FileOperations *ops;
45 74db920c Gautham R Shenoy
} FsTypeEntry;
46 74db920c Gautham R Shenoy
47 74db920c Gautham R Shenoy
typedef struct FsTypeListEntry {
48 74db920c Gautham R Shenoy
    FsTypeEntry fse;
49 74db920c Gautham R Shenoy
    QTAILQ_ENTRY(FsTypeListEntry) next;
50 74db920c Gautham R Shenoy
} FsTypeListEntry;
51 74db920c Gautham R Shenoy
52 64b85a8f Blue Swirl
int qemu_fsdev_add(QemuOpts *opts);
53 64b85a8f Blue Swirl
FsTypeEntry *get_fsdev_fsentry(char *id);
54 9f107513 Anthony Liguori
extern FileOperations local_ops;
55 74db920c Gautham R Shenoy
#endif