diff options
author | Guy Harris <gharris@sonic.net> | 2021-07-26 01:32:23 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-07-26 01:32:23 -0700 |
commit | 92f49886cc98c805b94e80b49af0687edb42d037 (patch) | |
tree | 8f81ffd1789859611dba249cde1c586a5bb4ac9b /dumpcap.c | |
parent | 94d7b7846cfd67c2b70e91d04a290d686a192031 (diff) |
dumpcap: clean up capture device open errors.
1) Consistently say "capture device"; not all capture devices are
"interfaces" in the sense of "network interfaces' ("any" means "all
network interfaces", and capturing may be supported on a USB bus or on
D-Bus or....)
2) Use double quotes to quote the device specifier (it probably won't
have spaces in its name, but...).
3) Make sure that there's a space between "capture device" and the
quoted device name.
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -653,7 +653,7 @@ get_capture_device_open_failure_messages(cap_device_open_status open_status, size_t secondary_errmsg_len) { g_snprintf(errmsg, (gulong) errmsg_len, - "The capture session could not be initiated on interface '%s' (%s).", + "The capture session could not be initiated on capture device \"%s\" (%s).", iface, open_status_str); g_snprintf(secondary_errmsg, (gulong) secondary_errmsg_len, "%s", get_pcap_failure_secondary_error_message(open_status, open_status_str)); @@ -5447,15 +5447,15 @@ main(int argc, char *argv[]) caps = get_if_capabilities(interface_opts, &open_status, &open_status_str); if (caps == NULL) { if (capture_child) { - char *error_msg = g_strdup_printf("The capabilities of the capture device" - " \"%s\" could not be obtained (%s)", + char *error_msg = g_strdup_printf("The capabilities of the capture device " + "\"%s\" could not be obtained (%s)", interface_opts->name, open_status_str); sync_pipe_errmsg_to_parent(2, error_msg, get_pcap_failure_secondary_error_message(open_status, open_status_str)); g_free(error_msg); } else { - cmdarg_err("The capabilities of the capture device" + cmdarg_err("The capabilities of the capture device " "\"%s\" could not be obtained (%s).\n%s", interface_opts->name, open_status_str, get_pcap_failure_secondary_error_message(open_status, open_status_str)); |