Ignore:
File:
1 edited

Legend:

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

    rfc51296 raf6b5157  
    3535#include <str_error.h>
    3636#include <ddf/driver.h>
    37 #include <ddf/log.h>
    3837
    3938#include "test1.h"
     
    6463        int rc;
    6564
    66         ddf_msg(LVL_DEBUG, "Registering function `%s': %s.\n", name, message);
     65        printf(NAME ": registering function `%s': %s.\n", name, message);
    6766
    6867        fun = ddf_fun_create(parent, fun_inner, name);
    6968        if (fun == NULL) {
    70                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
     69                printf(NAME ": error creating function %s\n", name);
    7170                return ENOMEM;
    7271        }
     
    7473        rc = ddf_fun_add_match_id(fun, match_id, match_score);
    7574        if (rc != EOK) {
    76                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
    77                     name);
     75                printf(NAME ": error adding match IDs to function %s\n", name);
    7876                ddf_fun_destroy(fun);
    7977                return rc;
     
    8280        rc = ddf_fun_bind(fun);
    8381        if (rc != EOK) {
    84                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     82                printf(NAME ": error binding function %s: %s\n", name,
    8583                    str_error(rc));
    8684                ddf_fun_destroy(fun);
     
    8886        }
    8987
    90         ddf_msg(LVL_NOTE, "Registered child device `%s'\n", name);
     88        printf(NAME ": registered child device `%s'\n", name);
    9189        return EOK;
    9290}
     
    114112        int rc;
    115113
    116         ddf_msg(LVL_DEBUG, "add_device(name=\"%s\", handle=%d)\n",
     114        printf(NAME ": add_device(name=\"%s\", handle=%d)\n",
    117115            dev->name, (int) dev->handle);
    118116
    119117        fun_a = ddf_fun_create(dev, fun_exposed, "a");
    120118        if (fun_a == NULL) {
    121                 ddf_msg(LVL_ERROR, "Failed creating function 'a'.\n");
     119                printf(NAME ": error creating function 'a'.\n");
    122120                return ENOMEM;
    123121        }
     
    125123        rc = ddf_fun_bind(fun_a);
    126124        if (rc != EOK) {
    127                 ddf_msg(LVL_ERROR, "Failed binding function 'a'.\n");
     125                printf(NAME ": error binding function 'a'.\n");
    128126                return rc;
    129127        }
     
    142140        }
    143141
    144         ddf_msg(LVL_DEBUG, "Device `%s' accepted.\n", dev->name);
     142        printf(NAME ": device `%s' accepted.\n", dev->name);
    145143
    146144        return EOK;
     
    150148{
    151149        printf(NAME ": HelenOS test1 virtual device driver\n");
    152         ddf_log_init(NAME, LVL_ERROR);
    153150        return ddf_driver_main(&test1_driver);
    154151}
Note: See TracChangeset for help on using the changeset viewer.