Changeset eff1a590 in mainline for uspace/srv/drivers/root/root.c


Ignore:
Timestamp:
2010-03-25T14:47:20Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1769ee
Parents:
a087f2e
Message:

parts of code of a dummy root HW device driver for ia32 platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/drivers/root/root.c

    ra087f2e reff1a590  
    8080        if (NULL == (platform = create_device())) {
    8181                goto failure;
    82         }
     82        }       
    8383       
    84         // TODO - replace this with some better solution (sysinfo ?)
    85         platform->name = STRING(UARCH);
     84        platform->name = "hw";
    8685        printf(NAME ": the new device's name is %s.\n", platform->name);
    8786       
     
    9089                goto failure;
    9190        }
    92         match_id->id = platform->name;
     91       
     92        // TODO - replace this with some better solution (sysinfo ?)
     93        match_id->id = STRING(UARCH);
    9394        match_id->score = 100;
    9495        add_match_id(&platform->match_ids, match_id);   
     
    130131}
    131132
    132 static bool root_init()
    133 {
    134         // TODO  driver initialization 
    135         return true;
    136 }
    137 
    138133int main(int argc, char *argv[])
    139134{
    140         printf(NAME ": HelenOS root device driver\n");
    141         if (!root_init()) {
    142                 printf(NAME ": Error while initializing driver.\n");
    143                 return -1;
    144         }
    145        
     135        printf(NAME ": HelenOS root device driver\n"); 
    146136        return driver_main(&root_driver);
    147137}
Note: See TracChangeset for help on using the changeset viewer.