mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
src/system/helpers.cpp: Add function readLink()
This commit is contained in:
@@ -1272,3 +1272,13 @@ std::string Lang2ISO639_1(std::string& lang)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
string readLink(string lnk)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
memset(buf, 0, sizeof(buf)-1);
|
||||
if (readlink(lnk.c_str(), buf, sizeof(buf)-1) != -1)
|
||||
return (string)buf;
|
||||
|
||||
return "";
|
||||
}
|
||||
|
@@ -148,5 +148,6 @@ bool split_config_string(const std::string &str, std::map<std::string,std::strin
|
||||
|
||||
std::string getJFFS2MountPoint(int mtdPos);
|
||||
std::string Lang2ISO639_1(std::string& lang);
|
||||
std::string readLink(std::string lnk);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user