From 74dc704a409964c0d02c9ff8338bbb81fa6776bd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 14 Oct 2020 08:21:24 +0200 Subject: [PATCH] imageinfo: outsource kernel info init into own member --- src/gui/imageinfo.cpp | 12 +++++++++--- src/gui/imageinfo.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 0bece5922..81f561f05 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -356,9 +356,7 @@ void CImageInfo::InitInfoData() v_info.push_back(pretty_name); //kernel - struct utsname uts_info; - if (uname(&uts_info) == 0) - v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_KERNEL), uts_info.release}); + initKernelInfo(); v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_DATE), builddate}); @@ -399,6 +397,14 @@ void CImageInfo::initHalInfo() #endif } +void CImageInfo::initKernelInfo() +{ + struct utsname uts_info; + if (uname(&uts_info) == 0) + v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_KERNEL), uts_info.release}); +} + + void CImageInfo::initSupportInfo() { //www diff --git a/src/gui/imageinfo.h b/src/gui/imageinfo.h index e03191fce..7628232a7 100644 --- a/src/gui/imageinfo.h +++ b/src/gui/imageinfo.h @@ -58,6 +58,7 @@ class CImageInfo : public CMenuTarget void InitMinitv(); void InitInfos(); void InitBuildInfos(); + void initKernelInfo(); void initHalInfo(); void InitInfoText(const std::string& text); void initSupportInfo();