Subversion Repositories HelenOS-historic

Rev

Rev 1595 | Rev 1643 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1595 Rev 1613
Line 68... Line 68...
68
 
68
 
69
    va_copy(atst, args);
69
    va_copy(atst, args);
70
    spinlock_lock(&klog_lock);
70
    spinlock_lock(&klog_lock);
71
 
71
 
72
    ret = vsnprintf(klog+klogpos, klogsize-klogpos, fmt, atst);
72
    ret = vsnprintf(klog+klogpos, klogsize-klogpos, fmt, atst);
73
    // Workaround around bad return value from vsnprintf
-
 
74
    if (ret+klogpos < klogsize)
-
 
75
        ret = 100;
-
 
76
    if (ret == klogsize-klogpos) {
73
    if (ret >= klogsize-klogpos) {
77
        klogpos = 0;
74
        klogpos = 0;
78
        ret = vsnprintf(klog+klogpos, klogsize-klogpos, fmt, args);
-
 
79
        ret = 100;
-
 
80
        if (ret == klogsize)
75
        if (ret >= klogsize)
81
            goto out;
76
            goto out;
82
    }
77
    }
83
    ipc_irq_send_msg(IPC_IRQ_KLOG, klogpos, ret);
78
    ipc_irq_send_msg(IPC_IRQ_KLOG, klogpos, ret);
84
    klogpos += ret;
79
    klogpos += ret;
85
    if (klogpos >= klogsize)
80
    if (klogpos >= klogsize)