Fix devfs loop device support
This commit is contained in:
1 parent
b0cc0a6ca8
commit
c7a3fb96d0
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -95,7 +95,7 @@ extern char *find_unused_loop_device(void)
|
||||
struct loop_info loopinfo;
|
||||
|
||||
for (i = 0; i <= 7; i++) {
|
||||
sprintf(dev, "/dev/loop%d", i);
|
||||
sprintf(dev, LOOP_FORMAT, i);
|
||||
if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
|
||||
if ((fd = open(dev, O_RDONLY)) >= 0) {
|
||||
if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) != 0) {
|
||||
|
||||
Reference in new issue
Block a user