Lines Matching refs:loopfd
670 int loopfd, err = 0, res = -1; in syz_read_part_table() local
703 loopfd = open(loopname, O_RDWR); in syz_read_part_table()
704 if (loopfd == -1) { in syz_read_part_table()
708 if (ioctl(loopfd, LOOP_SET_FD, memfd)) { in syz_read_part_table()
713 ioctl(loopfd, LOOP_CLR_FD, 0); in syz_read_part_table()
715 if (ioctl(loopfd, LOOP_SET_FD, memfd)) { in syz_read_part_table()
721 if (ioctl(loopfd, LOOP_GET_STATUS64, &info)) { in syz_read_part_table()
729 if (ioctl(loopfd, LOOP_SET_STATUS64, &info)) { in syz_read_part_table()
746 ioctl(loopfd, LOOP_CLR_FD, 0); in syz_read_part_table()
748 close(loopfd); in syz_read_part_table()
770 int loopfd, err = 0, res = -1; in syz_mount_image() local
806 loopfd = open(loopname, O_RDWR); in syz_mount_image()
807 if (loopfd == -1) { in syz_mount_image()
811 if (ioctl(loopfd, LOOP_SET_FD, memfd)) { in syz_mount_image()
816 ioctl(loopfd, LOOP_CLR_FD, 0); in syz_mount_image()
818 if (ioctl(loopfd, LOOP_SET_FD, memfd)) { in syz_mount_image()
851 ioctl(loopfd, LOOP_CLR_FD, 0); in syz_mount_image()
853 close(loopfd); in syz_mount_image()
2004 int loopfd = open(buf, O_RDWR); in reset_loop() local
2005 if (loopfd != -1) { in reset_loop()
2006 ioctl(loopfd, LOOP_CLR_FD, 0); in reset_loop()
2007 close(loopfd); in reset_loop()