From c4e46c1e7a7c369364c83d47c2ae33210368c9ea Mon Sep 17 00:00:00 2001 From: nfshp Date: Wed, 9 Apr 2003 09:43:19 +0000 Subject: [PATCH] [liblustre]: now we don't need the syscall workaround in libsysio anymore --- lustre/liblustre/lltest.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lustre/liblustre/lltest.c b/lustre/liblustre/lltest.c index db3ff4b..6710f15 100644 --- a/lustre/liblustre/lltest.c +++ b/lustre/liblustre/lltest.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -78,7 +79,7 @@ int main(int argc, char * const argv[]) { struct stat statbuf; - int err, i, fd, written, read; + int err, i, fd, written, readed; char pgbuf[4096], readbuf[4096]; int npages; @@ -111,26 +112,26 @@ main(int argc, char * const argv[]) #if 1 portal_debug = 0; portal_subsystem_debug = 0; - npages = 1024; + npages = 100; - fd = fixme_open("/newfile3", O_RDWR|O_CREAT|O_TRUNC, 00664); + fd = open("/newfile01", O_RDWR|O_CREAT|O_TRUNC, 00664); printf("***************** open return %d ****************\n", fd); printf("***************** begin write pages ****************\n"); for (i = 0; i < npages; i++ ) { memset(pgbuf, ('A'+ i%10), 4096); - written = fixme_write(fd, pgbuf, 4096); + written = write(fd, pgbuf, 4096); printf(">>> page %d: %d bytes written\n", i, written); } printf("***************** begin read pages ****************\n"); - fixme_lseek(fd, 0, SEEK_SET); + lseek(fd, 0, SEEK_SET); for (i = 0; i < npages; i++ ) { memset(readbuf, '8', 4096); - read = fixme_read(fd, readbuf, 4096); + readed = read(fd, readbuf, 4096); readbuf[10] = 0; - printf("<<< page %d: %d bytes (%s)", i, read, readbuf); + printf("<<< page %d: %d bytes (%s)\n", i, readed, readbuf); } #endif printf("sysio is about shutdown\n"); -- 1.8.3.1