mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
Remove support for old kernels lacking private devpts
Early on kernel support for private devpts was not widespread, so we had compatibiltiy codepaths. Such old kernels are not seriously used for LXC these days, so the compat code can go away Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
d369e50825
commit
f7e8653f7e
@ -1252,8 +1252,9 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl)
|
||||
}
|
||||
|
||||
if (access(ctrl->devptmx, R_OK) < 0) {
|
||||
VIR_WARN("Kernel does not support private devpts, using shared devpts");
|
||||
VIR_FREE(ctrl->devptmx);
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
_("Kernel does not support private devpts"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
@ -1278,7 +1279,6 @@ virLXCControllerSetupConsoles(virLXCControllerPtr ctrl,
|
||||
size_t i;
|
||||
|
||||
for (i = 0 ; i < ctrl->nconsoles ; i++) {
|
||||
if (ctrl->devptmx) {
|
||||
VIR_DEBUG("Opening tty on private %s", ctrl->devptmx);
|
||||
if (lxcCreateTty(ctrl->devptmx,
|
||||
&ctrl->consoles[i].contFd,
|
||||
@ -1287,16 +1287,6 @@ virLXCControllerSetupConsoles(virLXCControllerPtr ctrl,
|
||||
_("Failed to allocate tty"));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
VIR_DEBUG("Opening tty on shared /dev/ptmx");
|
||||
if (virFileOpenTty(&ctrl->consoles[i].contFd,
|
||||
&containerTTYPaths[i],
|
||||
0) < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Failed to allocate tty"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user