If we modify log() to make it return the previous error code, the following code are affected:
sleep.d/75modules
* resume_modules() calls modreload(), if it fails to load a module, the return value of sleep.d/75modules will match the return value of modprobe (is this the expected behavior, or should resume_modules return 0 just like suspend_modules? I vote for the latter one)
pm-functions
* load_hook_blacklist(): if disablehook() fails to write to ${STORAGEDIR}/disable_hook:HOOKNAME, the return value of load_hook_blacklist will be the return value of disablehook() (this is unlikely to happen, but should load_hook_)
* _run_hook: this function will work as expected as the return value of hook_ok propagates to hook_exit_status
Other functions/ scripts are not affected by this change in log() . Should log() change the previous exitcode or not?
The patch provided does not change the behavior of pm-utils, other than making _run_hook() work as it should do.
If we modify log() to make it return the previous error code, the following code are affected:
sleep.d/75modules
* resume_modules() calls modreload(), if it fails to load a module, the return value of sleep.d/75modules will match the return value of modprobe (is this the expected behavior, or should resume_modules return 0 just like suspend_modules? I vote for the latter one)
pm-functions blacklist( ): if disablehook() fails to write to ${STORAGEDIR} /disable_ hook:HOOKNAME, the return value of load_hook_blacklist will be the return value of disablehook() (this is unlikely to happen, but should load_hook_)
* load_hook_
* _run_hook: this function will work as expected as the return value of hook_ok propagates to hook_exit_status
Other functions/ scripts are not affected by this change in log() . Should log() change the previous exitcode or not?
The patch provided does not change the behavior of pm-utils, other than making _run_hook() work as it should do.