From a0226e24181707adae5370b6f9bb7a000f8b6bf2 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Fri, 27 Feb 2009 14:28:02 +0000 Subject: [PATCH] switched all users of cfs_seek(x,y) to cfs_seek(x,y,CFS_SEEK_SET) --- apps/codeprop/codeprop-tmp.c | 8 ++++---- apps/deluge/deluge.c | 6 +++--- apps/shell/shell-file.c | 4 ++-- apps/shell/shell-netfile.c | 4 ++-- core/loader/elfloader-avr.c | 8 ++++---- core/loader/elfloader-msp430.c | 8 ++++---- core/loader/elfloader-x86.c | 8 ++++---- core/loader/elfloader.c | 6 +++--- cpu/at91sam7s/elfloader-arm.c | 2 +- cpu/at91sam7s/loader/codeprop-otf.c | 8 ++++---- cpu/at91sam7s/loader/elfloader-otf.c | 6 +++--- examples/rime/example-rudolph0.c | 6 +++--- examples/rime/example-rudolph1.c | 6 +++--- examples/rime/example-rudolph2.c | 6 +++--- examples/sky/tcprudolph0.c | 8 ++++---- examples/sky/test-coffee.c | 16 ++++++++-------- 16 files changed, 55 insertions(+), 55 deletions(-) diff --git a/apps/codeprop/codeprop-tmp.c b/apps/codeprop/codeprop-tmp.c index d766d6bf2..b58f9bff6 100644 --- a/apps/codeprop/codeprop-tmp.c +++ b/apps/codeprop/codeprop-tmp.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: codeprop-tmp.c,v 1.4 2007/03/18 13:15:01 ksb Exp $ + * @(#)$Id: codeprop-tmp.c,v 1.5 2009/02/27 14:28:02 nvt-se Exp $ */ /** \addtogroup esb @@ -213,7 +213,7 @@ send_udpdata(struct codeprop_udphdr *uh) len = s.len - s.addr; } - cfs_seek(fd, s.addr); + cfs_seek(fd, s.addr, CFS_SEEK_SET); cfs_read(fd, &uh->data[0], len); /* eeprom_read(EEPROMFS_ADDR_CODEPROP + s.addr, &uh->data[0], len);*/ @@ -320,7 +320,7 @@ PT_THREAD(recv_udpthread(struct pt *pt)) if(len > 0) { /* eeprom_write(EEPROMFS_ADDR_CODEPROP + s.addr, &uh->data[0], len);*/ - cfs_seek(fd, s.addr); + cfs_seek(fd, s.addr, CFS_SEEK_SET); cfs_write(fd, &uh->data[0], len); /* beep();*/ @@ -406,7 +406,7 @@ PT_THREAD(recv_tcpthread(struct pt *pt)) /* eeprom_write(EEPROMFS_ADDR_CODEPROP + s.addr, uip_appdata, uip_datalen());*/ - cfs_seek(fd, s.addr); + cfs_seek(fd, s.addr, CFS_SEEK_SET); cfs_write(fd, uip_appdata, uip_datalen()); s.addr += datalen; } diff --git a/apps/deluge/deluge.c b/apps/deluge/deluge.c index 107a22724..305cbb899 100644 --- a/apps/deluge/deluge.c +++ b/apps/deluge/deluge.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: deluge.c,v 1.2 2009/02/26 14:55:29 nvt-se Exp $ + * $Id: deluge.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -134,7 +134,7 @@ transition(int state) static int write_page(struct deluge_object *obj, unsigned pagenum, unsigned char *data) { - cfs_seek(obj->cfs_fd, pagenum * S_PAGE); + cfs_seek(obj->cfs_fd, pagenum * S_PAGE, CFS_SEEK_SET); return cfs_write(obj->cfs_fd, (char *)data, S_PAGE); } @@ -142,7 +142,7 @@ write_page(struct deluge_object *obj, unsigned pagenum, unsigned char *data) static int read_page(struct deluge_object *obj, unsigned pagenum, unsigned char *buf) { - cfs_seek(obj->cfs_fd, pagenum * S_PAGE); + cfs_seek(obj->cfs_fd, pagenum * S_PAGE, CFS_SEEK_SET); return cfs_read(obj->cfs_fd, (char *)buf, S_PAGE); } diff --git a/apps/shell/shell-file.c b/apps/shell/shell-file.c index 101ad3f6c..244c43ec0 100644 --- a/apps/shell/shell-file.c +++ b/apps/shell/shell-file.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: shell-file.c,v 1.9 2009/02/19 22:56:56 adamdunkels Exp $ + * $Id: shell-file.c,v 1.10 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -220,7 +220,7 @@ PROCESS_THREAD(shell_read_process, ev, data) } fd = cfs_open(filename, CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); if(fd < 0) { shell_output_str(&read_command, diff --git a/apps/shell/shell-netfile.c b/apps/shell/shell-netfile.c index 0320bcfa7..e5a76e386 100644 --- a/apps/shell/shell-netfile.c +++ b/apps/shell/shell-netfile.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: shell-netfile.c,v 1.7 2009/02/24 21:27:43 adamdunkels Exp $ + * $Id: shell-netfile.c,v 1.8 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -111,7 +111,7 @@ read_chunk(struct rudolph0_conn *c, int offset, uint8_t *to, int maxsize) fd = cfs_open(filename, CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_read(fd, to, maxsize); /* printf("read_chunk %d bytes at %d, %d\n", ret, offset, (unsigned char)to[0]);*/ cfs_close(fd); diff --git a/core/loader/elfloader-avr.c b/core/loader/elfloader-avr.c index 089f270dd..a3ec1da2d 100644 --- a/core/loader/elfloader-avr.c +++ b/core/loader/elfloader-avr.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader-avr.c,v 1.5 2007/11/16 09:16:31 fros4943 Exp $ + * @(#)$Id: elfloader-avr.c,v 1.6 2009/02/27 14:28:02 nvt-se Exp $ */ #include @@ -114,7 +114,7 @@ elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char // Seek to patched module and burn it to flash (in chunks of // size SPM_PAGESIZE, i.e. 256 bytes on the ATmega128) - cfs_seek(fd, textoff); + cfs_seek(fd, textoff, CFS_SEEK_SET); for (flashptr=mem; flashptr < mem + size; flashptr += SPM_PAGESIZE) { memset (buf, 0, SPM_PAGESIZE); cfs_read(fd, buf, SPM_PAGESIZE); @@ -169,9 +169,9 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset, unsigned int type; unsigned char instr[4]; - cfs_seek(fd, sectionoffset + rela->r_offset); + cfs_seek(fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); cfs_read(fd, instr, 4); - cfs_seek(fd, sectionoffset + rela->r_offset); + cfs_seek(fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); type = ELF32_R_TYPE(rela->r_info); diff --git a/core/loader/elfloader-msp430.c b/core/loader/elfloader-msp430.c index 958a6e174..e80d78891 100644 --- a/core/loader/elfloader-msp430.c +++ b/core/loader/elfloader-msp430.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader-msp430.c,v 1.3 2009/01/15 09:04:55 fros4943 Exp $ + * @(#)$Id: elfloader-msp430.c,v 1.4 2009/02/27 14:28:02 nvt-se Exp $ */ #include "elfloader-arch.h" @@ -73,7 +73,7 @@ elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char flashptr = (unsigned short *)mem; - cfs_seek(fd, textoff); + cfs_seek(fd, textoff, CFS_SEEK_SET); for(ptr = 0; ptr < size; ptr += READSIZE) { /* Read data from file into RAM. */ @@ -97,7 +97,7 @@ elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char flash_done(); #else /* ELFLOADER_CONF_TEXT_IN_ROM */ - cfs_seek(fd, textoff); + cfs_seek(fd, textoff, CFS_SEEK_SET); cfs_read(fd, (unsigned char *)mem, size); #endif /* ELFLOADER_CONF_TEXT_IN_ROM */ } @@ -109,7 +109,7 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset, { addr += rela->r_addend; - cfs_seek(fd, sectionoffset + rela->r_offset); + cfs_seek(fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); cfs_write(fd, (char *)&addr, 2); } /*---------------------------------------------------------------------------*/ diff --git a/core/loader/elfloader-x86.c b/core/loader/elfloader-x86.c index 20e32f1b7..5279ed527 100644 --- a/core/loader/elfloader-x86.c +++ b/core/loader/elfloader-x86.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader-x86.c,v 1.2 2006/12/18 14:54:04 fros4943 Exp $ + * @(#)$Id: elfloader-x86.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $ */ #include "elfloader-arch.h" #include @@ -69,7 +69,7 @@ elfloader_arch_allocate_rom(int size) void elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char *mem) { - cfs_seek(fd, textoff); + cfs_seek(fd, textoff, CFS_SEEK_SET); cfs_read(fd, (unsigned char *)mem, size); } /*---------------------------------------------------------------------------*/ @@ -97,7 +97,7 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset, char *sectionaddress case R_386_32: addr += rela->r_addend; /* +A */ - cfs_seek(fd, sectionoffset + rela->r_offset); + cfs_seek(fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); cfs_write(fd, (char *)&addr, 4); /*printf("elfloader-x86.c: performed relocation type S + A (%d)\n", type);*/ break; @@ -105,7 +105,7 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset, char *sectionaddress addr -= (sectionaddress + rela->r_offset); /* -P */ addr += rela->r_addend; /* +A */ - cfs_seek(fd, sectionoffset + rela->r_offset); + cfs_seek(fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); cfs_write(fd, (char *)&addr, 4); /*printf("elfloader-x86.c: performed relocation type S + A - P (%d)\n", type);*/ break; diff --git a/core/loader/elfloader.c b/core/loader/elfloader.c index 8ad6e6ec1..ebddb2f01 100644 --- a/core/loader/elfloader.c +++ b/core/loader/elfloader.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader.c,v 1.9 2008/07/09 20:56:25 adamdunkels Exp $ + * @(#)$Id: elfloader.c,v 1.10 2009/02/27 14:28:02 nvt-se Exp $ */ #include "contiki.h" @@ -149,7 +149,7 @@ static const unsigned char elf_magic_header[] = static void seek_read(int fd, unsigned int offset, char *buf, int len) { - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); cfs_read(fd, buf, len); #if DEBUG { @@ -168,7 +168,7 @@ seek_read(int fd, unsigned int offset, char *buf, int len) static void seek_write(int fd, unsigned int offset, char *buf, int len) { - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); cfs_write(fd, buf, len); } */ diff --git a/cpu/at91sam7s/elfloader-arm.c b/cpu/at91sam7s/elfloader-arm.c index 30505a47f..0f4062f09 100644 --- a/cpu/at91sam7s/elfloader-arm.c +++ b/cpu/at91sam7s/elfloader-arm.c @@ -29,7 +29,7 @@ elfloader_arch_relocate(int input_fd, type = ELF32_R_TYPE(rela->r_info); - cfs_seek(input_fd, sectionoffset + rela->r_offset); + cfs_seek(input_fd, sectionoffset + rela->r_offset, CFS_SEEK_SET); /* PRINTF("elfloader_arch_relocate: type %d\n", type); */ /* PRINTF("Addr: %p, Addend: %ld\n", addr, rela->r_addend); */ diff --git a/cpu/at91sam7s/loader/codeprop-otf.c b/cpu/at91sam7s/loader/codeprop-otf.c index 263982487..962bca6ad 100644 --- a/cpu/at91sam7s/loader/codeprop-otf.c +++ b/cpu/at91sam7s/loader/codeprop-otf.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: codeprop-otf.c,v 1.2 2007/03/18 13:15:02 ksb Exp $ + * @(#)$Id: codeprop-otf.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $ */ /** \addtogroup esb @@ -215,7 +215,7 @@ send_udpdata(struct codeprop_udphdr *uh) len = s.len - s.addr; } - cfs_seek(fd, s.addr); + cfs_seek(fd, s.addr, CFS_SEEK_SET); cfs_read(fd, (char*)&uh->data[0], len); /* eeprom_read(EEPROMFS_ADDR_CODEPROP + s.addr, &uh->data[0], len);*/ @@ -322,7 +322,7 @@ PT_THREAD(recv_udpthread(struct pt *pt)) if(len > 0) { /* eeprom_write(EEPROMFS_ADDR_CODEPROP + s.addr, &uh->data[0], len);*/ - cfs_seek(fd, s.addr); + cfs_seek(fd, s.addr, CFS_SEEK_SET); cfs_write(fd, (char*)&uh->data[0], len); /* beep();*/ @@ -405,7 +405,7 @@ PT_THREAD(recv_tcpthread(struct pt *pt)) if(datalen > 0) { /* printf("Got %d bytes\n", datalen); */ - if (cfs_seek(fd, s.addr) != s.addr) { + if (cfs_seek(fd, s.addr, CFS_SEEK_SET) != s.addr) { PRINTF(("codeprop: seek in buffer file failed\n")); uip_abort(); } diff --git a/cpu/at91sam7s/loader/elfloader-otf.c b/cpu/at91sam7s/loader/elfloader-otf.c index c9b7d4470..f3b28b2ee 100644 --- a/cpu/at91sam7s/loader/elfloader-otf.c +++ b/cpu/at91sam7s/loader/elfloader-otf.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader-otf.c,v 1.1 2007/03/07 16:07:26 ksb Exp $ + * @(#)$Id: elfloader-otf.c,v 1.2 2009/02/27 14:28:02 nvt-se Exp $ */ #include "contiki.h" @@ -152,7 +152,7 @@ copy_segment_data(int input_fd, unsigned int offset, { char buffer[16]; int res; - if (cfs_seek(input_fd, offset) != offset) return ELFLOADER_INPUT_ERROR; + if (cfs_seek(input_fd, offset, CFS_SEEK_SET) != offset) return ELFLOADER_INPUT_ERROR; while(len > sizeof(buffer)) { res = cfs_read(input_fd, buffer, sizeof(buffer)); if (res != sizeof(buffer)) return ELFLOADER_INPUT_ERROR; @@ -170,7 +170,7 @@ copy_segment_data(int input_fd, unsigned int offset, static int seek_read(int fd, unsigned int offset, char *buf, int len) { - if (cfs_seek(fd, offset) != offset) return -1; + if (cfs_seek(fd, offset, CFS_SEEK_SET) != offset) return -1; return cfs_read(fd, buf, len); } diff --git a/examples/rime/example-rudolph0.c b/examples/rime/example-rudolph0.c index a1abd7172..3e39b6f00 100644 --- a/examples/rime/example-rudolph0.c +++ b/examples/rime/example-rudolph0.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph0.c,v 1.1 2008/01/25 18:00:51 adamdunkels Exp $ + * $Id: example-rudolph0.c,v 1.2 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -70,7 +70,7 @@ write_chunk(struct rudolph0_conn *c, int offset, int flag, if(datalen > 0) { int ret; - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_write(fd, data, datalen); /* printf("write_chunk wrote %d bytes at %d, %d\n", ret, offset, (unsigned char)data[0]);*/ } @@ -102,7 +102,7 @@ read_chunk(struct rudolph0_conn *c, int offset, uint8_t *to, int maxsize) fd = cfs_open("hej", CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_read(fd, to, maxsize); /* printf("read_chunk %d bytes at %d, %d\n", ret, offset, (unsigned char)to[0]);*/ cfs_close(fd); diff --git a/examples/rime/example-rudolph1.c b/examples/rime/example-rudolph1.c index cafe857fd..77a7b3538 100644 --- a/examples/rime/example-rudolph1.c +++ b/examples/rime/example-rudolph1.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph1.c,v 1.3 2008/11/17 22:52:10 oliverschmidt Exp $ + * $Id: example-rudolph1.c,v 1.4 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -85,7 +85,7 @@ write_chunk(struct rudolph1_conn *c, int offset, int flag, if(datalen > 0) { int ret; - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_write(fd, data, datalen); } @@ -123,7 +123,7 @@ read_chunk(struct rudolph1_conn *c, int offset, uint8_t *to, int maxsize) fd = cfs_open("hej", CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_read(fd, to, maxsize); /* printf("%d.%d: read_chunk %d bytes at %d, %d\n", rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], diff --git a/examples/rime/example-rudolph2.c b/examples/rime/example-rudolph2.c index fc923aec2..7e3dac62b 100644 --- a/examples/rime/example-rudolph2.c +++ b/examples/rime/example-rudolph2.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph2.c,v 1.2 2008/11/17 22:52:10 oliverschmidt Exp $ + * $Id: example-rudolph2.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -84,7 +84,7 @@ write_chunk(struct rudolph2_conn *c, int offset, int flag, if(datalen > 0) { int ret; - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_write(fd, data, datalen); } @@ -122,7 +122,7 @@ read_chunk(struct rudolph2_conn *c, int offset, uint8_t *to, int maxsize) fd = cfs_open("hej", CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_read(fd, to, maxsize); /* printf("%d.%d: read_chunk %d bytes at %d, %d\n", rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], diff --git a/examples/sky/tcprudolph0.c b/examples/sky/tcprudolph0.c index 9e731bca5..3a57333ed 100644 --- a/examples/sky/tcprudolph0.c +++ b/examples/sky/tcprudolph0.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: tcprudolph0.c,v 1.11 2008/11/17 22:52:10 oliverschmidt Exp $ + * @(#)$Id: tcprudolph0.c,v 1.12 2009/02/27 14:28:02 nvt-se Exp $ */ #include @@ -132,7 +132,7 @@ PT_THREAD(recv_tcpthread(struct pt *pt)) leds_toggle(LEDS_RED); if(uip_len > 0) { s.fd = cfs_open("codeprop.out", CFS_WRITE + CFS_APPEND); - cfs_seek(s.fd, s.addr); + cfs_seek(s.fd, s.addr, CFS_SEEK_SET); /* xmem_pwrite(uip_appdata, uip_len, EEPROMFS_ADDR_CODEPROP + s.addr);*/ cfs_write(s.fd, uip_appdata, uip_len); cfs_close(s.fd); @@ -220,7 +220,7 @@ write_chunk(struct rudolph0_conn *c, int offset, int flag, if(datalen > 0) { int ret; - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_write(fd, data, datalen); /* printf("write_chunk wrote %d bytes at %d, %d\n", ret, offset, (unsigned char)data[0]);*/ } @@ -243,7 +243,7 @@ read_chunk(struct rudolph0_conn *c, int offset, uint8_t *to, int maxsize) fd = cfs_open("codeprop.out", CFS_READ); - cfs_seek(fd, offset); + cfs_seek(fd, offset, CFS_SEEK_SET); ret = cfs_read(fd, to, maxsize); /* printf("read_chunk %d bytes at %d, %d\n", ret, offset, (unsigned char)to[0]);*/ if(ret < maxsize) { diff --git a/examples/sky/test-coffee.c b/examples/sky/test-coffee.c index 4579e5553..21c89fa32 100755 --- a/examples/sky/test-coffee.c +++ b/examples/sky/test-coffee.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: test-coffee.c,v 1.8 2009/02/22 15:17:36 nvt-se Exp $ + * $Id: test-coffee.c,v 1.9 2009/02/27 14:28:02 nvt-se Exp $ */ /** @@ -151,7 +151,7 @@ coffee_file_test(void) } /* Test 9: Seek to beginning. */ - if(cfs_seek(wfd, 0) != 0) { + if(cfs_seek(wfd, 0, CFS_SEEK_SET) != 0) { FAIL(-11); } @@ -164,7 +164,7 @@ coffee_file_test(void) } /* Test 11: Read the data from the log. */ - cfs_seek(rfd, 0); + cfs_seek(rfd, 0, CFS_SEEK_SET); memset(buf, 0, sizeof(buf)); r = cfs_read(rfd, buf, sizeof(buf)); if(r < 0) { @@ -184,7 +184,7 @@ coffee_file_test(void) for(r = 0; r < sizeof(buf); r++) { buf[r] = sizeof(buf) - r - 1; } - if(cfs_seek(wfd, 0) != 0) { + if(cfs_seek(wfd, 0, CFS_SEEK_SET) != 0) { FAIL(-17); } r = cfs_write(wfd, buf, sizeof(buf)); @@ -193,12 +193,12 @@ coffee_file_test(void) } else if(r < sizeof(buf)) { FAIL(-19); } - if(cfs_seek(rfd, 0) != 0) { + if(cfs_seek(rfd, 0, CFS_SEEK_SET) != 0) { FAIL(-20); } /* Test 14: Read the reversed buffer. */ - cfs_seek(rfd, 0); + cfs_seek(rfd, 0, CFS_SEEK_SET); memset(buf, 0, sizeof(buf)); r = cfs_read(rfd, buf, sizeof(buf)); if(r < 0) { @@ -235,7 +235,7 @@ coffee_file_test(void) buf[r] = r; } - if(cfs_seek(wfd, offset) != offset) { + if(cfs_seek(wfd, offset, CFS_SEEK_SET) != offset) { FAIL(-26); } @@ -243,7 +243,7 @@ coffee_file_test(void) FAIL(-27); } - if(cfs_seek(wfd, offset) != offset) { + if(cfs_seek(wfd, offset, CFS_SEEK_SET) != offset) { FAIL(-28); }