Merge pull request #4612 from keszybz/format-strings
Format string tweaks (and a small fix on 32bit)
This commit is contained in:
commit
a809cee582
|
@ -932,7 +932,7 @@ libbasic_la_SOURCES = \
|
|||
src/basic/copy.h \
|
||||
src/basic/alloc-util.h \
|
||||
src/basic/alloc-util.c \
|
||||
src/basic/formats-util.h \
|
||||
src/basic/format-util.h \
|
||||
src/basic/nss-util.h
|
||||
|
||||
nodist_libbasic_la_SOURCES = \
|
||||
|
|
|
@ -216,25 +216,21 @@ AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
|
|||
[CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [-flto])],
|
||||
[AC_MSG_RESULT([disabling -flto as requested])])],
|
||||
[AC_MSG_RESULT([skipping -flto, optimization not enabled])])
|
||||
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
|
||||
|
||||
AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
|
||||
[CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
|
||||
-Wp,-D_FORTIFY_SOURCE=2])],
|
||||
[AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
|
||||
AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
|
||||
|
||||
AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
|
||||
[CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
|
||||
-Wl,--gc-sections])],
|
||||
[AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
|
||||
AC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
|
||||
|
||||
AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
|
||||
[CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
|
||||
-ffunction-sections -fdata-sections])],
|
||||
[AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
|
||||
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
|
||||
|
||||
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
|
||||
-Wl,--as-needed \
|
||||
|
@ -243,6 +239,9 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
|
|||
-Wl,-z,now \
|
||||
-pie \
|
||||
-Wl,-fuse-ld=gold])
|
||||
|
||||
AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
|
||||
AC_SUBST([OUR_CFLAGS], "-D__SANE_USERSPACE_TYPES__ $with_cflags $sanitizer_cflags")
|
||||
AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
|
||||
|
||||
AC_CHECK_SIZEOF(pid_t)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "login-util.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
#define procfs_file_alloca(pid, field) \
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "rlimit-util.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
|
|
|
@ -309,7 +309,7 @@ static char *format_timestamp_internal(
|
|||
if (n + 8 > l)
|
||||
return NULL; /* Microseconds part doesn't fit. */
|
||||
|
||||
sprintf(buf + n, ".%06llu", (unsigned long long) (t % USEC_PER_SEC));
|
||||
sprintf(buf + n, ".%06"PRI_USEC, t % USEC_PER_SEC);
|
||||
}
|
||||
|
||||
/* Append the timezone */
|
||||
|
@ -499,11 +499,11 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
|
|||
|
||||
if (j > 0) {
|
||||
k = snprintf(p, l,
|
||||
"%s"USEC_FMT".%0*llu%s",
|
||||
"%s"USEC_FMT".%0*"PRI_USEC"%s",
|
||||
p > buf ? " " : "",
|
||||
a,
|
||||
j,
|
||||
(unsigned long long) b,
|
||||
b,
|
||||
table[i].suffix);
|
||||
|
||||
t = 0;
|
||||
|
@ -1320,7 +1320,7 @@ unsigned long usec_to_jiffies(usec_t u) {
|
|||
r = sysconf(_SC_CLK_TCK);
|
||||
|
||||
assert(r > 0);
|
||||
hz = (unsigned long) r;
|
||||
hz = r;
|
||||
}
|
||||
|
||||
return DIV_ROUND_UP(u , USEC_PER_SEC / hz);
|
||||
|
|
|
@ -29,8 +29,10 @@
|
|||
typedef uint64_t usec_t;
|
||||
typedef uint64_t nsec_t;
|
||||
|
||||
#define NSEC_FMT "%" PRIu64
|
||||
#define USEC_FMT "%" PRIu64
|
||||
#define PRI_NSEC PRIu64
|
||||
#define PRI_USEC PRIu64
|
||||
#define NSEC_FMT "%" PRI_NSEC
|
||||
#define USEC_FMT "%" PRI_USEC
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "parse-util.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "hostname-util.h"
|
||||
#include "log.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "time-util.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "bus-util.h"
|
||||
#include "dbus-automount.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "label.h"
|
||||
#include "mkdir.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "busname.h"
|
||||
#include "dbus-busname.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "kdbus.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "env-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "install.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
#include "exit-status.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "io-util.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "def.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "killall.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#include "fd-util.h"
|
||||
#include "fdset.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hostname-setup.h"
|
||||
#include "ima-setup.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "dbus-mount.h"
|
||||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "log.h"
|
||||
#include "manager.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "exit-status.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "load-dropin.h"
|
||||
#include "load-fragment.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "def.h"
|
||||
#include "exit-status.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "label.h"
|
||||
#include "log.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "specifier.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "escape.h"
|
||||
#include "execute.h"
|
||||
#include "fileio-label.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "id128-util.h"
|
||||
#include "load-dropin.h"
|
||||
#include "load-fragment.h"
|
||||
|
|
|
@ -111,7 +111,7 @@ static CoredumpStorage arg_storage = COREDUMP_STORAGE_EXTERNAL;
|
|||
static bool arg_compress = true;
|
||||
static uint64_t arg_process_size_max = PROCESS_SIZE_MAX;
|
||||
static uint64_t arg_external_size_max = EXTERNAL_SIZE_MAX;
|
||||
static size_t arg_journal_size_max = JOURNAL_SIZE_MAX;
|
||||
static uint64_t arg_journal_size_max = JOURNAL_SIZE_MAX;
|
||||
static uint64_t arg_keep_free = (uint64_t) -1;
|
||||
static uint64_t arg_max_use = (uint64_t) -1;
|
||||
|
||||
|
@ -708,7 +708,7 @@ static int submit_coredump(
|
|||
coredump_filename = strjoina("COREDUMP_FILENAME=", filename);
|
||||
IOVEC_SET_STRING(iovec[n_iovec++], coredump_filename);
|
||||
} else if (arg_storage == COREDUMP_STORAGE_EXTERNAL)
|
||||
log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
|
||||
log_info("The core will not be stored: size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
|
||||
coredump_size, arg_external_size_max);
|
||||
|
||||
/* Vacuum again, but exclude the coredump we just created */
|
||||
|
@ -738,7 +738,7 @@ static int submit_coredump(
|
|||
else
|
||||
log_warning_errno(r, "Failed to generate stack trace: %m");
|
||||
} else
|
||||
log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
|
||||
log_debug("Not generating stack trace: core size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
|
||||
coredump_size, arg_process_size_max);
|
||||
|
||||
if (!core_message)
|
||||
|
@ -765,7 +765,7 @@ log:
|
|||
} else
|
||||
log_warning_errno(r, "Failed to attach the core to the journal entry: %m");
|
||||
} else
|
||||
log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
|
||||
log_info("The core will not be stored: size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
|
||||
coredump_size, arg_journal_size_max);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "stacktrace.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -429,10 +429,10 @@ static int add_automount(
|
|||
"Documentation=man:systemd-gpt-auto-generator(8)\n"
|
||||
"[Automount]\n"
|
||||
"Where=%s\n"
|
||||
"TimeoutIdleSec=%lld\n",
|
||||
"TimeoutIdleSec="USEC_FMT"\n",
|
||||
description,
|
||||
where,
|
||||
(unsigned long long)timeout / USEC_PER_SEC);
|
||||
timeout / USEC_PER_SEC);
|
||||
|
||||
r = fflush_and_check(f);
|
||||
if (r < 0)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "bus-util.h"
|
||||
#include "def.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "initreq.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "def.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "journal-upload.h"
|
||||
#include "log.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "journald-console.h"
|
||||
#include "journald-server.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "journald-kmsg.h"
|
||||
#include "journald-server.h"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "hostname-util.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "journald-console.h"
|
||||
#include "journald-kmsg.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
***/
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "journald-server.h"
|
||||
#include "journald-wall.h"
|
||||
#include "process-util.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "sd-daemon.h"
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "journal-authenticate.h"
|
||||
#include "journald-kmsg.h"
|
||||
#include "journald-server.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "hostname-util.h"
|
||||
|
|
|
@ -264,7 +264,7 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
|
|||
if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id && !(name->flags & KDBUS_HELLO_ACTIVATOR)) {
|
||||
char *n;
|
||||
|
||||
if (asprintf(&n, ":1.%llu", (unsigned long long) name->id) < 0) {
|
||||
if (asprintf(&n, ":1.%llu", name->id) < 0) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ int bus_get_name_creds_kdbus(
|
|||
}
|
||||
|
||||
if (mask & SD_BUS_CREDS_UNIQUE_NAME) {
|
||||
if (asprintf(&c->unique_name, ":1.%llu", (unsigned long long) conn_info->id) < 0) {
|
||||
if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "cgroup-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "cap-list.h"
|
||||
#include "capability-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "capability-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "memfd-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "stdio-util.h"
|
||||
|
@ -848,8 +848,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
|
|||
if (k->src_id == KDBUS_SRC_ID_KERNEL)
|
||||
bus_message_set_sender_driver(bus, m);
|
||||
else {
|
||||
xsprintf(m->sender_buffer, ":1.%llu",
|
||||
(unsigned long long)k->src_id);
|
||||
xsprintf(m->sender_buffer, ":1.%llu", k->src_id);
|
||||
m->sender = m->creds.unique_name = m->sender_buffer;
|
||||
}
|
||||
|
||||
|
@ -860,8 +859,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
|
|||
else if (k->dst_id == KDBUS_DST_ID_NAME)
|
||||
m->destination = bus->unique_name; /* fill in unique name if the well-known name is missing */
|
||||
else {
|
||||
xsprintf(m->destination_buffer, ":1.%llu",
|
||||
(unsigned long long)k->dst_id);
|
||||
xsprintf(m->destination_buffer, ":1.%llu", k->dst_id);
|
||||
m->destination = m->destination_buffer;
|
||||
}
|
||||
|
||||
|
@ -1035,7 +1033,7 @@ int bus_kernel_take_fd(sd_bus *b) {
|
|||
b->bloom_size = (size_t) bloom->size;
|
||||
b->bloom_n_hash = (unsigned) bloom->n_hash;
|
||||
|
||||
if (asprintf(&b->unique_name, ":1.%llu", (unsigned long long) hello->id) < 0) {
|
||||
if (asprintf(&b->unique_name, ":1.%llu", hello->id) < 0) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
@ -1207,7 +1205,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call
|
|||
return r;
|
||||
}
|
||||
} else {
|
||||
log_debug("Ignoring message with unknown payload type %llu.", (unsigned long long) k->payload_type);
|
||||
log_debug("Ignoring message with unknown payload type %llu.", k->payload_type);
|
||||
close_kdbus_msg(bus, k);
|
||||
}
|
||||
}
|
||||
|
@ -1268,7 +1266,7 @@ static int translate_name_change(
|
|||
if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
|
||||
old_owner[0] = 0;
|
||||
else
|
||||
sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old_id.id);
|
||||
sprintf(old_owner, ":1.%llu", d->name_change.old_id.id);
|
||||
|
||||
if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
|
||||
|
||||
|
@ -1277,7 +1275,7 @@ static int translate_name_change(
|
|||
|
||||
new_owner[0] = 0;
|
||||
} else
|
||||
sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new_id.id);
|
||||
sprintf(new_owner, ":1.%llu", d->name_change.new_id.id);
|
||||
|
||||
return push_name_owner_changed(bus, d->name_change.name, old_owner, new_owner, ts);
|
||||
}
|
||||
|
@ -1419,7 +1417,7 @@ int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority) {
|
|||
r = bus_kernel_translate_message(bus, k);
|
||||
close_kdbus_msg(bus, k);
|
||||
} else {
|
||||
log_debug("Ignoring message with unknown payload type %llu.", (unsigned long long) k->payload_type);
|
||||
log_debug("Ignoring message with unknown payload type %llu.", k->payload_type);
|
||||
r = 0;
|
||||
close_kdbus_msg(bus, k);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "bus-message.h"
|
||||
#include "bus-socket.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "bus-match.h"
|
||||
#include "bus-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "util.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "io-util.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "util.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "sd-netlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-internal.h"
|
||||
#include "netlink-types.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "sd-netlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-internal.h"
|
||||
#include "netlink-types.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-internal.h"
|
||||
#include "netlink-types.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "libudev-private.h"
|
||||
#include "missing.h"
|
||||
#include "mount-util.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "strv.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dirent-util.h"
|
||||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind-acl.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "conf-parser.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind-action.h"
|
||||
#include "process-util.h"
|
||||
#include "sleep-config.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio-label.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "logind.h"
|
||||
#include "mkdir.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind-inhibit.h"
|
||||
#include "mkdir.h"
|
||||
#include "parse-util.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind-acl.h"
|
||||
#include "logind-seat.h"
|
||||
#include "mkdir.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "logind-session.h"
|
||||
#include "mkdir.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind-user.h"
|
||||
#include "logind.h"
|
||||
#include "signal-util.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "label.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "bus-common-errors.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind.h"
|
||||
#include "special.h"
|
||||
#include "strv.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "def.h"
|
||||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "logind.h"
|
||||
#include "selinux-util.h"
|
||||
#include "signal-util.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "def.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "login-util.h"
|
||||
#include "macro.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "env-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "local-addresses.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "machine-dbus.h"
|
||||
#include "machine.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "cgroup-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "image-dbus.h"
|
||||
#include "io-util.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "cgroup-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "label.h"
|
||||
#include "machine-image.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "env-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include "fd-util.h"
|
||||
#include "fdset.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "gpt.h"
|
||||
#include "hostname-util.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "calendarspec.h"
|
||||
#include "env-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "ask-password-api.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "io-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "cgroup-show.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "macro.h"
|
||||
#include "output-mode.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "install-printf.h"
|
||||
#include "install.h"
|
||||
#include "macro.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "hostname-util.h"
|
||||
#include "io-util.h"
|
||||
|
@ -223,10 +223,7 @@ static int output_timestamp_monotonic(FILE *f, sd_journal *j, const char *monoto
|
|||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get monotonic timestamp: %m");
|
||||
|
||||
fprintf(f, "[%5llu.%06llu]",
|
||||
(unsigned long long) (t / USEC_PER_SEC),
|
||||
(unsigned long long) (t % USEC_PER_SEC));
|
||||
|
||||
fprintf(f, "[%5"PRI_USEC".%06"PRI_USEC"]", t / USEC_PER_SEC, t % USEC_PER_SEC);
|
||||
return 1 + 5 + 1 + 6 + 1;
|
||||
}
|
||||
|
||||
|
@ -268,7 +265,7 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou
|
|||
switch (mode) {
|
||||
|
||||
case OUTPUT_SHORT_UNIX:
|
||||
xsprintf(buf, "%10llu.%06llu", (unsigned long long) t, (unsigned long long) (x % USEC_PER_SEC));
|
||||
xsprintf(buf, "%10"PRI_TIME".%06"PRIu64, t, x % USEC_PER_SEC);
|
||||
break;
|
||||
|
||||
case OUTPUT_SHORT_ISO:
|
||||
|
@ -292,7 +289,7 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou
|
|||
assert(sizeof(buf) > strlen(buf));
|
||||
k = sizeof(buf) - strlen(buf);
|
||||
|
||||
r = snprintf(buf + strlen(buf), k, ".%06llu", (unsigned long long) (x % USEC_PER_SEC));
|
||||
r = snprintf(buf + strlen(buf), k, ".%06"PRIu64, x % USEC_PER_SEC);
|
||||
if (r <= 0 || (size_t) r >= k) { /* too long? */
|
||||
log_error("Failed to format precise time");
|
||||
return -EINVAL;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "exit-status.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "hostname-util.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "def.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio-label.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "path-util.h"
|
||||
#include "selinux-util.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "cgroup-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
#include "stat-util.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -376,12 +376,12 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
|
|||
m->drift_ppm = tmx.freq / 65536;
|
||||
|
||||
log_debug(" status : %04i %s\n"
|
||||
" time now : %li.%03llu\n"
|
||||
" time now : %li.%03"PRI_USEC"\n"
|
||||
" constant : %li\n"
|
||||
" offset : %+.3f sec\n"
|
||||
" freq offset : %+li (%i ppm)\n",
|
||||
tmx.status, tmx.status & STA_UNSYNC ? "unsync" : "sync",
|
||||
tmx.time.tv_sec, (unsigned long long) (tmx.time.tv_usec / NSEC_PER_MSEC),
|
||||
tmx.time.tv_sec, tmx.time.tv_usec / NSEC_PER_MSEC,
|
||||
tmx.constant,
|
||||
(double)tmx.offset / NSEC_PER_SEC,
|
||||
tmx.freq, m->drift_ppm);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "io-util.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "socket-util.h"
|
||||
#include "udev.h"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "netlink-util.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "selinux-util.h"
|
||||
#include "smack-util.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "dev-setup.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "io-util.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "format-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "special.h"
|
||||
|
|
Loading…
Reference in New Issue