diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/test-journal-stream.c | 9 | ||||
-rw-r--r-- | src/libudev/libudev-device.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/journal/test-journal-stream.c b/src/journal/test-journal-stream.c index e1146c692d..b5ecf2f375 100644 --- a/src/journal/test-journal-stream.c +++ b/src/journal/test-journal-stream.c @@ -80,6 +80,7 @@ int main(int argc, char *argv[]) { char *z; const void *data; size_t l; + dual_timestamp previous_ts = DUAL_TIMESTAMP_NULL; /* journal_file_open requires a valid machine id */ if (access("/etc/machine-id", F_OK) != 0) @@ -101,6 +102,14 @@ int main(int argc, char *argv[]) { dual_timestamp_get(&ts); + if (ts.monotonic <= previous_ts.monotonic) + ts.monotonic = previous_ts.monotonic + 1; + + if (ts.realtime <= previous_ts.realtime) + ts.realtime = previous_ts.realtime + 1; + + previous_ts = ts; + assert_se(asprintf(&p, "NUMBER=%u", i) >= 0); iovec[0].iov_base = p; iovec[0].iov_len = strlen(p); diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index c27b01db96..9a8d682107 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -871,7 +871,7 @@ _public_ struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_ udev_list_cleanup(&udev_device->sysattrs); FOREACH_DEVICE_SYSATTR(udev_device->device, sysattr) - udev_list_entry_add(&udev_device->properties, sysattr, NULL); + udev_list_entry_add(&udev_device->sysattrs, sysattr, NULL); udev_device->sysattrs_read = true; } |