From 64a2c1ecf33e134c799edcebc434a1126b95c24a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Mon, 13 Nov 2017 22:28:54 +0100 Subject: [PATCH] armbox: read frontend real names --- src/zapit/src/frontend.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index e812851ec..8435ff28d 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -28,8 +28,10 @@ #include #include #include +#include /* zapit */ #include +#include #include #include #include @@ -252,6 +254,7 @@ bool CFrontend::Open(bool init) } getFEInfo(); + } currentTransponder.setTransponderId(0); @@ -274,6 +277,30 @@ void CFrontend::getFEInfo(void) printf("[fe%d] frontend fd %d type %d\n", fenumber, fd, info.type); bool legacy = true; +#if HAVE_ARM_HARDWARE + std::ifstream in; + in.open("/proc/bus/nim_sockets"); + if (in.is_open()) + { + std::string line; + bool found = false; + while (getline(in, line)) + { + if (line.find("NIM Socket "+to_string(fenumber)+":") !=std::string::npos) + found = true; + + if ((line.find("Name:") != std::string::npos) && found) + { + //printf("NIM SOCKET: %s\n",line.substr(line.find_first_of(":")+2).c_str()); + std::string tmp = info.name; + sprintf(info.name,"%s (%s)",tmp.c_str(),line.substr(line.find_first_of(":")+2).c_str()); + break; + } + } + in.close(); + } +#endif // HAVE_ARM_HARDWARE + deliverySystemMask = UNKNOWN_DS; #if (DVB_API_VERSION >= 5) && (DVB_API_VERSION_MINOR >= 5)