Changeset b04967a in mainline for uspace/drv/rootvirt/rootvirt.c


Ignore:
Timestamp:
2011-04-07T15:53:46Z (13 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c156c2d
Parents:
64dbc83 (diff), a82889e (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:

development merge

File:
1 edited

Legend:

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

    r64dbc83 rb04967a  
    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\")",
    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", 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",
    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                     str_error(rc));
     105                ddf_msg(LVL_ERROR, "Failed binding function %s: %s",
     106                    vfun->name, str_error(rc));
    106107                ddf_fun_destroy(fun);
    107108                return rc;
    108109        }
    109110
    110         printf(NAME ": registered child device `%s'\n", vfun->name);
     111        ddf_msg(LVL_NOTE, "Registered child device `%s'", 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)", (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.