summaryrefslogtreecommitdiff
path: root/udevsend.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-02-05 01:35:08 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:25 -0700
commit86590cd590a9f2fcc5917e8f5c85e024af1e58e0 (patch)
tree29d0de5205aa63af70a25ac1b68c77d1e517c2b1 /udevsend.c
parent16be1328898ed54d6b9cbc56ea113bf911450376 (diff)
[PATCH] udevd - allow to bypass sequence number
This patch allows udevsend to be called by the user and not only by the kernel with its SEQNUM. If no SEQNUM is given, we move the event straight to the exec queue and don't look if something is missing. I don't know if this is really needed, but some people seem trying to send events trough udevd instead of calling udev directly with their scripts and confuse the reorder logic with that. So at least, we may remove this source of confusion and udevsend is much much faster back than udev itself and it will also block concurrent events for the same devpath.
Diffstat (limited to 'udevsend.c')
-rw-r--r--udevsend.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/udevsend.c b/udevsend.c
index d3c74dd46a..9dc2b2e841 100644
--- a/udevsend.c
+++ b/udevsend.c
@@ -148,11 +148,10 @@ int main(int argc, char* argv[])
}
seqnum = get_seqnum();
- if (seqnum == NULL) {
- dbg("no seqnum");
- goto exit;
- }
- seq = atoi(seqnum);
+ if (seqnum == NULL)
+ seq = 0;
+ else
+ seq = atoi(seqnum);
sock = socket(AF_LOCAL, SOCK_STREAM, 0);
if (sock == -1) {