|
Lines 3011-3019
static int drmParseSubsystemType(int maj, int min)
Link Here
|
| 3011 |
snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min); |
3011 |
snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min); |
| 3012 |
if (!realpath(path, real_path)) |
3012 |
if (!realpath(path, real_path)) |
| 3013 |
return -errno; |
3013 |
return -errno; |
| 3014 |
snprintf(path, sizeof(path), "%s", real_path); |
3014 |
subsystem_type = get_subsystem_type(real_path); |
| 3015 |
|
3015 |
if (subsystem_type >= 0) |
| 3016 |
subsystem_type = get_subsystem_type(path); |
3016 |
memcpy(path, real_path, sizeof(path)); |
|
|
3017 |
else |
| 3018 |
subsystem_type = get_subsystem_type(path); |
| 3017 |
if (subsystem_type == DRM_BUS_VIRTIO) { |
3019 |
if (subsystem_type == DRM_BUS_VIRTIO) { |
| 3018 |
strncat(path, "/..", PATH_MAX); |
3020 |
strncat(path, "/..", PATH_MAX); |
| 3019 |
subsystem_type = get_subsystem_type(path); |
3021 |
subsystem_type = get_subsystem_type(path); |
| 3020 |
- |
|
|