libsysprof-analyze: rename mount-path to mount-point

We want to be consistent with SysprofMount in naming.
This commit is contained in:
Christian Hergert
2023-05-19 10:01:02 -07:00
parent d448519c29
commit 7db4540f9a
4 changed files with 27 additions and 25 deletions

View File

@ -324,7 +324,7 @@ sysprof_document_load_mounts (SysprofDocument *self)
mount_device = sysprof_mount_device_new (); mount_device = sysprof_mount_device_new ();
sysprof_mount_device_set_id (mount_device, device); sysprof_mount_device_set_id (mount_device, device);
sysprof_mount_device_set_mount_path (mount_device, mountpoint); sysprof_mount_device_set_mount_point (mount_device, mountpoint);
sysprof_mount_device_set_subvolume (mount_device, subvol); sysprof_mount_device_set_subvolume (mount_device, subvol);
sysprof_mount_namespace_add_device (self->mount_namespace, g_steal_pointer (&mount_device)); sysprof_mount_namespace_add_device (self->mount_namespace, g_steal_pointer (&mount_device));
} }

View File

@ -32,9 +32,9 @@ SysprofMountDevice *sysprof_mount_device_new (void);
const char *sysprof_mount_device_get_id (SysprofMountDevice *self); const char *sysprof_mount_device_get_id (SysprofMountDevice *self);
void sysprof_mount_device_set_id (SysprofMountDevice *self, void sysprof_mount_device_set_id (SysprofMountDevice *self,
const char *id); const char *id);
const char *sysprof_mount_device_get_mount_path (SysprofMountDevice *self); const char *sysprof_mount_device_get_mount_point (SysprofMountDevice *self);
void sysprof_mount_device_set_mount_path (SysprofMountDevice *self, void sysprof_mount_device_set_mount_point (SysprofMountDevice *self,
const char *mount_path); const char *mount_point);
const char *sysprof_mount_device_get_subvolume (SysprofMountDevice *self); const char *sysprof_mount_device_get_subvolume (SysprofMountDevice *self);
void sysprof_mount_device_set_subvolume (SysprofMountDevice *self, void sysprof_mount_device_set_subvolume (SysprofMountDevice *self,
const char *subvolume); const char *subvolume);

View File

@ -26,14 +26,14 @@ struct _SysprofMountDevice
{ {
GObject parent_instance; GObject parent_instance;
char *id; char *id;
char *mount_path; char *mount_point;
char *subvolume; char *subvolume;
}; };
enum { enum {
PROP_0, PROP_0,
PROP_ID, PROP_ID,
PROP_MOUNT_PATH, PROP_MOUNT_POINT,
PROP_SUBVOLUME, PROP_SUBVOLUME,
N_PROPS N_PROPS
}; };
@ -48,7 +48,7 @@ sysprof_mount_device_finalize (GObject *object)
SysprofMountDevice *self = (SysprofMountDevice *)object; SysprofMountDevice *self = (SysprofMountDevice *)object;
g_clear_pointer (&self->id, g_free); g_clear_pointer (&self->id, g_free);
g_clear_pointer (&self->mount_path, g_free); g_clear_pointer (&self->mount_point, g_free);
g_clear_pointer (&self->subvolume, g_free); g_clear_pointer (&self->subvolume, g_free);
G_OBJECT_CLASS (sysprof_mount_device_parent_class)->finalize (object); G_OBJECT_CLASS (sysprof_mount_device_parent_class)->finalize (object);
@ -68,8 +68,8 @@ sysprof_mount_device_get_property (GObject *object,
g_value_set_string (value, sysprof_mount_device_get_id (self)); g_value_set_string (value, sysprof_mount_device_get_id (self));
break; break;
case PROP_MOUNT_PATH: case PROP_MOUNT_POINT:
g_value_set_string (value, sysprof_mount_device_get_mount_path (self)); g_value_set_string (value, sysprof_mount_device_get_mount_point (self));
break; break;
case PROP_SUBVOLUME: case PROP_SUBVOLUME:
@ -95,8 +95,8 @@ sysprof_mount_device_set_property (GObject *object,
sysprof_mount_device_set_id (self, g_value_get_string (value)); sysprof_mount_device_set_id (self, g_value_get_string (value));
break; break;
case PROP_MOUNT_PATH: case PROP_MOUNT_POINT:
sysprof_mount_device_set_mount_path (self, g_value_get_string (value)); sysprof_mount_device_set_mount_point (self, g_value_get_string (value));
break; break;
case PROP_SUBVOLUME: case PROP_SUBVOLUME:
@ -122,7 +122,7 @@ sysprof_mount_device_class_init (SysprofMountDeviceClass *klass)
NULL, NULL,
(G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
properties [PROP_MOUNT_PATH] = properties [PROP_MOUNT_POINT] =
g_param_spec_string ("mount-path", NULL, NULL, g_param_spec_string ("mount-path", NULL, NULL,
NULL, NULL,
(G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
@ -165,21 +165,21 @@ sysprof_mount_device_set_id (SysprofMountDevice *self,
} }
const char * const char *
sysprof_mount_device_get_mount_path (SysprofMountDevice *self) sysprof_mount_device_get_mount_point (SysprofMountDevice *self)
{ {
g_return_val_if_fail (SYSPROF_IS_MOUNT_DEVICE (self), NULL); g_return_val_if_fail (SYSPROF_IS_MOUNT_DEVICE (self), NULL);
return self->mount_path; return self->mount_point;
} }
void void
sysprof_mount_device_set_mount_path (SysprofMountDevice *self, sysprof_mount_device_set_mount_point (SysprofMountDevice *self,
const char *mount_path) const char *mount_point)
{ {
g_return_if_fail (SYSPROF_IS_MOUNT_DEVICE (self)); g_return_if_fail (SYSPROF_IS_MOUNT_DEVICE (self));
if (g_set_str (&self->mount_path, mount_path)) if (g_set_str (&self->mount_point, mount_point))
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MOUNT_PATH]); g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MOUNT_POINT]);
} }
const char * const char *

View File

@ -27,5 +27,7 @@ G_BEGIN_DECLS
SysprofMount *_sysprof_mount_new_for_mountinfo (SysprofStrings *strings, SysprofMount *_sysprof_mount_new_for_mountinfo (SysprofStrings *strings,
const char *mountinfo); const char *mountinfo);
gboolean _sysprof_mount_contains_path (SysprofMount *self,
const char *path);
G_END_DECLS G_END_DECLS