File: fake_systemd_tpm_path.c

package info (click to toggle)
cryptsetup 2%3A2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,356 kB
  • sloc: ansic: 65,885; sh: 17,691; cpp: 994; xml: 920; makefile: 495; perl: 486
file content (19 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// SPDX-License-Identifier: GPL-2.0-or-later

#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;
}