Changeset c01d95b7 in rtems


Ignore:
Timestamp:
Jan 9, 2004, 3:40:54 PM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
89b46875
Parents:
4056604
Message:

2004-01-08 Ralf Corsepius <corsepiu@…>

  • include/rtems/blkdev.h, include/rtems/ide_part_table.h, src/bdbuf.c, src/ide_part_table.c, src/ramdisk.c: Switch to using c99 fixed size types instead of RTEMS-types.
Location:
cpukit/libblock
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/ChangeLog

    r4056604 rc01d95b7  
     12004-01-08  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * include/rtems/blkdev.h, include/rtems/ide_part_table.h,
     4        src/bdbuf.c, src/ide_part_table.c, src/ramdisk.c:
     5        Switch to using c99 fixed size types instead of RTEMS-types.
     6
    172004-01-08  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    28
  • cpukit/libblock/include/rtems/blkdev.h

    r4056604 rc01d95b7  
    2828
    2929/* Block device block number datatype */
    30 typedef rtems_unsigned32 blkdev_bnum;
     30typedef uint32_t  blkdev_bnum;
    3131
    3232/* Block device request type */
     
    5252 */
    5353typedef struct blkdev_sg_buffer {
    54     rtems_unsigned32 length;  /* Buffer length */
     54    uint32_t  length;  /* Buffer length */
    5555    void            *buffer;  /* Buffer pointer */
    5656} blkdev_sg_buffer;
     
    6868                                */
    6969    blkdev_bnum       start;    /* Start block number */
    70     rtems_unsigned32  count;    /* Number of blocks to be exchanged */
    71     rtems_unsigned32  bufnum;   /* Number of buffers provided */   
     70    uint32_t    count;    /* Number of blocks to be exchanged */
     71    uint32_t    bufnum;   /* Number of buffers provided */   
    7272   
    7373    blkdev_sg_buffer  bufs[0];/* List of scatter/gather buffers */
  • cpukit/libblock/include/rtems/ide_part_table.h

    r4056604 rc01d95b7  
    8080typedef struct sector_data_s
    8181{
    82     unsigned32 sector_num; /* sector number on the device */
    83     unsigned8  data[0]; /* raw sector data */
     82    uint32_t  sector_num; /* sector number on the device */
     83    uint8_t    data[0]; /* raw sector data */
    8484} sector_data_t;
    8585
     
    116116 */
    117117typedef struct part_desc_s {
    118     unsigned8           bootable; /* is the partition active */
    119     unsigned8           sys_type; /* type of partition */
    120     unsigned8           log_id; /* logical number of partition */
    121     unsigned32          start; /* first partition sector, in absolute numeration */
    122     unsigned32          size; /* size in sectors */
    123     unsigned32          end; /* last partition sector, end = start + size - 1 */
     118    uint8_t             bootable; /* is the partition active */
     119    uint8_t             sys_type; /* type of partition */
     120    uint8_t             log_id; /* logical number of partition */
     121    uint32_t            start; /* first partition sector, in absolute numeration */
     122    uint32_t            size; /* size in sectors */
     123    uint32_t            end; /* last partition sector, end = start + size - 1 */
    124124    struct disk_desc_s *disk_desc; /* descriptor of disk, partition contains in */
    125125    struct part_desc_s *ext_part; /* extended partition containing this one */
     
    135135
    136136    /* device name in /dev filesystem */
    137     unsigned8    dev_name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
     137    uint8_t      dev_name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
    138138
    139     unsigned32   sector_size; /* size of sector */
    140     unsigned32   sector_bits; /* the base-2 logarithm of sector_size */
    141     unsigned32   lba_size; /* total amount of sectors in lba address mode */
     139    uint32_t     sector_size; /* size of sector */
     140    uint32_t     sector_bits; /* the base-2 logarithm of sector_size */
     141    uint32_t     lba_size; /* total amount of sectors in lba address mode */
    142142    int          last_log_id; /* used for logical disks enumerating */
    143143
  • cpukit/libblock/src/bdbuf.c

    r4056604 rc01d95b7  
    2424
    2525/* Fatal errors: */
    26 #define BLKDEV_FATAL_ERROR(n) (((unsigned32)'B' << 24) | ((unsigned32)(n) & (unsigned32)0x00FFFFFF))
     26#define BLKDEV_FATAL_ERROR(n) (((uint32_t)'B' << 24) | ((uint32_t)(n) & (uint32_t)0x00FFFFFF))
    2727#define BLKDEV_FATAL_BDBUF_CONSISTENCY BLKDEV_FATAL_ERROR(1)
    2828#define BLKDEV_FATAL_BDBUF_SWAPOUT     BLKDEV_FATAL_ERROR(2)
  • cpukit/libblock/src/ide_part_table.c

    r4056604 rc01d95b7  
    4747 */
    4848static rtems_status_code
    49 get_sector(dev_t dev, unsigned32 sector_num, sector_data_t **sector)
     49get_sector(dev_t dev, uint32_t sector_num, sector_data_t **sector)
    5050{
    5151    sector_data_t      *s;
     
    9595msdos_signature_check (sector_data_t *sector)
    9696{
    97     unsigned8 *p = sector->data + RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET;
     97    uint8_t *p = sector->data + RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET;
    9898
    9999    return ((p[0] == RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA1) &&
     
    113113 */
    114114static rtems_boolean
    115 is_extended(unsigned8 type)
     115is_extended(uint8_t type)
    116116{
    117117    return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
     
    129129 */
    130130static rtems_boolean
    131 is_fat_partition(unsigned8 type)
    132 {
    133   static const unsigned8 fat_part_types[] = {
     131is_fat_partition(uint8_t type)
     132{
     133  static const uint8_t fat_part_types[] = {
    134134    DOS_FAT12_PARTITION,DOS_FAT16_PARTITION,
    135135    DOS_P32MB_PARTITION,
     
    157157 */
    158158static rtems_status_code
    159 data_to_part_desc(unsigned8 *data, part_desc_t **new_part_desc)
     159data_to_part_desc(uint8_t *data, part_desc_t **new_part_desc)
    160160{
    161161    part_desc_t *part_desc;
    162     unsigned32   temp;
     162    uint32_t     temp;
    163163
    164164    if (new_part_desc == NULL)
     
    180180
    181181    /* due to incorrect data alignment one have to align data first */
    182     memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(unsigned32));
     182    memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t));
    183183    part_desc->start = LE_TO_CPU_U32(temp);
    184184
    185     memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(unsigned32));
     185    memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t));
    186186    part_desc->size = LE_TO_CPU_U32(temp);
    187187
     
    220220 */
    221221static rtems_status_code
    222 read_extended_partition(unsigned32 start, part_desc_t *ext_part)
     222read_extended_partition(uint32_t start, part_desc_t *ext_part)
    223223{
    224224    int                 i;
    225225    dev_t               dev;
    226226    sector_data_t      *sector;
    227     unsigned32          here;
    228     unsigned8          *data;
     227    uint32_t            here;
     228    uint8_t            *data;
    229229    part_desc_t        *new_part_desc;
    230230    rtems_status_code   rc;
     
    320320    sector_data_t      *sector;
    321321    part_desc_t        *part_desc;
    322     unsigned8          *data;
     322    uint8_t            *data;
    323323    rtems_status_code   rc;
    324324    dev_t               dev = disk_desc->dev;
  • cpukit/libblock/src/ramdisk.c

    r4056604 rc01d95b7  
    5252{
    5353    char *from;
    54     rtems_unsigned32 i;
     54    uint32_t  i;
    5555    blkdev_sg_buffer *sg;
    56     rtems_unsigned32 remains;
     56    uint32_t  remains;
    5757   
    5858    from = (char *)rd->area + (req->start * rd->block_size);
     
    8787{
    8888    char *to;
    89     rtems_unsigned32 i;
     89    uint32_t  i;
    9090    blkdev_sg_buffer *sg;
    91     rtems_unsigned32 remains;
     91    uint32_t  remains;
    9292   
    9393    to = (char *)rd->area + (req->start * rd->block_size);
Note: See TracChangeset for help on using the changeset viewer.