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:
Daniel P. Berrange 2011-12-08 14:57:13 +00:00
parent 478a4d07ac
commit 4d82fa688e

View File

@ -1388,9 +1388,9 @@ lxcControllerRun(virDomainDefPtr def,
VIR_FREE(devptmx);
}
} else {
if (nttyFDs != -1) {
lxcError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Expected exactly one TTY fd"));
if (nttyFDs != 1) {
lxcError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Expected exactly one TTY fd, but got %zu"), nttyFDs);
goto cleanup;
}
}