Index: new/qemu-options.hx
===================================================================
---- new.orig/qemu-options.hx 2012-02-09 13:15:26.000000000 +0100
-+++ new/qemu-options.hx 2012-02-09 13:22:39.000000000 +0100
-@@ -92,6 +92,12 @@
+--- new.orig/qemu-options.hx 2012-03-12 06:44:56.000000000 +0100
++++ new/qemu-options.hx 2012-03-13 07:25:22.000000000 +0100
+@@ -95,6 +95,12 @@
are split equally.
ETEXI
DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
Index: new/vl.c
===================================================================
---- new.orig/vl.c 2012-02-09 13:15:26.000000000 +0100
-+++ new/vl.c 2012-02-09 13:22:39.000000000 +0100
+--- new.orig/vl.c 2012-03-12 06:44:56.000000000 +0100
++++ new/vl.c 2012-03-13 08:58:16.000000000 +0100
@@ -153,6 +153,8 @@
#include "fsdev/qemu-fsdev.h"
#endif
#include "disas.h"
#include "qemu_socket.h"
-@@ -204,6 +206,7 @@
- int rtc_td_hack = 0;
+@@ -203,6 +205,7 @@
+ int win2k_install_hack = 0;
int usb_enabled = 0;
int singlestep = 0;
+int fairsched_id = 0;
int smp_cpus = 1;
int max_cpus = 0;
int smp_cores = 1;
-@@ -1959,7 +1962,7 @@
+@@ -2045,7 +2048,7 @@
}
static int debugcon_parse(const char *devname)
QemuOpts *opts;
if (!qemu_chr_new("debugcon", devname, NULL)) {
-@@ -2175,6 +2178,7 @@
+@@ -2258,6 +2261,9 @@
+ int main(int argc, char **argv, char **envp)
{
- const char *gdbstub_dev = NULL;
int i;
+ int cpuunits = 0;
++ long int fairsched_id_long = 0;
++ char *ep;
int snapshot, linux_boot;
const char *icount_option = NULL;
const char *initrd_filename;
-@@ -2923,6 +2927,20 @@
+@@ -3022,6 +3028,21 @@
exit(1);
}
break;
+ case QEMU_OPTION_id:
-+ fairsched_id = atoi(optarg);
-+ if (fairsched_id < 100 || fairsched_id >= 1000000) {
++ fairsched_id_long = strtol(optarg, &ep, 10);
++ fairsched_id = fairsched_id_long;
++ if (*ep != 0 || fairsched_id_long < 100 || fairsched_id_long > INT_MAX) {
+ fprintf(stderr, "Invalid ID\n");
+ exit(1);
+ }
case QEMU_OPTION_vnc:
#ifdef CONFIG_VNC
display_remote++;
-@@ -2997,8 +3015,8 @@
+@@ -3093,8 +3114,8 @@
}
p += 8;
os_set_proc_name(p);
break;
case QEMU_OPTION_prom_env:
if (nb_prom_envs >= MAX_PROM_ENVS) {
-@@ -3309,6 +3327,39 @@
+@@ -3411,6 +3432,39 @@
}
}
Index: new/vzsyscalls.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vzsyscalls.h 2012-02-09 13:22:39.000000000 +0100
++++ new/vzsyscalls.h 2012-03-13 07:25:22.000000000 +0100
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2000-2008, Parallels, Inc. All rights reserved.