Changes in uspace/drv/root/root.c [ebcb05a:fc51296] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/root/root.c
rebcb05a rfc51296 91 91 92 92 ddf_msg(LVL_DEBUG, "Adding new function for virtual devices. " 93 "Function node is `%s' (%d %s) ", name,93 "Function node is `%s' (%d %s)\n", 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 ", name);98 ddf_msg(LVL_ERROR, "Failed creating function %s\n", 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", 106 name); 105 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n", name); 107 106 ddf_fun_destroy(fun); 108 107 return rc; … … 111 110 rc = ddf_fun_bind(fun); 112 111 if (rc != EOK) { 113 ddf_msg(LVL_ERROR, "Failed binding function %s: %s ", name,112 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name, 114 113 str_error(rc)); 115 114 ddf_fun_destroy(fun); … … 138 137 platform = sysinfo_get_data("platform", &platform_size); 139 138 if (platform == NULL) { 140 ddf_msg(LVL_ERROR, "Failed to obtain platform name. ");139 ddf_msg(LVL_ERROR, "Failed to obtain platform name.\n"); 141 140 return ENOENT; 142 141 } … … 145 144 platform = realloc(platform, platform_size + 1); 146 145 if (platform == NULL) { 147 ddf_msg(LVL_ERROR, "Memory allocation failed. ");146 ddf_msg(LVL_ERROR, "Memory allocation failed.\n"); 148 147 return ENOMEM; 149 148 } … … 153 152 /* Construct match ID. */ 154 153 if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) { 155 ddf_msg(LVL_ERROR, "Memory allocation failed. ");154 ddf_msg(LVL_ERROR, "Memory allocation failed.\n"); 156 155 return ENOMEM; 157 156 } … … 159 158 /* Add function. */ 160 159 ddf_msg(LVL_DEBUG, "Adding platform function. Function node is `%s' " 161 " (%d %s) ", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE,160 " (%d %s)\n", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE, 162 161 match_id); 163 162 164 163 fun = ddf_fun_create(dev, fun_inner, name); 165 164 if (fun == NULL) { 166 ddf_msg(LVL_ERROR, "Error creating function %s ", name);165 ddf_msg(LVL_ERROR, "Error creating function %s\n", name); 167 166 return ENOMEM; 168 167 } … … 170 169 rc = ddf_fun_add_match_id(fun, match_id, PLATFORM_FUN_MATCH_SCORE); 171 170 if (rc != EOK) { 172 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s ",171 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n", 173 172 name); 174 173 ddf_fun_destroy(fun); … … 178 177 rc = ddf_fun_bind(fun); 179 178 if (rc != EOK) { 180 ddf_msg(LVL_ERROR, "Failed binding function %s: %s ", name,179 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name, 181 180 str_error(rc)); 182 181 ddf_fun_destroy(fun); … … 194 193 static int root_add_device(ddf_dev_t *dev) 195 194 { 196 ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun ,195 ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun "\n", 197 196 dev->handle); 198 197 … … 207 206 int res = add_platform_fun(dev); 208 207 if (EOK != res) 209 ddf_msg(LVL_ERROR, "Failed adding child device for platform. ");208 ddf_msg(LVL_ERROR, "Failed adding child device for platform.\n"); 210 209 211 210 return res;
Note:
See TracChangeset
for help on using the changeset viewer.