summaryrefslogtreecommitdiffstats
path: root/src/shared/dissect-image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/dissect-image.c')
-rw-r--r--src/shared/dissect-image.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index b20e21cce2..9636fd8d48 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -3156,6 +3156,20 @@ finish:
return r;
}
+Architecture dissected_image_architecture(DissectedImage *img) {
+ assert(img);
+
+ if (img->partitions[PARTITION_ROOT].found &&
+ img->partitions[PARTITION_ROOT].architecture >= 0)
+ return img->partitions[PARTITION_ROOT].architecture;
+
+ if (img->partitions[PARTITION_USR].found &&
+ img->partitions[PARTITION_USR].architecture >= 0)
+ return img->partitions[PARTITION_USR].architecture;
+
+ return _ARCHITECTURE_INVALID;
+}
+
int dissect_loop_device(
LoopDevice *loop,
const VeritySettings *verity,