]> git.proxmox.com Git - mirror_qemu.git/blame - fsdev/qemu-fsdev.h
hw/9pfs: Add synthetic file system support using 9p
[mirror_qemu.git] / fsdev / qemu-fsdev.h
CommitLineData
74db920c
GS
1/*
2 * Virtio 9p
3 *
4 * Copyright IBM, Corp. 2010
5 *
6 * Authors:
7 * Gautham R Shenoy <ego@in.ibm.com>
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#ifndef QEMU_FSDEV_H
14#define QEMU_FSDEV_H
15#include "qemu-option.h"
353ac78d 16#include "file-op-9p.h"
74db920c
GS
17
18
19/*
20 * A table to store the various file systems and their callback operations.
21 * -----------------
22 * fstype | ops
23 * -----------------
24 * local | local_ops
25 * . |
26 * . |
27 * . |
28 * . |
29 * -----------------
30 * etc
31 */
fbcbf101 32typedef struct FsDriverTable {
74db920c
GS
33 const char *name;
34 FileOperations *ops;
fbcbf101 35} FsDriverTable;
74db920c
GS
36
37/*
38 * Structure to store the various fsdev's passed through command line.
39 */
fbcbf101 40typedef struct FsDriverEntry {
74db920c
GS
41 char *fsdev_id;
42 char *path;
d3ab98e6 43 int export_flags;
74db920c 44 FileOperations *ops;
fbcbf101 45} FsDriverEntry;
74db920c 46
fbcbf101
AK
47typedef struct FsDriverListEntry {
48 FsDriverEntry fse;
49 QTAILQ_ENTRY(FsDriverListEntry) next;
50} FsDriverListEntry;
74db920c 51
64b85a8f 52int qemu_fsdev_add(QemuOpts *opts);
fbcbf101 53FsDriverEntry *get_fsdev_fsentry(char *id);
9f107513 54extern FileOperations local_ops;
5f542225 55extern FileOperations handle_ops;
9db221ae 56extern FileOperations synth_ops;
74db920c 57#endif