imageinfo: outsource kernel info init into own member

This commit is contained in:
2020-10-14 08:21:24 +02:00
parent 57b150c42d
commit 74dc704a40
2 changed files with 10 additions and 3 deletions

View File

@@ -356,9 +356,7 @@ void CImageInfo::InitInfoData()
v_info.push_back(pretty_name); v_info.push_back(pretty_name);
//kernel //kernel
struct utsname uts_info; initKernelInfo();
if (uname(&uts_info) == 0)
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_KERNEL), uts_info.release});
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_DATE), builddate}); v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_DATE), builddate});
@@ -399,6 +397,14 @@ void CImageInfo::initHalInfo()
#endif #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() void CImageInfo::initSupportInfo()
{ {
//www //www

View File

@@ -58,6 +58,7 @@ class CImageInfo : public CMenuTarget
void InitMinitv(); void InitMinitv();
void InitInfos(); void InitInfos();
void InitBuildInfos(); void InitBuildInfos();
void initKernelInfo();
void initHalInfo(); void initHalInfo();
void InitInfoText(const std::string& text); void InitInfoText(const std::string& text);
void initSupportInfo(); void initSupportInfo();