summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-10 22:05:14 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-10 22:05:14 +0000
commit9057ba93ab8d12d0ba24c02e211a144df9c8fc4b (patch)
treedc92300cd8a77eaee8d25d900dd6be3936efec7d /ufs
parent1c77cea608dcd904834899f7d5544fad4be3eff1 (diff)
entered into RCS
Diffstat (limited to 'ufs')
-rw-r--r--ufs/devio.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ufs/devio.c b/ufs/devio.c
index 81423d73..2e5cc332 100644
--- a/ufs/devio.c
+++ b/ufs/devio.c
@@ -19,6 +19,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Written by Michael I. Bushnell. */
+#include "ufs.h"
+#include <device/device.h>
+#include <device/device_request.h>
+
/* Write disk block ADDR with DATA of LEN bytes, waiting for completion. */
error_t
dev_write_sync (daddr_t addr,
@@ -26,7 +30,7 @@ dev_write_sync (daddr_t addr,
long len)
{
int foo;
- assert (!readonly);
+ assert (!diskfs_readonly);
if (device_write (ufs_device, 0, addr, (io_buf_ptr_t) data, len, &foo)
|| foo != len)
return EIO;
@@ -40,11 +44,9 @@ dev_write (daddr_t addr,
vm_address_t data,
long len)
{
- int foo;
- assert (!readonly);
+ assert (!diskfs_readonly);
if (device_write_request (ufs_device, MACH_PORT_NULL, 0, addr,
- (io_buf_ptr_t) data, len, &foo)
- || foo != len)
+ (io_buf_ptr_t) data, len))
return EIO;
return 0;
}