dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 0af3aeb44697533df2bc79d0985b65bca6b8cd86 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Sun, 3 Nov 2013 13:01:20 +0100
Subject: [PATCH] rules: load path_id on DRM devices

The path_id-builtin provides useful unique aliases for DRM devices. If we
want to configure DRM render-nodes for compositors, we want to avoid
storing the whole sys-path in configuration files. Hence, allow users to
store the short PATH_ID instead.

Load path_id-builtin unconditionally on DRM devices now to always provide
this alias.
---
 Makefile.am        | 1 +
 rules/60-drm.rules | 8 ++++++++
 2 files changed, 9 insertions(+)
 create mode 100644 rules/60-drm.rules

diff --git a/Makefile.am b/Makefile.am
index 7ab345a..34de7f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2209,6 +2209,7 @@ dist_udevrules_DATA += \
 	rules/99-systemd.rules \
 	rules/42-usb-hid-pm.rules \
 	rules/50-udev-default.rules \
+	rules/60-drm.rules \
 	rules/60-keyboard.rules \
 	rules/60-persistent-storage-tape.rules \
 	rules/60-persistent-serial.rules \
diff --git a/rules/60-drm.rules b/rules/60-drm.rules
new file mode 100644
index 0000000..de038c1
--- /dev/null
+++ b/rules/60-drm.rules
@@ -0,0 +1,8 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="drm_end"
+SUBSYSTEM!="drm", GOTO="drm_end"
+
+SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
+
+LABEL="drm_end"