char *message = NULL, *syslog_priority = NULL, *syslog_pid = NULL, *syslog_facility = NULL, *syslog_identifier = NULL, *source_time = NULL;
int priority, r;
unsigned n = 0, z = 0, j;
- usec_t usec;
+ unsigned long long usec;
char *identifier = NULL, *pid = NULL, *e, *f, *k;
uint64_t serial;
size_t pl;
e = f;
*e = 0;
- r = parse_usec(p, &usec);
+ r = safe_atollu(p, &usec);
if (r < 0)
return;
}
}
- if (asprintf(&source_time, "_SOURCE_MONOTONIC_TIMESTAMP=%llu",
- (unsigned long long) usec) >= 0)
+ if (asprintf(&source_time, "_SOURCE_MONOTONIC_TIMESTAMP=%llu", usec) >= 0)
IOVEC_SET_STRING(iovec[n++], source_time);
IOVEC_SET_STRING(iovec[n++], "_TRANSPORT=kernel");
if ((priority & LOG_FACMASK) == LOG_KERN)
IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
else {
- syslog_parse_identifier((const char**) &p, &identifier, &pid);
+ pl -= syslog_parse_identifier((const char**) &p, &identifier, &pid);
/* Avoid any messages we generated ourselves via
* log_info() and friends. */
/* We store the seqnum we last read in an mmaped file. That
* way we can just use it like a variable, but it is
- * persistant and automatically flushed at reboot. */
+ * persistent and automatically flushed at reboot. */
fd = open("/run/systemd/journal/kernel-seqnum", O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644);
if (fd < 0) {