Changeset 8436590 in mainline for uspace/drv/root/root.c


Ignore:
Timestamp:
2011-04-07T21:38:17Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
033cbf82
Parents:
3acb285 (diff), ccca251 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/root/root.c

    r3acb285 r8436590  
    9191
    9292        ddf_msg(LVL_DEBUG, "Adding new function for virtual devices. "
    93             "Function node is `%s' (%d %s)\n", name,
     93            "Function node is `%s' (%d %s)", name,
    9494            VIRTUAL_FUN_MATCH_SCORE, VIRTUAL_FUN_MATCH_ID);
    9595
    9696        fun = ddf_fun_create(dev, fun_inner, name);
    9797        if (fun == NULL) {
    98                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
     98                ddf_msg(LVL_ERROR, "Failed creating function %s", name);
    9999                return ENOMEM;
    100100        }
     
    103103            VIRTUAL_FUN_MATCH_SCORE);
    104104        if (rc != EOK) {
    105                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n", name);
     105                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
     106                    name);
    106107                ddf_fun_destroy(fun);
    107108                return rc;
     
    110111        rc = ddf_fun_bind(fun);
    111112        if (rc != EOK) {
    112                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     113                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    113114                    str_error(rc));
    114115                ddf_fun_destroy(fun);
     
    137138        platform = sysinfo_get_data("platform", &platform_size);
    138139        if (platform == NULL) {
    139                 ddf_msg(LVL_ERROR, "Failed to obtain platform name.\n");
     140                ddf_msg(LVL_ERROR, "Failed to obtain platform name.");
    140141                return ENOENT;
    141142        }
     
    144145        platform = realloc(platform, platform_size + 1);
    145146        if (platform == NULL) {
    146                 ddf_msg(LVL_ERROR, "Memory allocation failed.\n");
     147                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    147148                return ENOMEM;
    148149        }
     
    152153        /* Construct match ID. */
    153154        if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) {
    154                 ddf_msg(LVL_ERROR, "Memory allocation failed.\n");
     155                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    155156                return ENOMEM;
    156157        }
     
    158159        /* Add function. */
    159160        ddf_msg(LVL_DEBUG, "Adding platform function. Function node is `%s' "
    160             " (%d %s)\n", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE,
     161            " (%d %s)", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE,
    161162            match_id);
    162163
    163164        fun = ddf_fun_create(dev, fun_inner, name);
    164165        if (fun == NULL) {
    165                 ddf_msg(LVL_ERROR, "Error creating function %s\n", name);
     166                ddf_msg(LVL_ERROR, "Error creating function %s", name);
    166167                return ENOMEM;
    167168        }
     
    169170        rc = ddf_fun_add_match_id(fun, match_id, PLATFORM_FUN_MATCH_SCORE);
    170171        if (rc != EOK) {
    171                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
     172                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    172173                    name);
    173174                ddf_fun_destroy(fun);
     
    177178        rc = ddf_fun_bind(fun);
    178179        if (rc != EOK) {
    179                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     180                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    180181                    str_error(rc));
    181182                ddf_fun_destroy(fun);
     
    193194static int root_add_device(ddf_dev_t *dev)
    194195{
    195         ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun "\n",
     196        ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun,
    196197            dev->handle);
    197198
     
    206207        int res = add_platform_fun(dev);
    207208        if (EOK != res)
    208                 ddf_msg(LVL_ERROR, "Failed adding child device for platform.\n");
     209                ddf_msg(LVL_ERROR, "Failed adding child device for platform.");
    209210
    210211        return res;
Note: See TracChangeset for help on using the changeset viewer.