[gnome-software/wip/rancell/ubuntu-3-20-rebase: 5/10] trivial: Allow arbitrary variables to be read from /etc/os-release



commit 8f3418872696be7fefa7804d5a74bd0ca187c355
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Feb 11 15:31:30 2016 +1300

    trivial: Allow arbitrary variables to be read from /etc/os-release

 src/gs-os-release.c |    6 ++++++
 src/gs-os-release.h |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-os-release.c b/src/gs-os-release.c
index 9c639af..b15d0f0 100644
--- a/src/gs-os-release.c
+++ b/src/gs-os-release.c
@@ -126,4 +126,10 @@ gs_os_release_get_pretty_name (GError **error)
        return gs_os_release_parse_variable ("PRETTY_NAME", error);
 }
 
+gchar *
+gs_os_release_get (const gchar *name, GError **error)
+{
+       return gs_os_release_parse_variable (name, error);
+}
+
 /* vim: set noexpandtab: */
diff --git a/src/gs-os-release.h b/src/gs-os-release.h
index cc9b7c7..6eaffa4 100644
--- a/src/gs-os-release.h
+++ b/src/gs-os-release.h
@@ -39,6 +39,8 @@ gchar          *gs_os_release_get_version             (GError         **error);
 gchar           *gs_os_release_get_id                  (GError         **error);
 gchar           *gs_os_release_get_version_id          (GError         **error);
 gchar           *gs_os_release_get_pretty_name         (GError         **error);
+gchar           *gs_os_release_get                     (const gchar    *name,
+                                                        GError         **error);
 
 G_END_DECLS
 


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