libsysprof-analyze: treat overlay as SysprofMount

This creates a synthesized SysprofMount for the overlays so that we can
process them as we walk the other mounts.
This commit is contained in:
Christian Hergert
2023-05-22 18:36:27 -07:00
parent 754e5df789
commit 1469e8691a
5 changed files with 75 additions and 51 deletions

View File

@ -25,8 +25,28 @@
G_BEGIN_DECLS
struct _SysprofMount
{
GObject parent_instance;
int mount_id;
int parent_mount_id;
int device_major;
int device_minor;
GRefString *root;
GRefString *mount_point;
GRefString *mount_source;
GRefString *filesystem_type;
GRefString *superblock_options;
guint is_overlay : 1;
guint layer : 15;
};
SysprofMount *_sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
const char *mountinfo);
SysprofMount *_sysprof_mount_new_for_overlay (SysprofStrings *strings,
const char *mount_point,
const char *host_path,
int layer);
const char *_sysprof_mount_get_relative_path (SysprofMount *self,
const char *path);