blob: 9fa45bf5107c4e85d3b804d73c15fde1d938b6ce [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
Paolo Bonzini1de7afc2012-12-17 18:20:00 +010015#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 */
Aneesh Kumar K.Vfbcbf102011-10-13 12:28:04 +053032typedef struct FsDriverTable {
Gautham R Shenoy74db9202010-04-29 17:44:43 +053033 const char *name;
34 FileOperations *ops;
Aneesh Kumar K.Vfbcbf102011-10-13 12:28:04 +053035} FsDriverTable;
Gautham R Shenoy74db9202010-04-29 17:44:43 +053036
Aneesh Kumar K.Vfbcbf102011-10-13 12:28:04 +053037typedef struct FsDriverListEntry {
38 FsDriverEntry fse;
39 QTAILQ_ENTRY(FsDriverListEntry) next;
40} FsDriverListEntry;
Gautham R Shenoy74db9202010-04-29 17:44:43 +053041
Blue Swirl64b85a82011-01-23 16:21:20 +000042int qemu_fsdev_add(QemuOpts *opts);
Aneesh Kumar K.Vfbcbf102011-10-13 12:28:04 +053043FsDriverEntry *get_fsdev_fsentry(char *id);
Anthony Liguori9f107512010-04-29 17:44:44 +053044extern FileOperations local_ops;
Aneesh Kumar K.V5f542222011-08-02 11:35:54 +053045extern FileOperations handle_ops;
Aneesh Kumar K.V9db221a2011-10-25 12:10:40 +053046extern FileOperations synth_ops;
M. Mohan Kumar4c793dd2011-12-14 13:49:28 +053047extern FileOperations proxy_ops;
Gautham R Shenoy74db9202010-04-29 17:44:43 +053048#endif