mirror of
https://git.sr.ht/~nabijaczleweli/tzpfms
synced 2025-04-11 09:30:02 +03:00
format
This commit is contained in:
parent
44f9b25314
commit
2764c6e0d3
@ -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; });
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user