From 4d8fa7fdfdccc33963ac296eead388b8743f70be Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 7 Oct 2017 20:52:38 +0200 Subject: [PATCH] hdd-menu: hide mmcblk devices from hdd-menu Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/20d3cd3d2a8919a7a64b463c35619839f0c9c80e Author: vanhofen Date: 2017-10-07 (Sat, 07 Oct 2017) Origin message was: ------------------ - hdd-menu: hide mmcblk devices from hdd-menu Signed-off-by: Thilo Graf ------------------ This commit was generated by Migit --- src/gui/hdd_menu.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 2baa3a6d6..eb0ebc590 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -127,8 +127,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; } @@ -210,6 +213,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 + ")";