2010-08-26 Chris Johns <chrisj@rtems.org>

* libfs/src/defaults/default_evaluate_link.c: Remove assignment.

        * libfs/src/rfs/rtems-rfs-file.c: Check then load the inode is not
        present on the close.

        * libfs/src/rfs/rtems-rfs-format.c: Initialise the buffer chain.
This commit is contained in:
Chris Johns
2010-08-26 06:31:15 +00:00
parent 37ae92ae11
commit 6ed22abde2
3 changed files with 27 additions and 11 deletions

View File

@@ -158,18 +158,24 @@ rtems_rfs_file_close (rtems_rfs_file_system* fs,
if (handle->shared->references == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
handle->shared->map.size.count = handle->shared->size.count;
handle->shared->map.size.offset = handle->shared->size.offset;
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
handle->shared->map.size.count = handle->shared->size.count;
handle->shared->map.size.offset = handle->shared->size.offset;
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{

View File

@@ -538,6 +538,7 @@ rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
memset (&fs, 0, sizeof (rtems_rfs_file_system));
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);