New names for Magenta IO functions

This commit is contained in:
Max Wash
2020-08-09 15:22:13 +01:00
parent 36751e2f45
commit e4674e69e9

View File

@@ -102,7 +102,7 @@ unsigned int __fio_read(struct __io_file *f, char *buf, unsigned int sz)
return real_sz; return real_sz;
} }
mx_status_t err = mx_read(f->handle, sz, buf + i, &real_sz); mx_status_t err = mx_object_read(f->handle, sz, buf + i, &real_sz);
if (err != MX_OK || real_sz != sz) { if (err != MX_OK || real_sz != sz) {
f->err = 1; f->err = 1;
@@ -140,7 +140,7 @@ int __fio_ungetc(struct __io_file *f, char c)
unsigned int __fio_flush(struct __io_file *f) unsigned int __fio_flush(struct __io_file *f)
{ {
unsigned long written = 0; unsigned long written = 0;
mx_status_t ret = mx_write(f->handle, f->buf_idx, f->buf, &written); mx_status_t ret = mx_object_write(f->handle, f->buf_idx, f->buf, &written);
if (ret != MX_OK || written != f->buf_idx) { if (ret != MX_OK || written != f->buf_idx) {
f->err = 1; f->err = 1;
} }