xref: /qemu/fsdev/qemu-fsdev.h (revision fbcbf101)
174db920cSGautham R Shenoy /*
274db920cSGautham R Shenoy  * Virtio 9p
374db920cSGautham R Shenoy  *
474db920cSGautham R Shenoy  * Copyright IBM, Corp. 2010
574db920cSGautham R Shenoy  *
674db920cSGautham R Shenoy  * Authors:
774db920cSGautham R Shenoy  *  Gautham R Shenoy <ego@in.ibm.com>
874db920cSGautham R Shenoy  *
974db920cSGautham R Shenoy  * This work is licensed under the terms of the GNU GPL, version 2.  See
1074db920cSGautham R Shenoy  * the COPYING file in the top-level directory.
1174db920cSGautham R Shenoy  *
1274db920cSGautham R Shenoy  */
1374db920cSGautham R Shenoy #ifndef QEMU_FSDEV_H
1474db920cSGautham R Shenoy #define QEMU_FSDEV_H
1574db920cSGautham R Shenoy #include "qemu-option.h"
16353ac78dSAneesh Kumar K.V #include "file-op-9p.h"
1774db920cSGautham R Shenoy 
1874db920cSGautham R Shenoy 
1974db920cSGautham R Shenoy /*
2074db920cSGautham R Shenoy  * A table to store the various file systems and their callback operations.
2174db920cSGautham R Shenoy  * -----------------
2274db920cSGautham R Shenoy  * fstype | ops
2374db920cSGautham R Shenoy  * -----------------
2474db920cSGautham R Shenoy  *  local | local_ops
2574db920cSGautham R Shenoy  *  .     |
2674db920cSGautham R Shenoy  *  .     |
2774db920cSGautham R Shenoy  *  .     |
2874db920cSGautham R Shenoy  *  .     |
2974db920cSGautham R Shenoy  * -----------------
3074db920cSGautham R Shenoy  *  etc
3174db920cSGautham R Shenoy  */
32*fbcbf101SAneesh Kumar K.V typedef struct FsDriverTable {
3374db920cSGautham R Shenoy     const char *name;
3474db920cSGautham R Shenoy     FileOperations *ops;
35*fbcbf101SAneesh Kumar K.V } FsDriverTable;
3674db920cSGautham R Shenoy 
3774db920cSGautham R Shenoy /*
3874db920cSGautham R Shenoy  * Structure to store the various fsdev's passed through command line.
3974db920cSGautham R Shenoy  */
40*fbcbf101SAneesh Kumar K.V typedef struct FsDriverEntry {
4174db920cSGautham R Shenoy     char *fsdev_id;
4274db920cSGautham R Shenoy     char *path;
439ce56db6SVenkateswararao Jujjuri (JV)     char *security_model;
44d3ab98e6SAneesh Kumar K.V     int export_flags;
4574db920cSGautham R Shenoy     FileOperations *ops;
46*fbcbf101SAneesh Kumar K.V } FsDriverEntry;
4774db920cSGautham R Shenoy 
48*fbcbf101SAneesh Kumar K.V typedef struct FsDriverListEntry {
49*fbcbf101SAneesh Kumar K.V     FsDriverEntry fse;
50*fbcbf101SAneesh Kumar K.V     QTAILQ_ENTRY(FsDriverListEntry) next;
51*fbcbf101SAneesh Kumar K.V } FsDriverListEntry;
5274db920cSGautham R Shenoy 
5364b85a8fSBlue Swirl int qemu_fsdev_add(QemuOpts *opts);
54*fbcbf101SAneesh Kumar K.V FsDriverEntry *get_fsdev_fsentry(char *id);
559f107513SAnthony Liguori extern FileOperations local_ops;
565f542225SAneesh Kumar K.V extern FileOperations handle_ops;
5774db920cSGautham R Shenoy #endif
58