forked from Imagelibrary/rtems
@@ -91,7 +91,7 @@ msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
|
||||
if (sc != RTEMS_SUCCESSFUL)
|
||||
rtems_set_errno_and_return_minus_one(EIO);
|
||||
|
||||
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
|
||||
if (rtems_libio_iop_is_append(iop))
|
||||
iop->offset = fat_fd->fat_file_size;
|
||||
|
||||
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
|
||||
|
||||
@@ -87,7 +87,7 @@ static ssize_t memfile_write(
|
||||
IMFS_memfile_t *memfile = IMFS_iop_to_memfile( iop );
|
||||
ssize_t status;
|
||||
|
||||
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
|
||||
if (rtems_libio_iop_is_append(iop))
|
||||
iop->offset = memfile->File.size;
|
||||
|
||||
status = IMFS_memfile_write( memfile, iop->offset, buffer, count );
|
||||
|
||||
@@ -672,10 +672,10 @@ static ssize_t rtems_jffs2_file_write(rtems_libio_t *iop, const void *buf, size_
|
||||
|
||||
rtems_jffs2_do_lock(inode->i_sb);
|
||||
|
||||
if ((iop->flags & LIBIO_FLAGS_APPEND) == 0) {
|
||||
pos = iop->offset;
|
||||
} else {
|
||||
if (rtems_libio_iop_is_append(iop)) {
|
||||
pos = inode->i_size;
|
||||
} else {
|
||||
pos = iop->offset;
|
||||
}
|
||||
|
||||
if (pos > inode->i_size) {
|
||||
|
||||
@@ -2566,7 +2566,7 @@ Nfs nfs = node->nfs;
|
||||
|
||||
|
||||
SERP_ARGS(node).writearg.beginoffset = UINT32_C(0xdeadbeef);
|
||||
if ( LIBIO_FLAGS_APPEND & iop->flags ) {
|
||||
if (rtems_libio_iop_is_append(iop)) {
|
||||
if ( updateAttr(node, 0) ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ rtems_rfs_rtems_file_write (rtems_libio_t* iop,
|
||||
|
||||
rtems_rfs_file_set_bpos (file, pos);
|
||||
}
|
||||
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
|
||||
else if (pos < file_size && rtems_libio_iop_is_append(iop))
|
||||
{
|
||||
pos = file_size;
|
||||
rc = rtems_rfs_file_seek (file, pos, &pos);
|
||||
|
||||
Reference in New Issue
Block a user