src/jkOwnLib/splix.c 1.6
1.6 2009/02/10 22:24:24 kent
Wrapping a read in netReadAll instead because it's so big it sometimes seems to come back in parts.
Index: src/jkOwnLib/splix.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/jkOwnLib/splix.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 4 -r1.5 -r1.6
--- src/jkOwnLib/splix.c 20 Jan 2009 19:24:47 -0000 1.5
+++ src/jkOwnLib/splix.c 10 Feb 2009 22:24:24 -0000 1.6
@@ -3,8 +3,9 @@
/* This file is copyright 2008 Jim Kent. All rights reserved. */
#include "common.h"
#include "splix.h"
+#include "net.h"
#include <sys/mman.h>
static void *pointerOffset(void *pt, bits64 offset)
/* A little wrapper around pointer arithmetic in terms of bytes. */
@@ -52,9 +53,9 @@
if (lseek(fd, 0, SEEK_SET) < 0)
errnoAbort("Couldn't seek back to start of splix file %s. "
"Splix files must be random access files, not pipes and the like"
, fileName);
- if (read(fd, header, h.size) < h.size)
+ if (netReadAll(fd, header, h.size) < h.size)
errnoAbort("Couldn't read all of splix file %s.", fileName);
}
/* Allocate wrapper structure and fill it in. */