Skip to content

Commit

Permalink
Fix mount image file
Browse files Browse the repository at this point in the history
  • Loading branch information
Moe-hacker committed Jul 3, 2024
1 parent d94f241 commit 3709e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static char *losetup(const char *img)
}
}
// It takes the same efferct as `losetup` command.
int imgfd = open(img, O_RDONLY | O_CLOEXEC);
int imgfd = open(img, O_RDWR | O_CLOEXEC);
ioctl(loopfd, LOOP_SET_FD, imgfd);
close(loopfd);
close(imgfd);
Expand Down

0 comments on commit 3709e94

Please sign in to comment.