Unverified Commit d62ac985 by Christian Brauner Committed by GitHub

Merge pull request #3134 from jcfaracco/loop

utils: Copying source filename to avoid missing info
parents 13a885dd a70c9e85
...@@ -1557,6 +1557,8 @@ int lxc_prepare_loop_dev(const char *source, char *loop_dev, int flags) ...@@ -1557,6 +1557,8 @@ int lxc_prepare_loop_dev(const char *source, char *loop_dev, int flags)
memset(&lo64, 0, sizeof(lo64)); memset(&lo64, 0, sizeof(lo64));
lo64.lo_flags = flags; lo64.lo_flags = flags;
strlcpy((char *)lo64.lo_file_name, source, LO_NAME_SIZE);
ret = ioctl(fd_loop, LOOP_SET_STATUS64, &lo64); ret = ioctl(fd_loop, LOOP_SET_STATUS64, &lo64);
if (ret < 0) { if (ret < 0) {
SYSERROR("Failed to set loop status64"); SYSERROR("Failed to set loop status64");
......
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