return 0;
}
-static int start_tpm(sd_bus *bus, const char *scope, const char *tpm, const char **ret_state_tempdir) {
+static int start_tpm(
+ sd_bus *bus,
+ const char *scope,
+ const char *swtpm,
+ char **ret_state_tempdir) {
+
_cleanup_(rm_rf_physical_and_freep) char *state_dir = NULL;
_cleanup_free_ char *scope_prefix = NULL;
_cleanup_(socket_service_pair_done) SocketServicePair ssp = {
assert(bus);
assert(scope);
- assert(tpm);
+ assert(swtpm);
assert(ret_state_tempdir);
r = unit_name_to_prefix(scope, &scope_prefix);
if (!ssp.listen_address)
return log_oom();
- ssp.exec_start = strv_new(tpm, "socket", "--tpm2", "--tpmstate");
+ ssp.exec_start = strv_new(swtpm, "socket", "--tpm2", "--tpmstate");
if (!ssp.exec_start)
return log_oom();
return r;
*ret_state_tempdir = TAKE_PTR(state_dir);
-
return 0;
}
}
}
- _cleanup_free_ const char *tpm_state_tempdir = NULL;
+ _cleanup_free_ char *tpm_state_tempdir = NULL;
if (swtpm) {
_cleanup_free_ char *escaped_state_dir = NULL;