All of lore.kernel.org
 help / color / mirror / Atom feed
From: Narendra K <Narendra_K@dell.com>
To: linux-hotplug@vger.kernel.org
Cc: netdev@vger.kernel.org, matt_domsch@dell.com,
	jordan_hargrave@dell.com, charles_rose@dell.com,
	sandeep_k_shandilya@dell.com, dannf@hp.com
Subject: [PATCH]udev:Extend udev to support move events
Date: Wed, 28 Oct 2009 12:46:29 +0000	[thread overview]
Message-ID: <20091028124627.GA20936@mock.linuxdev.us.dell.com> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Narendra K <Narendra_K@dell.com>
To: linux-hotplug@vger.kernel.org
Cc: netdev@vger.kernel.org, matt_domsch@dell.com,
	jordan_hargrave@dell.com, charles_rose@dell.com,
	sandeep_k_shandilya@dell.com, dannf@hp.com
Subject: [PATCH]udev:Extend udev to support move events
Date: Wed, 28 Oct 2009 07:46:29 -0500	[thread overview]
Message-ID: <20091028124627.GA20936@mock.linuxdev.us.dell.com> (raw)

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


             reply	other threads:[~2009-10-28 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 12:46 Narendra K [this message]
2009-10-28 12:46 ` [PATCH]udev:Extend udev to support move events Narendra K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091028124627.GA20936@mock.linuxdev.us.dell.com \
    --to=narendra_k@dell.com \
    --cc=charles_rose@dell.com \
    --cc=dannf@hp.com \
    --cc=jordan_hargrave@dell.com \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=matt_domsch@dell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sandeep_k_shandilya@dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.