Time of check time of use

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-06-14 21:56:52 +02:00
parent 48cfd5db4f
commit b29e05d629
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -1581,13 +1581,13 @@ static int lxc_setup_devpts(struct lxc_conf *conf)
DEBUG("Mount new devpts instance with options \"%s\"", devpts_mntopts); DEBUG("Mount new devpts instance with options \"%s\"", devpts_mntopts);
/* Remove any pre-existing /dev/ptmx file. */ /* Remove any pre-existing /dev/ptmx file. */
ret = access("/dev/ptmx", F_OK);
if (!ret) {
ret = remove("/dev/ptmx"); ret = remove("/dev/ptmx");
if (ret < 0) { if (ret < 0) {
if (errno != ENOENT) {
SYSERROR("Failed to remove existing \"/dev/ptmx\" file"); SYSERROR("Failed to remove existing \"/dev/ptmx\" file");
return -1; return -1;
} }
} else {
DEBUG("Removed existing \"/dev/ptmx\" file"); DEBUG("Removed existing \"/dev/ptmx\" file");
} }