forked from osmocom/wireshark
allow tshark reading from pipes
Change-Id: If20a14b949667911df44f09c6a705b7645d4c49e Reviewed-on: https://code.wireshark.org/review/85 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
parent
6d2f865b35
commit
f62450ff93
2
tshark.c
2
tshark.c
|
@ -300,7 +300,7 @@ print_usage(gboolean print_ver)
|
|||
#endif
|
||||
/*fprintf(output, "\n");*/
|
||||
fprintf(output, "Input file:\n");
|
||||
fprintf(output, " -r <infile> set the filename to read from (no pipes or stdin!)\n");
|
||||
fprintf(output, " -r <infile> set the filename to read from (no stdin!)\n");
|
||||
|
||||
fprintf(output, "\n");
|
||||
fprintf(output, "Processing:\n");
|
||||
|
|
|
@ -1054,7 +1054,8 @@ file_seek(FILE_T file, gint64 offset, int whence, int *err)
|
|||
|
||||
/* if within raw area while reading, just go there */
|
||||
if (file->compression == UNCOMPRESSED && file->pos + offset >= file->raw
|
||||
&& (offset < 0 || offset >= file->have) /* seek only when we don't have that offset in buffer */)
|
||||
&& (offset < 0 || offset >= file->have) /* seek only when we don't have that offset in buffer */
|
||||
&& (file->fast_seek) /* seek only when random access is supported */)
|
||||
{
|
||||
if (ws_lseek64(file->fd, offset - file->have, SEEK_CUR) == -1) {
|
||||
*err = errno;
|
||||
|
|
Loading…
Reference in New Issue