summaryrefslogtreecommitdiff
path: root/src/shared/dissect-image.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-09 18:39:15 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-20 20:00:09 +0100
commit9b6deb03fcb358d6987ce86fcad08e2e290ee5d0 (patch)
tree04585a62a61a27df1de280a8aecef2ef485eb25d /src/shared/dissect-image.h
parent6f4e2f97d738e720ae843cef67cf83e350aa7667 (diff)
downloadsystemd-9b6deb03fcb358d6987ce86fcad08e2e290ee5d0.tar.gz
systemd-9b6deb03fcb358d6987ce86fcad08e2e290ee5d0.tar.bz2
systemd-9b6deb03fcb358d6987ce86fcad08e2e290ee5d0.zip
dissect: optionally, only look for GPT partition tables, nothing else
This is useful for reusing the dissector logic in the gpt-auto-discovery logic: there we really don't want to use MBR or naked file systems as root device.
Diffstat (limited to 'src/shared/dissect-image.h')
-rw-r--r--src/shared/dissect-image.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h
index 175ddd8ea0..b424dac665 100644
--- a/src/shared/dissect-image.h
+++ b/src/shared/dissect-image.h
@@ -67,6 +67,7 @@ typedef enum DissectImageFlags {
DISSECT_IMAGE_DISCARD_ANY = DISSECT_IMAGE_DISCARD_ON_LOOP |
DISSECT_IMAGE_DISCARD |
DISSECT_IMAGE_DISCARD_ON_CRYPTO,
+ DISSECT_IMAGE_GPT_ONLY = 16, /* Only recognize images with GPT partition tables */
} DissectImageFlags;
struct DissectedImage {
@@ -76,7 +77,7 @@ struct DissectedImage {
DissectedPartition partitions[_PARTITION_DESIGNATOR_MAX];
};
-int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectedImage **ret);
+int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectImageFlags flags, DissectedImage **ret);
DissectedImage* dissected_image_unref(DissectedImage *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(DissectedImage*, dissected_image_unref);