Home | History | Annotate | Download | only in init

Lines Matching refs:loop

38 #include <linux/loop.h>
423 } else if (!strncmp(source, "loop@", 5)) {
424 int mode, loop, fd;
434 snprintf(tmp, sizeof(tmp), "/dev/block/loop%d", n);
435 loop = open(tmp, mode | O_CLOEXEC);
436 if (loop < 0) {
441 /* if it is a blank loop device */
442 if (ioctl(loop, LOOP_GET_STATUS, &info) < 0 && errno == ENXIO) {
443 /* if it becomes our loop device */
444 if (ioctl(loop, LOOP_SET_FD, fd) >= 0) {
448 ioctl(loop, LOOP_CLR_FD, 0);
449 close(loop);
453 close(loop);
458 close(loop);