mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
set-smp: limit the number of cpus below 255
Limit the number of cpus below 255, since qemu can't support. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
This commit is contained in:
committed by
Richard W.M. Jones
parent
9e5c0b39c6
commit
b5cc1fa049
@@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g)
|
||||
int
|
||||
guestfs__set_smp (guestfs_h *g, int v)
|
||||
{
|
||||
if (v >= 1) {
|
||||
if (v > 255) {
|
||||
error (g, "unsupported number of smp vcpus: %d", v);
|
||||
return -1;
|
||||
} else if (v >= 1) {
|
||||
g->smp = v;
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user