summaryrefslogtreecommitdiff
path: root/src/shared/dissect-image.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-06 10:58:26 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-07 20:45:24 +0900
commit64dd3a245f0964b8a15923da68b77e932a40536b (patch)
tree495c49d1d6526226ba28a8fe1507c31994623979 /src/shared/dissect-image.h
parent55a065cd30f303578ce5f8a36bd859763c99ba51 (diff)
downloadsystemd-64dd3a245f0964b8a15923da68b77e932a40536b.tar.gz
dissect-image: use loop backing file or device node as name of the image
Note, currently, for each call of dissect_loop_device_and_warn(), the specified name is equivalent to the path passed to loop_device_make_by_path(). Hence, this should not change the current behavios.
Diffstat (limited to 'src/shared/dissect-image.h')
-rw-r--r--src/shared/dissect-image.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h
index c8d2e6de8f..39af311833 100644
--- a/src/shared/dissect-image.h
+++ b/src/shared/dissect-image.h
@@ -265,9 +265,9 @@ int dissect_image(
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, loop->backing_file, verity, mount_options, loop->diskseq, loop->uevent_seqnum_not_before, loop->timestamp_not_before, flags, ret);
+ return dissect_image(loop->fd, loop->backing_file ?: loop->node, 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);
+int dissect_loop_device_and_warn(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);