Changeset 96b1d7f in rtems


Ignore:
Timestamp:
Jun 3, 2012, 11:06:51 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
b8ed6d80
Parents:
39ee704e
git-author:
Sebastian Huber <sebastian.huber@…> (06/03/12 11:06:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/04/12 07:54:32)
Message:

dosfs: Fix for no space left on device condition

The file size was wrong in the no space left on device condition. This
resulted in turn in a read of an invalid block which lead to an EIO
error status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/fat_file.c

    r39ee704e r96b1d7f  
    553553    /*  check wether we satisfied request for 'cls2add' clusters */
    554554    if (cls2add != cls_added)
    555         *a_length = new_length -
    556                     ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
    557                     (bytes2add & (fs_info->vol.bpc - 1));
     555    {
     556        new_length -= bytes2add & (fs_info->vol.bpc - 1);
     557        new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
     558    }
    558559
    559560    /* add new chain to the end of existed */
     
    604605    }
    605606
     607    *a_length = new_length;
    606608    fat_fd->fat_file_size = new_length;
    607609
Note: See TracChangeset for help on using the changeset viewer.