Skip to content

Commit

Permalink
conf: fix console chmod error log messages
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Thompson <dev@aaront.org>
  • Loading branch information
dev-aaront-org authored and Christian Brauner committed May 4, 2021
1 parent d3162ef commit bdd9079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/conf.c
Expand Up @@ -1826,7 +1826,7 @@ static int lxc_setup_dev_console(struct lxc_rootfs *rootfs,

ret = fchmod(console->pty, 0620);
if (ret < 0)
return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", S_IXUSR | S_IXGRP, console->name);
return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", 0620, console->name);

if (can_use_mount_api()) {
ret = lxc_bind_mount_console(console, rootfs->dfd_dev, "console");
Expand Down Expand Up @@ -1888,7 +1888,7 @@ static int lxc_setup_ttydir_console(struct lxc_rootfs *rootfs,

ret = fchmod(console->pty, 0620);
if (ret < 0)
return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", S_IXUSR | S_IXGRP, console->name);
return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", 0620, console->name);

/* bind mount console->name to '/dev/<ttydir>/console' */
if (can_use_mount_api()) {
Expand Down

0 comments on commit bdd9079

Please sign in to comment.