Changeset cd0684d in mainline for uspace/drv/isa/isa.c


Ignore:
Timestamp:
2011-02-14T22:14:52Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
659ca07
Parents:
97a62fe
Message:

Remove register_function_wrapper() since it became practically useless.
Provide ddf_fun_add_match_id() instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/isa/isa.c

    r97a62fe rcd0684d  
    4444#include <stdlib.h>
    4545#include <str.h>
     46#include <str_error.h>
    4647#include <ctype.h>
    4748#include <macros.h>
     
    324325        int score = 0;
    325326        char *end = NULL;
     327        int rc;
    326328
    327329        val = skip_spaces(val);
     
    334336        }
    335337
    336         match_id_t *match_id = create_match_id();
    337         if (match_id == NULL) {
    338                 printf(NAME " : failed to allocate match id for function %s.\n",
    339                     fun->fnode->name);
    340                 return;
    341         }
    342 
    343338        val = skip_spaces(end);
    344339        get_match_id(&id, val);
     
    346341                printf(NAME " : error - could not read match id for "
    347342                    "function %s.\n", fun->fnode->name);
    348                 delete_match_id(match_id);
    349343                return;
    350344        }
    351 
    352         match_id->id = id;
    353         match_id->score = score;
    354345
    355346        printf(NAME ": adding match id '%s' with score %d to function %s\n", id,
    356347            score, fun->fnode->name);
    357         add_match_id(&fun->fnode->match_ids, match_id);
     348
     349        rc = ddf_fun_add_match_id(fun->fnode, id, score);
     350        if (rc != EOK)
     351                printf(NAME ": error adding match ID: %s\n", str_error(rc));
    358352}
    359353
Note: See TracChangeset for help on using the changeset viewer.