Subversion Repositories HelenOS

Rev

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

Rev 2894 Rev 2896
Line 57... Line 57...
57
 
57
 
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;
63
 
64
 
64
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
65
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
65
    if (rc != 0) {
66
    if (rc != 0) {
66
        klog_printf("debug_regs_write() - copy failed");
67
        klog_printf("debug_regs_write() - copy failed");
67
        return rc;
68
        return rc;
Line 83... Line 84...
83
    klog_printf("udebug_rp_mem_write()");
84
    klog_printf("udebug_rp_mem_write()");
84
 
85
 
85
    uspace_data = (void *)IPC_GET_ARG2(call->data);
86
    uspace_data = (void *)IPC_GET_ARG2(call->data);
86
    to_copy = IPC_GET_ARG4(call->data);
87
    to_copy = IPC_GET_ARG4(call->data);
87
 
88
 
88
    buffer = malloc(to_copy, 0); // ???
89
    buffer = malloc(to_copy, 0);
-
 
90
    if (!buffer) return ENOMEM;
89
 
91
 
90
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
92
    rc = copy_from_uspace(buffer, uspace_data, to_copy);
91
    if (rc != 0) {
93
    if (rc != 0) {
92
        klog_printf(" - copy failed");
94
        klog_printf(" - copy failed");
93
        return rc;
95
        return rc;