hdd-menu: hide mmcblk devices from hdd-menu

Origin commit data
------------------
Branch: ni/coolstream
Commit: 41646df5e0
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-07 (Sat, 07 Oct 2017)

Origin message was:
------------------
- hdd-menu: hide mmcblk devices from hdd-menu

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-10-07 20:52:38 +02:00
parent e2ec1ddc3b
commit bf2319a7cc

View File

@@ -129,8 +129,11 @@ CHDDMenuHandler* CHDDMenuHandler::getInstance()
int CHDDMenuHandler::filterDevName(const char * name)
{
if (((name[0] == 's' || name[0] == 'h') && (name[1] == 'd' || name[1] == 'r')) ||
!strncmp(name, "mmcblk", 6))
if (((name[0] == 's' || name[0] == 'h') && (name[1] == 'd' || name[1] == 'r'))
#if !HAVE_ARM_HARDWARE
|| !strncmp(name, "mmcblk", 6)
#endif
)
return 1;
return 0;
}
@@ -212,6 +215,10 @@ void CHDDMenuHandler::getBlkIds()
hdd_s hdd;
hdd.devname = std::string(buff + 5);
#if HAVE_ARM_HARDWARE
if (strncmp(hdd.devname.c_str(), "mmcblk", 6) == 0)
continue;
#endif
hdd.mounted = is_mounted(buff + 5);
hdd.fmt = ret;
hdd.desc = hdd.devname + " (" + hdd.fmt + ")";