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:
Bill(Shuzhou) Liu
2023-06-28 09:03:28 -05:00
parent 0218a2797d
commit 72009f1812
@@ -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;
}