Files
cryptsetup/tests/fake_systemd_tpm_path.c
Milan Broz 661f57def4 Use SPDX license identifiers.
This patch switches code to SPDX one-line license identifiers according to
https://spdx.dev/learn/handling-license-info/
and replacing long license text headers.

I used C++ format on the first line in style
// SPDX-License-Identifier: <id>
except exported libcryptsetup.h, when only C comments are used.

The only additional changes are:
- switch backend utf8.c from LGPL2+ to LGPL2.1+ (as in systemd)
- add some additional formatting lines.
2024-06-03 16:38:15 +00:00

20 lines
311 B
C

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