udev:Extend udev to support move events
Subsystems (2)
PATCH 1/1 udev:Extend udev to support move events
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 <[email protected]>
--- udev/udev-event.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
udev/udev-event.c +7 -0
@@ -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 */
Signature · 2 lines
With regards, Narendra K