diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-11-21 17:14:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-11-21 17:14:54 +0000 |
commit | d415d3d87cd112d26b6508d377be30f3b1d9771c (patch) | |
tree | 44355aa9144fb53b62a4748d10dc34bb39adb67a /dumpcap.c | |
parent | 03f4fa5223c5bfe90d79bcf94f34ffd2d87d78d2 (diff) |
On error, have capture_opts_trim_iface() return the exit status that
should be used (on success, have it return 0). Exit with that exit
status; if the problem is that we couldn't get the interface list or if
there are no interfaces in that list, return 2, as that's not a
command-line syntax error.
svn path=/trunk/; revision=46108
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4673,9 +4673,10 @@ main(int argc, char *argv[]) * "-L", "-d", and capturing act on a particular interface, so we have to * have an interface; if none was specified, pick a default. */ - if (capture_opts_trim_iface(&global_capture_opts, NULL) == FALSE) { + status = capture_opts_trim_iface(&global_capture_opts, NULL); + if (status != 0) { /* cmdarg_err() already called .... */ - exit_main(1); + exit_main(status); } /* Let the user know what interfaces were chosen. */ |