/* Returns: 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively.  */
gint g_unix_mount_compare(GUnixMountEntry *mount1, GUnixMountEntry *mount2)
/* Returns: 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively.  */
gint g_unix_mount_compare(GUnixMountEntry *mount1, GUnixMountEntry *mount2)
{
  int res;
  g_return_val_if_fail (mount1 != NULL && mount2 != NULL, 0);
  res = g_strcmp0 (mount1->mount_path, mount2->mount_path);
  if (res != 0)
    return res;
  res = g_strcmp0 (mount1->device_path, mount2->device_path);
  if (res != 0)
    return res;
  res = g_strcmp0 (mount1->filesystem_type, mount2->filesystem_type);
  if (res != 0)
    return res;
  res =  mount1->is_read_only - mount2->is_read_only;
  if (res != 0)
    return res;
  return 0;
}