When checking nttyFDs to see if it is != 1, be sure to use '1' and not '-1'
* src/lxc/lxc_controller.c: Fix check for tty count
This commit is contained in:
parent
478a4d07ac
commit
4d82fa688e
@ -1388,9 +1388,9 @@ lxcControllerRun(virDomainDefPtr def,
|
|||||||
VIR_FREE(devptmx);
|
VIR_FREE(devptmx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nttyFDs != -1) {
|
if (nttyFDs != 1) {
|
||||||
lxcError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
lxcError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("Expected exactly one TTY fd"));
|
_("Expected exactly one TTY fd, but got %zu"), nttyFDs);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user