Index: cpukit/libblock/src/bdbuf.c
===================================================================
--- cpukit/libblock/src/bdbuf.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/bdbuf.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -21,5 +21,5 @@
  *
  * Copyright (c) 2009 embedded brains GmbH.
- * 
+ *
  * @(#) bdbuf.c,v 1.14 2004/04/17 08:15:17 ralf Exp
  */
@@ -99,5 +99,5 @@
   rtems_chain_control swapout_workers;   /**< The work threads for the swapout
                                           * task. */
-  
+
   rtems_bdbuf_buffer* bds;               /**< Pointer to table of buffer
                                           * descriptors. */
@@ -133,5 +133,5 @@
   size_t              group_count;       /**< The number of groups. */
   rtems_bdbuf_group*  groups;            /**< The groups. */
-  
+
   bool                initialised;       /**< Initialised state. */
 } rtems_bdbuf_cache;
@@ -417,5 +417,5 @@
     p = q;
   }
- 
+
   q->avl.left = q->avl.right = NULL;
   q->avl.bal = 0;
@@ -952,5 +952,5 @@
   rtems_status_code sc;
   rtems_mode        prev_mode;
-  
+
   /*
    * Indicate we are waiting.
@@ -969,5 +969,5 @@
    */
   prev_mode = rtems_bdbuf_disable_preemption ();
-  
+
   /*
    * Unlock the cache, wait, and lock the cache when we return.
@@ -979,12 +979,12 @@
   if (sc == RTEMS_TIMEOUT)
     rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
-  
+
   if (sc != RTEMS_UNSATISFIED)
     rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
-  
+
   rtems_bdbuf_lock_cache ();
 
   rtems_bdbuf_restore_preemption (prev_mode);
-  
+
   --waiters->count;
 }
@@ -1061,5 +1061,5 @@
   if (bd->state == RTEMS_BDBUF_STATE_ACCESS)
     bd->hold_timer = bdbuf_config.swap_block_hold;
-      
+
   rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
 
@@ -1108,10 +1108,10 @@
   size_t bufs_per_size;
   size_t bds_per_size;
-  
+
   if (size > bdbuf_config.buffer_max)
     return 0;
-  
+
   bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
-  
+
   for (bds_per_size = 1;
        bds_per_size < bufs_per_size;
@@ -1136,5 +1136,5 @@
       rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
   }
-  
+
   rtems_chain_extract (&bd->link);
 }
@@ -1167,15 +1167,15 @@
             group - bdbuf_cache.groups, group->bds_per_group,
             new_bds_per_group);
-  
+
   bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
-  
+
   for (b = 0, bd = group->bdbuf;
        b < group->bds_per_group;
        b++, bd += bufs_per_bd)
     rtems_bdbuf_remove_from_cache_and_lru_list (bd);
-  
+
   group->bds_per_group = new_bds_per_group;
   bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
-  
+
   for (b = 1, bd = group->bdbuf + bufs_per_bd;
        b < group->bds_per_group;
@@ -1280,5 +1280,5 @@
   if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
     return RTEMS_INVALID_NUMBER;
-  
+
   /*
    * We use a special variable to manage the initialisation incase we have
@@ -1296,5 +1296,5 @@
   bdbuf_cache.initialised = true;
   rtems_bdbuf_restore_preemption (prev_mode);
-  
+
   /*
    * For unspecified cache alignments we use the CPU alignment.
@@ -1321,5 +1321,5 @@
 
   rtems_bdbuf_lock_cache ();
-  
+
   sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
                                1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
@@ -1327,5 +1327,5 @@
   if (sc != RTEMS_SUCCESSFUL)
     goto error;
-  
+
   sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
                                0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
@@ -1345,5 +1345,5 @@
   if (sc != RTEMS_SUCCESSFUL)
     goto error;
-  
+
   /*
    * Compute the various number of elements in the cache.
@@ -1371,5 +1371,5 @@
   if (!bdbuf_cache.groups)
     goto error;
-  
+
   /*
    * Allocate memory for buffer memory. The buffer memory will be cache
@@ -1377,5 +1377,5 @@
    * with free(). Return 0 if allocated.
    *
-   * The memory allocate allows a 
+   * The memory allocate allows a
    */
   if (rtems_memalign ((void **) &bdbuf_cache.buffers,
@@ -1396,5 +1396,5 @@
     bd->group  = group;
     bd->buffer = buffer;
-    
+
     rtems_chain_append (&bdbuf_cache.lru, &bd->link);
 
@@ -1415,5 +1415,5 @@
     group->bdbuf = bd;
   }
-         
+
   /*
    * Create and start swapout task. This task will create and manage the worker
@@ -1421,5 +1421,5 @@
    */
   bdbuf_cache.swapout_enabled = true;
-  
+
   sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
                           bdbuf_config.swapout_priority ?
@@ -1473,5 +1473,5 @@
   rtems_status_code sc = RTEMS_SUCCESSFUL;
   rtems_event_set   out = 0;
-  
+
   sc = rtems_event_receive (event,
                             RTEMS_EVENT_ALL | RTEMS_WAIT,
@@ -1596,5 +1596,5 @@
   if (!rtems_chain_is_empty (&bdbuf_cache.modified))
     rtems_bdbuf_wake_swapper ();
-  
+
   rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
 }
@@ -1606,5 +1606,5 @@
 {
   rtems_bdbuf_buffer *bd = NULL;
-  
+
   bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
 
@@ -1632,5 +1632,5 @@
 {
   rtems_bdbuf_buffer *bd = NULL;
-  
+
   do
   {
@@ -1778,5 +1778,5 @@
       break;
   }
-  
+
   if (rtems_bdbuf_tracer)
   {
@@ -1867,5 +1867,5 @@
     if (bd == NULL)
       break;
-    
+
     req->bufs [transfer_index].user   = bd;
     req->bufs [transfer_index].block  = media_block;
@@ -1901,5 +1901,5 @@
     bool     wake_transfer = false;
     bool     wake_buffer = false;
-                         
+
     rtems_bdbuf_unlock_cache ();
 
@@ -1910,5 +1910,5 @@
     req->status = RTEMS_RESOURCE_IN_USE;
     req->error = 0;
-  
+
     result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, req);
 
@@ -1920,5 +1920,5 @@
     else
       error = errno;
-    
+
     rtems_bdbuf_lock_cache ();
 
@@ -1995,5 +1995,5 @@
                      sizeof ( rtems_blkdev_sg_buffer) *
                       (bdbuf_config.max_read_ahead_blocks + 1));
-  
+
   if (rtems_bdbuf_tracer)
     printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
@@ -2023,5 +2023,5 @@
     rtems_bdbuf_show_usage ();
   }
-  
+
   rtems_bdbuf_unlock_cache ();
   rtems_bdbuf_release_disk (dd);
@@ -2070,8 +2070,8 @@
       break;
   }
-  
+
   if (rtems_bdbuf_tracer)
     rtems_bdbuf_show_usage ();
-  
+
   rtems_bdbuf_unlock_cache ();
 
@@ -2098,8 +2098,8 @@
       break;
   }
-  
+
   if (rtems_bdbuf_tracer)
     rtems_bdbuf_show_usage ();
-  
+
   rtems_bdbuf_unlock_cache ();
 
@@ -2126,5 +2126,5 @@
       break;
   }
-  
+
   if (rtems_bdbuf_tracer)
     rtems_bdbuf_show_usage ();
@@ -2141,5 +2141,5 @@
 
   rtems_bdbuf_unlock_cache ();
-  
+
   return RTEMS_SUCCESSFUL;
 }
@@ -2165,5 +2165,5 @@
    */
   rtems_bdbuf_lock_sync ();
-  rtems_bdbuf_lock_cache ();  
+  rtems_bdbuf_lock_cache ();
 
   /*
@@ -2177,5 +2177,5 @@
   bdbuf_cache.sync_requester = rtems_task_self ();
   bdbuf_cache.sync_device    = dev;
-  
+
   rtems_bdbuf_wake_swapper ();
   rtems_bdbuf_unlock_cache ();
@@ -2219,5 +2219,5 @@
 {
   rtems_disk_device* dd;
-  
+
   if (rtems_bdbuf_tracer)
     printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
@@ -2246,5 +2246,5 @@
        */
       uint32_t bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
-      
+
       /*
        * Take as many buffers as configured and pass to the driver. Note, the
@@ -2266,5 +2266,5 @@
 
         bool write = false;
-        
+
         /*
          * If the device only accepts sequential buffers and this is not the
@@ -2273,5 +2273,5 @@
          * the committed buffers.
          */
-        
+
         if (rtems_bdbuf_tracer)
           printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
@@ -2279,5 +2279,5 @@
                   dd->phys_dev->capabilities &
                   RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
-        
+
         if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
             transfer->write_req->bufnum &&
@@ -2321,9 +2321,9 @@
            * device is being held.
            */
-          result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, transfer->write_req); 
+          result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, transfer->write_req);
           if (result < 0)
           {
             rtems_bdbuf_lock_cache ();
-              
+
             for (b = 0; b < transfer->write_req->bufnum; b++)
             {
@@ -2359,5 +2359,5 @@
 
               rtems_chain_append (&bdbuf_cache.lru, &bd->link);
-              
+
               if (bd->waiters)
                 rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
@@ -2377,5 +2377,5 @@
         }
       }
-          
+
       rtems_disk_release (dd);
     }
@@ -2420,5 +2420,5 @@
     {
       rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
-    
+
       /*
        * Check if the buffer's hold timer has reached 0. If a sync is active
@@ -2430,5 +2430,5 @@
       if (sync_active || rtems_bdbuf_has_buffer_waiters ())
         bd->hold_timer = 0;
-  
+
       if (bd->hold_timer)
       {
@@ -2460,5 +2460,5 @@
         rtems_chain_node* next_node = node->next;
         rtems_chain_node* tnode = rtems_chain_tail (transfer);
-    
+
         /*
          * The blocks on the transfer list are sorted in block order. This
@@ -2473,5 +2473,5 @@
 
         tnode = tnode->previous;
-          
+
         while (node && !rtems_chain_is_head (transfer, tnode))
         {
@@ -2486,8 +2486,8 @@
             tnode = tnode->previous;
         }
-        
+
         if (node)
           rtems_chain_prepend (transfer, node);
-          
+
         node = next_node;
       }
@@ -2544,8 +2544,8 @@
       transfer = &worker->transfer;
   }
-  
+
   rtems_chain_initialize_empty (&transfer->bds);
   transfer->dev = BDBUF_INVALID_DEV;
-  
+
   /*
    * When the sync is for a device limit the sync to that device. If the sync
@@ -2555,5 +2555,5 @@
   if (bdbuf_cache.sync_active)
     transfer->dev = bdbuf_cache.sync_device;
-  
+
   /*
    * If we have any buffers in the sync queue move them to the modified
@@ -2599,8 +2599,8 @@
       rtems_bdbuf_swapout_write (transfer);
     }
-    
+
     transfered_buffers = true;
   }
-   
+
   if (bdbuf_cache.sync_active && !transfered_buffers)
   {
@@ -2614,5 +2614,5 @@
       rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
   }
-  
+
   return transfered_buffers;
 }
@@ -2670,5 +2670,5 @@
 
     rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
-    
+
     rtems_bdbuf_unlock_cache ();
   }
@@ -2688,7 +2688,7 @@
   rtems_status_code sc;
   size_t            w;
-  
+
   rtems_bdbuf_lock_cache ();
-  
+
   for (w = 0; w < bdbuf_config.swapout_workers; w++)
   {
@@ -2702,5 +2702,5 @@
     worker->enabled = true;
     worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
-    
+
     rtems_chain_initialize_empty (&worker->transfer.bds);
     worker->transfer.dev = BDBUF_INVALID_DEV;
@@ -2723,5 +2723,5 @@
       rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
   }
-  
+
   rtems_bdbuf_unlock_cache ();
 }
@@ -2734,7 +2734,7 @@
 {
   rtems_chain_node* node;
-  
+
   rtems_bdbuf_lock_cache ();
-  
+
   node = rtems_chain_first (&bdbuf_cache.swapout_workers);
   while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
@@ -2745,5 +2745,5 @@
     node = rtems_chain_next (node);
   }
-  
+
   rtems_bdbuf_unlock_cache ();
 }
@@ -2782,5 +2782,5 @@
    */
   rtems_bdbuf_swapout_workers_open ();
-  
+
   while (bdbuf_cache.swapout_enabled)
   {
@@ -2792,5 +2792,5 @@
      */
     bool update_timers = true;
-    
+
     /*
      * If we write buffers to any disk perform a check again. We only write a
@@ -2815,5 +2815,5 @@
         transfered_buffers = true;
       }
-      
+
       /*
        * Only update the timers once.
@@ -2833,5 +2833,5 @@
 
   rtems_bdbuf_swapout_workers_close ();
-  
+
   free (transfer.write_req);
 
Index: cpukit/libblock/src/blkdev.c
===================================================================
--- cpukit/libblock/src/blkdev.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/blkdev.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -6,5 +6,5 @@
  * Block device management.
  */
- 
+
 /*
  * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
@@ -273,5 +273,5 @@
     size_t            *arg_size = argp;
     int                rc = 0;
-    
+
     switch (req)
     {
Index: cpukit/libblock/src/diskdevs.c
===================================================================
--- cpukit/libblock/src/diskdevs.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/diskdevs.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -6,5 +6,5 @@
  * @brief Block device disk management implementation.
  */
- 
+
 /*
  * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
@@ -191,5 +191,5 @@
   if (name != NULL) {
     alloc_name = strdup(name);
-    
+
     if (alloc_name == NULL) {
       free(dd);
@@ -267,5 +267,5 @@
     dd->capabilities = 0;
   }
-  
+
   disk_unlock();
 
Index: cpukit/libblock/src/flashdisk.c
===================================================================
--- cpukit/libblock/src/flashdisk.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/flashdisk.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -247,5 +247,5 @@
   uint32_t avail_compact_segs;             /**< The number of segments when
                                                 compaction occurs when writing. */
-  
+
   uint32_t               block_size;       /**< The block size for this disk. */
   rtems_fdisk_block_ctl* blocks;           /**< The block to segment-page
@@ -253,5 +253,5 @@
   uint32_t block_count;                    /**< The number of avail. blocks. */
   uint32_t unavail_blocks;                 /**< The number of unavail blocks. */
- 
+
   rtems_fdisk_device_ctl* devices;         /**< The flash devices for this
                                                 disk. */
@@ -304,5 +304,5 @@
  * @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
  */
-rtems_status_code 
+rtems_status_code
 rtems_fdisk_crc16_gen_factors (uint16_t pattern)
 {
@@ -457,5 +457,5 @@
     sc->next = queue->head;
     queue->head = sc;
-  
+
     if (queue->tail == 0)
       queue->tail = sc;
@@ -498,5 +498,5 @@
   {
     sc->next = 0;
- 
+
     if (queue->head)
     {
@@ -762,5 +762,5 @@
     if (rtems_fdisk_page_desc_erased (pd))
       break;
-  
+
   return page;
 }
@@ -841,5 +841,5 @@
                       device, segment, offset, size);
 #endif
-  return ops->read (sd, device, segment, offset, buffer, size); 
+  return ops->read (sd, device, segment, offset, buffer, size);
 }
 
@@ -865,5 +865,5 @@
                       device, segment, offset, size);
 #endif
-  return ops->write (sd, device, segment, offset, buffer, size); 
+  return ops->write (sd, device, segment, offset, buffer, size);
 }
 
@@ -886,5 +886,5 @@
                       device, segment, offset, size);
 #endif
-  return ops->blank (sd, device, segment, offset, size); 
+  return ops->blank (sd, device, segment, offset, size);
 }
 /**
@@ -907,5 +907,5 @@
                       device, segment, offset, size);
 #endif
-  return ops->verify (sd, device, segment, offset, buffer, size); 
+  return ops->verify (sd, device, segment, offset, buffer, size);
 }
 
@@ -1016,5 +1016,5 @@
     if (ret)
       return ret;
-  }  
+  }
   return rtems_fdisk_seg_write (fd, device, segment, offset,
                                 page_desc, sizeof (rtems_fdisk_page_desc));
@@ -1096,5 +1096,5 @@
   {
     int ret;
-  
+
 #if RTEMS_FDISK_TRACE
     rtems_fdisk_info (fd, " erase-flash:%02d", device);
@@ -1149,5 +1149,5 @@
   sc->pages_used   = 0;
   sc->pages_bad    = 0;
-  
+
   sc->failed = false;
 
@@ -1213,5 +1213,5 @@
     return;
   }
-  
+
   /*
    * Remove the queue from the available or used queue.
@@ -1237,5 +1237,5 @@
        */
       rtems_fdisk_segment_ctl* seg = fd->used.head;
-      
+
       while (seg)
       {
@@ -1325,5 +1325,5 @@
     rtems_fdisk_printf (fd, " compacting");
 #endif
-      
+
     dsc = rtems_fdisk_seg_most_available (&fd->available);
 
@@ -1333,15 +1333,15 @@
       return EIO;
     }
-    
+
     ssc = fd->used.head;
     dst_pages = rtems_fdisk_seg_pages_available (dsc);
     segments = 0;
     pages = 0;
-    
+
 #if RTEMS_FDISK_TRACE
     rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
                         dsc->device, dsc->segment);
 #endif
-      
+
     /*
      * Count the number of segments that have active pages that fit into
@@ -1351,5 +1351,5 @@
      * will fill.
      */
-      
+
     while (ssc &&
            ((pages + ssc->pages_active) < dst_pages) &&
@@ -1366,5 +1366,5 @@
      * to free at least one more segment.
      */
-       
+
     if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
       break;
@@ -1375,5 +1375,5 @@
                         pages, segments);
 #endif
-     
+
     rtems_fdisk_segment_queue_remove (&fd->available, dsc);
 
@@ -1381,5 +1381,5 @@
      * We now copy the pages to the new segment.
      */
-      
+
     while (pages)
     {
@@ -1405,7 +1405,7 @@
             dpage = rtems_fdisk_seg_next_available_page (dsc);
             dpd   = &dsc->page_descriptors[dpage];
-              
+
             active++;
-              
+
             if (dpage >= dsc->pages)
             {
@@ -1419,5 +1419,5 @@
               return EIO;
             }
-            
+
 #if RTEMS_FDISK_TRACE
             rtems_fdisk_info (fd, "compacting: %02d-%03d-%03d=>%02d-%03d-%03d",
@@ -1470,8 +1470,8 @@
              * be.
              */
-            
+
             ssc->pages_active--;
             ssc->pages_used++;
-              
+
             fd->blocks[spd->block].segment = dsc;
             fd->blocks[spd->block].page    = dpage;
@@ -1481,5 +1481,5 @@
              */
             rtems_fdisk_queue_segment (fd, dsc);
-              
+
             pages--;
           }
@@ -1498,5 +1498,5 @@
                              ssc->pages_active);
         }
-          
+
         ret = rtems_fdisk_erase_segment (fd, ssc);
 
@@ -1519,5 +1519,5 @@
 {
   uint32_t device;
-  
+
   /*
    * Clear the queues.
@@ -1546,5 +1546,5 @@
       uint32_t                        page;
       int                             ret;
-  
+
 #if RTEMS_FDISK_TRACE
       rtems_fdisk_info (fd, "recover-block-mappings:%02d-%03d", device, segment);
@@ -1560,5 +1560,5 @@
 
       sc->failed = false;
-      
+
       if (!sc->page_descriptors)
         sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
@@ -1566,5 +1566,5 @@
       if (!sc->page_descriptors)
         rtems_fdisk_abort ("no memory for page descriptors");
-    
+
       pd = sc->page_descriptors;
 
@@ -1616,5 +1616,5 @@
             ret = rtems_fdisk_seg_write_page_desc (fd, device, segment,
                                                    page, pd);
-            
+
             if (ret)
             {
@@ -1623,5 +1623,5 @@
               sc->failed = true;
             }
-            
+
             sc->pages_used++;
           }
@@ -1774,8 +1774,8 @@
 
       cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
-    
+
       if (cs == pd->crc)
         return 0;
-    
+
       rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
                          block, cs, pd->crc);
@@ -1831,5 +1831,5 @@
   uint32_t                 page;
   int                      ret;
-    
+
 #if RTEMS_FDISK_TRACE
   rtems_fdisk_info (fd, "write-block:%d", block);
@@ -1873,5 +1873,5 @@
       return 0;
     }
-  
+
     /*
      * The page exists in flash so we need to set the used flag
@@ -1882,5 +1882,5 @@
 
     rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_USED);
-    
+
     ret = rtems_fdisk_seg_write_page_desc_flags (fd, sc->device, sc->segment,
                                                  bc->page, pd);
@@ -1901,5 +1901,5 @@
       sc->pages_used++;
     }
-    
+
     /*
      * If possible reuse this segment. This will mean the segment
@@ -1926,5 +1926,5 @@
       fd->avail_compact_segs)
     rtems_fdisk_compact (fd);
-  
+
   /*
    * Get the next avaliable segment.
@@ -1948,5 +1948,5 @@
      */
     sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
-    
+
     if (!sc)
     {
@@ -1965,5 +1965,5 @@
   }
 #endif
-  
+
   /*
    * Find the next avaliable page in the segment.
@@ -1981,5 +1981,5 @@
       bc->segment = sc;
       bc->page    = page;
-    
+
       rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_ACTIVE);
 
@@ -2027,5 +2027,5 @@
         }
       }
-      
+
       rtems_fdisk_queue_segment (fd, sc);
       return ret;
@@ -2074,5 +2074,5 @@
   req->req_done (req->done_arg,
                  ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
- 
+
   return ret;
 }
@@ -2110,5 +2110,5 @@
   req->req_done (req->done_arg,
                  ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
- 
+
   return 0;
 }
@@ -2184,9 +2184,9 @@
   {
     data->segment_count += fd->devices[i].segment_count;
-  
+
     for (j = 0; j < fd->devices[i].segment_count; j++)
     {
       rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
-    
+
       data->page_count   += sc->pages;
       data->pages_desc   += sc->pages_desc;
@@ -2215,5 +2215,5 @@
 
   fd->info_level = 3;
-  
+
   rtems_fdisk_printf (fd,
                       "Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
@@ -2251,5 +2251,5 @@
     uint32_t block;
     uint32_t seg;
-  
+
     rtems_fdisk_printf (fd, " Device\t\t%ld", device);
     rtems_fdisk_printf (fd, "  Segment count\t%ld",
@@ -2294,5 +2294,5 @@
         }
       }
-      
+
       count = 0;
       for (block = 0; block < fd->block_count; block++)
@@ -2376,5 +2376,5 @@
               errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
               break;
-        
+
             default:
               errno = EINVAL;
@@ -2463,7 +2463,7 @@
 
     fd = &rtems_flashdisks[minor];
-  
+
     name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
-  
+
     fd->major              = major;
     fd->minor              = minor;
@@ -2474,9 +2474,9 @@
     fd->unavail_blocks     = c->unavail_blocks;
     fd->info_level         = c->info_level;
-  
+
     for (device = 0; device < c->device_count; device++)
       blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
                                               c->block_size);
-  
+
     sc = rtems_disk_create_phys(dev, c->block_size,
                                 blocks - fd->unavail_blocks,
@@ -2487,5 +2487,5 @@
       return sc;
     }
-  
+
     sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
                                  RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
@@ -2503,5 +2503,5 @@
     if (!fd->copy_buffer)
       return RTEMS_NO_MEMORY;
-    
+
     fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
     if (!fd->blocks)
@@ -2521,5 +2521,5 @@
 
       segment_count = rtems_fdisk_count_segments (&c->devices[device]);
-    
+
       fd->devices[device].segments = calloc (segment_count,
                                              sizeof (rtems_fdisk_segment_ctl));
@@ -2528,5 +2528,5 @@
 
       sc = fd->devices[device].segments;
-    
+
       for (segment = 0; segment < c->devices[device].segment_count; segment++)
       {
@@ -2544,9 +2544,9 @@
         }
       }
-      
+
       fd->devices[device].segment_count = segment_count;
       fd->devices[device].descriptor    = &c->devices[device];
     }
-    
+
     fd->device_count = c->device_count;
 
Index: cpukit/libblock/src/nvdisk-sram.c
===================================================================
--- cpukit/libblock/src/nvdisk-sram.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/nvdisk-sram.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -11,5 +11,5 @@
 
 #if HAVE_CONFIG_H
-#include "config.h" 
+#include "config.h"
 #endif
 
@@ -28,5 +28,5 @@
 rtems_nvdisk_sram_read (uint32_t device __attribute__((unused)),
                         uint32_t flags __attribute__((unused)),
-                        uint32_t base, 
+                        uint32_t base,
                         uint32_t offset,
                         void*    buffer,
@@ -40,5 +40,5 @@
 rtems_nvdisk_sram_write (uint32_t    device __attribute__((unused)),
                          uint32_t    flags __attribute__((unused)),
-                         uint32_t    base, 
+                         uint32_t    base,
                          uint32_t    offset,
                          const void* buffer,
@@ -52,5 +52,5 @@
 rtems_nvdisk_sram_verify (uint32_t    device __attribute__((unused)),
                           uint32_t    flags __attribute__((unused)),
-                          uint32_t    base, 
+                          uint32_t    base,
                           uint32_t    offset,
                           const void* buffer,
Index: cpukit/libblock/src/nvdisk.c
===================================================================
--- cpukit/libblock/src/nvdisk.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/nvdisk.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -64,5 +64,5 @@
    */
   uint32_t device;
-  
+
   /**
    * Total number of pages in the device.
@@ -135,5 +135,5 @@
  * @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
  */
-rtems_status_code 
+rtems_status_code
 rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
 {
@@ -276,5 +276,5 @@
                       device, offset, size);
 #endif
-  return ops->read (device, dd->flags, dd->base, offset, buffer, size); 
+  return ops->read (device, dd->flags, dd->base, offset, buffer, size);
 }
 
@@ -297,5 +297,5 @@
                       device, offset, size);
 #endif
-  return ops->write (device, dd->flags, dd->base, offset, buffer, size); 
+  return ops->write (device, dd->flags, dd->base, offset, buffer, size);
 }
 
@@ -319,5 +319,5 @@
                       device, offset, size);
 #endif
-  return ops->verify (device, dd->flags, dd->base, offset, buffer, size); 
+  return ops->verify (device, dd->flags, dd->base, offset, buffer, size);
 }
 #endif
@@ -428,5 +428,5 @@
 {
   uint32_t device;
-  
+
   if (block >= nvd->block_count)
   {
@@ -457,5 +457,5 @@
   return block - dc->block_base;
 }
-    
+
 /**
  * Read a block. The block is checked to see if the page referenced
@@ -476,5 +476,5 @@
   uint16_t                 cs;
   int                      ret;
-  
+
   dc = rtems_nvdisk_get_device (nvd, block);
 
@@ -483,5 +483,5 @@
 
   page = rtems_nvdisk_get_page (dc, block);
-  
+
 #if RTEMS_NVDISK_TRACE
   rtems_nvdisk_info (nvd, " read-block:%d=>%02d-%03d, cs:%04x",
@@ -502,5 +502,5 @@
     return 0;
   }
-  
+
   ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
 
@@ -509,7 +509,7 @@
 
   cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
-  
+
   if (cs != crc)
-  {    
+  {
     rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
                         block, cs, crc);
@@ -540,5 +540,5 @@
   uint16_t                 cs;
   int                      ret;
-  
+
   dc = rtems_nvdisk_get_device (nvd, block);
 
@@ -547,5 +547,5 @@
 
   page = rtems_nvdisk_get_page (dc, block);
-  
+
   cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
 
@@ -598,5 +598,5 @@
   req->req_done (req->done_arg,
                  ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
- 
+
   return ret;
 }
@@ -638,5 +638,5 @@
   req->req_done (req->done_arg,
                  ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
- 
+
   return 0;
 }
@@ -693,5 +693,5 @@
     return -1;
   }
-        
+
   if (rtems_nvdisks[minor].device_count == 0)
   {
@@ -699,5 +699,5 @@
     return -1;
   }
-        
+
   errno = 0;
 
@@ -716,9 +716,9 @@
             errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
             break;
-            
+
           case RTEMS_BLKDEV_REQ_WRITE:
             errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
             break;
-            
+
           default:
             errno = EINVAL;
@@ -730,9 +730,9 @@
         errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
         break;
-        
+
       case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
         rtems_nvdisks[minor].info_level = (uint32_t) argp;
         break;
-        
+
       default:
         rtems_blkdev_ioctl (dd, req, argp);
@@ -788,7 +788,7 @@
 
     nvd = &rtems_nvdisks[minor];
-  
+
     name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
-  
+
     nvd->major        = major;
     nvd->minor        = minor;
@@ -809,5 +809,5 @@
       dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
       dc->block_base = blocks;
-      
+
       blocks += dc->pages - dc->pages_desc;
 
@@ -825,5 +825,5 @@
       return sc;
     }
-  
+
     sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
                                  RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
Index: cpukit/libblock/src/ramdisk-driver.c
===================================================================
--- cpukit/libblock/src/ramdisk-driver.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/ramdisk-driver.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -118,5 +118,5 @@
             break;
         }
-  
+
         default:
             return rtems_blkdev_ioctl (dd, req, argp);
Index: cpukit/libblock/src/show_bdbuf.c
===================================================================
--- cpukit/libblock/src/show_bdbuf.c	(revision 33c3b54d57b50ac3d236e2660556a9a2ecb8dcad)
+++ cpukit/libblock/src/show_bdbuf.c	(revision 18daff9b95bbe4d5004a99079207a5343760ecd3)
@@ -84,5 +84,5 @@
   bool modified;
   bool in_progress;
-  bool actual;  
+  bool actual;
   int use_count;
   const CORE_mutex_Control *sema;
@@ -129,13 +129,13 @@
   if (rc == RTEMS_SUCCESSFUL) {
     DISABLE_PREEMPTION(preempt_key);
-  }    
+  }
   /*
    * follow node to its head
-   * XXX: this is highly dependent on the chain implementation 
+   * XXX: this is highly dependent on the chain implementation
    * in score/src/chain.c and friends
    */
   while (the_node->previous != NULL) {
     the_node = the_node->previous;
-  } 
+  }
   /*
    * reenable preemption, if disabled
@@ -143,8 +143,8 @@
   if (preempt_disabled) {
     ENABLE_PREEMPTION(preempt_key);
-  }    
-  /*
-   * XXX: this depends n the chain implementation in 
-   * score/include/rtems/score/chain.h: 
+  }
+  /*
+   * XXX: this depends n the chain implementation in
+   * score/include/rtems/score/chain.h:
    * Chain_Control is overlayed by two Cohain_Nodes
    */
@@ -177,5 +177,5 @@
   Chain_Control *the_chain_control;
 
-  
+
   *chn_ident = bdbuf_chain_ident_none;
   if (rc == RTEMS_SUCCESSFUL) {
@@ -219,5 +219,5 @@
 {
   rtems_status_code sc = RTEMS_SUCCESSFUL;
-  int arg_error = 0; 
+  int arg_error = 0;
   int i;
   char *tmp_ptr;
@@ -232,5 +232,5 @@
 
   /*
-   * scan arguments 
+   * scan arguments
    */
   for (i = 1;
@@ -321,5 +321,5 @@
     printf("%s: unknown argument %s\n",argv[0],argv[arg_error]);
     sc = RTEMS_NOT_DEFINED;
-  }  
+  }
   return sc;
 }
@@ -415,5 +415,5 @@
 \*=========================================================================*/
 {
-  
+
   rtems_status_code rc = RTEMS_SUCCESSFUL;
 
@@ -453,9 +453,9 @@
 \*=========================================================================*/
 {
-  
+
   rtems_status_code rc = RTEMS_SUCCESSFUL;
 
-  /* 
-   * determine the chain we are in 
+  /*
+   * determine the chain we are in
    */
   if (rc == RTEMS_SUCCESSFUL) {
@@ -477,5 +477,5 @@
     bdbuf_info->in_progress = the_bdbuf->in_progress;
     bdbuf_info->actual      = the_bdbuf->actual;
-    bdbuf_info->use_count   = the_bdbuf->use_count;    
+    bdbuf_info->use_count   = the_bdbuf->use_count;
     bdbuf_info->sema        = &(the_bdbuf->transfer_sema);
     bdbuf_info->pool_id     = the_bdbuf->pool;
@@ -504,8 +504,8 @@
 \*=========================================================================*/
 {
-  
+
   rtems_status_code rc = RTEMS_SUCCESSFUL;
   bool unmatch = false;
-  
+
   if (rc == RTEMS_SUCCESSFUL) {
     if (filter->bdbuf_all) {
@@ -541,5 +541,5 @@
 |    rtems_status_code                                                      |
 \*=========================================================================*/
-{  
+{
   rtems_status_code rc = RTEMS_SUCCESSFUL;
   Chain_Control *the_chain_head;
@@ -567,5 +567,5 @@
     thread_id   = the_thread->Object.id;
     thread_name = the_thread->Object.name;
-    thread_name_nonstring = (uint32_t)thread_name.name_u32; 
+    thread_name_nonstring = (uint32_t)thread_name.name_u32;
     printf("%20s %3d (0x%08" PRIx32 ") %c%c%c%c\n",
 	   ((thread_cnt == 1) ? "Threads waiting:" : ""),
@@ -578,5 +578,5 @@
     the_chain_node = the_chain_node->next;
   }
-	 
+
   return rc;
 }
@@ -602,5 +602,5 @@
 \*=========================================================================*/
 {
-  
+
   rtems_status_code rc = RTEMS_SUCCESSFUL;
 
@@ -659,7 +659,7 @@
     else {
       printf("%3" PRIu32 "%2" PRIu32,
-	     ((bdbuf_info->dev == -1) 
+	     ((bdbuf_info->dev == -1)
 	      ? 0 : rtems_filesystem_dev_major_t(bdbuf_info->dev)),
-	     ((bdbuf_info->dev == -1) 
+	     ((bdbuf_info->dev == -1)
 	      ? 0 : rtems_filesystem_dev_minor_t(bdbuf_info->dev)));
     }
@@ -722,7 +722,7 @@
     else {
       printf("%20s:%-10s ",
-	     ((bdbuf_info->status == RTEMS_SUCCESSFUL) 
+	     ((bdbuf_info->status == RTEMS_SUCCESSFUL)
 	      ? "SUCCESSFUL" : rtems_status_text(bdbuf_info->status)),
-	     ((bdbuf_info->status == RTEMS_SUCCESSFUL) 
+	     ((bdbuf_info->status == RTEMS_SUCCESSFUL)
 	      ? "" : strerror(bdbuf_info->error)));
     }
@@ -789,6 +789,6 @@
   for (pool_idx = 0;
        (rc == RTEMS_SUCCESSFUL) && (pool_idx < pool_cnt);
-       pool_idx++) {    
-    if ((filter.pool_id < 0) || 
+       pool_idx++) {
+    if ((filter.pool_id < 0) ||
 	(filter.pool_id == pool_idx)) {
       curr_pool = pool_base + pool_idx;
@@ -813,7 +813,7 @@
 	 */
 	for (bdbuf_idx = 0;
-	     ((rc == RTEMS_SUCCESSFUL) && 
+	     ((rc == RTEMS_SUCCESSFUL) &&
 	      (bdbuf_idx < curr_pool->nblks));
-	     bdbuf_idx++) {	  
+	     bdbuf_idx++) {
 	  /*
 	   * get infos about bdbuf
@@ -840,5 +840,5 @@
 	      rc = rtems_show_bdbuf_print(&bdbuf_info,&selector,
 					  false);
-	      if ((rc == RTEMS_SUCCESSFUL) && 
+	      if ((rc == RTEMS_SUCCESSFUL) &&
 		  selector.show_sema) {
 		rc = rtems_show_bdbuf_print_wait_chain(&(curr_pool->bdbufs[bdbuf_idx]));
@@ -849,5 +849,5 @@
 	      un_matched_cnt++;
 	    }
-	  }	  
+	  }
 	}
 	/*
@@ -874,5 +874,5 @@
 };
 
-#ifndef ARRAY_CNT 
+#ifndef ARRAY_CNT
 #define ARRAY_CNT(arr) (sizeof((arr))/sizeof((arr)[0]))
 #endif
