Changeset 18daff9 in rtems


Ignore:
Timestamp:
Nov 29, 2009, 1:35:32 PM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
28352fae
Parents:
0a7278e
Message:

Whitespace removal.

Location:
cpukit
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • cpukit/itron/include/rtems/itron/task.h

    r0a7278e r18daff9  
    6060 *  When the user configures a set of ITRON API initialization tasks,
    6161 *  This variable will point to the method used to initialize them.
    62  * 
     62 *
    6363 *  @note It is instantiated and initialized by confdefs.h based upon
    6464 *        application requirements.
  • cpukit/libblock/src/bdbuf.c

    r0a7278e r18daff9  
    2121 *
    2222 * Copyright (c) 2009 embedded brains GmbH.
    23  * 
     23 *
    2424 * @(#) bdbuf.c,v 1.14 2004/04/17 08:15:17 ralf Exp
    2525 */
     
    9999  rtems_chain_control swapout_workers;   /**< The work threads for the swapout
    100100                                          * task. */
    101  
     101
    102102  rtems_bdbuf_buffer* bds;               /**< Pointer to table of buffer
    103103                                          * descriptors. */
     
    133133  size_t              group_count;       /**< The number of groups. */
    134134  rtems_bdbuf_group*  groups;            /**< The groups. */
    135  
     135
    136136  bool                initialised;       /**< Initialised state. */
    137137} rtems_bdbuf_cache;
     
    417417    p = q;
    418418  }
    419  
     419
    420420  q->avl.left = q->avl.right = NULL;
    421421  q->avl.bal = 0;
     
    952952  rtems_status_code sc;
    953953  rtems_mode        prev_mode;
    954  
     954
    955955  /*
    956956   * Indicate we are waiting.
     
    969969   */
    970970  prev_mode = rtems_bdbuf_disable_preemption ();
    971  
     971
    972972  /*
    973973   * Unlock the cache, wait, and lock the cache when we return.
     
    979979  if (sc == RTEMS_TIMEOUT)
    980980    rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
    981  
     981
    982982  if (sc != RTEMS_UNSATISFIED)
    983983    rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
    984  
     984
    985985  rtems_bdbuf_lock_cache ();
    986986
    987987  rtems_bdbuf_restore_preemption (prev_mode);
    988  
     988
    989989  --waiters->count;
    990990}
     
    10611061  if (bd->state == RTEMS_BDBUF_STATE_ACCESS)
    10621062    bd->hold_timer = bdbuf_config.swap_block_hold;
    1063      
     1063
    10641064  rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
    10651065
     
    11081108  size_t bufs_per_size;
    11091109  size_t bds_per_size;
    1110  
     1110
    11111111  if (size > bdbuf_config.buffer_max)
    11121112    return 0;
    1113  
     1113
    11141114  bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
    1115  
     1115
    11161116  for (bds_per_size = 1;
    11171117       bds_per_size < bufs_per_size;
     
    11361136      rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
    11371137  }
    1138  
     1138
    11391139  rtems_chain_extract (&bd->link);
    11401140}
     
    11671167            group - bdbuf_cache.groups, group->bds_per_group,
    11681168            new_bds_per_group);
    1169  
     1169
    11701170  bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
    1171  
     1171
    11721172  for (b = 0, bd = group->bdbuf;
    11731173       b < group->bds_per_group;
    11741174       b++, bd += bufs_per_bd)
    11751175    rtems_bdbuf_remove_from_cache_and_lru_list (bd);
    1176  
     1176
    11771177  group->bds_per_group = new_bds_per_group;
    11781178  bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
    1179  
     1179
    11801180  for (b = 1, bd = group->bdbuf + bufs_per_bd;
    11811181       b < group->bds_per_group;
     
    12801280  if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
    12811281    return RTEMS_INVALID_NUMBER;
    1282  
     1282
    12831283  /*
    12841284   * We use a special variable to manage the initialisation incase we have
     
    12961296  bdbuf_cache.initialised = true;
    12971297  rtems_bdbuf_restore_preemption (prev_mode);
    1298  
     1298
    12991299  /*
    13001300   * For unspecified cache alignments we use the CPU alignment.
     
    13211321
    13221322  rtems_bdbuf_lock_cache ();
    1323  
     1323
    13241324  sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
    13251325                               1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
     
    13271327  if (sc != RTEMS_SUCCESSFUL)
    13281328    goto error;
    1329  
     1329
    13301330  sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
    13311331                               0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
     
    13451345  if (sc != RTEMS_SUCCESSFUL)
    13461346    goto error;
    1347  
     1347
    13481348  /*
    13491349   * Compute the various number of elements in the cache.
     
    13711371  if (!bdbuf_cache.groups)
    13721372    goto error;
    1373  
     1373
    13741374  /*
    13751375   * Allocate memory for buffer memory. The buffer memory will be cache
     
    13771377   * with free(). Return 0 if allocated.
    13781378   *
    1379    * The memory allocate allows a 
     1379   * The memory allocate allows a
    13801380   */
    13811381  if (rtems_memalign ((void **) &bdbuf_cache.buffers,
     
    13961396    bd->group  = group;
    13971397    bd->buffer = buffer;
    1398    
     1398
    13991399    rtems_chain_append (&bdbuf_cache.lru, &bd->link);
    14001400
     
    14151415    group->bdbuf = bd;
    14161416  }
    1417          
     1417
    14181418  /*
    14191419   * Create and start swapout task. This task will create and manage the worker
     
    14211421   */
    14221422  bdbuf_cache.swapout_enabled = true;
    1423  
     1423
    14241424  sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
    14251425                          bdbuf_config.swapout_priority ?
     
    14731473  rtems_status_code sc = RTEMS_SUCCESSFUL;
    14741474  rtems_event_set   out = 0;
    1475  
     1475
    14761476  sc = rtems_event_receive (event,
    14771477                            RTEMS_EVENT_ALL | RTEMS_WAIT,
     
    15961596  if (!rtems_chain_is_empty (&bdbuf_cache.modified))
    15971597    rtems_bdbuf_wake_swapper ();
    1598  
     1598
    15991599  rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
    16001600}
     
    16061606{
    16071607  rtems_bdbuf_buffer *bd = NULL;
    1608  
     1608
    16091609  bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
    16101610
     
    16321632{
    16331633  rtems_bdbuf_buffer *bd = NULL;
    1634  
     1634
    16351635  do
    16361636  {
     
    17781778      break;
    17791779  }
    1780  
     1780
    17811781  if (rtems_bdbuf_tracer)
    17821782  {
     
    18671867    if (bd == NULL)
    18681868      break;
    1869    
     1869
    18701870    req->bufs [transfer_index].user   = bd;
    18711871    req->bufs [transfer_index].block  = media_block;
     
    19011901    bool     wake_transfer = false;
    19021902    bool     wake_buffer = false;
    1903                          
     1903
    19041904    rtems_bdbuf_unlock_cache ();
    19051905
     
    19101910    req->status = RTEMS_RESOURCE_IN_USE;
    19111911    req->error = 0;
    1912  
     1912
    19131913    result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, req);
    19141914
     
    19201920    else
    19211921      error = errno;
    1922    
     1922
    19231923    rtems_bdbuf_lock_cache ();
    19241924
     
    19951995                     sizeof ( rtems_blkdev_sg_buffer) *
    19961996                      (bdbuf_config.max_read_ahead_blocks + 1));
    1997  
     1997
    19981998  if (rtems_bdbuf_tracer)
    19991999    printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
     
    20232023    rtems_bdbuf_show_usage ();
    20242024  }
    2025  
     2025
    20262026  rtems_bdbuf_unlock_cache ();
    20272027  rtems_bdbuf_release_disk (dd);
     
    20702070      break;
    20712071  }
    2072  
     2072
    20732073  if (rtems_bdbuf_tracer)
    20742074    rtems_bdbuf_show_usage ();
    2075  
     2075
    20762076  rtems_bdbuf_unlock_cache ();
    20772077
     
    20982098      break;
    20992099  }
    2100  
     2100
    21012101  if (rtems_bdbuf_tracer)
    21022102    rtems_bdbuf_show_usage ();
    2103  
     2103
    21042104  rtems_bdbuf_unlock_cache ();
    21052105
     
    21262126      break;
    21272127  }
    2128  
     2128
    21292129  if (rtems_bdbuf_tracer)
    21302130    rtems_bdbuf_show_usage ();
     
    21412141
    21422142  rtems_bdbuf_unlock_cache ();
    2143  
     2143
    21442144  return RTEMS_SUCCESSFUL;
    21452145}
     
    21652165   */
    21662166  rtems_bdbuf_lock_sync ();
    2167   rtems_bdbuf_lock_cache (); 
     2167  rtems_bdbuf_lock_cache ();
    21682168
    21692169  /*
     
    21772177  bdbuf_cache.sync_requester = rtems_task_self ();
    21782178  bdbuf_cache.sync_device    = dev;
    2179  
     2179
    21802180  rtems_bdbuf_wake_swapper ();
    21812181  rtems_bdbuf_unlock_cache ();
     
    22192219{
    22202220  rtems_disk_device* dd;
    2221  
     2221
    22222222  if (rtems_bdbuf_tracer)
    22232223    printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
     
    22462246       */
    22472247      uint32_t bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
    2248      
     2248
    22492249      /*
    22502250       * Take as many buffers as configured and pass to the driver. Note, the
     
    22662266
    22672267        bool write = false;
    2268        
     2268
    22692269        /*
    22702270         * If the device only accepts sequential buffers and this is not the
     
    22732273         * the committed buffers.
    22742274         */
    2275        
     2275
    22762276        if (rtems_bdbuf_tracer)
    22772277          printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
     
    22792279                  dd->phys_dev->capabilities &
    22802280                  RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
    2281        
     2281
    22822282        if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
    22832283            transfer->write_req->bufnum &&
     
    23212321           * device is being held.
    23222322           */
    2323           result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, transfer->write_req); 
     2323          result = dd->ioctl (dd, RTEMS_BLKIO_REQUEST, transfer->write_req);
    23242324          if (result < 0)
    23252325          {
    23262326            rtems_bdbuf_lock_cache ();
    2327              
     2327
    23282328            for (b = 0; b < transfer->write_req->bufnum; b++)
    23292329            {
     
    23592359
    23602360              rtems_chain_append (&bdbuf_cache.lru, &bd->link);
    2361              
     2361
    23622362              if (bd->waiters)
    23632363                rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
     
    23772377        }
    23782378      }
    2379          
     2379
    23802380      rtems_disk_release (dd);
    23812381    }
     
    24202420    {
    24212421      rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
    2422    
     2422
    24232423      /*
    24242424       * Check if the buffer's hold timer has reached 0. If a sync is active
     
    24302430      if (sync_active || rtems_bdbuf_has_buffer_waiters ())
    24312431        bd->hold_timer = 0;
    2432  
     2432
    24332433      if (bd->hold_timer)
    24342434      {
     
    24602460        rtems_chain_node* next_node = node->next;
    24612461        rtems_chain_node* tnode = rtems_chain_tail (transfer);
    2462    
     2462
    24632463        /*
    24642464         * The blocks on the transfer list are sorted in block order. This
     
    24732473
    24742474        tnode = tnode->previous;
    2475          
     2475
    24762476        while (node && !rtems_chain_is_head (transfer, tnode))
    24772477        {
     
    24862486            tnode = tnode->previous;
    24872487        }
    2488        
     2488
    24892489        if (node)
    24902490          rtems_chain_prepend (transfer, node);
    2491          
     2491
    24922492        node = next_node;
    24932493      }
     
    25442544      transfer = &worker->transfer;
    25452545  }
    2546  
     2546
    25472547  rtems_chain_initialize_empty (&transfer->bds);
    25482548  transfer->dev = BDBUF_INVALID_DEV;
    2549  
     2549
    25502550  /*
    25512551   * When the sync is for a device limit the sync to that device. If the sync
     
    25552555  if (bdbuf_cache.sync_active)
    25562556    transfer->dev = bdbuf_cache.sync_device;
    2557  
     2557
    25582558  /*
    25592559   * If we have any buffers in the sync queue move them to the modified
     
    25992599      rtems_bdbuf_swapout_write (transfer);
    26002600    }
    2601    
     2601
    26022602    transfered_buffers = true;
    26032603  }
    2604    
     2604
    26052605  if (bdbuf_cache.sync_active && !transfered_buffers)
    26062606  {
     
    26142614      rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
    26152615  }
    2616  
     2616
    26172617  return transfered_buffers;
    26182618}
     
    26702670
    26712671    rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
    2672    
     2672
    26732673    rtems_bdbuf_unlock_cache ();
    26742674  }
     
    26882688  rtems_status_code sc;
    26892689  size_t            w;
    2690  
     2690
    26912691  rtems_bdbuf_lock_cache ();
    2692  
     2692
    26932693  for (w = 0; w < bdbuf_config.swapout_workers; w++)
    26942694  {
     
    27022702    worker->enabled = true;
    27032703    worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
    2704    
     2704
    27052705    rtems_chain_initialize_empty (&worker->transfer.bds);
    27062706    worker->transfer.dev = BDBUF_INVALID_DEV;
     
    27232723      rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
    27242724  }
    2725  
     2725
    27262726  rtems_bdbuf_unlock_cache ();
    27272727}
     
    27342734{
    27352735  rtems_chain_node* node;
    2736  
     2736
    27372737  rtems_bdbuf_lock_cache ();
    2738  
     2738
    27392739  node = rtems_chain_first (&bdbuf_cache.swapout_workers);
    27402740  while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
     
    27452745    node = rtems_chain_next (node);
    27462746  }
    2747  
     2747
    27482748  rtems_bdbuf_unlock_cache ();
    27492749}
     
    27822782   */
    27832783  rtems_bdbuf_swapout_workers_open ();
    2784  
     2784
    27852785  while (bdbuf_cache.swapout_enabled)
    27862786  {
     
    27922792     */
    27932793    bool update_timers = true;
    2794    
     2794
    27952795    /*
    27962796     * If we write buffers to any disk perform a check again. We only write a
     
    28152815        transfered_buffers = true;
    28162816      }
    2817      
     2817
    28182818      /*
    28192819       * Only update the timers once.
     
    28332833
    28342834  rtems_bdbuf_swapout_workers_close ();
    2835  
     2835
    28362836  free (transfer.write_req);
    28372837
  • cpukit/libblock/src/blkdev.c

    r0a7278e r18daff9  
    66 * Block device management.
    77 */
    8  
     8
    99/*
    1010 * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
     
    273273    size_t            *arg_size = argp;
    274274    int                rc = 0;
    275    
     275
    276276    switch (req)
    277277    {
  • cpukit/libblock/src/diskdevs.c

    r0a7278e r18daff9  
    66 * @brief Block device disk management implementation.
    77 */
    8  
     8
    99/*
    1010 * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
     
    191191  if (name != NULL) {
    192192    alloc_name = strdup(name);
    193    
     193
    194194    if (alloc_name == NULL) {
    195195      free(dd);
     
    267267    dd->capabilities = 0;
    268268  }
    269  
     269
    270270  disk_unlock();
    271271
  • cpukit/libblock/src/flashdisk.c

    r0a7278e r18daff9  
    247247  uint32_t avail_compact_segs;             /**< The number of segments when
    248248                                                compaction occurs when writing. */
    249  
     249
    250250  uint32_t               block_size;       /**< The block size for this disk. */
    251251  rtems_fdisk_block_ctl* blocks;           /**< The block to segment-page
     
    253253  uint32_t block_count;                    /**< The number of avail. blocks. */
    254254  uint32_t unavail_blocks;                 /**< The number of unavail blocks. */
    255  
     255
    256256  rtems_fdisk_device_ctl* devices;         /**< The flash devices for this
    257257                                                disk. */
     
    304304 * @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
    305305 */
    306 rtems_status_code 
     306rtems_status_code
    307307rtems_fdisk_crc16_gen_factors (uint16_t pattern)
    308308{
     
    457457    sc->next = queue->head;
    458458    queue->head = sc;
    459  
     459
    460460    if (queue->tail == 0)
    461461      queue->tail = sc;
     
    498498  {
    499499    sc->next = 0;
    500  
     500
    501501    if (queue->head)
    502502    {
     
    762762    if (rtems_fdisk_page_desc_erased (pd))
    763763      break;
    764  
     764
    765765  return page;
    766766}
     
    841841                      device, segment, offset, size);
    842842#endif
    843   return ops->read (sd, device, segment, offset, buffer, size); 
     843  return ops->read (sd, device, segment, offset, buffer, size);
    844844}
    845845
     
    865865                      device, segment, offset, size);
    866866#endif
    867   return ops->write (sd, device, segment, offset, buffer, size); 
     867  return ops->write (sd, device, segment, offset, buffer, size);
    868868}
    869869
     
    886886                      device, segment, offset, size);
    887887#endif
    888   return ops->blank (sd, device, segment, offset, size); 
     888  return ops->blank (sd, device, segment, offset, size);
    889889}
    890890/**
     
    907907                      device, segment, offset, size);
    908908#endif
    909   return ops->verify (sd, device, segment, offset, buffer, size); 
     909  return ops->verify (sd, device, segment, offset, buffer, size);
    910910}
    911911
     
    10161016    if (ret)
    10171017      return ret;
    1018   } 
     1018  }
    10191019  return rtems_fdisk_seg_write (fd, device, segment, offset,
    10201020                                page_desc, sizeof (rtems_fdisk_page_desc));
     
    10961096  {
    10971097    int ret;
    1098  
     1098
    10991099#if RTEMS_FDISK_TRACE
    11001100    rtems_fdisk_info (fd, " erase-flash:%02d", device);
     
    11491149  sc->pages_used   = 0;
    11501150  sc->pages_bad    = 0;
    1151  
     1151
    11521152  sc->failed = false;
    11531153
     
    12131213    return;
    12141214  }
    1215  
     1215
    12161216  /*
    12171217   * Remove the queue from the available or used queue.
     
    12371237       */
    12381238      rtems_fdisk_segment_ctl* seg = fd->used.head;
    1239      
     1239
    12401240      while (seg)
    12411241      {
     
    13251325    rtems_fdisk_printf (fd, " compacting");
    13261326#endif
    1327      
     1327
    13281328    dsc = rtems_fdisk_seg_most_available (&fd->available);
    13291329
     
    13331333      return EIO;
    13341334    }
    1335    
     1335
    13361336    ssc = fd->used.head;
    13371337    dst_pages = rtems_fdisk_seg_pages_available (dsc);
    13381338    segments = 0;
    13391339    pages = 0;
    1340    
     1340
    13411341#if RTEMS_FDISK_TRACE
    13421342    rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
    13431343                        dsc->device, dsc->segment);
    13441344#endif
    1345      
     1345
    13461346    /*
    13471347     * Count the number of segments that have active pages that fit into
     
    13511351     * will fill.
    13521352     */
    1353      
     1353
    13541354    while (ssc &&
    13551355           ((pages + ssc->pages_active) < dst_pages) &&
     
    13661366     * to free at least one more segment.
    13671367     */
    1368        
     1368
    13691369    if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
    13701370      break;
     
    13751375                        pages, segments);
    13761376#endif
    1377      
     1377
    13781378    rtems_fdisk_segment_queue_remove (&fd->available, dsc);
    13791379
     
    13811381     * We now copy the pages to the new segment.
    13821382     */
    1383      
     1383
    13841384    while (pages)
    13851385    {
     
    14051405            dpage = rtems_fdisk_seg_next_available_page (dsc);
    14061406            dpd   = &dsc->page_descriptors[dpage];
    1407              
     1407
    14081408            active++;
    1409              
     1409
    14101410            if (dpage >= dsc->pages)
    14111411            {
     
    14191419              return EIO;
    14201420            }
    1421            
     1421
    14221422#if RTEMS_FDISK_TRACE
    14231423            rtems_fdisk_info (fd, "compacting: %02d-%03d-%03d=>%02d-%03d-%03d",
     
    14701470             * be.
    14711471             */
    1472            
     1472
    14731473            ssc->pages_active--;
    14741474            ssc->pages_used++;
    1475              
     1475
    14761476            fd->blocks[spd->block].segment = dsc;
    14771477            fd->blocks[spd->block].page    = dpage;
     
    14811481             */
    14821482            rtems_fdisk_queue_segment (fd, dsc);
    1483              
     1483
    14841484            pages--;
    14851485          }
     
    14981498                             ssc->pages_active);
    14991499        }
    1500          
     1500
    15011501        ret = rtems_fdisk_erase_segment (fd, ssc);
    15021502
     
    15191519{
    15201520  uint32_t device;
    1521  
     1521
    15221522  /*
    15231523   * Clear the queues.
     
    15461546      uint32_t                        page;
    15471547      int                             ret;
    1548  
     1548
    15491549#if RTEMS_FDISK_TRACE
    15501550      rtems_fdisk_info (fd, "recover-block-mappings:%02d-%03d", device, segment);
     
    15601560
    15611561      sc->failed = false;
    1562      
     1562
    15631563      if (!sc->page_descriptors)
    15641564        sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
     
    15661566      if (!sc->page_descriptors)
    15671567        rtems_fdisk_abort ("no memory for page descriptors");
    1568    
     1568
    15691569      pd = sc->page_descriptors;
    15701570
     
    16161616            ret = rtems_fdisk_seg_write_page_desc (fd, device, segment,
    16171617                                                   page, pd);
    1618            
     1618
    16191619            if (ret)
    16201620            {
     
    16231623              sc->failed = true;
    16241624            }
    1625            
     1625
    16261626            sc->pages_used++;
    16271627          }
     
    17741774
    17751775      cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
    1776    
     1776
    17771777      if (cs == pd->crc)
    17781778        return 0;
    1779    
     1779
    17801780      rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
    17811781                         block, cs, pd->crc);
     
    18311831  uint32_t                 page;
    18321832  int                      ret;
    1833    
     1833
    18341834#if RTEMS_FDISK_TRACE
    18351835  rtems_fdisk_info (fd, "write-block:%d", block);
     
    18731873      return 0;
    18741874    }
    1875  
     1875
    18761876    /*
    18771877     * The page exists in flash so we need to set the used flag
     
    18821882
    18831883    rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_USED);
    1884    
     1884
    18851885    ret = rtems_fdisk_seg_write_page_desc_flags (fd, sc->device, sc->segment,
    18861886                                                 bc->page, pd);
     
    19011901      sc->pages_used++;
    19021902    }
    1903    
     1903
    19041904    /*
    19051905     * If possible reuse this segment. This will mean the segment
     
    19261926      fd->avail_compact_segs)
    19271927    rtems_fdisk_compact (fd);
    1928  
     1928
    19291929  /*
    19301930   * Get the next avaliable segment.
     
    19481948     */
    19491949    sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
    1950    
     1950
    19511951    if (!sc)
    19521952    {
     
    19651965  }
    19661966#endif
    1967  
     1967
    19681968  /*
    19691969   * Find the next avaliable page in the segment.
     
    19811981      bc->segment = sc;
    19821982      bc->page    = page;
    1983    
     1983
    19841984      rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_ACTIVE);
    19851985
     
    20272027        }
    20282028      }
    2029      
     2029
    20302030      rtems_fdisk_queue_segment (fd, sc);
    20312031      return ret;
     
    20742074  req->req_done (req->done_arg,
    20752075                 ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
    2076  
     2076
    20772077  return ret;
    20782078}
     
    21102110  req->req_done (req->done_arg,
    21112111                 ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
    2112  
     2112
    21132113  return 0;
    21142114}
     
    21842184  {
    21852185    data->segment_count += fd->devices[i].segment_count;
    2186  
     2186
    21872187    for (j = 0; j < fd->devices[i].segment_count; j++)
    21882188    {
    21892189      rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
    2190    
     2190
    21912191      data->page_count   += sc->pages;
    21922192      data->pages_desc   += sc->pages_desc;
     
    22152215
    22162216  fd->info_level = 3;
    2217  
     2217
    22182218  rtems_fdisk_printf (fd,
    22192219                      "Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
     
    22512251    uint32_t block;
    22522252    uint32_t seg;
    2253  
     2253
    22542254    rtems_fdisk_printf (fd, " Device\t\t%ld", device);
    22552255    rtems_fdisk_printf (fd, "  Segment count\t%ld",
     
    22942294        }
    22952295      }
    2296      
     2296
    22972297      count = 0;
    22982298      for (block = 0; block < fd->block_count; block++)
     
    23762376              errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
    23772377              break;
    2378        
     2378
    23792379            default:
    23802380              errno = EINVAL;
     
    24632463
    24642464    fd = &rtems_flashdisks[minor];
    2465  
     2465
    24662466    name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
    2467  
     2467
    24682468    fd->major              = major;
    24692469    fd->minor              = minor;
     
    24742474    fd->unavail_blocks     = c->unavail_blocks;
    24752475    fd->info_level         = c->info_level;
    2476  
     2476
    24772477    for (device = 0; device < c->device_count; device++)
    24782478      blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
    24792479                                              c->block_size);
    2480  
     2480
    24812481    sc = rtems_disk_create_phys(dev, c->block_size,
    24822482                                blocks - fd->unavail_blocks,
     
    24872487      return sc;
    24882488    }
    2489  
     2489
    24902490    sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
    24912491                                 RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
     
    25032503    if (!fd->copy_buffer)
    25042504      return RTEMS_NO_MEMORY;
    2505    
     2505
    25062506    fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
    25072507    if (!fd->blocks)
     
    25212521
    25222522      segment_count = rtems_fdisk_count_segments (&c->devices[device]);
    2523    
     2523
    25242524      fd->devices[device].segments = calloc (segment_count,
    25252525                                             sizeof (rtems_fdisk_segment_ctl));
     
    25282528
    25292529      sc = fd->devices[device].segments;
    2530    
     2530
    25312531      for (segment = 0; segment < c->devices[device].segment_count; segment++)
    25322532      {
     
    25442544        }
    25452545      }
    2546      
     2546
    25472547      fd->devices[device].segment_count = segment_count;
    25482548      fd->devices[device].descriptor    = &c->devices[device];
    25492549    }
    2550    
     2550
    25512551    fd->device_count = c->device_count;
    25522552
  • cpukit/libblock/src/nvdisk-sram.c

    r0a7278e r18daff9  
    1111
    1212#if HAVE_CONFIG_H
    13 #include "config.h" 
     13#include "config.h"
    1414#endif
    1515
     
    2828rtems_nvdisk_sram_read (uint32_t device __attribute__((unused)),
    2929                        uint32_t flags __attribute__((unused)),
    30                         uint32_t base, 
     30                        uint32_t base,
    3131                        uint32_t offset,
    3232                        void*    buffer,
     
    4040rtems_nvdisk_sram_write (uint32_t    device __attribute__((unused)),
    4141                         uint32_t    flags __attribute__((unused)),
    42                          uint32_t    base, 
     42                         uint32_t    base,
    4343                         uint32_t    offset,
    4444                         const void* buffer,
     
    5252rtems_nvdisk_sram_verify (uint32_t    device __attribute__((unused)),
    5353                          uint32_t    flags __attribute__((unused)),
    54                           uint32_t    base, 
     54                          uint32_t    base,
    5555                          uint32_t    offset,
    5656                          const void* buffer,
  • cpukit/libblock/src/nvdisk.c

    r0a7278e r18daff9  
    6464   */
    6565  uint32_t device;
    66  
     66
    6767  /**
    6868   * Total number of pages in the device.
     
    135135 * @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
    136136 */
    137 rtems_status_code 
     137rtems_status_code
    138138rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
    139139{
     
    276276                      device, offset, size);
    277277#endif
    278   return ops->read (device, dd->flags, dd->base, offset, buffer, size); 
     278  return ops->read (device, dd->flags, dd->base, offset, buffer, size);
    279279}
    280280
     
    297297                      device, offset, size);
    298298#endif
    299   return ops->write (device, dd->flags, dd->base, offset, buffer, size); 
     299  return ops->write (device, dd->flags, dd->base, offset, buffer, size);
    300300}
    301301
     
    319319                      device, offset, size);
    320320#endif
    321   return ops->verify (device, dd->flags, dd->base, offset, buffer, size); 
     321  return ops->verify (device, dd->flags, dd->base, offset, buffer, size);
    322322}
    323323#endif
     
    428428{
    429429  uint32_t device;
    430  
     430
    431431  if (block >= nvd->block_count)
    432432  {
     
    457457  return block - dc->block_base;
    458458}
    459    
     459
    460460/**
    461461 * Read a block. The block is checked to see if the page referenced
     
    476476  uint16_t                 cs;
    477477  int                      ret;
    478  
     478
    479479  dc = rtems_nvdisk_get_device (nvd, block);
    480480
     
    483483
    484484  page = rtems_nvdisk_get_page (dc, block);
    485  
     485
    486486#if RTEMS_NVDISK_TRACE
    487487  rtems_nvdisk_info (nvd, " read-block:%d=>%02d-%03d, cs:%04x",
     
    502502    return 0;
    503503  }
    504  
     504
    505505  ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
    506506
     
    509509
    510510  cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
    511  
     511
    512512  if (cs != crc)
    513   {   
     513  {
    514514    rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
    515515                        block, cs, crc);
     
    540540  uint16_t                 cs;
    541541  int                      ret;
    542  
     542
    543543  dc = rtems_nvdisk_get_device (nvd, block);
    544544
     
    547547
    548548  page = rtems_nvdisk_get_page (dc, block);
    549  
     549
    550550  cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
    551551
     
    598598  req->req_done (req->done_arg,
    599599                 ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
    600  
     600
    601601  return ret;
    602602}
     
    638638  req->req_done (req->done_arg,
    639639                 ret ? RTEMS_SUCCESSFUL : RTEMS_IO_ERROR, ret);
    640  
     640
    641641  return 0;
    642642}
     
    693693    return -1;
    694694  }
    695        
     695
    696696  if (rtems_nvdisks[minor].device_count == 0)
    697697  {
     
    699699    return -1;
    700700  }
    701        
     701
    702702  errno = 0;
    703703
     
    716716            errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
    717717            break;
    718            
     718
    719719          case RTEMS_BLKDEV_REQ_WRITE:
    720720            errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
    721721            break;
    722            
     722
    723723          default:
    724724            errno = EINVAL;
     
    730730        errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
    731731        break;
    732        
     732
    733733      case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
    734734        rtems_nvdisks[minor].info_level = (uint32_t) argp;
    735735        break;
    736        
     736
    737737      default:
    738738        rtems_blkdev_ioctl (dd, req, argp);
     
    788788
    789789    nvd = &rtems_nvdisks[minor];
    790  
     790
    791791    name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
    792  
     792
    793793    nvd->major        = major;
    794794    nvd->minor        = minor;
     
    809809      dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
    810810      dc->block_base = blocks;
    811      
     811
    812812      blocks += dc->pages - dc->pages_desc;
    813813
     
    825825      return sc;
    826826    }
    827  
     827
    828828    sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
    829829                                 RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
  • cpukit/libblock/src/ramdisk-driver.c

    r0a7278e r18daff9  
    118118            break;
    119119        }
    120  
     120
    121121        default:
    122122            return rtems_blkdev_ioctl (dd, req, argp);
  • cpukit/libblock/src/show_bdbuf.c

    r0a7278e r18daff9  
    8484  bool modified;
    8585  bool in_progress;
    86   bool actual; 
     86  bool actual;
    8787  int use_count;
    8888  const CORE_mutex_Control *sema;
     
    129129  if (rc == RTEMS_SUCCESSFUL) {
    130130    DISABLE_PREEMPTION(preempt_key);
    131   }   
     131  }
    132132  /*
    133133   * follow node to its head
    134    * XXX: this is highly dependent on the chain implementation 
     134   * XXX: this is highly dependent on the chain implementation
    135135   * in score/src/chain.c and friends
    136136   */
    137137  while (the_node->previous != NULL) {
    138138    the_node = the_node->previous;
    139   } 
     139  }
    140140  /*
    141141   * reenable preemption, if disabled
     
    143143  if (preempt_disabled) {
    144144    ENABLE_PREEMPTION(preempt_key);
    145   }   
    146   /*
    147    * XXX: this depends n the chain implementation in 
    148    * score/include/rtems/score/chain.h: 
     145  }
     146  /*
     147   * XXX: this depends n the chain implementation in
     148   * score/include/rtems/score/chain.h:
    149149   * Chain_Control is overlayed by two Cohain_Nodes
    150150   */
     
    177177  Chain_Control *the_chain_control;
    178178
    179  
     179
    180180  *chn_ident = bdbuf_chain_ident_none;
    181181  if (rc == RTEMS_SUCCESSFUL) {
     
    219219{
    220220  rtems_status_code sc = RTEMS_SUCCESSFUL;
    221   int arg_error = 0; 
     221  int arg_error = 0;
    222222  int i;
    223223  char *tmp_ptr;
     
    232232
    233233  /*
    234    * scan arguments 
     234   * scan arguments
    235235   */
    236236  for (i = 1;
     
    321321    printf("%s: unknown argument %s\n",argv[0],argv[arg_error]);
    322322    sc = RTEMS_NOT_DEFINED;
    323   } 
     323  }
    324324  return sc;
    325325}
     
    415415\*=========================================================================*/
    416416{
    417  
     417
    418418  rtems_status_code rc = RTEMS_SUCCESSFUL;
    419419
     
    453453\*=========================================================================*/
    454454{
    455  
     455
    456456  rtems_status_code rc = RTEMS_SUCCESSFUL;
    457457
    458   /* 
    459    * determine the chain we are in 
     458  /*
     459   * determine the chain we are in
    460460   */
    461461  if (rc == RTEMS_SUCCESSFUL) {
     
    477477    bdbuf_info->in_progress = the_bdbuf->in_progress;
    478478    bdbuf_info->actual      = the_bdbuf->actual;
    479     bdbuf_info->use_count   = the_bdbuf->use_count;   
     479    bdbuf_info->use_count   = the_bdbuf->use_count;
    480480    bdbuf_info->sema        = &(the_bdbuf->transfer_sema);
    481481    bdbuf_info->pool_id     = the_bdbuf->pool;
     
    504504\*=========================================================================*/
    505505{
    506  
     506
    507507  rtems_status_code rc = RTEMS_SUCCESSFUL;
    508508  bool unmatch = false;
    509  
     509
    510510  if (rc == RTEMS_SUCCESSFUL) {
    511511    if (filter->bdbuf_all) {
     
    541541|    rtems_status_code                                                      |
    542542\*=========================================================================*/
    543 { 
     543{
    544544  rtems_status_code rc = RTEMS_SUCCESSFUL;
    545545  Chain_Control *the_chain_head;
     
    567567    thread_id   = the_thread->Object.id;
    568568    thread_name = the_thread->Object.name;
    569     thread_name_nonstring = (uint32_t)thread_name.name_u32; 
     569    thread_name_nonstring = (uint32_t)thread_name.name_u32;
    570570    printf("%20s %3d (0x%08" PRIx32 ") %c%c%c%c\n",
    571571           ((thread_cnt == 1) ? "Threads waiting:" : ""),
     
    578578    the_chain_node = the_chain_node->next;
    579579  }
    580          
     580
    581581  return rc;
    582582}
     
    602602\*=========================================================================*/
    603603{
    604  
     604
    605605  rtems_status_code rc = RTEMS_SUCCESSFUL;
    606606
     
    659659    else {
    660660      printf("%3" PRIu32 "%2" PRIu32,
    661              ((bdbuf_info->dev == -1) 
     661             ((bdbuf_info->dev == -1)
    662662              ? 0 : rtems_filesystem_dev_major_t(bdbuf_info->dev)),
    663              ((bdbuf_info->dev == -1) 
     663             ((bdbuf_info->dev == -1)
    664664              ? 0 : rtems_filesystem_dev_minor_t(bdbuf_info->dev)));
    665665    }
     
    722722    else {
    723723      printf("%20s:%-10s ",
    724              ((bdbuf_info->status == RTEMS_SUCCESSFUL) 
     724             ((bdbuf_info->status == RTEMS_SUCCESSFUL)
    725725              ? "SUCCESSFUL" : rtems_status_text(bdbuf_info->status)),
    726              ((bdbuf_info->status == RTEMS_SUCCESSFUL) 
     726             ((bdbuf_info->status == RTEMS_SUCCESSFUL)
    727727              ? "" : strerror(bdbuf_info->error)));
    728728    }
     
    789789  for (pool_idx = 0;
    790790       (rc == RTEMS_SUCCESSFUL) && (pool_idx < pool_cnt);
    791        pool_idx++) {   
    792     if ((filter.pool_id < 0) || 
     791       pool_idx++) {
     792    if ((filter.pool_id < 0) ||
    793793        (filter.pool_id == pool_idx)) {
    794794      curr_pool = pool_base + pool_idx;
     
    813813         */
    814814        for (bdbuf_idx = 0;
    815              ((rc == RTEMS_SUCCESSFUL) && 
     815             ((rc == RTEMS_SUCCESSFUL) &&
    816816              (bdbuf_idx < curr_pool->nblks));
    817              bdbuf_idx++) {       
     817             bdbuf_idx++) {
    818818          /*
    819819           * get infos about bdbuf
     
    840840              rc = rtems_show_bdbuf_print(&bdbuf_info,&selector,
    841841                                          false);
    842               if ((rc == RTEMS_SUCCESSFUL) && 
     842              if ((rc == RTEMS_SUCCESSFUL) &&
    843843                  selector.show_sema) {
    844844                rc = rtems_show_bdbuf_print_wait_chain(&(curr_pool->bdbufs[bdbuf_idx]));
     
    849849              un_matched_cnt++;
    850850            }
    851           }       
     851          }
    852852        }
    853853        /*
     
    874874};
    875875
    876 #ifndef ARRAY_CNT 
     876#ifndef ARRAY_CNT
    877877#define ARRAY_CNT(arr) (sizeof((arr))/sizeof((arr)[0]))
    878878#endif
  • cpukit/libcsupport/src/__assert.c

    r0a7278e r18daff9  
    1 /*  __assert - small RTEMS Specific Implementation 
     1/*  __assert - small RTEMS Specific Implementation
    22 *
    33 *  COPYRIGHT (c) 2007.
     
    2020#if defined(RTEMS_NEWLIB) && !defined(HAVE___ASSERT_FUNC)
    2121/*
    22  * Newlib 1.16.0 added this method.  Together these provide an 
     22 * Newlib 1.16.0 added this method.  Together these provide an
    2323 * RTEMS safe, low memory implementation.
    2424 */
  • cpukit/libcsupport/src/__times.c

    r0a7278e r18daff9  
    5757      uint32_t          ticks;
    5858      uint32_t          fractional_ticks;
    59      
    60       _Timestamp_Set( 
     59
     60      _Timestamp_Set(
    6161        &per_tick,
    6262        rtems_configuration_get_microseconds_per_tick() /
  • cpukit/libcsupport/src/free.c

    r0a7278e r18daff9  
    3737   */
    3838
    39   if ( _System_state_Is_up(_System_state_Get()) && 
     39  if ( _System_state_Is_up(_System_state_Get()) &&
    4040       !malloc_is_system_state_OK() ) {
    4141      malloc_deferred_free(ptr);
  • cpukit/libcsupport/src/libio.c

    r0a7278e r18daff9  
    2727#include <errno.h>
    2828
    29 /* define this to alias O_NDELAY to  O_NONBLOCK, i.e., 
     29/* define this to alias O_NDELAY to  O_NONBLOCK, i.e.,
    3030 * O_NDELAY is accepted on input but fcntl(F_GETFL) returns
    31  * O_NONBLOCK. This is because rtems has no distinction 
     31 * O_NONBLOCK. This is because rtems has no distinction
    3232 * between the two (but some systems have).
    3333 * Note that accepting this alias creates a problem:
     
    166166    iop = rtems_libio_iop_freelist;
    167167    next = iop->data1;
    168     (void) memset( iop, 0, sizeof(rtems_libio_t) ); 
     168    (void) memset( iop, 0, sizeof(rtems_libio_t) );
    169169    iop->flags = LIBIO_FLAGS_OPEN;
    170170    iop->sem = sema;
  • cpukit/libcsupport/src/malloc.c

    r0a7278e r18daff9  
    7474
    7575  if ( !return_this ) {
    76     if (rtems_malloc_sbrk_helpers) 
     76    if (rtems_malloc_sbrk_helpers)
    7777      return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
    7878    if ( !return_this ) {
  • cpukit/libcsupport/src/malloc_get_statistics.c

    r0a7278e r18daff9  
    2121int malloc_get_statistics(
    2222  rtems_malloc_statistics_t *stats
    23 ) 
     23)
    2424{
    2525  if ( !stats )
  • cpukit/libcsupport/src/malloc_initialize.c

    r0a7278e r18daff9  
    8484   *  that has already been done.
    8585   */
    86    
     86
    8787  /*
    8888   *  If the BSP is not clearing out the workspace, then it is most likely
     
    110110
    111111  if ( !rtems_unified_work_area ) {
    112     uintptr_t status = _Protected_heap_Initialize( 
     112    uintptr_t status = _Protected_heap_Initialize(
    113113      RTEMS_Malloc_Heap,
    114114      heap_begin,
  • cpukit/libcsupport/src/newlibc_exit.c

    r0a7278e r18daff9  
    132132      #define FINI_SYMBOL _fini
    133133    #endif
    134  
     134
    135135    extern void FINI_SYMBOL( void );
    136136  #endif
     
    139139{
    140140  /*
    141    *  If the toolset uses init/fini sections, then we need to 
     141   *  If the toolset uses init/fini sections, then we need to
    142142   *  run the global destructors now.
    143143   */
  • cpukit/libcsupport/src/newlibc_init.c

    r0a7278e r18daff9  
    2222/*
    2323 *  Init libc for CYGNUS newlib
    24  * 
     24 *
    2525 *  Set up _REENT to use our global libc_global_reent.
    2626 *  (newlib provides a global of its own, but we prefer our own name for it)
  • cpukit/libcsupport/src/open_dev_console.c

    r0a7278e r18daff9  
    3737     */
    3838    return;
    39   } 
     39  }
    4040
    4141  /*
  • cpukit/libcsupport/src/printk_plugin.c

    r0a7278e r18daff9  
    1717#include <rtems/bspIo.h>
    1818
    19 int printk_plugin( 
     19int printk_plugin(
    2020  void *ignored __attribute__((unused)),
    2121  const char *format,
     
    3030
    3131  va_end(arg_pointer); /* clean up when done */
    32  
     32
    3333  return 0;
    3434}
  • cpukit/libcsupport/src/putk.c

    r0a7278e r18daff9  
    2121 * Kernel putk (e.g. puts) function requiring minimal infrastrure.
    2222 */
    23 void putk(const char *s) 
     23void putk(const char *s)
    2424{
    2525  const char *p = s;
  • cpukit/libcsupport/src/readv.c

    r0a7278e r18daff9  
    6060  /*
    6161   *  OpenGroup says that you are supposed to return EINVAL if the
    62    *  sum of the iov_len values in the iov array would overflow a 
     62   *  sum of the iov_len values in the iov array would overflow a
    6363   *  ssize_t.
    6464   *
     
    9696    return 0;
    9797  }
    98    
     98
    9999  /*
    100100   *  Now process the readv().
  • cpukit/libcsupport/src/rmdir.c

    r0a7278e r18daff9  
    3535  int                               i;
    3636  int                               result;
    37  
     37
    3838  /*
    3939   *  Get the parent node of the node we wish to remove. Find the parent path.
     
    5656   * Start from the parent to find the node that should be under it.
    5757   */
    58  
     58
    5959  loc = parentloc;
    6060  name = pathname + parentpathlen;
    6161  name += rtems_filesystem_prefix_separators( name, strlen( name ) );
    62  
     62
    6363  result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
    6464                                                    0, &loc, false );
  • cpukit/libcsupport/src/rtems_memalign.c

    r0a7278e r18daff9  
    4141   *  Do not attempt to allocate memory if not in correct system state.
    4242   */
    43   if ( _System_state_Is_up(_System_state_Get()) && 
     43  if ( _System_state_Is_up(_System_state_Get()) &&
    4444       !malloc_is_system_state_OK() )
    4545    return EINVAL;
     
    8686  #endif
    8787
    88   *pointer = return_this; 
     88  *pointer = return_this;
    8989  return 0;
    9090}
  • cpukit/libcsupport/src/scandir.c

    r0a7278e r18daff9  
    135135        closedir(dirp);
    136136        if (nitems && dcomp != NULL){
    137                 qsort(names, nitems, sizeof(struct dirent *), 
     137                qsort(names, nitems, sizeof(struct dirent *),
    138138                (int (*)(const void *, const void *)) dcomp);
    139139        }
  • cpukit/libcsupport/src/statvfs.c

    r0a7278e r18daff9  
    5252
    5353  memset (sb, 0, sizeof (struct statvfs));
    54  
     54
    5555  result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
    56  
     56
    5757  rtems_filesystem_freenode( &loc );
    5858
  • cpukit/libcsupport/src/tcflow.c

    r0a7278e r18daff9  
    2121
    2222int tcflow (
    23   int fd __attribute__((unused)), 
     23  int fd __attribute__((unused)),
    2424  int action __attribute__((unused)))
    2525{
  • cpukit/libcsupport/src/termios.c

    r0a7278e r18daff9  
    10221022                 * Process characters read from raw queue
    10231023                 */
    1024                 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 
     1024                while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
    10251025                       (tty->ccount < (CBUFSIZE-1))) {
    10261026                        unsigned char c;
  • cpukit/libcsupport/src/termios_setinitialbaud.c

    r0a7278e r18daff9  
    2525
    2626  ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
    27  
     27
    2828  return 0;
    2929}
  • cpukit/libcsupport/src/unlink.c

    r0a7278e r18daff9  
    3535   * Get the node to be unlinked. Find the parent path first.
    3636   */
    37  
     37
    3838  parentpathlen = rtems_filesystem_dirname ( path );
    39  
     39
    4040  if ( parentpathlen == 0 )
    4141    rtems_filesystem_get_start_loc( path, &i, &parentloc );
     
    4848      return -1;
    4949  }
    50  
     50
    5151  /*
    5252   * Start from the parent to find the node that should be under it.
    5353   */
    54  
     54
    5555  loc = parentloc;
    5656  name = path + parentpathlen;
    5757  name += rtems_filesystem_prefix_separators( name, strlen( name ) );
    58  
     58
    5959  result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
    6060                                                    0, &loc, false );
     
    6363    return -1;
    6464  }
    65  
     65
    6666  if ( !loc.ops->node_type_h ) {
    6767    rtems_filesystem_freenode( &loc );
  • cpukit/libcsupport/src/writev.c

    r0a7278e r18daff9  
    6161  /*
    6262   *  OpenGroup says that you are supposed to return EINVAL if the
    63    *  sum of the iov_len values in the iov array would overflow a 
     63   *  sum of the iov_len values in the iov array would overflow a
    6464   *  ssize_t.
    6565   *
     
    8585    if ( iov[v].iov_len )
    8686      all_zeros = false;
    87    
     87
    8888    /* check for wrap */
    8989    old    = total;
     
    9999    return 0;
    100100  }
    101    
     101
    102102  /*
    103103   *  Now process the writev().
Note: See TracChangeset for help on using the changeset viewer.