Lines Matching refs:device_number
65 int device_number = -1; in GetDeviceNumber() local
79 base::StringToInt(device_ids[1], &device_number); in GetDeviceNumber()
80 return device_number; in GetDeviceNumber()
99 base::FilePath CreateDevicePath(int device_number) { in CreateDevicePath() argument
100 return base::FilePath(base::StringPrintf("/dev/loop%d", device_number)); in CreateDevicePath()
105 LoopDevice::LoopDevice(int device_number, in LoopDevice() argument
108 : device_number_(device_number), in LoopDevice()
167 int device_number = -1; in AttachDeviceToFile() local
169 device_number = in AttachDeviceToFile()
173 if (device_number < 0) { in AttachDeviceToFile()
186 base::FilePath device_path = CreateDevicePath(device_number); in AttachDeviceToFile()
198 return CreateLoopDevice(device_number, backing_file); in AttachDeviceToFile()
207 int device_number) { in GetAttachedDeviceByNumber() argument
208 auto devices = SearchLoopDevicePaths(device_number); in GetAttachedDeviceByNumber()
238 LoopDeviceManager::SearchLoopDevicePaths(int device_number) { in SearchLoopDevicePaths() argument
242 if (device_number != -1) { in SearchLoopDevicePaths()
244 rootdir.Append(base::StringPrintf("loop%d", device_number)); in SearchLoopDevicePaths()
247 CreateLoopDevice(device_number, GetBackingFile(loopdev_path))); in SearchLoopDevicePaths()
267 int device_number, const base::FilePath& backing_file) { in CreateLoopDevice() argument
268 return std::make_unique<LoopDevice>(device_number, backing_file, loop_ioctl_); in CreateLoopDevice()