mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 02:40:01 +01:00
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.
20 lines
311 B
C
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;
|
|
}
|