]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
bump version to 4.2.0-2
[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>
6402d961
TL
3Date: Tue, 10 Mar 2020 12:55:17 +0100
4Subject: [PATCH 20/32] 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 +++
13 vl.c | 8 ++++++++
14 2 files changed, 11 insertions(+)
15
16diff --git a/qemu-options.hx b/qemu-options.hx
6402d961 17index 4cb2681bfc..b84e260fa5 100644
53e83913
WB
18--- a/qemu-options.hx
19+++ b/qemu-options.hx
6402d961 20@@ -826,6 +826,9 @@ STEXI
53e83913
WB
21 @table @option
22 ETEXI
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)
30diff --git a/vl.c b/vl.c
6402d961 31index 1616f55a38..4df15640c5 100644
53e83913
WB
32--- a/vl.c
33+++ b/vl.c
6402d961 34@@ -2828,6 +2828,7 @@ static void user_register_global_props(void)
53e83913
WB
35 int main(int argc, char **argv, char **envp)
36 {
37 int i;
38+ long vm_id;
39 int snapshot, linux_boot;
40 const char *initrd_filename;
41 const char *kernel_filename, *kernel_cmdline;
6402d961 42@@ -3560,6 +3561,13 @@ int main(int argc, char **argv, char **envp)
53e83913
WB
43 exit(1);
44 }
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;
53 case QEMU_OPTION_vnc:
54 vnc_parse(optarg, &error_fatal);
55 break;