mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-23 15:00:56 +07:00
rules: add mtd/by-name symlinks
Add persistent symlinks for MTD devices like SPI-NOR flash, based on the partition names specified on the cmdline, in a Device Tree, or by other MTD partitioning parser drivers. Using the persistent name can be preferable to using the numbered /dev/mtdX device, as the latter can change depending on probe order or when partitioning has changed.
This commit is contained in:
parent
9e7c4e744b
commit
944803d916
12
rules/60-persistent-storage-mtd.rules
Normal file
12
rules/60-persistent-storage-mtd.rules
Normal file
@ -0,0 +1,12 @@
|
||||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
# persistent storage links: /dev/mtd/by-name
|
||||
|
||||
ACTION=="remove", GOTO="persistent_storage_mtd_end"
|
||||
SUBSYSTEM!="mtd", GOTO="persistent_storage_mtd_end"
|
||||
KERNEL!="mtd[0-9]*", GOTO="persistent_storage_mtd_end"
|
||||
KERNEL=="mtd[0-9]*ro", GOTO="persistent_storage_mtd_end"
|
||||
|
||||
ATTR{name}=="?*", SYMLINK+="mtd/by-name/$attr{name}"
|
||||
|
||||
LABEL="persistent_storage_mtd_end"
|
@ -17,6 +17,7 @@ dist_udevrules_DATA = \
|
||||
60-input-id.rules \
|
||||
60-persistent-alsa.rules \
|
||||
60-persistent-input.rules \
|
||||
60-persistent-storage-mtd.rules \
|
||||
60-persistent-storage-tape.rules \
|
||||
60-persistent-v4l.rules \
|
||||
60-sensor.rules \
|
||||
|
Loading…
Reference in New Issue
Block a user