Changeset cec5c069 in rtems for cpukit/libblock


Ignore:
Timestamp:
08/21/08 16:17:35 (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
21c9770
Parents:
d9be8024
Message:

2008-08-21 Joel Sherrill <joel.sherrill@…>

  • libblock/include/rtems/bdbuf.h, libblock/include/rtems/diskdevs.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Eliminate sign mismatch warnings.
Location:
cpukit/libblock
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/include/rtems/bdbuf.h

    rd9be8024 rcec5c069  
    8787typedef struct rtems_bdbuf_pool
    8888{
    89   int                 blksize;           /*< The size of the blocks (in bytes) */
    90   int                 nblks;             /*< Number of blocks in this pool */
     89  uint32_t            blksize;           /*< The size of the blocks (in bytes) */
     90  uint32_t            nblks;             /*< Number of blocks in this pool */
    9191
    9292  uint32_t            flags;             /*< Configuration flags */
     
    145145 */
    146146typedef struct rtems_bdbuf_config {
    147   int                 max_read_ahead_blocks; /*< Number of blocks to read ahead. */
    148   int                 max_write_blocks;      /*< Number of blocks to write at once. */
     147  uint32_t            max_read_ahead_blocks; /*< Number of blocks to read ahead. */
     148  uint32_t            max_write_blocks;      /*< Number of blocks to write at once. */
    149149  rtems_task_priority swapout_priority;      /*< Priority of the swap out task. */
    150150  uint32_t            swapout_period;        /*< Period swapout checks buf timers. */
     
    318318 */
    319319rtems_status_code
    320 rtems_bdbuf_find_pool (int block_size, rtems_bdpool_id *pool);
     320rtems_bdbuf_find_pool (uint32_t block_size, rtems_bdpool_id *pool);
    321321
    322322/**
  • cpukit/libblock/include/rtems/diskdevs.h

    rd9be8024 rcec5c069  
    4848    int                       uses;         /* Use counter. Device couldn't be
    4949                                               removed if it is in use. */
    50     int                       start;        /* Starting block number (0 for
     50    uint32_t                  start;        /* Starting block number (0 for
    5151                                               physical devices, block offset
    5252                                               on the related physical device
    5353                                               for logical device) */
    54     int                       size;         /* Size of physical or logical disk
     54    uint32_t                  size;         /* Size of physical or logical disk
    5555                                               in disk blocks */
    56     int                       block_size;   /* Size of device block (minimum
     56    uint32_t                  block_size;   /* Size of device block (minimum
    5757                                               transfer unit) in bytes
    5858                                               (must be power of 2) */
    59     int                 block_size_log2;    /* log2 of block_size */
     59    uint32_t            block_size_log2;    /* log2 of block_size */
    6060    rtems_bdpool_id     pool;               /* Buffer pool assigned to this
    6161                                               device */
  • cpukit/libblock/src/bdbuf.c

    rd9be8024 rcec5c069  
    928928  rtems_bdbuf_buffer* bd;
    929929  rtems_status_code   sc;
    930   int                 b;
     930  uint32_t            b;
    931931
    932932  pool = rtems_bdbuf_get_pool (pid);
     
    12971297          {
    12981298            rtems_chain_node* node = rtems_chain_head (&pool->modified);
    1299             int               write_blocks = 0;
     1299            uint32_t          write_blocks = 0;
    13001300           
    13011301            node = node->next;
     
    15281528  rtems_bdbuf_pool*     pool;
    15291529  rtems_bdbuf_buffer*   bd = NULL;
    1530   int                   read_ahead_count;
     1530  uint32_t              read_ahead_count;
    15311531  rtems_blkdev_request* req;
    15321532 
     
    16401640     * of the bdbuf code.
    16411641     */
    1642     int result;
    1643     int b;
     1642    int      result;
     1643    uint32_t b;
    16441644   
    16451645    rtems_bdbuf_unlock_pool (pool);
     
    20432043         * calls sets the dev to use.
    20442044         */
    2045         if (*dev == -1)
     2045        if (*dev == (dev_t)-1)
    20462046          *dev = bd->dev;
    20472047
     
    22362236        {
    22372237          int result;
    2238           int b;
     2238          uint32_t b;
    22392239
    22402240          /*
     
    24362436 */
    24372437rtems_status_code
    2438 rtems_bdbuf_find_pool (int block_size, rtems_bdpool_id *pool)
     2438rtems_bdbuf_find_pool (uint32_t block_size, rtems_bdpool_id *pool)
    24392439{
    24402440  rtems_bdbuf_pool* p;
     
    24422442  rtems_bdpool_id   curid = -1;
    24432443  rtems_boolean     found = FALSE;
    2444   int               cursize = INT_MAX;
     2444  uint32_t          cursize = UINT_MAX;
    24452445  int               j;
    24462446
  • cpukit/libblock/src/blkdev.c

    rd9be8024 rcec5c069  
    5959    {
    6060        rtems_bdbuf_buffer *diskbuf;
    61         int copy;
    62         rtems_status_code rc;
     61        uint32_t            copy;
     62        rtems_status_code   rc;
    6363
    6464        rc = rtems_bdbuf_read(dev, block, &diskbuf);
     
    9292{
    9393    rtems_libio_rw_args_t *args = arg;
    94     int block_size_log2;
    95     int block_size;
     94    int           block_size_log2;
     95    uint32_t      block_size;
    9696    char         *buf;
    97     unsigned int count;
    98     unsigned int block;
    99     unsigned int blkofs;
     97    uint32_t      count;
     98    uint32_t      block;
     99    uint32_t      blkofs;
    100100    dev_t dev;
    101101    rtems_status_code rc;
     
    120120    {
    121121        rtems_bdbuf_buffer *diskbuf;
    122         int copy;
     122        uint32_t            copy;
    123123
    124124        if ((blkofs == 0) && (count >= block_size))
  • cpukit/libblock/src/diskdevs.c

    rd9be8024 rcec5c069  
    2626typedef struct rtems_disk_device_table {
    2727    rtems_disk_device **minor; /* minor-indexed disk device table */
    28     int size;            /* Number of entries in the table */
     28    uint32_t            size;            /* Number of entries in the table */
    2929} rtems_disk_device_table;
    3030
     
    3333
    3434/* Number of allocated entries in disktab table */
    35 static int disktab_size;
     35static uint32_t disktab_size;
    3636
    3737/* Mutual exclusion semaphore for disk devices table */
     
    7777    {
    7878        rtems_disk_device_table *p;
    79         int newsize;
    80         int i;
     79        uint32_t newsize;
     80        uint32_t i;
    8181        newsize = disktab_size * 2;
    8282        if (major >= newsize)
     
    9898        (minor >= disktab[major].size))
    9999    {
    100         int newsize;
     100        uint32_t            newsize;
    101101        rtems_disk_device **p;
    102         int i;
    103         int s = disktab[major].size;
     102        uint32_t            i;
     103        uint32_t            s = disktab[major].size;
    104104
    105105        if (s == 0)
  • cpukit/libblock/src/ramdisk.c

    rd9be8024 rcec5c069  
    4747
    4848static struct ramdisk *ramdisk;
    49 static int nramdisks;
     49static uint32_t        nramdisks;
    5050
    5151#if RTEMS_RAMDISK_TRACE
     
    104104    for (i = 0; (remains > 0) && (i < req->bufnum); i++, sg++)
    105105    {
    106         int count = sg->length;
     106        uint32_t count = sg->length;
    107107        from = ((char *)rd->area + (sg->block * rd->block_size));
    108108        if (count > remains)
     
    144144    for (i = 0; (remains > 0) && (i < req->bufnum); i++, sg++)
    145145    {
    146         int count = sg->length;
     146        uint32_t count = sg->length;
    147147        to = ((char *)rd->area + (sg->block * rd->block_size));
    148148        if (count > remains)
Note: See TracChangeset for help on using the changeset viewer.