diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-02-11 03:17:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 03:17:47 +0900 |
commit | fa7924db0bd836e30021c9b2c0480f0beb1a85d6 (patch) | |
tree | 140ee965dbe69032363640110dec3fe8089d379f /src/cryptenroll/cryptenroll.h | |
parent | 2de908aead1182e07851e05b9f31759fe445e4f5 (diff) | |
parent | 23ece765cc771f1fe0d4798843edb0ec24ae179c (diff) | |
download | systemd-fa7924db0bd836e30021c9b2c0480f0beb1a85d6.tar.gz |
Merge pull request #11484 from keszybz/udevadm-error-logs
Use real return codes in _from_string() functions
Diffstat (limited to 'src/cryptenroll/cryptenroll.h')
-rw-r--r-- | src/cryptenroll/cryptenroll.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptenroll/cryptenroll.h b/src/cryptenroll/cryptenroll.h index f8b81f17a5..b28d9db990 100644 --- a/src/cryptenroll/cryptenroll.h +++ b/src/cryptenroll/cryptenroll.h @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once +#include <errno.h> + typedef enum EnrollType { ENROLL_PASSWORD, ENROLL_RECOVERY, @@ -8,7 +10,7 @@ typedef enum EnrollType { ENROLL_FIDO2, ENROLL_TPM2, _ENROLL_TYPE_MAX, - _ENROLL_TYPE_INVALID = -1, + _ENROLL_TYPE_INVALID = -EINVAL, } EnrollType; typedef enum WipeScope { @@ -16,7 +18,7 @@ typedef enum WipeScope { WIPE_ALL, /* wipe all slots */ WIPE_EMPTY_PASSPHRASE, /* wipe slots with empty passphrases plus listed slots */ _WIPE_SCOPE_MAX, - _WIPE_SCOPE_INVALID = -1, + _WIPE_SCOPE_INVALID = -EINVAL, } WipeScope; const char* enroll_type_to_string(EnrollType t); |