aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-21 23:56:31 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-21 23:56:31 +0000
commitd591a432a3b3aabb7dd101dc80979cc37c996679 (patch)
treea2674ff005e0c3a1492522433caa6dc0998d3626 /shell
parent0315f670527c2fc6b2f48d6f23031f85a0e5471d (diff)
downloadbusybox-w32-d591a432a3b3aabb7dd101dc80979cc37c996679.tar.gz
busybox-w32-d591a432a3b3aabb7dd101dc80979cc37c996679.tar.bz2
busybox-w32-d591a432a3b3aabb7dd101dc80979cc37c996679.zip
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." git-svn-id: svn://busybox.net/trunk/busybox@8995 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
0 files changed, 0 insertions, 0 deletions