d7f4e01a34
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
|
Date: Mon, 6 Apr 2020 12:16:48 +0200
|
|
Subject: [PATCH] PVE: Add dummy -id command line parameter
|
|
|
|
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>
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
---
|
|
qemu-options.hx | 3 +++
|
|
softmmu/vl.c | 8 ++++++++
|
|
2 files changed, 11 insertions(+)
|
|
|
|
diff --git a/qemu-options.hx b/qemu-options.hx
|
|
index 55eef64ddf..e11b4f8ff5 100644
|
|
--- a/qemu-options.hx
|
|
+++ b/qemu-options.hx
|
|
@@ -904,6 +904,9 @@ DEFHEADING()
|
|
|
|
DEFHEADING(Block device options:)
|
|
|
|
+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/softmmu/vl.c b/softmmu/vl.c
|
|
index 4b45eb0c37..9de81875fd 100644
|
|
--- a/softmmu/vl.c
|
|
+++ b/softmmu/vl.c
|
|
@@ -2815,6 +2815,7 @@ static void create_default_memdev(MachineState *ms, const char *path)
|
|
void qemu_init(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;
|
|
@@ -3518,6 +3519,13 @@ void qemu_init(int argc, char **argv, char **envp)
|
|
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;
|