Wireshark-commits: [Wireshark-commits] master a566f61: No need for WTAP_ERR_CANT_READ.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 7 Oct 2014 23:19:59 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a566f617d8f712a8f4d1fe7b6d9b9f6ebe79ba11
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

a566f61 by Guy Harris (guy@xxxxxxxxxxxx):

    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@xxxxxxxxxxxx>
    

Actions performed:

    from  5e0e4fa   Replace another file_read() call with wtap_read_bytes().
    adds  a566f61   No need for WTAP_ERR_CANT_READ.


Summary of changes:
 epan/wslua/wslua_file.c       |    9 +++----
 file.c                        |   18 --------------
 rawshark.c                    |   11 ++-------
 tshark.c                      |    5 ----
 wiretap/5views.c              |    1 -
 wiretap/aethra.c              |    3 ---
 wiretap/btsnoop.c             |    3 ---
 wiretap/eyesdn.c              |    2 --
 wiretap/file_access.c         |    1 +
 wiretap/i4btrace.c            |    2 --
 wiretap/iptrace.c             |    3 ---
 wiretap/iseries.c             |    1 -
 wiretap/lanalyzer.c           |    5 ----
 wiretap/libpcap.c             |    3 ---
 wiretap/mp2t.c                |    2 --
 wiretap/mpeg.c                |    2 --
 wiretap/netmon.c              |    6 -----
 wiretap/netscaler.c           |    1 -
 wiretap/nettl.c               |    3 ---
 wiretap/network_instruments.c |    1 -
 wiretap/netxray.c             |    3 ---
 wiretap/ngsniffer.c           |    8 -------
 wiretap/pcap-common.c         |   16 -------------
 wiretap/pcapng.c              |   17 --------------
 wiretap/radcom.c              |   11 ---------
 wiretap/snoop.c               |    6 -----
 wiretap/visual.c              |    4 ----
 wiretap/vwr.c                 |    1 -
 wiretap/wtap.c                |   52 ++++++++++++++++++++++++++++++++++++++++-
 wiretap/wtap.h                |    8 +++----
 30 files changed, 61 insertions(+), 147 deletions(-)