Search
lxdream.org :: lxdream/src/dcload.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dcload.c
changeset 502:c4ecae2b1b5e
prev422:61a0598e07ff
next561:533f6b478071
next586:2a3ba82cf243
author nkeynes
date Thu Nov 08 11:54:16 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Add sh4ptr_t type, start converting bare pointer refs to it
file annotate diff log raw
1.1 --- a/src/dcload.c Sat Oct 06 09:03:24 2007 +0000
1.2 +++ b/src/dcload.c Thu Nov 08 11:54:16 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dcload.c,v 1.7 2007-10-06 08:59:42 nkeynes Exp $
1.6 + * $Id: dcload.c,v 1.8 2007-11-08 11:54:16 nkeynes Exp $
1.7 *
1.8 * DC-load syscall implementation.
1.9 *
1.10 @@ -86,7 +86,7 @@
1.11 if( fd < 0 || fd >= MAX_OPEN_FDS || open_fds[fd] == -1 ) {
1.12 sh4r.r[0] = -1;
1.13 } else {
1.14 - char *buf = mem_get_region( sh4r.r[6] );
1.15 + sh4ptr_t buf = mem_get_region( sh4r.r[6] );
1.16 int length = sh4r.r[7];
1.17 sh4r.r[0] = read( open_fds[fd], buf, length );
1.18 }
1.19 @@ -96,7 +96,7 @@
1.20 if( fd < 0 || fd >= MAX_OPEN_FDS || open_fds[fd] == -1 ) {
1.21 sh4r.r[0] = -1;
1.22 } else {
1.23 - char *buf = mem_get_region( sh4r.r[6] );
1.24 + sh4ptr_t buf = mem_get_region( sh4r.r[6] );
1.25 int length = sh4r.r[7];
1.26 sh4r.r[0] = write( open_fds[fd], buf, length );
1.27 }
1.28 @@ -117,7 +117,7 @@
1.29 if( fd == -1 ) {
1.30 sh4r.r[0] = -1;
1.31 } else {
1.32 - char *filename = mem_get_region( sh4r.r[5] );
1.33 + char *filename = (char *)mem_get_region( sh4r.r[5] );
1.34 int realfd = open( filename, sh4r.r[6] );
1.35 open_fds[fd] = realfd;
1.36 sh4r.r[0] = realfd;
.