Changeset c47e1a8 in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2010-05-21T07:50:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
rcf8cc36 rc47e1a8 38 38 39 39 #include "devman.h" 40 #include "util.h"41 40 42 41 /** Allocate and initialize a new driver structure. … … 74 73 * @return the match id. 75 74 */ 76 char * read_match_id(c onst char **buf)75 char * read_match_id(char **buf) 77 76 { 78 77 char *res = NULL; … … 100 99 * @return true if at least one match id and associated match score was successfully read, false otherwise. 101 100 */ 102 bool parse_match_ids(c onst char *buf, match_id_list_t *ids)101 bool parse_match_ids(char *buf, match_id_list_t *ids) 103 102 { 104 103 int score = 0; … … 158 157 bool opened = false; 159 158 int fd; 160 off_t len = 0;159 size_t len = 0; 161 160 162 161 fd = open(conf_path, O_RDONLY); … … 315 314 printf(NAME ": create_root_node\n"); 316 315 node_t *node = create_dev_node(); 317 if (node) { 318 insert_dev_node(tree, node, "", NULL);316 if (node) { 317 insert_dev_node(tree, node, clone_string(""), NULL); 319 318 match_id_t *id = create_match_id(); 320 id->id = "root";319 id->id = clone_string("root"); 321 320 id->score = 100; 322 321 add_match_id(&node->match_ids, id); … … 392 391 printf(NAME ": start_driver '%s'\n", drv->name); 393 392 394 c har *argv[2];393 const char *argv[2]; 395 394 396 395 argv[0] = drv->name; 397 396 argv[1] = NULL; 398 397 399 if (!task_spawn(drv->binary_path, argv)) { 400 printf(NAME ": error spawning %s\n", drv->name); 398 int err; 399 if (!task_spawn(drv->binary_path, argv, &err)) { 400 printf(NAME ": error spawning %s, errno = %d\n", drv->name, err); 401 401 return false; 402 402 } … … 682 682 char *rel_path = path; 683 683 char *next_path_elem = NULL; 684 size_t elem_size = 0;685 684 bool cont = '/' == rel_path[0]; 686 685
Note:
See TracChangeset
for help on using the changeset viewer.