chiark / gitweb /
util.c: use read_one_line_file where possible
[elogind.git] / src / core / main.c
index 5189833e48bc8a37cea302a426ad86cce0d2253d..d052c8debc79ce281530ee7ce151b563fa870c11 100644 (file)
@@ -166,7 +166,7 @@ noreturn static void crash(int sig) {
                         else if (status.si_code != CLD_DUMPED)
                                 log_error("Caught <%s>, core dump failed.", signal_to_string(sig));
                         else
-                                log_error("Caught <%s>, dumped core as pid %lu.", signal_to_string(sig), (unsigned long) pid);
+                                log_error("Caught <%s>, dumped core as pid "PID_FMT".", signal_to_string(sig), pid);
                 }
         }
 
@@ -197,7 +197,7 @@ noreturn static void crash(int sig) {
                         _exit(1);
                 }
 
-                log_info("Successfully spawned crash shell as pid %lu.", (unsigned long) pid);
+                log_info("Successfully spawned crash shell as pid "PID_FMT".", pid);
         }
 
         log_info("Freezing execution.");
@@ -462,7 +462,6 @@ DEFINE_SETTER(config_parse_target, log_set_target_from_string, "target")
 DEFINE_SETTER(config_parse_color, log_show_color_from_string, "color" )
 DEFINE_SETTER(config_parse_location, log_show_location_from_string, "location")
 
-
 static int config_parse_cpu_affinity2(const char *unit,
                                       const char *filename,
                                       unsigned line,
@@ -1866,7 +1865,7 @@ finish:
                         watchdog_close(false);
 
                         /* Tell the binary how often to ping */
-                        snprintf(e, sizeof(e), "WATCHDOG_USEC=%llu", (unsigned long long) arg_shutdown_watchdog);
+                        snprintf(e, sizeof(e), "WATCHDOG_USEC="USEC_FMT, arg_shutdown_watchdog);
                         char_array_0(e);
 
                         env_block = strv_append(environ, e);