libsysprof-analyze: make SysprofMount public API

And expose it via sysprof_document_process_list_mounts() so that when
inspecting processes we can see what binaries were mapped as well as what
the filesystem looked like to locate those mapped paths.
This commit is contained in:
Christian Hergert
2023-05-11 14:37:02 -07:00
parent 352fa617c0
commit 7c37120edf
8 changed files with 138 additions and 22 deletions

View File

@ -20,27 +20,12 @@
#pragma once
#include <glib-object.h>
#include "sysprof-mount.h"
#include "sysprof-strings-private.h"
G_BEGIN_DECLS
#define SYSPROF_TYPE_MOUNT (sysprof_mount_get_type())
G_DECLARE_FINAL_TYPE (SysprofMount, sysprof_mount, SYSPROF, MOUNT, GObject)
SysprofMount *sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
const char *mountinfo);
int sysprof_mount_get_device_major (SysprofMount *self);
int sysprof_mount_get_device_minor (SysprofMount *self);
int sysprof_mount_get_mount_id (SysprofMount *self);
int sysprof_mount_get_parent_mount_id (SysprofMount *self);
const char *sysprof_mount_get_root (SysprofMount *self);
const char *sysprof_mount_get_mount_point (SysprofMount *self);
const char *sysprof_mount_get_mount_source (SysprofMount *self);
const char *sysprof_mount_get_filesystem_type (SysprofMount *self);
const char *sysprof_mount_get_superblock_option (SysprofMount *self,
const char *option);
SysprofMount *sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
const char *mountinfo);
G_END_DECLS