From d7da1e5030b280ff3a0d0d1ee1272f4439f6ce3a Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 31 Oct 2010 18:12:45 +0000 Subject: [PATCH] hdd_menu: remove extraneous '\n' (thanks Miky1968) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@875 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/205c410487065c7d7d6a74932f3c9ca6a72624e2 Author: Stefan Seyfried Date: 2010-10-31 (Sun, 31 Oct 2010) --- src/gui/hdd_menu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 4c4f324fa..73443e471 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -154,7 +154,7 @@ int CHDDMenuHandler::doMenu () fscanf(f, "%d", &removable); fclose(f); - snprintf(str, sizeof(str), "%s %s (%s-%s %lld %s)\n", g_Locale->getText(LOCALE_HDD_MANAGE), namelist[i]->d_name, vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB"); + snprintf(str, sizeof(str), "%s %s (%s-%s %lld %s)", g_Locale->getText(LOCALE_HDD_MANAGE), namelist[i]->d_name, vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB"); printf("HDD: %s\n", str); CMenuWidget * tempMenu = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS); tempMenu->addItem( GenericMenuBack ); @@ -430,8 +430,12 @@ printf("CHDDChkExec: key %s\n", key.c_str()); progress->showLocalStatus(percent); } } - else if(!strncmp(buf, "Pass", 4)) + else if(!strncmp(buf, "Pass", 4)) { + char *t = strrchr(buf, '\n'); + if (t) + *t = 0; progress->showStatusMessageUTF(buf); + } } //printf("CHDDChkExec: %s\n", buf); pclose(f);