Return an error when user tries to set out of range clock values for setsrange functionality
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: Ibe1075c1d2b6c009332a52b81f4b41f7e93d0756
[ROCm/amdsmi commit: 462d4adc24]
This commit is contained in:
کامیت شده توسط
Divya Uday Shikre
والد
10a16579c1
کامیت
ebec7991cb
@@ -617,16 +617,21 @@ int Device::writeDevInfoStr(DevInfoTypes type, std::string valStr) {
|
|||||||
std::ofstream fs;
|
std::ofstream fs;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
fs.rdbuf()->pubsetbuf(0,0);
|
||||||
ret = openSysfsFileStream(type, &fs, valStr.c_str());
|
ret = openSysfsFileStream(type, &fs, valStr.c_str());
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We'll catch any exceptions in rocm_smi.cc code.
|
// We'll catch any exceptions in rocm_smi.cc code.
|
||||||
fs << valStr;
|
if (fs << valStr) {
|
||||||
|
ret = RSMI_STATUS_SUCCESS;
|
||||||
|
} else {
|
||||||
|
ret = RSMI_STATUS_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
fs.close();
|
fs.close();
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsmi_dev_perf_level Device::perfLvlStrToEnum(std::string s) {
|
rsmi_dev_perf_level Device::perfLvlStrToEnum(std::string s) {
|
||||||
|
|||||||
مرجع در شماره جدید
Block a user