projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
428ff5a
)
yaffs direct: Fix yaffs direct offset handling for pwrite
author
Charles Manning
<cdhmanning@gmail.com>
Thu, 24 Jun 2010 21:45:43 +0000
(09:45 +1200)
committer
Charles Manning
<cdhmanning@gmail.com>
Thu, 24 Jun 2010 21:45:43 +0000
(09:45 +1200)
Note that if the handle is opened with O_APPEND then the pwrite() offset
is ignored and the write appends.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c
patch
|
blob
|
history
diff --git
a/direct/yaffsfs.c
b/direct/yaffsfs.c
index 9f6008dbea91c4d2fef64ea93edffbaa83c670d0..2b64bc6be9ee8390b2ed8280ec61d6d5d686352b 100644
(file)
--- a/
direct/yaffsfs.c
+++ b/
direct/yaffsfs.c
@@
-826,10
+826,10
@@
int yaffsfs_do_write(int fd, const void *vbuf, unsigned int nbyte, int isPwrite,
yaffsfs_SetError(-EINVAL);
totalWritten=-1;
} else if( h && obj){
- if(isPwrite)
- startPos = offset;
if(h->append)
startPos = yaffs_GetObjectFileLength(obj);
+ else if(isPwrite)
+ startPos = offset;
else
startPos = h->position;