summaryrefslogtreecommitdiff
path: root/src/partition/repart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/partition/repart.c')
-rw-r--r--src/partition/repart.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 0c0c0de794..f44e239b37 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -4359,25 +4359,12 @@ static int parse_argv(int argc, char *argv[]) {
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 '?':
return -EINVAL;