Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/osutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ bool matches(const string & s, const string & pattern, int cflags)
}


string readlink(const string & path)
string readsymlink(const string & path)
{
char buffer[PATH_MAX+1];

Expand Down
2 changes: 1 addition & 1 deletion src/core/osutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ std::string pwd();

bool exists(const std::string & path);
bool samefile(const std::string & path1, const std::string & path2);
std::string readlink(const std::string & path);
std::string readsymlink(const std::string & path);
std::string realpath(const std::string & path);
std::string dirname(const std::string & path);
std::string shortname(const std::string & path);
Expand Down
2 changes: 1 addition & 1 deletion src/core/parisc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static bool scan_device(hwNode & node, string name = "")
newnode.setBusInfo(guessBusInfo(name));
if(exists("driver"))
{
string driver = readlink("driver");
string driver = readsymlink("driver");
size_t slash = driver.rfind("/");
newnode.setConfig("driver", driver.substr(slash==driver.npos?0:slash+1));
newnode.claim();
Expand Down
4 changes: 2 additions & 2 deletions src/core/pci.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,8 @@ bool scan_pci(hwNode & n)
device->setBusInfo(devices[i]->d_name);
if(exists(string(devices[i]->d_name)+"/driver"))
{
string drivername = readlink(string(devices[i]->d_name)+"/driver");
string modulename = readlink(string(devices[i]->d_name)+"/driver/module");
string drivername = readsymlink(string(devices[i]->d_name)+"/driver");
string modulename = readsymlink(string(devices[i]->d_name)+"/driver/module");

device->setConfig("driver", shortname(drivername));
if(exists(modulename))
Expand Down
2 changes: 1 addition & 1 deletion src/core/sysfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ string entry::driver() const
string driverlink = This->devpath + "/driver";
if (!exists(driverlink))
return "";
return shortname(readlink(driverlink));
return shortname(readsymlink(driverlink));
}


Expand Down