Lines Matching refs:num
271 Result<void> PreAllocateLoopDevices(size_t num) { in PreAllocateLoopDevices() argument
290 for (size_t id = 0ul, cnt = 0; cnt < num; ++id) { in PreAllocateLoopDevices()
317 LOG(INFO) << "Found " << (num - new_allocations) in PreAllocateLoopDevices()
436 Result<LoopbackDeviceUniqueFd> WaitForDevice(int num) { in WaitForDevice() argument
439 StringPrintf("/dev/block/loop%d", num), in WaitForDevice()
440 StringPrintf("/dev/loop%d", num), in WaitForDevice()
465 PLOG(WARNING) << "Loopback device " << num << " not ready. Waiting 50ms..."; in WaitForDevice()
473 return Error() << "Failed to open loopback device " << num; in WaitForDevice()
488 int num = ioctl(ctl_fd.get(), LOOP_CTL_GET_FREE); in CreateLoopDevice() local
489 if (num == -1) { in CreateLoopDevice()
493 Result<LoopbackDeviceUniqueFd> loop_device = WaitForDevice(num); in CreateLoopDevice()