char *mount_path;
char *device_path;
char *filesystem_type;
+ char *options;
gboolean is_read_only;
gboolean is_user_mountable;
gboolean is_loopback;
else
mount_entry->device_path = g_strdup (mntent->mnt_fsname);
mount_entry->filesystem_type = g_strdup (mntent->mnt_type);
+ mount_entry->options = g_strdup (mntent->mnt_opts);
#ifdef HAVE_HASMNTOPT
if (hasmntopt (mntent, MNTOPT_RO) != NULL)
mount_entry->mount_path = g_strdup (mntent.mnt_mountp);
mount_entry->device_path = g_strdup (mntent.mnt_special);
mount_entry->filesystem_type = g_strdup (mntent.mnt_fstype);
+ mount_entry->options = g_strdup (mntent.mnt_mntopts);
#ifdef HAVE_HASMNTOPT
if (hasmntopt (&mntent, MNTOPT_RO) != NULL)
mount_entry->mount_path = g_strdup (mntent.mnt_mount);
mount_entry->device_path = g_strdup (mntent.mnt_special);
mount_entry->filesystem_type = g_strdup (mntent.mnt_fstype);
+ mount_entry->options = g_strdup (mntent.mnt_options);
mount_entry->is_read_only = TRUE;
mount_entry->is_user_mountable = TRUE;
mount_entry->mount_path = g_strdup (fstab->fs_file);
mount_entry->device_path = g_strdup (fstab->fs_spec);
mount_entry->filesystem_type = g_strdup (fstab->fs_vfstype);
+ mount_entry->options = g_strdup (fstab->fs_mntops);
if (strcmp (fstab->fs_type, "ro") == 0)
mount_entry->is_read_only = TRUE;
g_free (mount_point->mount_path);
g_free (mount_point->device_path);
g_free (mount_point->filesystem_type);
+ g_free (mount_point->options);
g_free (mount_point);
}
if (res != 0)
return res;
+ res = g_strcmp0 (mount1->options, mount2->options);
+ if (res != 0)
+ return res;
+
res = mount1->is_read_only - mount2->is_read_only;
if (res != 0)
return res;
}
/**
+ * g_unix_mount_point_get_options:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Gets the options for the mount point.
+ *
+ * Returns: a string containing the options.
+ *
+ * Since: 2.32
+ */
+const gchar *
+g_unix_mount_point_get_options (GUnixMountPoint *mount_point)
+{
+ g_return_val_if_fail (mount_point != NULL, NULL);
+
+ return mount_point->options;
+}
+
+/**
* g_unix_mount_point_is_readonly:
* @mount_point: a #GUnixMountPoint.
*
const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
+const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point);
gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
gboolean g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point);
gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);