Subversion Repositories HelenOS

Rev

Rev 3096 | Rev 3113 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3096 Rev 3097
Line 61... Line 61...
61
{
61
{
62
    size_t i;
62
    size_t i;
63
    char *data;
63
    char *data;
64
    int rc;
64
    int rc;
65
 
65
 
66
    if (count == 0)
-
 
67
        return 0;
-
 
68
 
-
 
69
    if (count > PAGE_SIZE)
66
    if (count > PAGE_SIZE)
70
        return ELIMIT;
67
        return ELIMIT;
71
 
68
   
-
 
69
    if (count > 0) {
72
    data = (char *) malloc(count, 0);
70
        data = (char *) malloc(count, 0);
73
    if (!data)
71
        if (!data)
74
        return ENOMEM;
72
            return ENOMEM;
75
   
73
       
76
    rc = copy_from_uspace(data, buf, count);
74
        rc = copy_from_uspace(data, buf, count);
Line 80... Line 78...
80
    }
78
        }
81
 
79
   
82
    for (i = 0; i < count; i++)
80
        for (i = 0; i < count; i++)
83
        putchar(data[i]);
81
            putchar(data[i]);
84
    free(data);
82
        free(data);
-
 
83
    } else
-
 
84
        klog_update();
85
   
85
   
86
    return count;
86
    return count;
87
}
87
}
88
 
88
 
89
/** Tell kernel to get keyboard/console access again */
89
/** Tell kernel to get keyboard/console access again */