summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorGlenn L McGrath2004-07-21 23:56:31 +0000
committerGlenn L McGrath2004-07-21 23:56:31 +0000
commit0177ce12562b119004028ad23edf09ea0b9ff14a (patch)
treea2674ff005e0c3a1492522433caa6dc0998d3626 /modutils
parente8f46515cb9626ad723ba7bf9809476047510804 (diff)
downloadbusybox-0177ce12562b119004028ad23edf09ea0b9ff14a.zip
busybox-0177ce12562b119004028ad23edf09ea0b9ff14a.tar.gz
Patch from Mike Snitzer to fix return codes.
"I have a need to _really_ know if the interface was properly configured via ifup so I made busybox's ifupdown pass the return codes through rather than dropping them on the floor." "All the functions in ifupdown.c return 1 on success and 0 on failure (which happens to the opposite of standard practices but whatever). So it is important for all these functions to not blindly return 1." "The problem with blindly returning ret, even if it is != 1, is the callers expect a 0 or 1 and accumulate the return codes. So a function that makes 3 calls to execute will have a value of 3 accumulated. That value of 1 (success) was almost always returned even if 1 of the commands in the command sequence failed. The attached patch fixes the lack of checking to verify thar result == expected_reult."
Diffstat (limited to 'modutils')
0 files changed, 0 insertions, 0 deletions