summaryrefslogtreecommitdiff
path: root/rules.d
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-12-02 12:40:42 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-12-16 18:32:29 +0100
commit4dd465cb4e0706095ff7a80f58b23b8974fee37d (patch)
tree59901b810a3210fc9cdc962c09a2bd9996f323a9 /rules.d
parent84a1ff9457ae085ce620e3873c2295bc09b18e5d (diff)
downloadsystemd-4dd465cb4e0706095ff7a80f58b23b8974fee37d.tar.gz
udev: Extract RAM properties from DMI information
Add memory_id program to set properties about the physical memory devices in the system. This is useful on machines with removable memory modules to show how the machine can be upgraded, and on all devices to detect the actual RAM size, without relying on the OS accessible amount. Closes: #16651
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/70-memory.rules8
-rw-r--r--rules.d/meson.build1
2 files changed, 9 insertions, 0 deletions
diff --git a/rules.d/70-memory.rules b/rules.d/70-memory.rules
new file mode 100644
index 0000000000..f2610ff97e
--- /dev/null
+++ b/rules.d/70-memory.rules
@@ -0,0 +1,8 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="memory_end"
+SUBSYSTEM!="dmi", GOTO="memory_end"
+
+IMPORT{program}="dmi_memory_id"
+
+LABEL="memory_end"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index 7e46abd559..650addc3b3 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -17,6 +17,7 @@ rules = files('''
60-serial.rules
70-joystick.rules
70-mouse.rules
+ 70-memory.rules
70-touchpad.rules
75-net-description.rules
75-probe_mtd.rules