Changeset d347b53 in mainline for uspace/srv/devman/devman.c


Ignore:
Timestamp:
2010-03-21T19:33:58Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
66babbd
Parents:
bda60d9
Message:

child device registration - parts of code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    rbda60d9 rd347b53  
    233233        }       
    234234       
    235         printf(NAME ": get_driver_info - path to match id list = %s.\n", match_path);
    236        
    237235        if (!read_match_ids(match_path, &drv->match_ids)) {
    238236                goto cleanup;
     
    284282int lookup_available_drivers(driver_list_t *drivers_list, const char *dir_path)
    285283{
    286         printf(NAME ": lookup_available_drivers \n");
     284        printf(NAME ": lookup_available_drivers, dir = %s \n", dir_path);
    287285       
    288286        int drv_cnt = 0;
     
    291289
    292290        dir = opendir(dir_path);
    293         printf(NAME ": lookup_available_drivers has opened directory %s for driver search.\n", dir_path);
    294291       
    295292        if (dir != NULL) {
    296293                driver_t *drv = create_driver();
    297                 printf(NAME ": lookup_available_drivers has created driver structure.\n");
    298294                while ((diren = readdir(dir))) {                       
    299295                        if (get_driver_info(dir_path, diren->d_name, drv)) {
     
    345341driver_t * find_best_match_driver(driver_list_t *drivers_list, node_t *node)
    346342{
    347         printf(NAME ": find_best_match_driver\n");
     343        printf(NAME ": find_best_match_driver for device '%s' \n", node->pathname);
    348344        driver_t *best_drv = NULL, *drv = NULL;
    349345        int best_score = 0, score = 0;
     
    392388bool start_driver(driver_t *drv)
    393389{
    394         printf(NAME ": start_driver\n");
     390        printf(NAME ": start_driver '%s'\n", drv->name);
    395391       
    396392        char *argv[2];
    397        
    398         printf(NAME ": spawning driver %s\n", drv->name);
    399393       
    400394        argv[0] = drv->name;
     
    459453static void pass_devices_to_driver(driver_t *driver)
    460454{       
     455        printf(NAME ": pass_devices_to_driver\n");
    461456        node_t *dev;
    462457        link_t *link;
     
    486481void initialize_running_driver(driver_t *driver)
    487482{       
     483        printf(NAME ": initialize_running_driver\n");
    488484        fibril_mutex_lock(&driver->driver_mutex);
    489485       
     
    533529        driver_t *drv = find_best_match_driver(drivers_list, node);
    534530        if (NULL == drv) {
    535                 printf(NAME ": no driver found for device.\n");
     531                printf(NAME ": no driver found for device '%s'.\n", node->pathname);
    536532                return false;           
    537533        }
     
    626622        printf(NAME ": insert_dev_node\n");
    627623       
    628         assert(NULL != node && NULL != tree && dev_name != NULL);
     624        assert(NULL != node && NULL != tree && NULL != dev_name);
    629625       
    630626        node->name = dev_name;
Note: See TracChangeset for help on using the changeset viewer.