Changeset 6640459d in rtems for c/src/libchip/ide/ata.c


Ignore:
Timestamp:
Sep 7, 2008, 3:44:14 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.9, master
Children:
b4d0eec3
Parents:
d5150397
Message:

Convert to "bool".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/ide/ata.c

    rd5150397 r6640459d  
    106106#endif
    107107#else /* !SAFE */
    108 typedef boolean preemption_key;
     108typedef bool preemption_key;
    109109
    110110#define PREEMPTION_KEY(key) preemption_key key
     
    146146
    147147/* Flag meaning that ATA driver has already been initialized */
    148 static rtems_boolean ata_initialized = FALSE;
     148static bool ata_initialized = false;
    149149
    150150
     
    526526        else
    527527        {
    528             if (IDE_Controller_Table[ctrl_minor].int_driven == 0)
     528            if (IDE_Controller_Table[ctrl_minor].int_driven == false)
    529529            {
    530530                ide_controller_read_register(
     
    541541    }
    542542
    543     if (IDE_Controller_Table[ctrl_minor].int_driven == 0)
     543    if (IDE_Controller_Table[ctrl_minor].int_driven == false)
    544544    {
    545545        do {
     
    802802        ata_request_done(areq, ctrl_minor, RTEMS_SUCCESSFUL, RTEMS_SUCCESSFUL);
    803803    }
    804     else if (IDE_Controller_Table[ctrl_minor].int_driven == 0)
     804    else if (IDE_Controller_Table[ctrl_minor].int_driven == false)
    805805    {
    806806        do {
     
    852852                                        &areq->pos);
    853853        areq->cnt -= min_val;
    854         if (IDE_Controller_Table[ctrl_minor].int_driven == 0)
     854        if (IDE_Controller_Table[ctrl_minor].int_driven == false)
    855855        {
    856856            do {
     
    12101210        rtems_chain_initialize_empty(&ata_ide_ctrls[ctrl_minor].reqs);
    12111211
    1212         if (IDE_Controller_Table[ctrl_minor].int_driven == TRUE)
     1212        if (IDE_Controller_Table[ctrl_minor].int_driven == true)
    12131213        {
    12141214            int_st = malloc(sizeof(ata_int_st_t));
     
    13201320        if (breq.req.error == ATA_DEV0_PASSED_DEV1_PASSED_OR_NOT_PRSNT)
    13211321        {
    1322             ATA_DEV_INFO(ctrl_minor, 0).present = 1;
    1323             ATA_DEV_INFO(ctrl_minor,1).present = 1;
     1322            ATA_DEV_INFO(ctrl_minor, 0).present = true;
     1323            ATA_DEV_INFO(ctrl_minor,1).present = true;
    13241324        }
    13251325        else if (breq.req.error == ATA_DEV0_PASSED_DEV1_FAILED)
    13261326        {
    1327             ATA_DEV_INFO(ctrl_minor,0).present = 1;
    1328             ATA_DEV_INFO(ctrl_minor,1).present = 0;
     1327            ATA_DEV_INFO(ctrl_minor,0).present = true;
     1328            ATA_DEV_INFO(ctrl_minor,1).present = false;
    13291329        }
    13301330        else if (breq.req.error < ATA_DEV1_PASSED_DEV0_FAILED)
    13311331        {
    1332             ATA_DEV_INFO(ctrl_minor,0).present = 0;
    1333             ATA_DEV_INFO(ctrl_minor,1).present = 1;
     1332            ATA_DEV_INFO(ctrl_minor,0).present = false;
     1333            ATA_DEV_INFO(ctrl_minor,1).present = true;
    13341334        }
    13351335        else
    13361336        {
    1337             ATA_DEV_INFO(ctrl_minor, 0).present = 0;
    1338             ATA_DEV_INFO(ctrl_minor, 1).present = 0;
     1337            ATA_DEV_INFO(ctrl_minor, 0).present = false;
     1338            ATA_DEV_INFO(ctrl_minor, 1).present = false;
    13391339        }
    13401340
    13411341        /* refine the returned codes */
    1342         if (ATA_DEV_INFO(ctrl_minor, 1).present != 0)
     1342        if (ATA_DEV_INFO(ctrl_minor, 1).present != false)
    13431343        {
    13441344            ide_controller_read_register(ctrl_minor, IDE_REGISTER_ERROR, &ec);
    13451345            if (ec & ATA_DEV1_PASSED_DEV0_FAILED)
    1346                 ATA_DEV_INFO(ctrl_minor, 1).present = 1;
     1346                ATA_DEV_INFO(ctrl_minor, 1).present = true;
    13471347            else
    1348                 ATA_DEV_INFO(ctrl_minor, 1).present = 0;
     1348                ATA_DEV_INFO(ctrl_minor, 1).present = false;
    13491349        }
    13501350
     
    14581458            ata_devs_number++;
    14591459        }
    1460         if (IDE_Controller_Table[ctrl_minor].int_driven == TRUE)
     1460        if (IDE_Controller_Table[ctrl_minor].int_driven == true)
    14611461        {
    14621462            ide_controller_write_register(ctrl_minor,
     
    14671467
    14681468    free(buffer);
    1469     ata_initialized = TRUE;
     1469    ata_initialized = true;
    14701470    return RTEMS_SUCCESSFUL;
    14711471}
Note: See TracChangeset for help on using the changeset viewer.