summaryrefslogtreecommitdiffstats
path: root/tests/fake_systemd_tpm_path.c
blob: 3dff7183eb6a2964b2589f6b91c12e1195048fc5 (plain)
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;
}