* [PATCH]udev:Extend udev to support move events
@ 2009-10-28 12:46 Narendra K
0 siblings, 0 replies; only message in thread
From: Narendra K @ 2009-10-28 12:46 UTC (permalink / raw)
To: linux-hotplug
Cc: netdev, matt_domsch, jordan_hargrave, charles_rose,
sandeep_k_shandilya, dannf
As of now, udev does not support move events that are generated when
network interfaces are renamed. This patch extends udev to support move
events. With this patch udev would support rules like
ACTION=="move", SUBSYSTEM=="net", PROGRAM="netif_id %k"
Signed-off-by: Narendra K <Narendra_K@dell.com>
---
udev/udev-event.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/udev/udev-event.c b/udev/udev-event.c
index f4d7121..4a77753 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -647,6 +647,13 @@ exit_add:
goto exit;
}
+ /* handle "move" event */
+ if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "move") == 0) {
+ udev_rules_apply_to_event(rules, event);
+ udev_device_update_db(dev);
+ goto exit;
+ }
+
/* remove device node */
if (major(udev_device_get_devnum(dev)) != 0 && strcmp(udev_device_get_action(dev), "remove") == 0) {
/* import database entry and delete it */
--
With regards,
Narendra K
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-28 12:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 12:46 [PATCH]udev:Extend udev to support move events Narendra K
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).