]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
backup: improve error when copy-before-write fails for fleecing
[pve-qemu.git] / debian / patches / pve / 0020-PVE-Add-dummy-id-command-line-parameter.patch
CommitLineData
53e83913
WB
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
83faa3fe
TL
3Date: Mon, 6 Apr 2020 12:16:48 +0200
4Subject: [PATCH] PVE: Add dummy -id command line parameter
53e83913
WB
5
6This used to be part of the qemu-side PVE authentication for
7VNC. Now this does nothing.
8
9Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
b855dce7 10Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
53e83913
WB
11---
12 qemu-options.hx | 3 +++
f1eed34a 13 system/vl.c | 8 ++++++++
53e83913
WB
14 2 files changed, 11 insertions(+)
15
16diff --git a/qemu-options.hx b/qemu-options.hx
4fbd50e2 17index 511ab9415e..92e301d545 100644
53e83913
WB
18--- a/qemu-options.hx
19+++ b/qemu-options.hx
4fbd50e2 20@@ -1237,6 +1237,9 @@ legacy PC, they are not recommended for modern configurations.
83faa3fe 21
5b15e2ec 22 ERST
53e83913
WB
23
24+DEF("id", HAS_ARG, QEMU_OPTION_id,
25+ "-id n set the VMID", QEMU_ARCH_ALL)
26+
27 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
28 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
29 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
f1eed34a 30diff --git a/system/vl.c b/system/vl.c
4fbd50e2 31index 2738ab7c91..20ebf2c920 100644
f1eed34a
FE
32--- a/system/vl.c
33+++ b/system/vl.c
4fbd50e2 34@@ -2748,6 +2748,7 @@ void qemu_init(int argc, char **argv)
8dca018b
SR
35 MachineClass *machine_class;
36 bool userconfig = true;
37 FILE *vmstate_dump_file = NULL;
53e83913 38+ long vm_id;
8dca018b
SR
39
40 qemu_add_opts(&qemu_drive_opts);
41 qemu_add_drive_opts(&qemu_legacy_drive_opts);
4fbd50e2 42@@ -3371,6 +3372,13 @@ void qemu_init(int argc, char **argv)
4567474e
FE
43 machine_parse_property_opt(qemu_find_opts("smp-opts"),
44 "smp", optarg);
53e83913
WB
45 break;
46+ case QEMU_OPTION_id:
47+ vm_id = strtol(optarg, (char **)&optarg, 10);
48+ if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
49+ error_report("invalid -id argument %s", optarg);
50+ exit(1);
51+ }
52+ break;
f1eed34a 53 #ifdef CONFIG_VNC
53e83913 54 case QEMU_OPTION_vnc:
8dca018b 55 vnc_parse(optarg);