Changeset 6fa9a99d in mainline for uspace/lib/c/generic/io/kio.c


Ignore:
Timestamp:
2014-01-05T17:50:01Z (11 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91db0280
Parents:
208b5f5
Message:

Rename klog to kio

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/kio.c

    r208b5f5 r6fa9a99d  
    3939#include <unistd.h>
    4040#include <errno.h>
    41 #include <abi/klog.h>
    42 #include <io/klog.h>
     41#include <abi/kio.h>
     42#include <io/kio.h>
    4343#include <io/printf_core.h>
    4444
    45 size_t klog_write(const void *buf, size_t size)
     45size_t kio_write(const void *buf, size_t size)
    4646{
    47         ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) buf, size);
     47        ssize_t ret = (ssize_t) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) buf, size);
    4848       
    4949        if (ret >= 0)
     
    5353}
    5454
    55 void klog_update(void)
     55void kio_update(void)
    5656{
    57         (void) __SYSCALL3(SYS_KLOG, KLOG_UPDATE, (uintptr_t) NULL, 0);
     57        (void) __SYSCALL3(SYS_KIO, KIO_UPDATE, (uintptr_t) NULL, 0);
    5858}
    5959
    60 void klog_command(const void *buf, size_t size)
     60void kio_command(const void *buf, size_t size)
    6161{
    62         (void) __SYSCALL3(SYS_KLOG, KLOG_COMMAND, (sysarg_t) buf, (sysarg_t) size);
     62        (void) __SYSCALL3(SYS_KIO, KIO_COMMAND, (sysarg_t) buf, (sysarg_t) size);
    6363}
    6464
    65 /** Print formatted text to klog.
     65/** Print formatted text to kio.
    6666 *
    6767 * @param fmt Format string
     
    7070 *
    7171 */
    72 int klog_printf(const char *fmt, ...)
     72int kio_printf(const char *fmt, ...)
    7373{
    7474        va_list args;
    7575        va_start(args, fmt);
    7676       
    77         int ret = klog_vprintf(fmt, args);
     77        int ret = kio_vprintf(fmt, args);
    7878       
    7979        va_end(args);
     
    8282}
    8383
    84 static int klog_vprintf_str_write(const char *str, size_t size, void *data)
     84static int kio_vprintf_str_write(const char *str, size_t size, void *data)
    8585{
    86         size_t wr = klog_write(str, size);
     86        size_t wr = kio_write(str, size);
    8787        return str_nlength(str, wr);
    8888}
    8989
    90 static int klog_vprintf_wstr_write(const wchar_t *str, size_t size, void *data)
     90static int kio_vprintf_wstr_write(const wchar_t *str, size_t size, void *data)
    9191{
    9292        size_t offset = 0;
     
    9898               
    9999                if (chr_encode(str[chars], buf, &sz, STR_BOUNDS(1)) == EOK)
    100                         klog_write(buf, sz);
     100                        kio_write(buf, sz);
    101101               
    102102                chars++;
     
    107107}
    108108
    109 /** Print formatted text to klog.
     109/** Print formatted text to kio.
    110110 *
    111111 * @param fmt Format string
     
    115115 *
    116116 */
    117 int klog_vprintf(const char *fmt, va_list ap)
     117int kio_vprintf(const char *fmt, va_list ap)
    118118{
    119119        printf_spec_t ps = {
    120                 klog_vprintf_str_write,
    121                 klog_vprintf_wstr_write,
     120                kio_vprintf_str_write,
     121                kio_vprintf_wstr_write,
    122122                NULL
    123123        };
Note: See TracChangeset for help on using the changeset viewer.