diff options
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/creds.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c index e9c7c96fc5..c067c886db 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -832,25 +832,12 @@ static int parse_argv(int argc, char *argv[]) { arg_tpm2_device = streq(optarg, "auto") ? NULL : optarg; break; - case ARG_TPM2_PCRS: { - uint32_t mask; - - if (isempty(optarg)) { - arg_tpm2_pcr_mask = 0; - break; - } - - r = tpm2_parse_pcrs(optarg, &mask); + case ARG_TPM2_PCRS: + r = tpm2_parse_pcr_argument(optarg, &arg_tpm2_pcr_mask); if (r < 0) return r; - if (arg_tpm2_pcr_mask == UINT32_MAX) - arg_tpm2_pcr_mask = mask; - else - arg_tpm2_pcr_mask |= mask; - break; - } case ARG_NAME: if (isempty(optarg)) { |