Lines Matching refs:loop_device_fd
166 int loop_device_fd = in BindToUnusedLoopDevice() local
168 if (loop_device_fd == -1 && errno == ENOENT) { in BindToUnusedLoopDevice()
173 loop_device_fd = in BindToUnusedLoopDevice()
176 TEST_AND_RETURN_FALSE_ERRNO(loop_device_fd != -1); in BindToUnusedLoopDevice()
177 ScopedFdCloser loop_device_fd_closer(&loop_device_fd); in BindToUnusedLoopDevice()
180 if (ioctl(loop_device_fd, LOOP_GET_STATUS64, &device_info) != -1 || in BindToUnusedLoopDevice()
192 TEST_AND_RETURN_FALSE_ERRNO(ioctl(loop_device_fd, LOOP_SET_FD, data_fd) == 0); in BindToUnusedLoopDevice()
204 ioctl(loop_device_fd, LOOP_SET_STATUS64, &device_info) == 0); in BindToUnusedLoopDevice()
209 int loop_device_fd = in UnbindLoopDevice() local
211 if (loop_device_fd == -1 && errno == ENOENT) in UnbindLoopDevice()
213 TEST_AND_RETURN_FALSE_ERRNO(loop_device_fd != -1); in UnbindLoopDevice()
214 ScopedFdCloser loop_device_fd_closer(&loop_device_fd); in UnbindLoopDevice()
218 int get_stat_err = ioctl(loop_device_fd, LOOP_GET_STATUS64, &device_info); in UnbindLoopDevice()
222 TEST_AND_RETURN_FALSE_ERRNO(ioctl(loop_device_fd, LOOP_CLR_FD) == 0); in UnbindLoopDevice()