summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-13 18:21:08 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-14 10:18:31 +0100
commit4fdc3ee0aa9d319aa19a83f986d57995b8b44991 (patch)
treee06836414230bf58e46022c5d79cb054059f3801 /cpukit/libfs
parentFix spelling (diff)
downloadrtems-4fdc3ee0aa9d319aa19a83f986d57995b8b44991.tar.bz2
dosfs: Avoid error caused by bdbuf configuration
The success of a block size change depends on the bdbuf configuration. Do not treat a failed block size change as a hard error. This is only a missed performance optimization.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/src/dosfs/fat.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/cpukit/libfs/src/dosfs/fat.c b/cpukit/libfs/src/dosfs/fat.c
index c82bf5ac8b..a672f42c7a 100644
--- a/cpukit/libfs/src/dosfs/fat.c
+++ b/cpukit/libfs/src/dosfs/fat.c
@@ -773,17 +773,12 @@ fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
{
- vol->bytes_per_block = vol->bpc;
- vol->bytes_per_block_log2 = vol->bpc_log2;
- vol->sectors_per_block = vol->spc;
- sc = rtems_bdbuf_set_block_size (vol->dd, vol->bytes_per_block, true);
- if (RTEMS_SUCCESSFUL != sc)
+ sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
+ if (sc == RTEMS_SUCCESSFUL)
{
- close(vol->fd);
- free(fs_info->vhash);
- free(fs_info->rhash);
- free(fs_info->uino);
- rtems_set_errno_and_return_minus_one( EIO );
+ vol->bytes_per_block = vol->bpc;
+ vol->bytes_per_block_log2 = vol->bpc_log2;
+ vol->sectors_per_block = vol->spc;
}
}