mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
imageinfo.cpp: add show kernel version
This commit is contained in:
@@ -32,6 +32,8 @@
|
|||||||
#include <driver/rcinput.h>
|
#include <driver/rcinput.h>
|
||||||
#include <driver/screen_max.h>
|
#include <driver/screen_max.h>
|
||||||
|
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
#include <daemonc/remotecontrol.h>
|
#include <daemonc/remotecontrol.h>
|
||||||
|
|
||||||
#include <system/flashtool.h>
|
#include <system/flashtool.h>
|
||||||
@@ -209,8 +211,20 @@ void CImageInfo::paint()
|
|||||||
#else
|
#else
|
||||||
const char * builddate = config.getString("builddate", BUILT_DATE).c_str();
|
const char * builddate = config.getString("builddate", BUILT_DATE).c_str();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CFlashVersionInfo versionInfo(version);
|
static CFlashVersionInfo versionInfo(version);
|
||||||
const char * releaseCycle = versionInfo.getReleaseCycle();
|
const char * releaseCycle = versionInfo.getReleaseCycle();
|
||||||
|
|
||||||
|
struct utsname uts_info;
|
||||||
|
std::string Version_Kernel;
|
||||||
|
if( uname(&uts_info) < 0 ) {
|
||||||
|
Version_Kernel = releaseCycle;
|
||||||
|
}else{
|
||||||
|
Version_Kernel = releaseCycle;
|
||||||
|
Version_Kernel += " - Kernel: ";
|
||||||
|
Version_Kernel += uts_info.release;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf((char*) imagedate,sizeof(imagedate), "%s %s", versionInfo.getDate(), versionInfo.getTime());
|
snprintf((char*) imagedate,sizeof(imagedate), "%s %s", versionInfo.getDate(), versionInfo.getTime());
|
||||||
|
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
@@ -223,7 +237,7 @@ void CImageInfo::paint()
|
|||||||
|
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
|
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
|
||||||
paintLine(xpos+offset, font_info, releaseCycle);
|
paintLine(xpos+offset, font_info, Version_Kernel.c_str());
|
||||||
|
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
#ifdef SVNVERSION
|
#ifdef SVNVERSION
|
||||||
|
Reference in New Issue
Block a user