Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.4
iproute2.import4923
iproute2-correct-error-code.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File iproute2-correct-error-code.patch of Package iproute2.import4923
Index: iproute2-2.6.37/ip/ip.c =================================================================== --- iproute2-2.6.37.orig/ip/ip.c +++ iproute2-2.6.37/ip/ip.c @@ -143,6 +143,7 @@ static int batch(const char *name) int main(int argc, char **argv) { char *basename; + int ret = 0; basename = strrchr(argv[0], '/'); if (basename == NULL) @@ -245,17 +246,29 @@ int main(int argc, char **argv) _SL_ = oneline ? "\\" : "\n" ; - if (batch_file) - return batch(batch_file); + if (batch_file) { + ret = batch(batch_file); + if(ret < 0) + ret = -ret; + exit(ret); + } if (rtnl_open(&rth, 0) < 0) exit(1); - if (strlen(basename) > 2) - return do_cmd(basename+2, argc, argv); + if (strlen(basename) > 2) { + ret = do_cmd(basename+2, argc, argv); + if(ret < 0) + ret = -ret; + exit(ret); + } - if (argc > 1) - return do_cmd(argv[1], argc-1, argv+1); + if (argc > 1) { + ret = do_cmd(argv[1], argc-1, argv+1); + if(ret < 0) + ret = -ret; + exit(ret); + } rtnl_close(&rth); usage();
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor