diff options
author | Pozsar Balazs <pozsy@uhulinux.hu> | 2007-03-23 17:21:46 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-03-23 17:21:46 +0100 |
commit | 4e2b290821d083361260f8cdbe7c54886463673e (patch) | |
tree | de8aef46e92aab7d6b1c2dbe97582fa152afa2bc | |
parent | d2c9a56e0e624ed448aed8ad18460deed63973e1 (diff) |
udevsettle: read udev not kernel seqnum first
-rw-r--r-- | udevsettle.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/udevsettle.c b/udevsettle.c index 9e3e03b1af..f76ad7160d 100644 --- a/udevsettle.c +++ b/udevsettle.c @@ -110,9 +110,9 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } - /* read current kernel seqnum */ - strlcpy(filename, sysfs_path, sizeof(filename)); - strlcat(filename, "/kernel/uevent_seqnum", sizeof(filename)); + /* read current udev seqnum */ + strlcpy(filename, udev_root, sizeof(filename)); + strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename)); fd = open(filename, O_RDONLY); if (fd < 0) goto exit; @@ -121,12 +121,12 @@ int main(int argc, char *argv[], char *envp[]) if (len <= 0) goto exit; seqnum[len] = '\0'; - seq_kernel = strtoull(seqnum, NULL, 10); - info("kernel seqnum = %llu", seq_kernel); + seq_udev = strtoull(seqnum, NULL, 10); + info("udev seqnum = %llu", seq_udev); - /* read current udev seqnum */ - strlcpy(filename, udev_root, sizeof(filename)); - strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename)); + /* read current kernel seqnum */ + strlcpy(filename, sysfs_path, sizeof(filename)); + strlcat(filename, "/kernel/uevent_seqnum", sizeof(filename)); fd = open(filename, O_RDONLY); if (fd < 0) goto exit; @@ -135,8 +135,8 @@ int main(int argc, char *argv[], char *envp[]) if (len <= 0) goto exit; seqnum[len] = '\0'; - seq_udev = strtoull(seqnum, NULL, 10); - info("udev seqnum = %llu", seq_udev); + seq_kernel = strtoull(seqnum, NULL, 10); + info("kernel seqnum = %llu", seq_kernel); /* make sure all kernel events have arrived in the queue */ if (seq_udev >= seq_kernel) { |