Skip to contentSkip to conversation

Fix virtio-ports rule to create symlink only when 'name' attribute present

PATCH Applied Amit Shah 2 participants 2 messages Mar 19, 2010 – Mar 22, 2010

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

PATCH 1/1 Fix virtio-ports rule to create symlink only when 'name' attribute present

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.

---
 rules/rules.d/50-udev-default.rules |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
rules/rules.d/50-udev-default.rules +1 -1
index da1535f..e8116a3 100644
@@ -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"
Signature · 1 line
1.6.2.5
Applied
#1 lore raw

Re: [PATCH] Fix virtio-ports rule to create symlink only when 'name'

rules/rules.d/50-udev-default.rules KERNEL="mwave", GROUP="dialout" · line 21

Quoted 4 lines · Amit Shah

The fix is to check if the 'name' attribute is present.

rules/rules.d/50-udev-default.rules +1 -1
-KERNEL="vport*", SYMLINK+="virtio-ports/$attr{name}"
+KERNEL="vport*", ATTR{name}="?*", SYMLINK+="virtio-ports/$attr{name}"

Applied.

Thanks,
Kay