Return NOT_SUPPORTED if fail to write to sysfs
Check the error and return NOT_SUPPORTED when write to sysfs.
Change-Id: Idaa91816197413643552e230a483b79500d44e08
[ROCm/amdsmi commit: 145868ad72]
This commit is contained in:
@@ -120,6 +120,9 @@ int WriteSysfsStr(std::string path, std::string val) {
|
||||
|
||||
fs << val;
|
||||
fs.close();
|
||||
if (!fs) {
|
||||
return ENOENT; // Map to NOT_SUPPORT if errors
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user