Merge branch 'master' of https://github.com/neutrino-mp/neutrino-mp into ni/mp/tuxbox

Conflicts:
	src/gui/dboxinfo.cpp
	src/gui/infoviewer_bb.cpp


Origin commit data
------------------
Commit: c965d2408d
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-02 (Mon, 02 Oct 2017)
This commit is contained in:
vanhofen
2017-10-02 23:24:39 +02:00
3 changed files with 7 additions and 8 deletions

View File

@@ -39,7 +39,6 @@
#include <errno.h>
#include <inttypes.h>
#include <inttypes.h>
#include <linux/kd.h>
#include <stdlib.h>

View File

@@ -135,11 +135,11 @@ int CHDDMenuHandler::filterDevName(const char * name)
return 0;
}
static string readlink(const char *path)
static std::string readlink(const char *path)
{
char link[PATH_MAX + 1];
if (realpath(path, link))
return string(link);
return std::string(link);
return "";
}
@@ -153,7 +153,7 @@ bool CHDDMenuHandler::is_mounted(const char *dev)
snprintf(devpath, sizeof(devpath), "/dev/%s", dev);
char buffer[255];
string realdev = readlink(devpath);
std::string realdev = readlink(devpath);
realdev = trim(realdev);
FILE *f = fopen("/proc/mounts", "r");
if(f) {
@@ -166,7 +166,7 @@ bool CHDDMenuHandler::is_mounted(const char *dev)
if (!strcmp(buffer, devpath)) /* default '/dev/sda1' mount */
res = true;
else { /* now the case of '/dev/disk/by-label/myharddrive' mounts */
string realmount = readlink(buffer);
std::string realmount = readlink(buffer);
if (realdev == trim(realmount))
res = true;
}
@@ -261,7 +261,7 @@ void CHDDMenuHandler::check_kernel_fs()
if (! tab) /* should not happen in any kernel I have seen */
continue;
tab++;
kernel_fs_list.insert(string(tab));
kernel_fs_list.insert(std::string(tab));
}
fclose(f);
}

View File

@@ -150,8 +150,8 @@ int CStreamInfo2::doSignalStrengthLoop ()
const int delay = 15;
int sw = g_Font[font_info]->getRenderWidth ("99999.999");
maxb = minb = lastb = tmp_rate = 0;
string br_str = string(g_Locale->getText(LOCALE_STREAMINFO_BITRATE)) + ":";
string avg_str = "(" + string(g_Locale->getText(LOCALE_STREAMINFO_AVERAGE_BITRATE)) + ")";
std::string br_str = std::string(g_Locale->getText(LOCALE_STREAMINFO_BITRATE)) + ":";
std::string avg_str = "(" + std::string(g_Locale->getText(LOCALE_STREAMINFO_AVERAGE_BITRATE)) + ")";
int offset = g_Font[font_info]->getRenderWidth(avg_str);
int dheight = g_Font[font_info]->getHeight ();
int dx1 = x + 10;