Changeset bdca26a in mainline for uspace/lib/c/generic/rtld/module.c
- Timestamp:
- 2019-05-26T13:21:50Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8aea932
- Parents:
- 967e7a1
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2019-05-17 14:27:34)
- git-committer:
- Jakub Jermář <jakub@…> (2019-05-26 13:21:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rtld/module.c
r967e7a1 rbdca26a 65 65 66 66 module = calloc(1, sizeof(module_t)); 67 if (module == NULL) 67 if (module == NULL) { 68 DPRINTF("malloc failed\n"); 68 69 return ENOMEM; 70 } 69 71 70 72 module->id = rtld_get_next_id(rtld); … … 182 184 char name_buf[NAME_BUF_SIZE]; 183 185 module_t *m; 184 int rc;186 errno_t rc; 185 187 186 188 m = calloc(1, sizeof(module_t)); 187 189 if (m == NULL) { 188 printf("malloc failed\n");190 DPRINTF("malloc failed\n"); 189 191 goto error; 190 192 } … … 197 199 198 200 if (str_size(name) > NAME_BUF_SIZE - 2) { 199 printf("soname too long. increase NAME_BUF_SIZE\n");201 DPRINTF("soname too long. increase NAME_BUF_SIZE\n"); 200 202 goto error; 201 203 } … … 208 210 209 211 rc = elf_load_file_name(name_buf, RTLD_MODULE_LDF, &info); 210 if (rc != E E_OK) {211 printf("Failed to load '%s'\n", name_buf);212 if (rc != EOK) { 213 DPRINTF("Failed to load '%s'\n", name_buf); 212 214 goto error; 213 215 } … … 218 220 219 221 if (info.dynamic == NULL) { 220 printf("Error: '%s' is not a dynamically-linked object.\n",222 DPRINTF("Error: '%s' is not a dynamically-linked object.\n", 221 223 name_buf); 222 224 goto error; … … 285 287 m->deps = malloc(n * sizeof(module_t *)); 286 288 if (!m->deps) { 287 printf("malloc failed\n");289 DPRINTF("malloc failed\n"); 288 290 return ENOMEM; 289 291 }
Note:
See TracChangeset
for help on using the changeset viewer.