]> git.donarmstrong.com Git - samtools.git/blobdiff - knetfile.c
Added VCF header
[samtools.git] / knetfile.c
index 0dee408c2255f8330bccbd9a1f58565b0ebd0cdb..47a394aebd3d424798767641aff629ae0d11919b 100644 (file)
@@ -536,6 +536,8 @@ off_t knet_seek(knetFile *fp, int64_t off, int whence)
                 * while fseek() returns zero on success. */
                off_t offset = lseek(fp->fd, off, whence);
                if (offset == -1) {
+            // Be silent, it is OK for knet_seek to fail when the file is streamed
+            // fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
                        return -1;
                }
                fp->offset = offset;
@@ -564,9 +566,10 @@ off_t knet_seek(knetFile *fp, int64_t off, int whence)
         else if (whence==SEEK_SET)
             fp->offset = off;
                fp->is_ready = 0;
-               return fp->offset;
+               return 0;
        }
        errno = EINVAL;
+    fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
        return -1;
 }