diff options
Diffstat (limited to 'mdk-stage1/init.c')
-rw-r--r-- | mdk-stage1/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index 5209f1f50..f5e18bb03 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -241,6 +241,7 @@ void doklog() void del_loops(void) { char loopdev[] = "/dev/loop0"; + char chloopdev[] = "/dev/chloop0"; int i; for (i=0; i<8; i++) { int fd; @@ -251,6 +252,13 @@ void del_loops(void) printf("\t%s\n", loopdev); close(fd); } + chloopdev[11] = '0' + i; + fd = open(chloopdev, O_RDONLY, 0); + if (fd > 0) { + if (!ioctl(fd, LOOP_CLR_FD, 0)) + printf("\t%s\n", chloopdev); + close(fd); + } } } |