On Fri, Jul 02 2021, Lénaïc Huard wrote:
[nits]
+#ifdef __linux__
+
+static int real_is_systemd_timer_available(void)
+{
+ struct child_process child = CHILD_PROCESS_INIT;
+
+ strvec_pushl(&child.args, "systemctl", "--user", "list-timers", NULL);
+ child.no_stdin = 1;
+ child.no_stdout = 1;
+ child.no_stderr = 1;
+ child.silent_exec_failure = 1;
+
+ if (start_command(&child))
+ return 0;
+ if (finish_command(&child))
+ return 0;
+ return 1;
+}
+
+#else
+
+static int real_is_systemd_timer_available(void)
+{
+ return 0;
+}
+
+#endif
Ditto the Apple macro, i.e. if most/all of the code complies better to
just compile it on all platforms.
In 2/3 we have:
+struct maintenance_start_opts {
+ enum scheduler scheduler;
+};
It's not mentioned (perhaps discussed in previous rounds) but I assumed
the struct would grow in 3/3, but it didn't. Why not pass "enum
scheduler " around directly?