Subversion Repositories HelenOS

Rev

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

Rev 2899 Rev 2900
Line 58... Line 58...
58
    uspace_data = (void *)IPC_GET_ARG3(call->data);
58
    uspace_data = (void *)IPC_GET_ARG3(call->data);
59
    to_copy = IPC_GET_ARG4(call->data);
59
    to_copy = IPC_GET_ARG4(call->data);
60
    if (to_copy > sizeof(istate_t)) to_copy = sizeof(istate_t);
60
    if (to_copy > sizeof(istate_t)) to_copy = sizeof(istate_t);
61
 
61
 
62
    buffer = malloc(to_copy, 0);
62
    buffer = malloc(to_copy, 0);
63
    if (!buffer) return ENOMEM;
-
 
64
 
63
 
65
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
64
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
66
    if (rc != 0) {
65
    if (rc != 0) {
67
        klog_printf("debug_regs_write() - copy failed");
66
        klog_printf("debug_regs_write() - copy failed");
68
        return rc;
67
        return rc;
Line 85... Line 84...
85
 
84
 
86
    uspace_data = (void *)IPC_GET_ARG2(call->data);
85
    uspace_data = (void *)IPC_GET_ARG2(call->data);
87
    to_copy = IPC_GET_ARG4(call->data);
86
    to_copy = IPC_GET_ARG4(call->data);
88
 
87
 
89
    buffer = malloc(to_copy, 0);
88
    buffer = malloc(to_copy, 0);
90
    if (!buffer) return ENOMEM;
-
 
91
 
89
 
92
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
90
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
93
    if (rc != 0) {
91
    if (rc != 0) {
94
        klog_printf(" - copy failed");
92
        klog_printf(" - copy failed");
95
        return rc;
93
        return rc;