1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <string.h> #include <stdlib.h> /* systemd tpm2-util.h */ int tpm2_find_device_auto(char **ret); extern int tpm2_find_device_auto(char **ret) { const char *path = getenv("TPM_PATH"); if (!path) *ret = NULL; else *ret = strdup(path); return 0; }