Lines Matching refs:devPath
31 if (!stat (dev.devPath.c_str(), &devStat)) { in DeviceStat()
34 if (stat (dev.devPath.c_str(), &devStat) != EOK) { in DeviceStat()
91 LastComponent(dev.devPath).c_str(), file.c_str()) == -1) { in ReadDeviceSysfsFile()
128 specific->fd = open(dev.devPath.c_str(), RW_MODE); in SetBlockDeviceMode()
130 LOG(WARNING) << "Open " << dev.devPath << " with read-write failed, try read-only mode"; in SetBlockDeviceMode()
131 specific->fd = open(dev.devPath.c_str(), RD_MODE); in SetBlockDeviceMode()
135 LOG(ERROR) << "Open " << dev.devPath << " with read-only mode failed: " << errno; in SetBlockDeviceMode()
159 std::string devPath; in ReadPartitionFromSys() local
161 devPath = "/sys/block/" + devname + "/" + partn + "/" + type; in ReadPartitionFromSys()
163 devPath = "/sys/block/" + devname + "/" + type; in ReadPartitionFromSys()
166 if (devPath.length() >= DEVPATH_SIZE) { in ReadPartitionFromSys()
171 if ((f = fopen(devPath.c_str(), "r")) == nullptr) { in ReadPartitionFromSys()
216 const std::string devName = LastComponent(dev.devPath); in InitGeneric()
258 dev->devPath = path; in NewBlockDevice()
339 const std::string devName = LastComponent(dev.devPath); in NewPartition()
431 if (g_disks->dev->devPath == path) { in GetRegisterBlockDisk()