diff --git a/src/file_utils.cpp b/src/file_utils.cpp index 0fc41920..b268971d 100644 --- a/src/file_utils.cpp +++ b/src/file_utils.cpp @@ -100,7 +100,7 @@ bool dir_exists(const std::string& path) return !stat(path.c_str(), &s) && S_ISDIR(s.st_mode); } -std::string readlink(const char * link) +std::string read_symlink(const char * link) { char result[PATH_MAX] {}; ssize_t count = readlink(link, result, PATH_MAX); @@ -109,7 +109,7 @@ std::string readlink(const char * link) std::string get_exe_path() { - return readlink("/proc/self/exe"); + return read_symlink("/proc/self/exe"); } bool get_wine_exe_name(std::string& name, bool keep_ext) diff --git a/src/file_utils.h b/src/file_utils.h index 67e05e03..443fad40 100644 --- a/src/file_utils.h +++ b/src/file_utils.h @@ -15,7 +15,7 @@ bool find_folder(const std::string& root, const std::string& prefix, std::string std::vector ls(const char* root, const char* prefix = nullptr, LS_FLAGS flags = LS_DIRS); bool file_exists(const std::string& path); bool dir_exists(const std::string& path); -std::string readlink(const char * link); +std::string read_symlink(const char * link); std::string get_exe_path(); bool get_wine_exe_name(std::string& name, bool keep_ext = false); std::string get_home_dir(); diff --git a/src/overlay.cpp b/src/overlay.cpp index 7a8fbf41..58cee9e4 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -612,7 +612,7 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params) path += "/device"; if (pci_bus_parsed && pci_dev) { - string pci_device = readlink(path.c_str()); + string pci_device = read_symlink(path.c_str()); #ifndef NDEBUG std::cerr << "PCI device symlink: " << pci_device << "\n"; #endif