diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 27c93198ab..27262814a3 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -633,7 +633,7 @@ static void check_partition_flags( } #endif -static int make_image_name(const char *path, char **ret) { +int dissected_image_name_from_path(const char *path, char **ret) { int r; assert(path); @@ -668,7 +668,7 @@ static int dissected_image_new(const char *path, DissectedImage **ret) { assert(ret); if (path) { - r = make_image_name(path, &name); + r = dissected_image_name_from_path(path, &name); if (r < 0) return r; } @@ -5310,7 +5310,7 @@ int mountfsd_mount_image( return r; if (!di->image_name) { - r = make_image_name(path, &di->image_name); + r = dissected_image_name_from_path(path, &di->image_name); if (r < 0) return r; } diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h index dfafa623f9..aa8c6a2737 100644 --- a/src/shared/dissect-image.h +++ b/src/shared/dissect-image.h @@ -177,6 +177,7 @@ int dissected_image_mount(DissectedImage *m, const char *where, uid_t uid_shift, int dissected_image_mount_and_warn(DissectedImage *m, const char *where, uid_t uid_shift, uid_t uid_range, int userns_fd, DissectImageFlags flags); int dissected_image_acquire_metadata(DissectedImage *m, int userns_fd, DissectImageFlags extra_flags); +int dissected_image_name_from_path(const char *path, char **ret); Architecture dissected_image_architecture(DissectedImage *m);