From: Amit Shah Date: Thu, 21 Jan 2010 13:27:04 +0000 Subject: [PATCH] rules: Add symlink rule for virtio ports Message-Id: <1264079704-4148-1-git-send-email-amit.shah@redhat.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 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 --- The series that introduces this functionality is currently in Rusty's queue and can be seen in linux-next: http://git.kernel.org/?p=3Dlinux/kernel/git/next/linux-next.git;a=3Dcommitd= iff;h=BEbf00791b72a68bbd90251133a9074d75c8c22a rules/rules.d/50-udev-default.rules | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-de= fault.rules index 374db50..f8556d1 100644 --- a/rules/rules.d/50-udev-default.rules +++ b/rules/rules.d/50-udev-default.rules @@ -17,6 +17,9 @@ KERNEL=3D"ppp", MODE=3D"0600" KERNEL=3D"mwave", GROUP=3D"dialout" KERNEL=3D"hvc*|hvsi*", GROUP=3D"dialout" =20 +# virtio serial / console ports +KERNEL=3D"vport*", SYMLINK+=3D"virtio-ports/$ATTR{name}" + # mem KERNEL=3D"null|zero|full|random|urandom", MODE=3D"0666" KERNEL=3D"mem|kmem|port|nvram", GROUP=3D"kmem", MODE=3D"0640" --=20 1.6.2.5