From 3cbffe06f1a6e6bf845f1436765a98d3b15e94fe Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 11 Sep 2014 17:23:33 +0400 Subject: [PATCH] gui/dboxinfo: fixes Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d3c4b4f1999140b881fd5e786458cbe8c5d67fae Author: [CST] Focus Date: 2014-09-11 (Thu, 11 Sep 2014) --- src/gui/dboxinfo.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 79d12d88b..c4c25e5c4 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -281,7 +281,7 @@ void CDBoxInfoWidget::paint() while (getline(in, line)) { size_t firstslash = line.find_first_of('/'); size_t firstspace = line.find_first_of(' '); - if (firstspace != string::npos && firstslash != string::npos && firstslash < firstspace) { + if ( (firstspace != string::npos && firstslash != string::npos && firstslash < firstspace) || (line.find("rootfs") == 0) ) { firstspace++; size_t nextspace = line.find_first_of(' ', firstspace); if (nextspace == string::npos || line.find("nodev", nextspace + 1) != string::npos) @@ -307,7 +307,6 @@ void CDBoxInfoWidget::paint() satWidth = std::max(satWidth, fm->getRenderWidth(s)); } } -printf("nameWidth %d satWidth %d\n", nameWidth, satWidth); height += mheight; // header height += mounts.size() * mheight; // file systems @@ -383,8 +382,8 @@ printf("nameWidth %d satWidth %d\n", nameWidth, satWidth); now -= info.uptime; std::string str_boot(strftime(g_Locale->getText(LOCALE_EXTRA_DBOXINFO_TIMEFORMAT), now)); - char ubuf[80]; - char sbuf[256]; + char ubuf[80] = { 0 }; + char sbuf[256] = { 0 }; int updays, uphours, upminutes; updays = (int) info.uptime / (60*60*24);