diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index afbfa3743d6..207ddeb70f1 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -346,13 +346,15 @@ static int process_keymap(void) { if (r < 0) return r; - if (!isempty(arg_keymap)) - keymap = STRV_MAKE(strjoina("KEYMAP=", arg_keymap)); - - if (!keymap) + if (isempty(arg_keymap)) return 0; - mkdir_parents(etc_vconsoleconf, 0755); + keymap = STRV_MAKE(strjoina("KEYMAP=", arg_keymap)); + + r = mkdir_parents(etc_vconsoleconf, 0755); + if (r < 0) + return log_error_errno(r, "Failed to create the parent directory of %s: %m", etc_vconsoleconf); + r = write_env_file(etc_vconsoleconf, keymap); if (r < 0) return log_error_errno(r, "Failed to write %s: %m", etc_vconsoleconf); diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h index 1f274ecf261..5de44d76b42 100644 --- a/src/journal/journald-server.h +++ b/src/journal/journald-server.h @@ -189,7 +189,7 @@ struct Server { #define N_IOVEC_PAYLOAD_FIELDS 15 void server_dispatch_message(Server *s, struct iovec *iovec, size_t n, size_t m, ClientContext *c, const struct timeval *tv, int priority, pid_t object_pid); -void server_driver_message(Server *s, pid_t object_pid, const char *message_id, const char *format, ...) _sentinel_; +void server_driver_message(Server *s, pid_t object_pid, const char *message_id, const char *format, ...) _sentinel_ _printf_(4,0); /* gperf lookup function */ const struct ConfigPerfItem* journald_gperf_lookup(const char *key, GPERF_LEN_TYPE length); diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c index 3d2fdd496cb..aebfc388634 100644 --- a/src/machine/image-dbus.c +++ b/src/machine/image-dbus.c @@ -295,7 +295,6 @@ int bus_image_method_get_hostname( void *userdata, sd_bus_error *error) { - _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL; Image *image = userdata; int r; diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index a8eab2825c5..b7285e419db 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -957,7 +957,6 @@ static int print_image_machine_id(sd_bus *bus, const char *name) { static int print_image_machine_info(sd_bus *bus, const char *name) { _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL; - _cleanup_strv_free_ char **l = NULL; int r; r = sd_bus_call_method(