Changeset cc574511 in mainline for uspace/srv/devman/main.c


Ignore:
Timestamp:
2011-08-16T12:37:58Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16dc887
Parents:
86ffa27f
Message:

Basic category support in location service. Devman adds device services
to categories. Switch over input server device discovery from using
/dev/class to loc categories.

File:
1 edited

Legend:

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

    r86ffa27f rcc574511  
    362362{
    363363        devman_handle_t handle = IPC_GET_ARG1(*call);
     364        category_id_t cat_id;
     365        int rc;
    364366       
    365367        /* Get class name. */
    366368        char *class_name;
    367         int rc = async_data_write_accept((void **) &class_name, true,
     369        rc = async_data_write_accept((void **) &class_name, true,
    368370            0, 0, 0, 0);
    369371        if (rc != EOK) {
     
    383385        /* Register the device's class alias with location service. */
    384386        loc_register_class_dev(class_info);
     387       
     388        rc = loc_category_get_id(class_name, &cat_id, IPC_FLAG_BLOCKING);
     389        if (rc == EOK) {
     390                loc_service_add_to_cat(fun->service_id, cat_id);
     391        } else {
     392                log_msg(LVL_ERROR, "Failed adding function `%s' to category "
     393                    "`%s'.", fun->pathname, class_name);
     394        }
    385395       
    386396        log_msg(LVL_NOTE, "Function `%s' added to class `%s' as `%s'.",
     
    760770        printf(NAME ": HelenOS Device Manager\n");
    761771
    762         if (log_init(NAME, LVL_ERROR) != EOK) {
     772        if (log_init(NAME, LVL_WARN) != EOK) {
    763773                printf(NAME ": Error initializing logging subsystem.\n");
    764774                return -1;
Note: See TracChangeset for help on using the changeset viewer.