[Sysman]: Remove not used functions in fsAccess

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2023-03-01 12:22:24 +00:00
committed by Compute-Runtime-Automation
parent 7028d3c0d3
commit d47c1de7aa
4 changed files with 2 additions and 34 deletions

View File

@@ -199,15 +199,6 @@ bool FsAccess::fileExists(const std::string file) {
return true;
}
ze_result_t FsAccess::getFileMode(const std::string file, ::mode_t &mode) {
struct stat sb;
if (0 != stat(file.c_str(), &sb)) {
return getResult(errno);
}
mode = sb.st_mode;
return ZE_RESULT_SUCCESS;
}
ze_result_t FsAccess::readSymLink(const std::string path, std::string &val) {
// returns the value of symlink at path
char buf[PATH_MAX];
@@ -416,11 +407,6 @@ ze_result_t SysfsAccess::canWrite(const std::string file) {
return FsAccess::canWrite(fullPath(file));
}
ze_result_t SysfsAccess::getFileMode(const std::string file, ::mode_t &mode) {
// Prepend sysfs directory path and call the base getFileMode
return FsAccess::getFileMode(fullPath(file), mode);
}
ze_result_t SysfsAccess::read(const std::string file, std::string &val) {
// Prepend sysfs directory path and call the base read
return FsAccess::read(fullPath(file).c_str(), val);

View File

@@ -33,7 +33,6 @@ class FsAccess {
virtual ze_result_t canRead(const std::string file);
virtual ze_result_t canWrite(const std::string file);
virtual ze_result_t getFileMode(const std::string file, ::mode_t &mode);
virtual ze_result_t read(const std::string file, uint64_t &val);
virtual ze_result_t read(const std::string file, std::string &val);
@@ -90,7 +89,6 @@ class SysfsAccess : protected FsAccess {
ze_result_t canRead(const std::string file) override;
ze_result_t canWrite(const std::string file) override;
ze_result_t getFileMode(const std::string file, ::mode_t &mode) override;
ze_result_t read(const std::string file, std::string &val) override;
ze_result_t read(const std::string file, int32_t &val) override;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -198,15 +198,6 @@ bool FsAccess::fileExists(const std::string file) {
return true;
}
ze_result_t FsAccess::getFileMode(const std::string file, ::mode_t &mode) {
struct stat sb;
if (0 != stat(file.c_str(), &sb)) {
return getResult(errno);
}
mode = sb.st_mode;
return ZE_RESULT_SUCCESS;
}
ze_result_t FsAccess::readSymLink(const std::string path, std::string &val) {
// returns the value of symlink at path
char buf[PATH_MAX];
@@ -415,11 +406,6 @@ ze_result_t SysfsAccess::canWrite(const std::string file) {
return FsAccess::canWrite(fullPath(file));
}
ze_result_t SysfsAccess::getFileMode(const std::string file, ::mode_t &mode) {
// Prepend sysfs directory path and call the base getFileMode
return FsAccess::getFileMode(fullPath(file), mode);
}
ze_result_t SysfsAccess::read(const std::string file, std::string &val) {
// Prepend sysfs directory path and call the base read
return FsAccess::read(fullPath(file).c_str(), val);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -32,7 +32,6 @@ class FsAccess {
virtual ze_result_t canRead(const std::string file);
virtual ze_result_t canWrite(const std::string file);
virtual ze_result_t getFileMode(const std::string file, ::mode_t &mode);
virtual ze_result_t read(const std::string file, uint64_t &val);
virtual ze_result_t read(const std::string file, std::string &val);
@@ -89,7 +88,6 @@ class SysfsAccess : protected FsAccess {
ze_result_t canRead(const std::string file) override;
ze_result_t canWrite(const std::string file) override;
ze_result_t getFileMode(const std::string file, ::mode_t &mode) override;
ze_result_t read(const std::string file, std::string &val) override;
ze_result_t read(const std::string file, int32_t &val) override;