tree-wide: use 'Architecture' type consistently across the tree

Some parts of our tree used 'Architecture' for storing architectures,
others used ints. Let's unify on the former.

Inspired by #22952's rework of the 'Virtualization' enum.
This commit is contained in:
Lennart Poettering
2022-04-05 02:19:37 +09:00
committed by Yu Watanabe
parent 9858e6d2e7
commit 6b41a7b281
9 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -490,7 +490,7 @@ static int condition_test_virtualization(Condition *c, char **env) {
}
static int condition_test_architecture(Condition *c, char **env) {
int a, b;
Architecture a, b;
assert(c);
assert(c->parameter);
+2 -2
View File
@@ -612,7 +612,7 @@ static void dissected_partition_done(DissectedPartition *p) {
*p = (DissectedPartition) {
.partno = -1,
.architecture = -1
.architecture = _ARCHITECTURE_INVALID,
};
}
@@ -917,7 +917,7 @@ int dissect_image(
if (is_gpt) {
PartitionDesignator designator = _PARTITION_DESIGNATOR_INVALID;
int architecture = _ARCHITECTURE_INVALID;
Architecture architecture = _ARCHITECTURE_INVALID;
const char *stype, *sid, *fstype = NULL, *label;
sd_id128_t type_id, id;
bool rw = true, growfs = false;
+3 -3
View File
@@ -20,9 +20,9 @@ struct DissectedPartition {
bool found:1;
bool rw:1;
bool growfs:1;
int partno; /* -1 if there was no partition and the images contains a file system directly */
int architecture; /* Intended architecture: either native, secondary or unset (-1). */
sd_id128_t uuid; /* Partition entry UUID as reported by the GPT */
int partno; /* -1 if there was no partition and the images contains a file system directly */
Architecture architecture; /* Intended architecture: either native, secondary or unset ARCHITECTURE_INVALID. */
sd_id128_t uuid; /* Partition entry UUID as reported by the GPT */
char *fstype;
char *node;
char *label;