diff --git a/src/libsysprof-analyze/sysprof-mount-namespace-private.h b/src/libsysprof-analyze/sysprof-mount-namespace-private.h index 28b110d9..4f4ecd26 100644 --- a/src/libsysprof-analyze/sysprof-mount-namespace-private.h +++ b/src/libsysprof-analyze/sysprof-mount-namespace-private.h @@ -39,7 +39,5 @@ void sysprof_mount_namespace_add_mount (SysprofMountNamespa SysprofMount *mount); char **sysprof_mount_namespace_translate (SysprofMountNamespace *self, const char *path); -GMappedFile *sysprof_mount_namespace_open (SysprofMountNamespace *self, - const char *path); G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-mount-namespace.c b/src/libsysprof-analyze/sysprof-mount-namespace.c index c096aebf..8e556d39 100644 --- a/src/libsysprof-analyze/sysprof-mount-namespace.c +++ b/src/libsysprof-analyze/sysprof-mount-namespace.c @@ -146,3 +146,30 @@ sysprof_mount_namespace_add_mount (SysprofMountNamespace *self, g_ptr_array_add (self->mounts, mount); } + +/** + * sysprof_mount_namespace_translate: + * @self: a #SysprofMountNamespace + * @file: the path within the mount namespace to translate + * + * Attempts to translate a path within the mount namespace into a + * path available in our current mount namespace. + * + * As overlays are involved, multiple paths may be returned which + * could contain the target file. You should check these starting + * from the first element in the resulting array to the last. + * + * Returns: (transfer full) (nullable): a UTF-8 encoded string array + * if successful; otherwise %NULL and @error is set. + */ +char ** +sysprof_mount_namespace_translate (SysprofMountNamespace *self, + const char *file) +{ + g_return_val_if_fail (SYSPROF_IS_MOUNT_NAMESPACE (self), NULL); + g_return_val_if_fail (file != NULL, NULL); + + /* TODO: */ + + return NULL; +}