]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0029-PVE-Add-dummy-id-command-line-parameter.patch
build qemu multithreaded
[pve-qemu.git] / debian / patches / pve / 0029-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>
3Date: Thu, 30 Aug 2018 14:52:56 +0200
4Subject: [PATCH] PVE: Add dummy -id command line parameter
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>
10---
11 qemu-options.hx | 3 +++
12 vl.c | 8 ++++++++
13 2 files changed, 11 insertions(+)
14
15diff --git a/qemu-options.hx b/qemu-options.hx
16index 31329e26e2..15df7e4fab 100644
17--- a/qemu-options.hx
18+++ b/qemu-options.hx
19@@ -591,6 +591,9 @@ STEXI
20 @table @option
21 ETEXI
22
23+DEF("id", HAS_ARG, QEMU_OPTION_id,
24+ "-id n set the VMID", QEMU_ARCH_ALL)
25+
26 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
27 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
28 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
29diff --git a/vl.c b/vl.c
30index b2e3e23724..a03e4c2867 100644
31--- a/vl.c
32+++ b/vl.c
33@@ -2915,6 +2915,7 @@ static void register_global_properties(MachineState *ms)
34 int main(int argc, char **argv, char **envp)
35 {
36 int i;
37+ long vm_id;
38 int snapshot, linux_boot;
39 const char *initrd_filename;
40 const char *kernel_filename, *kernel_cmdline;
41@@ -3659,6 +3660,13 @@ int main(int argc, char **argv, char **envp)
42 exit(1);
43 }
44 break;
45+ case QEMU_OPTION_id:
46+ vm_id = strtol(optarg, (char **)&optarg, 10);
47+ if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
48+ error_report("invalid -id argument %s", optarg);
49+ exit(1);
50+ }
51+ break;
52 case QEMU_OPTION_vnc:
53 vnc_parse(optarg, &error_fatal);
54 break;
55--
562.11.0
57