[gnome-software/wip/rancell/snap-auth-3-20: 21/57] 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/snap-auth-3-20: 21/57] trivial: Allow arbitrary variables to be read from /etc/os-release
- Date: Thu, 14 Dec 2017 00:44:26 +0000 (UTC)
commit 660b9242f880596058c9d7260d8c89256be31ec5
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]