mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
hdd_menu: don't segfault if /sys is not mounted
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1111 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1c828f328d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-02-05 (Sat, 05 Feb 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -89,12 +89,12 @@ int CHDDMenuHandler::doMenu ()
|
|||||||
|
|
||||||
bool hdd_found = 0;
|
bool hdd_found = 0;
|
||||||
int n = scandir("/sys/block", &namelist, my_filter, alphasort);
|
int n = scandir("/sys/block", &namelist, my_filter, alphasort);
|
||||||
#if 0
|
|
||||||
if(n <= 0) {
|
if (n < 0) {
|
||||||
//FIXME no hdd found message
|
perror("CHDDMenuHandler::doMenu: scandir(\"/sys/block\") failed");
|
||||||
return 0;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
CMenuWidget* hddmenu = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, 58);
|
CMenuWidget* hddmenu = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, 58);
|
||||||
hddmenu->addIntroItems(LOCALE_HDD_SETTINGS);
|
hddmenu->addIntroItems(LOCALE_HDD_SETTINGS);
|
||||||
|
Reference in New Issue
Block a user