Skip to content

Commit

Permalink
storage/dir: bdev->dest can't be empty
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 Apr 28, 2021
1 parent 0476883 commit 0b2e168
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lxc/storage/dir.c
Expand Up @@ -179,14 +179,14 @@ int dir_mount(struct lxc_storage *bdev)
ret = mount(src, bdev->dest, "bind", mflags, mnt_opts->data);
if (ret < 0)
return log_error_errno(-errno, errno, "Failed to remount \"%s\" on \"%s\" read-only with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
src ? src : "(none)", bdev->dest ? bdev->dest : "(none)", mnt_opts->data, mflags, mnt_opts->mnt_flags);
src ? src : "(none)", bdev->dest, mnt_opts->data, mflags, mnt_opts->mnt_flags);
else
DEBUG("Remounted \"%s\" on \"%s\" read-only with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
src ? src : "(none)", bdev->dest ? bdev->dest : "(none)", mnt_opts->data, mflags, mnt_opts->mnt_flags);
src ? src : "(none)", bdev->dest, mnt_opts->data, mflags, mnt_opts->mnt_flags);
}

TRACE("Mounted \"%s\" on \"%s\" with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
src ? src : "(none)", bdev->dest ? bdev->dest : "(none)", mnt_opts->data, mflags, mnt_opts->mnt_flags);
src ? src : "(none)", bdev->dest, mnt_opts->data, mflags, mnt_opts->mnt_flags);
}

TRACE("Mounted \"%s\" onto \"%s\"", src, bdev->dest);
Expand Down

0 comments on commit 0b2e168

Please sign in to comment.