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()
125 specific->fd = open(dev.devPath.c_str(), RW_MODE); in SetBlockDeviceMode()
127 LOG(WARNING) << "Open " << dev.devPath << " with read-write failed, try read-only mode"; in SetBlockDeviceMode()
128 specific->fd = open(dev.devPath.c_str(), RD_MODE); in SetBlockDeviceMode()
132 LOG(ERROR) << "Open " << dev.devPath << " with read-only mode failed: " << errno; in SetBlockDeviceMode()
156 std::string devPath; in ReadPartitionFromSys() local
158 devPath = "/sys/block/" + devname + "/" + partn + "/" + type; in ReadPartitionFromSys()
160 devPath = "/sys/block/" + devname + "/" + type; in ReadPartitionFromSys()
163 if (devPath.length() >= DEVPATH_SIZE) { in ReadPartitionFromSys()
168 if ((f = fopen(devPath.c_str(), "r")) == nullptr) { in ReadPartitionFromSys()
211 const std::string devName = LastComponent(dev.devPath); in InitGeneric()
253 dev->devPath = path; in NewBlockDevice()
334 const std::string devName = LastComponent(dev.devPath); in NewPartition()
426 if (g_disks->dev->devPath == path) { in GetRegisterBlockDisk()