Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 1 | /* |
Greg Kurz | af8b38b | 2016-06-06 11:52:34 +0200 | [diff] [blame] | 2 | * 9p |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 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 |
Aneesh Kumar K.V | 353ac78 | 2011-01-28 18:09:08 +0530 | [diff] [blame] | 15 | #include "file-op-9p.h" |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 16 | |
| 17 | |
| 18 | /* |
| 19 | * A table to store the various file systems and their callback operations. |
| 20 | * ----------------- |
| 21 | * fstype | ops |
| 22 | * ----------------- |
| 23 | * local | local_ops |
| 24 | * . | |
| 25 | * . | |
| 26 | * . | |
| 27 | * . | |
| 28 | * ----------------- |
| 29 | * etc |
| 30 | */ |
Aneesh Kumar K.V | fbcbf10 | 2011-10-13 12:28:04 +0530 | [diff] [blame] | 31 | typedef struct FsDriverTable { |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 32 | const char *name; |
| 33 | FileOperations *ops; |
Aneesh Kumar K.V | fbcbf10 | 2011-10-13 12:28:04 +0530 | [diff] [blame] | 34 | } FsDriverTable; |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 35 | |
Aneesh Kumar K.V | fbcbf10 | 2011-10-13 12:28:04 +0530 | [diff] [blame] | 36 | typedef struct FsDriverListEntry { |
| 37 | FsDriverEntry fse; |
| 38 | QTAILQ_ENTRY(FsDriverListEntry) next; |
| 39 | } FsDriverListEntry; |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 40 | |
Blue Swirl | 64b85a8 | 2011-01-23 16:21:20 +0000 | [diff] [blame] | 41 | int qemu_fsdev_add(QemuOpts *opts); |
Aneesh Kumar K.V | fbcbf10 | 2011-10-13 12:28:04 +0530 | [diff] [blame] | 42 | FsDriverEntry *get_fsdev_fsentry(char *id); |
Anthony Liguori | 9f10751 | 2010-04-29 17:44:44 +0530 | [diff] [blame] | 43 | extern FileOperations local_ops; |
Aneesh Kumar K.V | 5f54222 | 2011-08-02 11:35:54 +0530 | [diff] [blame] | 44 | extern FileOperations handle_ops; |
Aneesh Kumar K.V | 9db221a | 2011-10-25 12:10:40 +0530 | [diff] [blame] | 45 | extern FileOperations synth_ops; |
M. Mohan Kumar | 4c793dd | 2011-12-14 13:49:28 +0530 | [diff] [blame] | 46 | extern FileOperations proxy_ops; |
Gautham R Shenoy | 74db920 | 2010-04-29 17:44:43 +0530 | [diff] [blame] | 47 | #endif |