Skip to content

Commit

Permalink
conf: remove unnecessary syscall
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 26, 2021
1 parent e85a479 commit d3491df
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lxc/conf.c
Expand Up @@ -1151,13 +1151,13 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
mode_t cmask;
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);
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;
}

INFO("Populating \"/dev\"");

Expand Down

0 comments on commit d3491df

Please sign in to comment.