Home | History | Annotate | Download | only in init

Lines Matching refs:loop

33 #include <linux/loop.h>
422 } else if (!strncmp(source, "loop@", 5)) {
423 int mode, loop, fd;
433 sprintf(tmp, "/dev/block/loop%d", n);
434 loop = open(tmp, mode);
435 if (loop < 0) {
439 /* if it is a blank loop device */
440 if (ioctl(loop, LOOP_GET_STATUS, &info) < 0 && errno == ENXIO) {
441 /* if it becomes our loop device */
442 if (ioctl(loop, LOOP_SET_FD, fd) >= 0) {
446 ioctl(loop, LOOP_CLR_FD, 0);
447 close(loop);
451 close(loop);
456 close(loop);