From a8c252a60b46cdca6a02fa2995996015959b245b Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 3 Nov 2012 15:40:35 +0100 Subject: [PATCH] Software Update with apply the settings (Part7) - Clean osrelease at user defined kernelversion (THX snafed) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7a5f5e8220dd6cbfd72289224bdc324afd4df08e Author: Michael Liebmann Date: 2012-11-03 (Sat, 03 Nov 2012) Origin message was: ------------------ * Software Update with apply the settings (Part7) - Clean osrelease at user defined kernelversion (THX snafed) ------------------ This commit was generated by Migit --- src/gui/ext_update.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/ext_update.cpp b/src/gui/ext_update.cpp index 1b7afd219..d951bc5b8 100644 --- a/src/gui/ext_update.cpp +++ b/src/gui/ext_update.cpp @@ -185,8 +185,12 @@ bool CExtUpdate::writemtdExt() // get osrelease struct utsname uts_info; - if( uname(&uts_info) == 0 ) + if( uname(&uts_info) == 0 ) { osrelease = uts_info.release; + size_t pos = osrelease.find_first_of(" "); + if (pos != std::string::npos) + osrelease = osrelease.substr(0, pos); + } else return ErrorReset(0, "error no kernel info");