summaryrefslogtreecommitdiff
path: root/rules/rules.d
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-01-21 18:45:04 +0530
committerKay Sievers <kay.sievers@vrfy.org>2010-01-21 14:21:42 +0100
commit7b79a59b28539a05458bec652781d42d20adc2f9 (patch)
tree66c37b53cfbf31b41d31ea03e767b2ae9b7721f9 /rules/rules.d
parent2b8a57353677d73219bee2d56307d40e63fde196 (diff)
rules: Add symlink rule for virtio ports
virtio ports spawned by the virtio_console.c driver can have 'names' assigned to them by hosts. The ports are distinguishable using these names. Make a rule to create a symlink to the chardev associated for a port with a name. The symlink created is: /dev/virtio-ports/org.libvirt.console0 -> /dev/vport0p0 if the first port for the first device was given a name of 'org.libvirt.console0'. Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'rules/rules.d')
-rw-r--r--rules/rules.d/50-udev-default.rules3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
index 374db500e6..f8556d1940 100644
--- a/rules/rules.d/50-udev-default.rules
+++ b/rules/rules.d/50-udev-default.rules
@@ -17,6 +17,9 @@ KERNEL=="ppp", MODE="0600"
KERNEL=="mwave", GROUP="dialout"
KERNEL=="hvc*|hvsi*", GROUP="dialout"
+# virtio serial / console ports
+KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}"
+
# mem
KERNEL=="null|zero|full|random|urandom", MODE="0666"
KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640"