mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
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
------------------
Branch: ni/coolstream
Commit: c965d2408d
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-02 (Mon, 02 Oct 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user