dbus-wait-for-jobs: add extra_args to bus_wait_for_jobs_one()
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 30 Dec 2021 00:53:29 +0000 (00:53 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 30 Dec 2021 14:50:45 +0000 (23:50 +0900)
And pass it through to bus_wait_for_jobs()

src/mount/mount-tool.c
src/nspawn/nspawn-register.c
src/run/run.c
src/shared/bus-wait-for-jobs.c
src/shared/bus-wait-for-jobs.h
src/shared/tests.c

index b0ea45debc27ff5b6a6ac2fdcb39df2e1632af21..dd0afc6e1111388334863eb04aa9a1367f78106a 100644 (file)
@@ -601,7 +601,7 @@ static int start_transient_mount(
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                r = bus_wait_for_jobs_one(w, object, arg_quiet);
+                r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
                 if (r < 0)
                         return r;
         }
@@ -710,7 +710,7 @@ static int start_transient_automount(
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                r = bus_wait_for_jobs_one(w, object, arg_quiet);
+                r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
                 if (r < 0)
                         return r;
         }
@@ -875,7 +875,7 @@ static int stop_mount(
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                r = bus_wait_for_jobs_one(w, object, arg_quiet);
+                r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
                 if (r < 0)
                         return r;
         }
index 2e6c12b3b7e64c08af6bdb11f1c1f9be5ac0b1e0..c78bead4a4bc35c3953f676165c4fdefcce9006d 100644 (file)
@@ -313,7 +313,7 @@ int allocate_scope(
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        r = bus_wait_for_jobs_one(w, object, false);
+        r = bus_wait_for_jobs_one(w, object, false, NULL);
         if (r < 0)
                 return r;
 
index 42c4e1b46b53323a054877129f103f8094c68434..92c19b6a327d9323614dab28b4947a6c0a93c8b7 100644 (file)
@@ -1229,7 +1229,7 @@ static int start_transient_service(
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                r = bus_wait_for_jobs_one(w, object, arg_quiet);
+                r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
                 if (r < 0)
                         return r;
         }
@@ -1465,7 +1465,7 @@ static int start_transient_scope(sd_bus *bus) {
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        r = bus_wait_for_jobs_one(w, object, arg_quiet);
+        r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
         if (r < 0)
                 return r;
 
@@ -1685,7 +1685,7 @@ static int start_transient_trigger(
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        r = bus_wait_for_jobs_one(w, object, arg_quiet);
+        r = bus_wait_for_jobs_one(w, object, arg_quiet, NULL);
         if (r < 0)
                 return r;
 
index e4a3ab9a956b5a90ded066c82042387a3039cf5f..0cd47d578703674a88a7e4c68ac03eaa071633a0 100644 (file)
@@ -323,12 +323,12 @@ int bus_wait_for_jobs_add(BusWaitForJobs *d, const char *path) {
         return set_put_strdup(&d->jobs, path);
 }
 
-int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet) {
+int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet, const char* const* extra_args) {
         int r;
 
         r = bus_wait_for_jobs_add(d, path);
         if (r < 0)
                 return log_oom();
 
-        return bus_wait_for_jobs(d, quiet, NULL);
+        return bus_wait_for_jobs(d, quiet, extra_args);
 }
index 68c9d604ad2b7d6c569e67ea1388c51e4c08cb02..5acf8b9241d0b82ab97f93b55031310feb8ba03c 100644 (file)
@@ -11,6 +11,6 @@ int bus_wait_for_jobs_new(sd_bus *bus, BusWaitForJobs **ret);
 BusWaitForJobs* bus_wait_for_jobs_free(BusWaitForJobs *d);
 int bus_wait_for_jobs_add(BusWaitForJobs *d, const char *path);
 int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet, const char* const* extra_args);
-int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet);
+int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet, const char* const* extra_args);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(BusWaitForJobs*, bus_wait_for_jobs_free);
index 175b6d5499c83ed4a6b454ac9e79808436dcb268..b00006b41a24a690f9de9a6549d326d26722e3cd 100644 (file)
@@ -247,7 +247,7 @@ static int allocate_scope(void) {
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        r = bus_wait_for_jobs_one(w, object, false);
+        r = bus_wait_for_jobs_one(w, object, false, NULL);
         if (r < 0)
                 return r;