When reporting "sorry, *this* packet can't be written to a file of that
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 19 Nov 2011 20:18:01 +0000 (20:18 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 19 Nov 2011 20:18:01 +0000 (20:18 +0000)
commita33e6528d96478e58aad7ff1a0dc2e6ad7db2a8a
tree23f6e64eaa570e79fd24e3dd413e77eed56f9737
parent93a8dcc5e29222c3c48ad706146cad165cb8695f
When reporting "sorry, *this* packet can't be written to a file of that
type" when writing out a capture file (i.e., writing a
per-packet-encapsulation capture to a file type that supports it but
doesn't support one of the packet's encapsulations), report the packet
number and, when doing this in a merge operation, report the file from
which it came.

When reporting "sorry, that file can't be written to a file of that
type, period", show the file type rather than the input file link-layer
type that causes the problem.  (We could show both.  We could be
*really* ambitious and iterate through all possible file types and show
the ones that will or at least might work....)

file_write_error_message() is documented as handling only UNIX-style
errnos, and libwireshark should be usable without libwiretap, so leave
it up to its callers to handle Wiretap errors such as
WTAP_ERR_SHORT_WRITE.

Clean up indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39949 f5534014-38df-0310-8fa8-9805f1628bb7
alert_box.c
editcap.c
epan/filesystem.c
file.c
merge.c
merge.h
mergecap.c
tshark.c