Lines Matching refs:devpath
609 static void handle_device(const char *action, const char *devpath,
613 make_device(devpath, path, block, major, minor, (const char **)links);
616 make_link_init(devpath, links[i]);
624 remove_link(devpath, links[i]);
627 unlink(devpath);
678 char devpath[DEVPATH_LEN];
685 snprintf(devpath, sizeof(devpath), "%s%s", base, name);
691 handle_device(uevent->action, devpath, uevent->path, 1,
695 static bool assemble_devpath(char *devpath, const char *dirname,
698 int s = snprintf(devpath, DEVPATH_LEN, "%s/%s", dirname, devname);
710 static void mkdir_recursive_for_devpath(const char *devpath)
715 strcpy(dir, devpath);
725 char devpath[DEVPATH_LEN] = {0};
748 LOG(ERROR) << uevent->subsystem << " subsystem's devpath option is not set; ignoring event";
752 if (!assemble_devpath(devpath, subsystem->dirname, devname))
754 mkdir_recursive_for_devpath(devpath);
758 if (!assemble_devpath(devpath, "/dev", uevent->device_name))
760 mkdir_recursive_for_devpath(devpath);
772 snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d", bus_id);
773 make_dir(devpath, 0755);
774 snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d/%03d", bus_id, device_id);
813 if (!devpath[0])
814 snprintf(devpath, sizeof(devpath), "%s%s", base, name);
816 handle_device(uevent->action, devpath, uevent->path, 0,