* Re: udev_rules_get_run confusion
2006-01-25 20:42 udev_rules_get_run confusion Andrey Borzenkov
@ 2006-01-26 1:57 ` Kay Sievers
2006-01-26 17:40 ` Andrey Borzenkov
2006-01-26 23:12 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2006-01-26 1:57 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 25, 2006 at 11:42:14PM +0300, Andrey Borzenkov wrote:
> What this function does? As it is now it does *not* get called at all.
$ grep udev_rules_get_run *
udev_device.c: udev_rules_get_run(rules, udev);
udev_device.c: udev_rules_get_run(rules, udev);
udev_rules.c:int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev)
udev_rules.h:extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev);
> Is it leftover from the past or something for the future?
It is called for all events, that don't create a node and need to "name"
a device. The logic is a bit different, if NAME is contained in a rule, that's
why they are different functions. udev_rules_get_name() and udev_rules_get_run()
could be merged, sure, if it would improve something, but I'm not sure about.
Thanks,
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev_rules_get_run confusion
2006-01-25 20:42 udev_rules_get_run confusion Andrey Borzenkov
2006-01-26 1:57 ` Kay Sievers
@ 2006-01-26 17:40 ` Andrey Borzenkov
2006-01-26 23:12 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2006-01-26 17:40 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 332 bytes --]
On Thursday 26 January 2006 04:57, Kay Sievers wrote:
> On Wed, Jan 25, 2006 at 11:42:14PM +0300, Andrey Borzenkov wrote:
> > What this function does? As it is now it does *not* get called at all.
>
Oops I should never post that late. I missed this piece in previous patch.
Trivial one-liner follows.
regards
-andrey
[-- Attachment #1.2: remove_apply_from_get_run.diff --]
[-- Type: text/x-diff, Size: 815 bytes --]
Subject: [PATCH] Remove udev_rules_apply_format from udev_rules_get_run
From: Andrey Borzenkov <arvidjaar@mail.ru>
This removes now redundant substitution (otherwise it will be expanded
twice).
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
---
udev_rules.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/udev_rules.c b/udev_rules.c
index 90dc024..5d68728 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -1082,7 +1082,6 @@ int udev_rules_get_run(struct udev_rules
name_list_cleanup(&udev->run_list);
}
strlcpy(program, key_val(rule, &rule->run), sizeof(program));
- udev_rules_apply_format(udev, program, sizeof(program));
dbg("add run '%s'", program);
name_list_add(&udev->run_list, program, 0);
if (rule->run.operation == KEY_OP_ASSIGN_FINAL)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: udev_rules_get_run confusion
2006-01-25 20:42 udev_rules_get_run confusion Andrey Borzenkov
2006-01-26 1:57 ` Kay Sievers
2006-01-26 17:40 ` Andrey Borzenkov
@ 2006-01-26 23:12 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2006-01-26 23:12 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 26, 2006 at 08:40:54PM +0300, Andrey Borzenkov wrote:
> On Thursday 26 January 2006 04:57, Kay Sievers wrote:
> > On Wed, Jan 25, 2006 at 11:42:14PM +0300, Andrey Borzenkov wrote:
> > > What this function does? As it is now it does *not* get called at all.
> >
>
> Oops I should never post that late. I missed this piece in previous patch.
> Trivial one-liner follows.
Thanks for the patch, I've removed the whole temporary variable now,
which is not longer needed if we don't change the string.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread