From: Daan De Meyer Date: Thu, 24 Nov 2022 09:05:32 +0000 (+0100) Subject: repart: Inline Partition and Context typedefs X-Git-Tag: v253-rc1~344^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=448cfb7f3763a50ef2e911668d45d3f215f8be16;p=thirdparty%2Fsystemd.git repart: Inline Partition and Context typedefs --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 26f1519edcf..e3d9e4f6610 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -158,9 +158,7 @@ STATIC_DESTRUCTOR_REGISTER(arg_tpm2_device, freep); STATIC_DESTRUCTOR_REGISTER(arg_tpm2_public_key, freep); STATIC_DESTRUCTOR_REGISTER(arg_filter_partitions, freep); -typedef struct Partition Partition; typedef struct FreeArea FreeArea; -typedef struct Context Context; typedef enum EncryptMode { ENCRYPT_OFF, @@ -180,7 +178,7 @@ typedef enum VerityMode { _VERITY_MODE_INVALID = -EINVAL, } VerityMode; -struct Partition { +typedef struct Partition { char *definition_path; char **drop_in_files; @@ -236,10 +234,10 @@ struct Partition { char *split_name_format; char *split_path; - Partition *siblings[_VERITY_MODE_MAX]; + struct Partition *siblings[_VERITY_MODE_MAX]; - LIST_FIELDS(Partition, partitions); -}; + LIST_FIELDS(struct Partition, partitions); +} Partition; #define PARTITION_IS_FOREIGN(p) (!(p)->definition_path) #define PARTITION_EXISTS(p) (!!(p)->current_partition) @@ -250,7 +248,7 @@ struct FreeArea { uint64_t allocated; }; -struct Context { +typedef struct Context { LIST_HEAD(Partition, partitions); size_t n_partitions; @@ -269,7 +267,7 @@ struct Context { int backing_fd; bool from_scratch; -}; +} Context; static const char *encrypt_mode_table[_ENCRYPT_MODE_MAX] = { [ENCRYPT_OFF] = "off",