Changeset c47e1a8 in mainline for uspace/srv/devman/devman.c


Ignore:
Timestamp:
2010-05-21T07:50:04Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
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.
Message:

merge mainline changes (rev. 451)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    rcf8cc36 rc47e1a8  
    3838
    3939#include "devman.h"
    40 #include "util.h"
    4140
    4241/** Allocate and initialize a new driver structure.
     
    7473 * @return the match id.
    7574 */
    76 char * read_match_id(const char **buf)
     75char * read_match_id(char **buf)
    7776{
    7877        char *res = NULL;
     
    10099 * @return true if at least one match id and associated match score was successfully read, false otherwise.
    101100 */
    102 bool parse_match_ids(const char *buf, match_id_list_t *ids)
     101bool parse_match_ids(char *buf, match_id_list_t *ids)
    103102{
    104103        int score = 0;
     
    158157        bool opened = false;
    159158        int fd;         
    160         off_t len = 0;
     159        size_t len = 0;
    161160       
    162161        fd = open(conf_path, O_RDONLY);
     
    315314        printf(NAME ": create_root_node\n");
    316315        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);
    319318                match_id_t *id = create_match_id();
    320                 id->id = "root";
     319                id->id = clone_string("root");
    321320                id->score = 100;
    322321                add_match_id(&node->match_ids, id);
     
    392391        printf(NAME ": start_driver '%s'\n", drv->name);
    393392       
    394         char *argv[2];
     393        const char *argv[2];
    395394       
    396395        argv[0] = drv->name;
    397396        argv[1] = NULL;
    398397       
    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);
    401401                return false;
    402402        }
     
    682682        char *rel_path = path;
    683683        char *next_path_elem = NULL;
    684         size_t elem_size = 0;
    685684        bool cont = '/' == rel_path[0];
    686685       
Note: See TracChangeset for help on using the changeset viewer.