This commit is contained in:
наб 2025-02-16 16:50:31 +01:00
parent 44f9b25314
commit 2764c6e0d3
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
5 changed files with 4 additions and 7 deletions

View File

@ -8,6 +8,5 @@
int main(int argc, char ** argv) {
return do_clear_main(
argc, argv, THIS_BACKEND, [](auto, auto) { return 0; }, [] { return 0; });
return do_clear_main(argc, argv, THIS_BACKEND, [](auto, auto) { return 0; }, [] { return 0; });
}

View File

@ -133,7 +133,7 @@ static int get_key_material_raw(const char * whom, bool again, bool newkey, uint
if(from_tty) {
// Handle SIGINT and ignore SIGSTP.
// This is necessary to restore the state of the terminal.
struct sigaction act {};
struct sigaction act{};
sigemptyset(&act.sa_mask);
caught_interrupt = 0;

View File

@ -64,8 +64,7 @@ static int do_bare_main(
}
template <class G, class M, class V = int (*)()>
static int do_main(
int argc, char ** argv, const char * getoptions, const char * usage, G && getoptfn, M && main, V && validate = [] { return 0; }) {
static int do_main(int argc, char ** argv, const char * getoptions, const char * usage, G && getoptfn, M && main, V && validate = [] { return 0; }) {
return do_bare_main(
// as-in argument in a usage string
argc, argv, getoptions, usage, gettext_noop("dataset"), getoptfn,

View File

@ -32,7 +32,6 @@ template <class F>
int with_tpm1x_session(F && func) {
mlockall(MCL_CURRENT | MCL_FUTURE);
TSS_HCONTEXT ctx{}; // All memory lives as long as this does
TRY_TPM1X("create TPM context", Tspi_Context_Create(&ctx));

View File

@ -6,10 +6,10 @@
#include "common.hpp"
#include <sys/mman.h>
#include <tss2/tss2_common.h>
#include <tss2/tss2_esys.h>
#include <tss2/tss2_rc.h>
#include <sys/mman.h>
#define TRY_TPM2(what, ...) TRY_GENERIC(what, , != TPM2_RC_SUCCESS, _try_ret, __LINE__, Tss2_RC_Decode, __VA_ARGS__)