Changeset 818dc00 in mainline for uspace/drv/vhc/debug.c


Ignore:
Timestamp:
2010-12-09T00:02:25Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
040068c
Parents:
aca85e4 (diff), 07b9203e (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:

Merge with vojtechhorky/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/debug.c

    raca85e4 r818dc00  
    3535#include <stdio.h>
    3636#include <ipc/ipc.h>
     37#include <usb/debug.h>
    3738
    3839#include "vhcd.h"
    3940
    40 /** Current debug level. */
    41 int debug_level = 0;
    42 
    43 /** Debugging printf.
    44  * This function is intended for single-line messages as it
    45  * automatically prints debugging prefix at the beginning of the
    46  * line.
    47  *
    48  * @see printf
    49  * @param level Debugging level.
    50  */
    51 void dprintf(int level, const char *format, ...)
    52 {
    53         if (level > debug_level) {
    54                 return;
    55         }
    56        
    57         printf("%s(%d): ", NAME, level);
    58         va_list args;
    59         va_start(args, format);
    60         vprintf(format, args);
    61         va_end(args);
    62         printf("\n");
    63 }
    6441
    6542/** Debug print informing of invalid call.
Note: See TracChangeset for help on using the changeset viewer.