]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: trivial cleanups for start_systemd_journal_remote()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 May 2024 02:27:48 +0000 (11:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 May 2024 02:37:24 +0000 (11:37 +0900)
- prefix argument for storing result with 'ret_',
- align arguments for strv_new().

src/vmspawn/vmspawn.c

index 05661961ed096f5420ca2a8c17560de37349f77d..a5666459a34dab1289eb6b5102114add62fab554 100644 (file)
@@ -929,7 +929,7 @@ static int start_tpm(
         return 0;
 }
 
-static int start_systemd_journal_remote(sd_bus *bus, const char *scope, unsigned port, const char *sd_journal_remote, char **listen_address) {
+static int start_systemd_journal_remote(sd_bus *bus, const char *scope, unsigned port, const char *sd_journal_remote, char **ret_listen_address) {
         _cleanup_free_ char *scope_prefix = NULL;
         _cleanup_(socket_service_pair_done) SocketServicePair ssp = {
                 .socket_type = SOCK_STREAM,
@@ -952,7 +952,8 @@ static int start_systemd_journal_remote(sd_bus *bus, const char *scope, unsigned
         if (r < 0)
                 return log_oom();
 
-        ssp.exec_start = strv_new(sd_journal_remote,
+        ssp.exec_start = strv_new(
+                        sd_journal_remote,
                         "--output", arg_forward_journal,
                         "--split-mode", endswith(arg_forward_journal, ".journal") ? "none" : "host");
         if (!ssp.exec_start)
@@ -962,8 +963,8 @@ static int start_systemd_journal_remote(sd_bus *bus, const char *scope, unsigned
         if (r < 0)
                 return r;
 
-        if (listen_address)
-                *listen_address = TAKE_PTR(ssp.listen_address);
+        if (ret_listen_address)
+                *ret_listen_address = TAKE_PTR(ssp.listen_address);
 
         return 0;
 }