mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tag
v_synth when -virtfs_synth command line option is specified
in qemu. The synthetic file system can be mounted in guest
using 9p using the below command line
mount -t 9p -oversion=9p2000.L,trans=virtio v_synth <mountpint>
Synthetic file system enabled different qemu subsystem to register
callbacks for read and write events from guest. The subsystem
can create directories and files in the synthetic file system as show
in ex below
qemu_v9fs_synth_mkdir(NULL, 0777, "test2", &node);
qemu_v9fs_synth_add_file(node, 0777, "testfile",
my_test_read, NULL, NULL);
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
@@ -24,6 +24,7 @@ static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries =
|
||||
static FsDriverTable FsDrivers[] = {
|
||||
{ .name = "local", .ops = &local_ops},
|
||||
{ .name = "handle", .ops = &handle_ops},
|
||||
{ .name = "synth", .ops = &synth_ops},
|
||||
};
|
||||
|
||||
int qemu_fsdev_add(QemuOpts *opts)
|
||||
|
||||
@@ -53,4 +53,5 @@ int qemu_fsdev_add(QemuOpts *opts);
|
||||
FsDriverEntry *get_fsdev_fsentry(char *id);
|
||||
extern FileOperations local_ops;
|
||||
extern FileOperations handle_ops;
|
||||
extern FileOperations synth_ops;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user