Fix opening files using O_APPEND
commitf318eae1ae5152ebbf70e67e2dec5919a104ed81
authorAlberto Bertogli <albertito@blitiri.com.ar>
Thu, 16 Apr 2009 16:16:15 +0000 (16 13:16 -0300)
committerAlberto Bertogli <albertito@blitiri.com.ar>
Thu, 16 Apr 2009 16:16:15 +0000 (16 13:16 -0300)
tree4568d01d08e2c27b14b277ae4564069c900c825a
parent6f3c37f159f317673a6929125a329d082bdb10f1
Fix opening files using O_APPEND

When opening a file in O_APPEND mode, each write must behave just as if a
lseek(fs->fd, 0, SEEK_END) was performed before it.

We used not to honour that behaviour, but this patch fixes that.

Thanks to Jonathan Yu for the bug report.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
libjio/ansi.c
libjio/common.h
libjio/trans.c
libjio/unix.c