summaryrefslogtreecommitdiff
path: root/wiretap/wtap.h
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 /wiretap/wtap.h
parent5e0e4fa9e4de39f9402e6472e6b25439f8464c24 (diff)
downloadwireshark-a566f617d8f712a8f4d1fe7b6d9b9f6ebe79ba11.tar.gz
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 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index e58134a2f0..3dd525826b 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1636,12 +1636,12 @@ int wtap_register_encap_type(const char* name, const char* short_name);
#define WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED -9
/** The specified format doesn't support per-packet encapsulations */
-#define WTAP_ERR_CANT_CLOSE -10
- /** The file couldn't be closed, reason unknown */
-
-#define WTAP_ERR_CANT_READ -11
+#define WTAP_ERR_CANT_WRITE -10
/** An attempt to read failed, reason unknown */
+#define WTAP_ERR_CANT_CLOSE -11
+ /** The file couldn't be closed, reason unknown */
+
#define WTAP_ERR_SHORT_READ -12
/** An attempt to read read less data than it should have */