mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add scaffolding for translate API
This commit is contained in:
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user