Ignore:
File:
1 edited

Legend:

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

    raf6b5157 rfc51296  
    4040#include <str_error.h>
    4141#include <ddf/driver.h>
     42#include <ddf/log.h>
    4243
    4344#define NAME "rootvirt"
     
    8384        int rc;
    8485
    85         printf(NAME ": registering function `%s' (match \"%s\")\n",
     86        ddf_msg(LVL_DEBUG, "Registering function `%s' (match \"%s\")\n",
    8687            vfun->name, vfun->match_id);
    8788
    8889        fun = ddf_fun_create(vdev, fun_inner, vfun->name);
    8990        if (fun == NULL) {
    90                 printf(NAME ": error creating function %s\n", vfun->name);
     91                ddf_msg(LVL_ERROR, "Failed creating function %s\n", vfun->name);
    9192                return ENOMEM;
    9293        }
     
    9495        rc = ddf_fun_add_match_id(fun, vfun->match_id, 10);
    9596        if (rc != EOK) {
    96                 printf(NAME ": error adding match IDs to function %s\n",
     97                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
    9798                    vfun->name);
    9899                ddf_fun_destroy(fun);
     
    102103        rc = ddf_fun_bind(fun);
    103104        if (rc != EOK) {
    104                 printf(NAME ": error binding function %s: %s\n", vfun->name,
     105                ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", vfun->name,
    105106                    str_error(rc));
    106107                ddf_fun_destroy(fun);
     
    108109        }
    109110
    110         printf(NAME ": registered child device `%s'\n", vfun->name);
     111        ddf_msg(LVL_NOTE, "Registered child device `%s'\n", vfun->name);
    111112        return EOK;
    112113}
     
    124125        }
    125126
    126         printf(NAME ": add_device(handle=%d)\n", (int)dev->handle);
     127        ddf_msg(LVL_DEBUG, "add_device(handle=%d)\n", (int)dev->handle);
    127128
    128129        /*
     
    142143{
    143144        printf(NAME ": HelenOS virtual devices root driver\n");
     145
     146        ddf_log_init(NAME, LVL_ERROR);
    144147        return ddf_driver_main(&rootvirt_driver);
    145148}
Note: See TracChangeset for help on using the changeset viewer.