mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
libsysprof-analyze: give mount access to strings in ctor
This commit is contained in:
@ -354,9 +354,13 @@ sysprof_document_load_mountinfo (SysprofDocument *self,
|
|||||||
|
|
||||||
line[line_len] = 0;
|
line[line_len] = 0;
|
||||||
|
|
||||||
if ((mount = sysprof_mount_new_for_mountinfo (line)))
|
if ((mount = sysprof_mount_new_for_mountinfo (self->strings, line)))
|
||||||
sysprof_mount_namespace_add_mount (mount_namespace, g_steal_pointer (&mount));
|
sysprof_mount_namespace_add_mount (mount_namespace, g_steal_pointer (&mount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_hash_table_insert (self->pid_to_mountinfo,
|
||||||
|
GINT_TO_POINTER (pid),
|
||||||
|
g_steal_pointer (&mount_namespace));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -22,20 +22,23 @@
|
|||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#include "sysprof-strings-private.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SYSPROF_TYPE_MOUNT (sysprof_mount_get_type())
|
#define SYSPROF_TYPE_MOUNT (sysprof_mount_get_type())
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (SysprofMount, sysprof_mount, SYSPROF, MOUNT, GObject)
|
G_DECLARE_FINAL_TYPE (SysprofMount, sysprof_mount, SYSPROF, MOUNT, GObject)
|
||||||
|
|
||||||
SysprofMount *sysprof_mount_new_for_mountinfo (const char *mountinfo);
|
SysprofMount *sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
|
||||||
int sysprof_mount_get_device_major (SysprofMount *self);
|
const char *mountinfo);
|
||||||
int sysprof_mount_get_device_minor (SysprofMount *self);
|
int sysprof_mount_get_device_major (SysprofMount *self);
|
||||||
const char *sysprof_mount_get_root (SysprofMount *self);
|
int sysprof_mount_get_device_minor (SysprofMount *self);
|
||||||
const char *sysprof_mount_get_mount_path (SysprofMount *self);
|
const char *sysprof_mount_get_root (SysprofMount *self);
|
||||||
const char *sysprof_mount_get_mount_source (SysprofMount *self);
|
const char *sysprof_mount_get_mount_path (SysprofMount *self);
|
||||||
const char *sysprof_mount_get_filesystem_type (SysprofMount *self);
|
const char *sysprof_mount_get_mount_source (SysprofMount *self);
|
||||||
const char *sysprof_mount_get_superblock_option (SysprofMount *self,
|
const char *sysprof_mount_get_filesystem_type (SysprofMount *self);
|
||||||
const char *option);
|
const char *sysprof_mount_get_superblock_option (SysprofMount *self,
|
||||||
|
const char *option);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -149,7 +149,8 @@ sysprof_mount_init (SysprofMount *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SysprofMount *
|
SysprofMount *
|
||||||
sysprof_mount_new_for_mountinfo (const char *mountinfo)
|
sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
|
||||||
|
const char *mountinfo)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user