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;
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;
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) {