storage/dir: source can't be empty

parent 196a800a
...@@ -183,14 +183,14 @@ int dir_mount(struct lxc_storage *bdev) ...@@ -183,14 +183,14 @@ int dir_mount(struct lxc_storage *bdev)
ret = mount(source, target, "bind", mflags, mnt_opts->data); ret = mount(source, target, "bind", mflags, mnt_opts->data);
if (ret < 0) 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\"", return log_error_errno(-errno, errno, "Failed to remount \"%s\" on \"%s\" read-only with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
source ? source : "(none)", target, mnt_opts->data, mflags, mnt_opts->mnt_flags); source, target, mnt_opts->data, mflags, mnt_opts->mnt_flags);
else else
DEBUG("Remounted \"%s\" on \"%s\" read-only with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"", DEBUG("Remounted \"%s\" on \"%s\" read-only with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
source ? source : "(none)", target, mnt_opts->data, mflags, mnt_opts->mnt_flags); source, target, mnt_opts->data, mflags, mnt_opts->mnt_flags);
} }
TRACE("Mounted \"%s\" on \"%s\" with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"", TRACE("Mounted \"%s\" on \"%s\" with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"",
source ? source : "(none)", target, mnt_opts->data, mflags, mnt_opts->mnt_flags); source, target, mnt_opts->data, mflags, mnt_opts->mnt_flags);
} }
TRACE("Mounted \"%s\" onto \"%s\"", source, target); TRACE("Mounted \"%s\" onto \"%s\"", source, target);
......
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