[gnome-software/wip/rancell/3-20-enhancements: 3/4] trivial: Allow arbitrary variables to be read from /etc/os-release
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/3-20-enhancements: 3/4] trivial: Allow arbitrary variables to be read from /etc/os-release
- Date: Fri, 9 Sep 2016 04:52:59 +0000 (UTC)
commit 34a06b85c015c6f6f483c300b94c1f8237c791da
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]