Lines Matching defs:path
49 * by their syspath, every device has exactly one path in the kernel sys
489 char path[UTIL_PATH_SIZE];
491 strscpyl(path, sizeof(path), "/sys", &property[8], NULL);
492 udev_device_set_syspath(udev_device, path);
748 * @syspath: sys device path including sys directory
752 * path to the device, including the sys mount point.
762 char path[UTIL_PATH_SIZE];
777 /* path starts in sys */
784 /* path is not a root directory */
792 /* resolve possible symlink to real path */
793 strscpy(path, sizeof(path), syspath);
794 util_resolve_sys_link(udev, path, sizeof(path));
796 if (startswith(path + strlen("/sys"), "/devices/")) {
800 strscpyl(file, sizeof(file), path, "/uevent", NULL);
805 if (stat(path, &statbuf) != 0)
818 udev_device_set_syspath(udev_device, path);
842 char path[UTIL_PATH_SIZE];
855 snprintf(path, sizeof(path), "/sys/dev/%s/%u:%u",
857 return udev_device_new_from_syspath(udev, path);
958 char path[UTIL_PATH_SIZE];
962 strscpyl(path, sizeof(path), "/sys/subsystem/", sysname, NULL);
963 if (stat(path, &statbuf) == 0)
966 strscpyl(path, sizeof(path), "/sys/bus/", sysname, NULL);
967 if (stat(path, &statbuf) == 0)
970 strscpyl(path, sizeof(path), "/sys/class/", sysname, NULL);
971 if (stat(path, &statbuf) == 0)
977 strscpyl(path, sizeof(path), "/sys/module/", sysname, NULL);
978 if (stat(path, &statbuf) == 0)
993 strscpyl(path, sizeof(path), "/sys/subsystem/", subsys, "/drivers/", driver, NULL);
994 if (stat(path, &statbuf) == 0)
997 strscpyl(path, sizeof(path), "/sys/bus/", subsys, "/drivers/", driver, NULL);
998 if (stat(path, &statbuf) == 0)
1006 strscpyl(path, sizeof(path), "/sys/subsystem/", subsystem, "/devices/", sysname, NULL);
1007 if (stat(path, &statbuf) == 0)
1010 strscpyl(path, sizeof(path), "/sys/bus/", subsystem, "/devices/", sysname, NULL);
1011 if (stat(path, &statbuf) == 0)
1014 strscpyl(path, sizeof(path), "/sys/class/", subsystem, "/", sysname, NULL);
1015 if (stat(path, &statbuf) == 0)
1020 return udev_device_new_from_syspath(udev, path);
1062 char path[UTIL_PATH_SIZE];
1065 strscpy(path, sizeof(path), udev_device->syspath);
1066 subdir = path + strlen("/sys/");
1074 udev_device_parent = udev_device_new_from_syspath(udev_device->udev, path);
1239 * Retrieve the kernel devpath value of the udev device. The path
1255 * Retrieve the sys path of the udev device. The path is an
1256 * absolute path and starts with the sys mount point.
1258 * Returns: the sys path of the udev device
1302 * The path is an absolute path, and starts with the device directory.
1324 * The devlink path can be retrieved from the list entry by
1325 * udev_list_entry_get_name(). The path is an absolute path, and starts with
1465 char path[UTIL_PATH_SIZE];
1483 strscpyl(path, sizeof(path), udev_device_get_syspath(udev_device), "/", sysattr, NULL);
1484 if (lstat(path, &statbuf) != 0) {
1491 * Some core links return only the last element of the target path,
1517 fd = open(path, O_RDONLY|O_CLOEXEC);
1549 char path[UTIL_PATH_SIZE];
1565 strscpyl(path, sizeof(path), udev_device_get_syspath(dev), "/", sysattr, NULL);
1566 if (lstat(path, &statbuf) != 0) {
1597 fd = open(path, O_WRONLY|O_CLOEXEC);
1637 char path[UTIL_PATH_SIZE];
1644 strscpyl(path, sizeof(path), udev_device_get_syspath(udev_device), "/", dent->d_name, NULL);
1645 if (lstat(path, &statbuf) != 0)