Changeset ce794342 in mainline for uspace/drv/usbhid/main.c


Ignore:
Timestamp:
2011-03-21T18:21:46Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
31b568e
Parents:
434ef65 (diff), fbefd0e (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:

Logging refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/main.c

    r434ef65 rce794342  
    3939#include <usb/debug.h>
    4040#include <errno.h>
     41#include <str_error.h>
    4142
    4243#include "kbddev.h"
     
    6465       
    6566        if (rc != EOK) {
    66                 usb_log_info("Device is not a supported keyboard.\n");
    67                 usb_log_error("Failed to add HID device.\n");
    68                 return EREFUSED;
     67                usb_log_warning("Device is not a supported keyboard.\n");
     68                usb_log_error("Failed to add HID device: %s.\n",
     69                    str_error(rc));
     70                return rc;
    6971        }
    7072       
     73        usb_log_info("Keyboard `%s' ready to use.\n", dev->name);
     74
    7175        return EOK;
    7276}
     
    8993int main(int argc, char *argv[])
    9094{
    91         usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
     95        printf(NAME ": HelenOS USB HID driver.\n");
     96
     97        usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME);
     98
    9299        return ddf_driver_main(&kbd_driver);
    93100}
Note: See TracChangeset for help on using the changeset viewer.