From: Amit Shah Date: Fri, 19 Mar 2010 16:51:44 +0000 Subject: [PATCH] Fix virtio-ports rule to create symlink only when 'name' attribute present Message-Id: <1269017414-31387-1-git-send-email-amit.shah@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org When a port doesn't have a 'name' attribute, the rule gives out a warning: Starting udev: udevd-work[420]: rename(/dev/virtio-ports/.udev-tmp, /dev/virtio-ports/) failed: Not a directory The fix is to check if the 'name' attribute is present. Fix provided by Harald Hoyer. Signed-off-by: Amit Shah --- rules/rules.d/50-udev-default.rules | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules index da1535f..e8116a3 100644 --- a/rules/rules.d/50-udev-default.rules +++ b/rules/rules.d/50-udev-default.rules @@ -18,7 +18,7 @@ KERNEL="mwave", GROUP="dialout" KERNEL="hvc*|hvsi*", GROUP="dialout" # virtio serial / console ports -KERNEL="vport*", SYMLINK+="virtio-ports/$attr{name}" +KERNEL="vport*", ATTR{name}="?*", SYMLINK+="virtio-ports/$attr{name}" # mem KERNEL="null|zero|full|random|urandom", MODE="0666" -- 1.6.2.5