diff options
Diffstat (limited to 'emulators/qemu/patches/patch-qga_main_c')
| -rw-r--r-- | emulators/qemu/patches/patch-qga_main_c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/emulators/qemu/patches/patch-qga_main_c b/emulators/qemu/patches/patch-qga_main_c new file mode 100644 index 0000000..4dc551d --- /dev/null +++ b/emulators/qemu/patches/patch-qga_main_c | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | Adapted from https://github.com/aborche/qemu-guest-agent | ||
| 2 | |||
| 3 | Index: qga/main.c | ||
| 4 | --- qga/main.c.orig | ||
| 5 | +++ qga/main.c | ||
| 6 | @@ -40,12 +40,16 @@ | ||
| 7 | #include "commands-common.h" | ||
| 8 | |||
| 9 | #ifndef _WIN32 | ||
| 10 | -#ifdef __FreeBSD__ | ||
| 11 | +#ifdef CONFIG_BSD | ||
| 12 | #define QGA_VIRTIO_PATH_DEFAULT "/dev/vtcon/org.qemu.guest_agent.0" | ||
| 13 | -#else /* __FreeBSD__ */ | ||
| 14 | +#else /* CONFIG_BSD */ | ||
| 15 | #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0" | ||
| 16 | -#endif /* __FreeBSD__ */ | ||
| 17 | +#endif /* CONFIG_BSD */ | ||
| 18 | +#ifdef __OpenBSD__ | ||
| 19 | +#define QGA_SERIAL_PATH_DEFAULT "/dev/cua01" | ||
| 20 | +#else | ||
| 21 | #define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0" | ||
| 22 | +#endif | ||
| 23 | #define QGA_STATE_RELATIVE_DIR "run" | ||
| 24 | #else | ||
| 25 | #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" | ||
| 26 | @@ -1483,7 +1487,11 @@ int main(int argc, char **argv) | ||
| 27 | } | ||
| 28 | |||
| 29 | if (config->method == NULL) { | ||
| 30 | +#ifdef CONFIG_BSD | ||
| 31 | + config->method = g_strdup("isa-serial"); | ||
| 32 | +#else | ||
| 33 | config->method = g_strdup("virtio-serial"); | ||
| 34 | +#endif | ||
| 35 | } | ||
| 36 | |||
| 37 | socket_activation = check_socket_activation(); | ||
