[virt-tools-list] [libosinfo 6/8] Deprecate osinfo_db_guess_os_from_media
Christophe Fergeau
cfergeau at redhat.com
Mon Dec 3 11:23:35 UTC 2012
---
osinfo/osinfo_db.c | 38 +++++++++++++++++++++++---------------
osinfo/osinfo_db.h | 1 +
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c
index 1e8a93c..46101d6 100644
--- a/osinfo/osinfo_db.c
+++ b/osinfo/osinfo_db.c
@@ -391,20 +391,10 @@ static gint media_volume_compare (gconstpointer a, gconstpointer b)
return 1;
}
-/**
- * osinfo_db_guess_os_from_media:
- * @db: the database
- * @media: the installation media
- * @matched_media: (out) (transfer none) (allow-none): the matched operating
- * system media
- *
- * Guess operating system given a #OsinfoMedia object.
- *
- * Returns: (transfer none): the operating system, or NULL if guessing failed
- */
-OsinfoOs *osinfo_db_guess_os_from_media(OsinfoDb *db,
- OsinfoMedia *media,
- OsinfoMedia **matched_media)
+static OsinfoOs *
+osinfo_db_guess_os_from_media_internal(OsinfoDb *db,
+ OsinfoMedia *media,
+ OsinfoMedia **matched_media)
{
OsinfoOs *ret = NULL;
GList *oss = NULL;
@@ -460,6 +450,23 @@ OsinfoOs *osinfo_db_guess_os_from_media(OsinfoDb *db,
return ret;
}
+/**
+ * osinfo_db_guess_os_from_media:
+ * @db: the database
+ * @media: the installation media
+ * @matched_media: (out) (transfer none) (allow-none): the matched operating
+ * system media
+ *
+ * Guess operating system given a #OsinfoMedia object.
+ *
+ * Returns: (transfer none): the operating system, or NULL if guessing failed
+ */
+OsinfoOs *osinfo_db_guess_os_from_media(OsinfoDb *db,
+ OsinfoMedia *media,
+ OsinfoMedia **matched_media)
+{
+ return osinfo_db_guess_os_from_media_internal(db, media, matched_media);
+}
static void fill_media (OsinfoMedia *media, OsinfoMedia *matched_media, OsinfoOs *os)
{
@@ -521,7 +528,8 @@ gboolean osinfo_db_identify_media(OsinfoDb *db, OsinfoMedia *media)
g_return_val_if_fail(OSINFO_IS_MEDIA(media), FALSE);
g_return_val_if_fail(OSINFO_IS_DB(db), FALSE);
- matched_os = osinfo_db_guess_os_from_media(db, media, &matched_media);
+ matched_os = osinfo_db_guess_os_from_media_internal(db, media,
+ &matched_media);
if (matched_os == NULL) {
return FALSE;
}
diff --git a/osinfo/osinfo_db.h b/osinfo/osinfo_db.h
index 2b7c74c..1253b24 100644
--- a/osinfo/osinfo_db.h
+++ b/osinfo/osinfo_db.h
@@ -96,6 +96,7 @@ void osinfo_db_add_device(OsinfoDb *db, OsinfoDevice *device);
void osinfo_db_add_deployment(OsinfoDb *db, OsinfoDeployment *deployment);
void osinfo_db_add_install_script(OsinfoDb *db, OsinfoInstallScript *script);
+G_DEPRECATED_FOR(osinfo_db_identify_media)
OsinfoOs *osinfo_db_guess_os_from_media(OsinfoDb *db,
OsinfoMedia *media,
OsinfoMedia **matched_media);
--
1.8.0.1
More information about the virt-tools-list
mailing list