Changeset 04803bf in mainline for uspace/lib/c/generic/io/klog.c


Ignore:
Timestamp:
2011-03-21T22:00:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (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 (needs fixes).

File:
1 moved

Legend:

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

    rb50b5af2 r04803bf  
    3535
    3636#include <libc.h>
    37 #include <string.h>
     37#include <str.h>
    3838#include <sys/types.h>
    3939#include <unistd.h>
     
    4242size_t klog_write(const void *buf, size_t size)
    4343{
    44         return (size_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size);
     44        ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size);
     45       
     46        if (ret >= 0)
     47                return (size_t) ret;
     48       
     49        return 0;
    4550}
    4651
    4752void klog_update(void)
    4853{
    49         (void) __SYSCALL3(SYS_KLOG, 1, NULL, 0);
     54        (void) __SYSCALL3(SYS_KLOG, 1, (uintptr_t) NULL, 0);
    5055}
    5156
Note: See TracChangeset for help on using the changeset viewer.