Changeset ebcb05a in mainline for uspace/drv/root/root.c
- Timestamp:
- 2011-04-01T19:00:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 969585f, ea53529
- Parents:
- bdbb6f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/root/root.c
rbdbb6f6 rebcb05a 91 91 92 92 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, 94 94 VIRTUAL_FUN_MATCH_SCORE, VIRTUAL_FUN_MATCH_ID); 95 95 96 96 fun = ddf_fun_create(dev, fun_inner, name); 97 97 if (fun == NULL) { 98 ddf_msg(LVL_ERROR, "Failed creating function %s \n", name);98 ddf_msg(LVL_ERROR, "Failed creating function %s", name); 99 99 return ENOMEM; 100 100 } … … 103 103 VIRTUAL_FUN_MATCH_SCORE); 104 104 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); 106 107 ddf_fun_destroy(fun); 107 108 return rc; … … 110 111 rc = ddf_fun_bind(fun); 111 112 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, 113 114 str_error(rc)); 114 115 ddf_fun_destroy(fun); … … 137 138 platform = sysinfo_get_data("platform", &platform_size); 138 139 if (platform == NULL) { 139 ddf_msg(LVL_ERROR, "Failed to obtain platform name. \n");140 ddf_msg(LVL_ERROR, "Failed to obtain platform name."); 140 141 return ENOENT; 141 142 } … … 144 145 platform = realloc(platform, platform_size + 1); 145 146 if (platform == NULL) { 146 ddf_msg(LVL_ERROR, "Memory allocation failed. \n");147 ddf_msg(LVL_ERROR, "Memory allocation failed."); 147 148 return ENOMEM; 148 149 } … … 152 153 /* Construct match ID. */ 153 154 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."); 155 156 return ENOMEM; 156 157 } … … 158 159 /* Add function. */ 159 160 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, 161 162 match_id); 162 163 163 164 fun = ddf_fun_create(dev, fun_inner, name); 164 165 if (fun == NULL) { 165 ddf_msg(LVL_ERROR, "Error creating function %s \n", name);166 ddf_msg(LVL_ERROR, "Error creating function %s", name); 166 167 return ENOMEM; 167 168 } … … 169 170 rc = ddf_fun_add_match_id(fun, match_id, PLATFORM_FUN_MATCH_SCORE); 170 171 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", 172 173 name); 173 174 ddf_fun_destroy(fun); … … 177 178 rc = ddf_fun_bind(fun); 178 179 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, 180 181 str_error(rc)); 181 182 ddf_fun_destroy(fun); … … 193 194 static int root_add_device(ddf_dev_t *dev) 194 195 { 195 ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun "\n",196 ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun, 196 197 dev->handle); 197 198 … … 206 207 int res = add_platform_fun(dev); 207 208 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."); 209 210 210 211 return res;
Note:
See TracChangeset
for help on using the changeset viewer.