blob: 3b2feb46433e1c605276ea572005729ad4e4e32e [file] [log] [blame]
Gautham R Shenoy74db9202010-04-29 17:44:43 +05301/*
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"
Aneesh Kumar K.V353ac782011-01-28 18:09:08 +053016#include "file-op-9p.h"
Gautham R Shenoy74db9202010-04-29 17:44:43 +053017
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 */
32typedef struct FsTypeTable {
33 const char *name;
34 FileOperations *ops;
35} FsTypeTable;
36
37/*
38 * Structure to store the various fsdev's passed through command line.
39 */
40typedef struct FsTypeEntry {
41 char *fsdev_id;
42 char *path;
Venkateswararao Jujjuri (JV)9ce56db2010-06-14 13:34:40 -070043 char *security_model;
Aneesh Kumar K.Vd3ab98e2011-10-12 19:11:23 +053044 int export_flags;
Gautham R Shenoy74db9202010-04-29 17:44:43 +053045 FileOperations *ops;
46} FsTypeEntry;
47
48typedef struct FsTypeListEntry {
49 FsTypeEntry fse;
50 QTAILQ_ENTRY(FsTypeListEntry) next;
51} FsTypeListEntry;
52
Blue Swirl64b85a82011-01-23 16:21:20 +000053int qemu_fsdev_add(QemuOpts *opts);
54FsTypeEntry *get_fsdev_fsentry(char *id);
Anthony Liguori9f107512010-04-29 17:44:44 +053055extern FileOperations local_ops;
Aneesh Kumar K.V5f542222011-08-02 11:35:54 +053056extern FileOperations handle_ops;
Gautham R Shenoy74db9202010-04-29 17:44:43 +053057#endif