Lines Matching refs:devpath

379 static void RemoveDeviceMapperLinks(const std::string& devpath) {  in RemoveDeviceMapperLinks()  argument
399 if (Readlink(path, &link_path) && link_path == devpath) { in RemoveDeviceMapperLinks()
406 void DeviceHandler::HandleDevice(const std::string& action, const std::string& devpath, bool block, in HandleDevice() argument
409 MakeDevice(devpath, block, major, minor, links); in HandleDevice()
413 if (action == "add" || (action == "change" && StartsWith(devpath, "/dev/block/dm-"))) { in HandleDevice()
419 if (symlink(devpath.c_str(), link.c_str())) { in HandleDevice()
421 PLOG(ERROR) << "Failed to symlink " << devpath << " to " << link; in HandleDevice()
423 Readlink(link, &link_path) && link_path != devpath) { in HandleDevice()
424 PLOG(ERROR) << "Failed to symlink " << devpath << " to " << link in HandleDevice()
432 if (StartsWith(devpath, "/dev/block/dm-")) { in HandleDevice()
433 RemoveDeviceMapperLinks(devpath); in HandleDevice()
437 if (Readlink(link, &link_path) && link_path == devpath) { in HandleDevice()
441 unlink(devpath.c_str()); in HandleDevice()
470 std::string devpath; in HandleUevent() local
476 devpath = "/dev/block/" + Basename(uevent.path); in HandleUevent()
484 devpath = subsystem->ParseDevPath(uevent); in HandleUevent()
487 devpath = "/dev/" + uevent.device_name; in HandleUevent()
494 devpath = StringPrintf("/dev/bus/usb/%03d/%03d", bus_id, device_id); in HandleUevent()
500 devpath = "/dev/" + Basename(uevent.path); in HandleUevent()
503 mkdir_recursive(Dirname(devpath), 0755); in HandleUevent()
505 HandleDevice(uevent.action, devpath, block, uevent.major, uevent.minor, links); in HandleUevent()