switched all users of cfs_seek(x,y) to cfs_seek(x,y,CFS_SEEK_SET)
This commit is contained in:
parent
3191a2568c
commit
a0226e2418
16 changed files with 55 additions and 55 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue