summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-06-13 21:26:36 +0000
committerRoland McGrath <roland@gnu.org>2002-06-13 21:26:36 +0000
commit541dbfcc1fdfa6e35177a805c7a0ab890f821de3 (patch)
tree9d503a2182a5a1b12ab8ae7f43a6ae87850013e0 /trans
parent079a3525822634b7b051604b6c86387cd557b8df (diff)
2002-06-13 Roland McGrath <roland@frob.com>
* firmlink.c (trivfs_S_io_read): Fix type of DATA argument. * streamio.c (trivfs_S_io_read): Likewise. (trivfs_S_io_write): Likewise. * hello.c (trivfs_S_io_read): Likewise. * hello-mt.c (trivfs_S_io_read): Likewise. * null.c (trivfs_S_io_read): Likewise. (trivfs_S_io_write): Likewise. (trivfs_S_file_set_size): Add reply port args. * firmlink.c (trivfs_S_io_read): off_t -> loff_t (trivfs_S_io_select): Remove bogus last arg.
Diffstat (limited to 'trans')
-rw-r--r--trans/firmlink.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/trans/firmlink.c b/trans/firmlink.c
index 6ac63566..df8629ae 100644
--- a/trans/firmlink.c
+++ b/trans/firmlink.c
@@ -203,8 +203,8 @@ trivfs_goaway (struct trivfs_control *cntl, int flags)
error_t
trivfs_S_io_read (struct trivfs_protid *cred,
mach_port_t reply, mach_msg_type_name_t reply_type,
- vm_address_t *data, mach_msg_type_number_t *data_len,
- off_t offs, mach_msg_type_number_t amount)
+ char **data, mach_msg_type_number_t *data_len,
+ loff_t offs, mach_msg_type_number_t amount)
{
error_t err = 0;
@@ -221,9 +221,8 @@ trivfs_S_io_read (struct trivfs_protid *cred,
if (start + amount > max)
amount = max - start;
if (amount > *data_len)
- *data = (vm_address_t) mmap (0, amount, PROT_READ|PROT_WRITE,
- MAP_ANON, 0, 0);
- err = (*data == -1) ? errno : 0;
+ *data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ err = (*data == MAP_FAILED) ? errno : 0;
if (!err && amount > 0)
{
memcpy ((char *)(*data + start), target, amount);
@@ -272,7 +271,7 @@ trivfs_S_io_seek (struct trivfs_protid *cred,
error_t
trivfs_S_io_select (struct trivfs_protid *cred,
mach_port_t reply, mach_msg_type_name_t reply_type,
- int *type, int *tag)
+ int *type)
{
return EOPNOTSUPP;
}