summaryrefslogtreecommitdiff
path: root/src/shared/dissect-image.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-02 19:09:51 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-03 01:32:01 +0900
commitbad31660eda404b034d20ea0d4b22ca45009f183 (patch)
tree63902b397a92a24e9404543e352b176efdfba7b1 /src/shared/dissect-image.h
parent062d511776943c26f6952ccfabc4e9f9f8e5a58d (diff)
downloadsystemd-bad31660eda404b034d20ea0d4b22ca45009f183.tar.gz
dissect-image: introduce dissect_loop_device() which takes LoopDevice object
Diffstat (limited to 'src/shared/dissect-image.h')
-rw-r--r--src/shared/dissect-image.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h
index 55bb8a1dad..2e71fda8b4 100644
--- a/src/shared/dissect-image.h
+++ b/src/shared/dissect-image.h
@@ -254,7 +254,11 @@ const char* mount_options_from_designator(const MountOptions *options, Partition
int probe_filesystem(const char *node, char **ret_fstype);
int dissect_image(int fd, const VeritySettings *verity, const MountOptions *mount_options, uint64_t diskseq, uint64_t uevent_seqnum_not_before, usec_t timestamp_not_before, DissectImageFlags flags, DissectedImage **ret);
-int dissect_image_and_warn(int fd, const char *name, const VeritySettings *verity, const MountOptions *mount_options, uint64_t diskseq, uint64_t uevent_seqnum_not_before, usec_t timestamp_not_before, DissectImageFlags flags, DissectedImage **ret);
+static inline int dissect_loop_device(const LoopDevice *loop, const VeritySettings *verity, const MountOptions *mount_options, DissectImageFlags flags, DissectedImage **ret) {
+ assert(loop);
+ return dissect_image(loop->fd, verity, mount_options, loop->diskseq, loop->uevent_seqnum_not_before, loop->timestamp_not_before, flags, ret);
+}
+int dissect_loop_device_and_warn(const char *name, const LoopDevice *loop, const VeritySettings *verity, const MountOptions *mount_options, DissectImageFlags flags, DissectedImage **ret);
DissectedImage* dissected_image_unref(DissectedImage *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(DissectedImage*, dissected_image_unref);