fix disk name

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1019 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: dfaf4ff485
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-01-08 (Sat, 08 Jan 2011)

Origin message was:
------------------
-fix disk name

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1019 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
Jacek Jendrzej
2011-01-08 19:04:09 +00:00
parent e95b88fd2e
commit 86b2c3f533

View File

@@ -113,7 +113,7 @@ int CHDDMenuHandler::doMenu ()
if (ret != -1)
root_dev = (s.st_dev & 0x0ffc0); /* hda = 0x0300, hdb = 0x0340 */
printf("HDD: root_dev: 0x%04x\n", root_dev);
std::string tmp_str[n];
for(int i = 0; i < n;i++) {
char str[256];
char sstr[256];
@@ -173,6 +173,7 @@ int CHDDMenuHandler::doMenu ()
snprintf(str, sizeof(str), "%s %s %lld %s", vendor, model, megabytes < 10000 ? megabytes : megabytes/1000, megabytes < 10000 ? "MB" : "GB");
printf("HDD: %s\n", str);
tmp_str[i]=str;
CMenuWidget * tempMenu = new CMenuWidget(str, NEUTRINO_ICON_SETTINGS);
tempMenu->addIntroItems();
//tempMenu->addItem( new CMenuOptionChooser(LOCALE_HDD_FS, &g_settings.hdd_fs, HDD_FILESYS_OPTIONS, HDD_FILESYS_OPTION_COUNT, true));
@@ -180,7 +181,7 @@ int CHDDMenuHandler::doMenu ()
tempMenu->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", new CHDDChkExec, namelist[i]->d_name));
snprintf(sstr, sizeof(sstr), "%s (%s)", g_Locale->getText(LOCALE_HDD_REMOVABLE_DEVICE), namelist[i]->d_name);
hddmenu->addItem(new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), (removable || isroot) ? false : true, str, tempMenu));
hddmenu->addItem(new CMenuForwarderNonLocalized((removable ? sstr : namelist[i]->d_name), (removable || isroot) ? false : true, tmp_str[i], tempMenu));
hdd_found = 1;
free(namelist[i]);