Lines Matching defs:path
40 char path[PATH_SIZE];
128 dbg("path link '%s' points to '%s'", devpath, link_target);
148 char path[PATH_SIZE];
174 /* look for device already in cache (we never put an untranslated path in the cache) */
183 strlcpy(path, sysfs_path, sizeof(path));
184 strlcat(path, devpath_real, sizeof(path));
185 if (lstat(path, &statbuf) != 0) {
186 dbg("stat '%s' failed: %s", path, strerror(errno));
193 /* now look for device in cache after path translation */
347 const char *path;
358 path = &path_full[sysfs_len];
365 if (strcmp(attr_loop->path, path) == 0) {
366 dbg("found in cache '%s'", attr_loop->path);
377 strlcpy(attr->path, path, sizeof(attr->path));
387 /* links return the last element of the target path */
441 char *path;
445 path = &path_full[sysfs_len];
448 strlcpy(path, "/subsystem/", sizeof(path_full) - sysfs_len);
449 strlcat(path, id, sizeof(path_full) - sysfs_len);
453 strlcpy(path, "/bus/", sizeof(path_full) - sysfs_len);
454 strlcat(path, id, sizeof(path_full) - sysfs_len);
459 strlcpy(path, "/class/", sizeof(path_full) - sysfs_len);
460 strlcat(path, id, sizeof(path_full) - sysfs_len);
466 strlcpy(path, "/module/", sizeof(path_full) - sysfs_len);
467 strlcat(path, id, sizeof(path_full) - sysfs_len);
482 strlcpy(path, "/subsystem/", sizeof(path_full) - sysfs_len);
483 strlcat(path, subsys, sizeof(path_full) - sysfs_len);
484 strlcat(path, "/drivers/", sizeof(path_full) - sysfs_len);
485 strlcat(path, driver, sizeof(path_full) - sysfs_len);
489 strlcpy(path, "/bus/", sizeof(path_full) - sysfs_len);
490 strlcat(path, subsys, sizeof(path_full) - sysfs_len);
491 strlcat(path, "/drivers/", sizeof(path_full) - sysfs_len);
492 strlcat(path, driver, sizeof(path_full) - sysfs_len);
499 strlcpy(path, "/subsystem/", sizeof(path_full) - sysfs_len);
500 strlcat(path, subsystem, sizeof(path_full) - sysfs_len);
501 strlcat(path, "/devices/", sizeof(path_full) - sysfs_len);
502 strlcat(path, id, sizeof(path_full) - sysfs_len);
506 strlcpy(path, "/bus/", sizeof(path_full) - sysfs_len);
507 strlcat(path, subsystem, sizeof(path_full) - sysfs_len);
508 strlcat(path, "/devices/", sizeof(path_full) - sysfs_len);
509 strlcat(path, id, sizeof(path_full) - sysfs_len);
513 strlcpy(path, "/class/", sizeof(path_full) - sysfs_len);
514 strlcat(path, subsystem, sizeof(path_full) - sysfs_len);
515 strlcat(path, "/", sizeof(path_full) - sysfs_len);
516 strlcat(path, id, sizeof(path_full) - sysfs_len);
523 sysfs_resolve_link(path, sizeof(path_full) - sysfs_len);
524 strlcpy(devpath_full, path, len);