Searched refs:device_stat (Results 1 – 2 of 2) sorted by relevance
128 struct stat device_stat; in GetDeviceInfo() local129 if (stat(device_path.value().c_str(), &device_stat) < 0) in GetDeviceInfo()133 if (S_ISCHR(device_stat.st_mode)) in GetDeviceInfo()135 else if (S_ISBLK(device_stat.st_mode)) in GetDeviceInfo()142 device_stat.st_rdev)); in GetDeviceInfo()
2722 struct stat device_stat; in GetDiskSize() local2723 if (fstat(fd, &device_stat) == -1) { in GetDiskSize()2731 if (S_ISBLK(device_stat.st_mode)) { in GetDiskSize()2750 } else if (S_ISREG(device_stat.st_mode)) { in GetDiskSize()2751 device_sectors_ = device_stat.st_size / kSectorSize; in GetDiskSize()