Return NOT_SUPPORTED if fail to write to sysfs

Check the error and return NOT_SUPPORTED when write to sysfs.

Change-Id: Idaa91816197413643552e230a483b79500d44e08
This commit is contained in:
Bill(Shuzhou) Liu
2023-06-28 09:03:28 -05:00
szülő 210af88a20
commit 145868ad72
+3
Fájl megtekintése
@@ -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;
}