2018-08-30 16:00:07 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
2020-03-10 17:12:50 +03:00
|
|
|
Date: Tue, 10 Mar 2020 12:55:17 +0100
|
|
|
|
Subject: [PATCH 20/32] PVE: Add dummy -id command line parameter
|
2018-08-30 16:00:07 +03:00
|
|
|
|
|
|
|
This used to be part of the qemu-side PVE authentication for
|
|
|
|
VNC. Now this does nothing.
|
|
|
|
|
|
|
|
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
2019-06-06 13:58:15 +03:00
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
2018-08-30 16:00:07 +03:00
|
|
|
---
|
|
|
|
qemu-options.hx | 3 +++
|
|
|
|
vl.c | 8 ++++++++
|
|
|
|
2 files changed, 11 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/qemu-options.hx b/qemu-options.hx
|
2020-03-10 17:12:50 +03:00
|
|
|
index 4cb2681bfc..b84e260fa5 100644
|
2018-08-30 16:00:07 +03:00
|
|
|
--- a/qemu-options.hx
|
|
|
|
+++ b/qemu-options.hx
|
2020-03-10 17:12:50 +03:00
|
|
|
@@ -826,6 +826,9 @@ STEXI
|
2018-08-30 16:00:07 +03:00
|
|
|
@table @option
|
|
|
|
ETEXI
|
|
|
|
|
|
|
|
+DEF("id", HAS_ARG, QEMU_OPTION_id,
|
|
|
|
+ "-id n set the VMID", QEMU_ARCH_ALL)
|
|
|
|
+
|
|
|
|
DEF("fda", HAS_ARG, QEMU_OPTION_fda,
|
|
|
|
"-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
|
|
|
|
DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
|
|
|
|
diff --git a/vl.c b/vl.c
|
2020-03-10 17:12:50 +03:00
|
|
|
index 1616f55a38..4df15640c5 100644
|
2018-08-30 16:00:07 +03:00
|
|
|
--- a/vl.c
|
|
|
|
+++ b/vl.c
|
2020-03-10 17:12:50 +03:00
|
|
|
@@ -2828,6 +2828,7 @@ static void user_register_global_props(void)
|
2018-08-30 16:00:07 +03:00
|
|
|
int main(int argc, char **argv, char **envp)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
+ long vm_id;
|
|
|
|
int snapshot, linux_boot;
|
|
|
|
const char *initrd_filename;
|
|
|
|
const char *kernel_filename, *kernel_cmdline;
|
2020-03-10 17:12:50 +03:00
|
|
|
@@ -3560,6 +3561,13 @@ int main(int argc, char **argv, char **envp)
|
2018-08-30 16:00:07 +03:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
+ case QEMU_OPTION_id:
|
|
|
|
+ vm_id = strtol(optarg, (char **)&optarg, 10);
|
|
|
|
+ if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
|
|
|
|
+ error_report("invalid -id argument %s", optarg);
|
|
|
|
+ exit(1);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
case QEMU_OPTION_vnc:
|
|
|
|
vnc_parse(optarg, &error_fatal);
|
|
|
|
break;
|