Changeset f9fd0c2 in rtems for cpukit/libblock


Ignore:
Timestamp:
Mar 13, 2012, 1:52:57 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
c08072ce
Parents:
12806cd
git-author:
Sebastian Huber <sebastian.huber@…> (03/13/12 13:52:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/14/12 09:48:39)
Message:

PR2040: libblock: Track number of erased blocks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/flashdisk.c

    r12806cd rf9fd0c2  
    253253  uint32_t block_count;                    /**< The number of avail. blocks. */
    254254  uint32_t unavail_blocks;                 /**< The number of unavail blocks. */
     255  uint32_t erased_blocks;                  /**< The number of erased blocks. */
    255256
    256257  rtems_fdisk_device_ctl* devices;         /**< The flash devices for this
     
    969970      return ret;
    970971  }
     972  --fd->erased_blocks;
    971973  return rtems_fdisk_seg_write (fd, sc,
    972974                                page * fd->block_size, buffer, fd->block_size);
     
    11461148  }
    11471149
     1150  fd->erased_blocks += sc->pages;
    11481151  sc->erased++;
    11491152
     
    16091612                                                  page + sc->pages_desc);
    16101613
    1611           if (ret)
     1614          if (ret == 0)
     1615          {
     1616            ++fd->erased_blocks;
     1617          }
     1618          else
    16121619          {
    16131620#if RTEMS_FDISK_TRACE
Note: See TracChangeset for help on using the changeset viewer.