}
#define MSG_GROUP_HDS 100
-#define DEFAULT_STATIC_HDS_ID "fsdef0"
static void do_hds(char* cat, type_action action, const char* data)
{
FsDriverEntry *entry;
#include "sysemu/block-backend.h"
#include "net/net.h"
#include "qmp-commands.h"
+#include "fsdev/qemu-fsdev.h"
#include "emulator_options.h"
#include "hw/virtio/maru_virtio_touchscreen.h"
}
/* file sharing path */
-void set_emul_file_sharing_path(const char *path)
+const char* get_host_directory_sharing_path(void)
{
- _emul_info.file_sharing_path = path;
-}
+ FsDriverEntry *sharing_entry = get_fsdev_fsentry((char*)DEFAULT_STATIC_HDS_ID);
+ const char *sharing_path = (sharing_entry != NULL ? sharing_entry->path : NULL);
-const char* get_emul_file_sharing_path(void)
-{
- return _emul_info.file_sharing_path;
+ return sharing_path;
}
//
#define MAX_HDS_PATH 256
#define MAX_PROFILE 256
+#define DEFAULT_STATIC_HDS_ID "fsdef0"
+
enum {
RESET = 0,
BOOT_COMPLETED = 1,
void set_emul_ecs_port(int port);
void set_emul_guest_ip(char *ip);
void set_emul_host_ip(char *ip);
-void set_emul_file_sharing_path(const char *path);
void set_emulator_condition(int state);
void set_emul_rotation(short rotation_type);
int get_emul_spice_port(void);
const char* get_emul_skin_path(void);
bool get_emul_cpu_accel(void);
-const char* get_emul_file_sharing_path(void);
int get_emulator_condition(void);
short get_emul_rotation(void);
const char *get_vm_name(void);
const char *get_profile_name(void);
bool is_gpu_accel_enabled(void);
+const char* get_host_directory_sharing_path(void);
const char *get_vm_data_path(void);
uint64_t get_ram_size(void);
void set_initial_display_resolution(int width, int height);
insertTableRow(vmInfoTable, DETAILED_INFO_DPY_DENSITY,
QString::number(get_display_pixel_density()), index++);
- QString sharingPath(get_emul_file_sharing_path());
+ QString sharingPath(get_host_directory_sharing_path());
insertTableRow(vmInfoTable, DETAILED_INFO_HDS_PATH,
(sharingPath.isEmpty()) ? GENERIC_TEXT_NONE : sharingPath, index++);
qemu_opt_set_bool(fsdev, "readonly",
qemu_opt_get_bool(opts, "readonly", 0));
-#ifdef CONFIG_MARU
- device = qemu_opts_create(qemu_find_opts("device"), "fileshare", 0,
- &error_abort);
-#else
device = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
&error_abort);
-#endif
qemu_opt_set(device, "driver", "virtio-9p-pci");
qemu_opt_set(device, "fsdev",
qemu_opt_get(opts, "mount_tag"));
qemu_opt_set(device, "mount_tag",
qemu_opt_get(opts, "mount_tag"));
-
-#ifdef CONFIG_MARU
- set_emul_file_sharing_path(qemu_opt_get(opts, "path"));
-#endif
break;
}
case QEMU_OPTION_virtfs_synth: {