aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hatina <phatina@redhat.com>2014-02-03 10:51:07 +0100
committerEvan Huus <eapache@gmail.com>2014-02-03 13:31:27 +0000
commitf62450ff9362058adeabb7fafc91ca69f09b1ede (patch)
tree511aa56dfc7a3f12ee21b584a69a3c337e3bf2b9
parent6d2f865b3513948ca4ab3f76fa4bf1a7f8f07f5a (diff)
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>
-rw-r--r--tshark.c2
-rw-r--r--wiretap/file_wrappers.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index d41818caa9..41d5087abc 100644
--- a/tshark.c
+++ b/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");
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c
index 3b996f5d3c..93ac29e4da 100644
--- a/wiretap/file_wrappers.c
+++ b/wiretap/file_wrappers.c
@@ -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;