conf: remove unnecessary syscall

parent 531d36ad
...@@ -1154,13 +1154,13 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs) ...@@ -1154,13 +1154,13 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
mode_t cmask; mode_t cmask;
int use_mknod = LXC_DEVNODE_MKNOD; int use_mknod = LXC_DEVNODE_MKNOD;
/* ignore, just don't try to fill in */
if (!exists_dir_at(rootfs->mntpt_fd, "dev"))
return 0;
dev_dir_fd = openat(rootfs->mntpt_fd, "dev/", O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_PATH | O_NOFOLLOW); dev_dir_fd = openat(rootfs->mntpt_fd, "dev/", O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_PATH | O_NOFOLLOW);
if (dev_dir_fd < 0) if (dev_dir_fd < 0) {
if (errno == ENOENT)
return log_info(0, "No /dev directory found, skipping setup");
return -errno; return -errno;
}
INFO("Populating \"/dev\""); INFO("Populating \"/dev\"");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment