aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-07 16:18:47 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-07 23:19:56 +0000
commita566f617d8f712a8f4d1fe7b6d9b9f6ebe79ba11 (patch)
tree1730a9b5c9cc7704273e4104a426e6987f9ef9b6 /file.c
parent5e0e4fa9e4de39f9402e6472e6b25439f8464c24 (diff)
No need for WTAP_ERR_CANT_READ.
Unlike the standard I/O routines, the code we introduced that supports fast random seeking on gzipped files will always supply some specific error code for read errors, so we don't need WTAP_ERR_CANT_READ. Add WTAP_ERR_CANT_WRITE for writing, as we're still using the standard I/O routines for that. Set errno to WTAP_ERR_CANT_WRITE before calling fwrite() in wtap_dump_file_write(), so that it's used if fwrite() fails without setting errno. Change-Id: I6bf066a6838284a532737aa65fd0c9bb3639ad63 Reviewed-on: https://code.wireshark.org/review/4540 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'file.c')
-rw-r--r--file.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/file.c b/file.c
index e948a48a83..31d2b6a713 100644
--- a/file.c
+++ b/file.c
@@ -748,12 +748,6 @@ cf_read(capture_file *cf, gboolean reloading)
g_free(err_info);
break;
- case WTAP_ERR_CANT_READ:
- simple_error_message_box(
- "An attempt to read from the capture file failed for"
- " some unknown reason.");
- break;
-
case WTAP_ERR_SHORT_READ:
simple_error_message_box(
"The capture file appears to have been cut short"
@@ -1533,12 +1527,6 @@ cf_merge_files(char **out_filenamep, int in_file_count,
g_free(err_info);
break;
- case WTAP_ERR_CANT_READ:
- simple_error_message_box(
- "An attempt to read from the capture file %s failed for"
- " some unknown reason.", display_basename);
- break;
-
case WTAP_ERR_SHORT_READ:
simple_error_message_box(
"The capture file %s appears to have been cut short"
@@ -4466,12 +4454,6 @@ rescan_file(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
g_free(err_info);
break;
- case WTAP_ERR_CANT_READ:
- simple_error_message_box(
- "An attempt to read from the capture file failed for"
- " some unknown reason.");
- break;
-
case WTAP_ERR_SHORT_READ:
simple_error_message_box(
"The capture file appears to have been cut short"