[libosinfo PATCH 04/11] os: Group get_*_resources() together

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Fabiano Fidêncio <fabiano@xxxxxxxxxxxx>
---
 osinfo/osinfo_os.c | 65 +++++++++++++++++++++++++++---------------------------
 1 file changed, 32 insertions(+), 33 deletions(-)

diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
index 86e726f..c396565 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -741,28 +741,6 @@ void osinfo_os_add_variant(OsinfoOs *os, OsinfoOsVariant *variant)
     osinfo_list_add(OSINFO_LIST(os->priv->variants), OSINFO_ENTITY(variant));
 }
 
-/**
- * osinfo_os_get_minimum_resources_without_inheritance:
- * @os: an operating system
- *
- * Get the list of minimum required resources for the operating system @os.
- *
- * Mind that this method is *private*!
- *
- * Returns: (transfer full): A list of resources
- */
-OsinfoResourcesList *
-osinfo_os_get_minimum_resources_without_inheritance(OsinfoOs *os)
-{
-    g_return_val_if_fail(OSINFO_IS_OS(os), NULL);
-
-    OsinfoResourcesList *newList = osinfo_resourceslist_new();
-
-    osinfo_list_add_all(OSINFO_LIST(newList), OSINFO_LIST(os->priv->minimum));
-
-    return newList;
-}
-
 struct GetAllResourcesData {
     OsinfoOs *os;
     OsinfoResourcesList *resourceslist;
@@ -862,6 +840,27 @@ osinfo_os_get_resources_internal(OsinfoOs *os,
     return foreach_data.resourceslist;
 }
 
+/**
+ * osinfo_os_get_minimum_resources_without_inheritance:
+ * @os: an operating system
+ *
+ * Get the list of minimum required resources for the operating system @os.
+ *
+ * Mind that this method is *private*!
+ *
+ * Returns: (transfer full): A list of resources
+ */
+OsinfoResourcesList *
+osinfo_os_get_minimum_resources_without_inheritance(OsinfoOs *os)
+{
+    g_return_val_if_fail(OSINFO_IS_OS(os), NULL);
+
+    OsinfoResourcesList *newList = osinfo_resourceslist_new();
+
+    osinfo_list_add_all(OSINFO_LIST(newList), OSINFO_LIST(os->priv->minimum));
+
+    return newList;
+}
 
 /**
  * osinfo_os_get_minimum_resources:
@@ -878,44 +877,44 @@ OsinfoResourcesList *osinfo_os_get_minimum_resources(OsinfoOs *os)
 }
 
 /**
- * osinfo_os_get_recommended_resources_without_inheritance:
+ * osinfo_os_get_maximum_resources:
  * @os: an operating system
  *
- * Get the list of recommended resources for the operating system @os.
- *
- * Mind that this method is *private*!
+ * Get the list of maximum resources for the operating system @os.
  *
  * Returns: (transfer full): A list of resources
  */
-OsinfoResourcesList *
-osinfo_os_get_recommended_resources_without_inheritance(OsinfoOs *os)
+OsinfoResourcesList *osinfo_os_get_maximum_resources(OsinfoOs *os)
 {
     g_return_val_if_fail(OSINFO_IS_OS(os), NULL);
 
     OsinfoResourcesList *newList = osinfo_resourceslist_new();
 
     osinfo_list_add_all(OSINFO_LIST(newList),
-                        OSINFO_LIST(os->priv->recommended));
+                        OSINFO_LIST(os->priv->maximum));
 
     return newList;
 }
 
 /**
- * osinfo_os_get_maximum_resources:
+ * osinfo_os_get_recommended_resources_without_inheritance:
  * @os: an operating system
  *
- * Get the list of maximum resources for the operating system @os.
+ * Get the list of recommended resources for the operating system @os.
+ *
+ * Mind that this method is *private*!
  *
  * Returns: (transfer full): A list of resources
  */
-OsinfoResourcesList *osinfo_os_get_maximum_resources(OsinfoOs *os)
+OsinfoResourcesList *
+osinfo_os_get_recommended_resources_without_inheritance(OsinfoOs *os)
 {
     g_return_val_if_fail(OSINFO_IS_OS(os), NULL);
 
     OsinfoResourcesList *newList = osinfo_resourceslist_new();
 
     osinfo_list_add_all(OSINFO_LIST(newList),
-                        OSINFO_LIST(os->priv->maximum));
+                        OSINFO_LIST(os->priv->recommended));
 
     return newList;
 }
-- 
1.8.3.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux