From f5215bc8d386bcc995942f7eedc1343a51e9f82f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 15 Sep 2020 18:02:28 +0200 Subject: [PATCH] =?UTF-8?q?dissect:=20rename=20mount=5Foptions=5Ffrom=5Fpa?= =?UTF-8?q?rt()=20=E2=86=92=20mount=5Foptions=5Ffrom=5Fdesignator()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After all, it actually takes a designator argument, not a partition index or so. --- src/shared/dissect-image.c | 14 +++++++------- src/shared/dissect-image.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 15c3f55de0..385b1247d7 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -420,7 +420,7 @@ int dissect_image( m->verity = root_hash && verity_data; m->can_verity = !!verity_data; - options = mount_options_from_part(mount_options, PARTITION_ROOT); + options = mount_options_from_designator(mount_options, PARTITION_ROOT); if (options) { o = strdup(options); if (!o) @@ -716,7 +716,7 @@ int dissect_image( if (!n) return -ENOMEM; - options = mount_options_from_part(mount_options, designator); + options = mount_options_from_designator(mount_options, designator); if (options) { o = strdup(options); if (!o) @@ -773,7 +773,7 @@ int dissect_image( if (!n) return -ENOMEM; - options = mount_options_from_part(mount_options, PARTITION_XBOOTLDR); + options = mount_options_from_designator(mount_options, PARTITION_XBOOTLDR); if (options) { o = strdup(options); if (!o) @@ -827,7 +827,7 @@ int dissect_image( if (multiple_generic) return -ENOTUNIQ; - options = mount_options_from_part(mount_options, PARTITION_ROOT); + options = mount_options_from_designator(mount_options, PARTITION_ROOT); if (options) { o = strdup(options); if (!o) @@ -2068,10 +2068,10 @@ MountOptions* mount_options_free_all(MountOptions *options) { return NULL; } -const char* mount_options_from_part(const MountOptions *options, int designator) { - MountOptions *m; +const char* mount_options_from_designator(const MountOptions *options, int designator) { + const MountOptions *m; - LIST_FOREACH(mount_options, m, (MountOptions *)options) + LIST_FOREACH(mount_options, m, options) if (designator == m->partition_designator && !isempty(m->options)) return m->options; diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h index 96f9840400..9666488c27 100644 --- a/src/shared/dissect-image.h +++ b/src/shared/dissect-image.h @@ -94,7 +94,7 @@ struct MountOptions { MountOptions* mount_options_free_all(MountOptions *options); DEFINE_TRIVIAL_CLEANUP_FUNC(MountOptions*, mount_options_free_all); -const char* mount_options_from_part(const MountOptions *options, int designator); +const char* mount_options_from_designator(const MountOptions *options, int designator); int probe_filesystem(const char *node, char **ret_fstype); int dissect_image(int fd, const void *root_hash, size_t root_hash_size, const char *verity_data, const MountOptions *mount_options, DissectImageFlags flags, DissectedImage **ret);