Changeset f3e2663 in mainline for uspace/lib/drv/generic/log.c


Ignore:
Timestamp:
2011-04-03T11:17:45Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
106743d
Parents:
10eb754 (diff), b2a081ae (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 mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/log.c

    r10eb754 rf3e2663  
    11/*
    2  * Copyright (c) 2005 Sergey Bondari
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup arm32
     29/** @addtogroup libdrv
    3030 * @{
    3131 */
    32 /** @file
    33  *  @brief Memory manipulating functions declarations.
     32
     33#include <io/log.h>
     34#include <stdarg.h>
     35
     36#include <ddf/log.h>
     37
     38/** Initialize the logging system.
     39 *
     40 * @param drv_name      Driver name, will be printed as part of message
     41 * @param level         Minimum message level to print
    3442 */
     43int ddf_log_init(const char *drv_name, log_level_t level)
     44{
     45        return log_init(drv_name, level);
     46}
    3547
    36 #ifndef KERN_arm32_MEMSTR_H_
    37 #define KERN_arm32_MEMSTR_H_
     48/** Log a driver message.
     49 *
     50 * @param level         Message verbosity level. Message is only printed
     51 *                      if verbosity is less than or equal to current
     52 *                      reporting level.
     53 * @param fmt           Format string (no trailing newline)
     54 */
     55void ddf_msg(log_level_t level, const char *fmt, ...)
     56{
     57        va_list args;
    3858
    39 #define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
    40 
    41 extern void memsetw(void *, size_t, uint16_t);
    42 extern void memsetb(void *, size_t, uint8_t);
    43 
    44 #endif
     59        va_start(args, fmt);
     60        log_msgv(level, fmt, args);
     61        va_end(args);
     62}
    4563
    4664/** @}
Note: See TracChangeset for help on using the changeset viewer.