summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/ChangeLog2
-rw-r--r--libdiskfs/dev-globals.c46
-rw-r--r--libdiskfs/dev-io.c59
-rw-r--r--libdiskfs/dev-open.c66
4 files changed, 2 insertions, 171 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog
index 81118fe2..686f49a3 100644
--- a/libdiskfs/ChangeLog
+++ b/libdiskfs/ChangeLog
@@ -1,5 +1,7 @@
1999-06-29 Thomas Bushnell, BSG <tb@mit.edu>
+ * dev-globals.c, dev-io.c, dev-open.c: Files removed.
+
* lookup.c (diskfs_lookup): If we get an error from
fshelp_checkdirmod, clear *NP as well as returning the error.
Use diskfs_nrele instead of diskfs_nput in case *NP and DP are
diff --git a/libdiskfs/dev-globals.c b/libdiskfs/dev-globals.c
deleted file mode 100644
index c32b6a59..00000000
--- a/libdiskfs/dev-globals.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Standard device global variables
-
- Copyright (C) 1995 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#include <diskfs.h>
-
-/* A mach device port for the device we're using. */
-mach_port_t diskfs_device = MACH_PORT_NULL;
-
-/* The mach device name of DISKFS_DEVICE. May be 0 if unknown. */
-char *diskfs_device_name = 0;
-
-/* The first valid block of DISKFS_DEVICE, in units of
- DISKFS_DEVICE_BLOCK_SIZE. */
-off_t diskfs_device_start = 0;
-
-/* The usable size of DISKFS_DEVICE, in units of DISKFS_DEVICE_BLOCK_SIZE. */
-off_t diskfs_device_size = 0;
-
-/* The unit of addressing for DISKFS_DEVICE. */
-unsigned diskfs_device_block_size = 0;
-
-/* Some handy calculations based on DISKFS_DEVICE_BLOCK_SIZE. */
-/* Log base 2 of DEVICE_BLOCK_SIZE, or 0 if it's not a power of two. */
-unsigned diskfs_log2_device_block_size = 0;
-/* Log base 2 of the number of device blocks in a vm page, or 0 if it's not a
- power of two. */
-unsigned diskfs_log2_device_blocks_per_page = 0;
diff --git a/libdiskfs/dev-io.c b/libdiskfs/dev-io.c
deleted file mode 100644
index d3be449f..00000000
--- a/libdiskfs/dev-io.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Device input and output
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of the GNU Hurd.
-
-The GNU Hurd is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-The GNU Hurd is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with the GNU Hurd; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#include <device/device.h>
-#include <device/device_request.h>
-
-#include <diskfs.h>
-
-/* Write disk block ADDR with DATA of LEN bytes to DISKFS_DEVICE, waiting for
- completion. ADDR is offset by DISKFS_DEVICE_START. If an error occurs,
- EIO is returned. */
-error_t
-diskfs_device_write_sync (off_t addr, vm_address_t data, size_t len)
-{
- int written;
- error_t err;
-
- assert (!diskfs_readonly);
- err = device_write (diskfs_device, 0, diskfs_device_start + addr,
- (io_buf_ptr_t) data, len, &written);
-
- if (err == D_READ_ONLY)
- return EROFS;
- else if (err || written != len)
- return EIO;
- return 0;
-}
-
-/* Read disk block ADDR from DISKFS_DEVICE; put the address of the data in
- DATA; read LEN bytes. Always *DATA should be a full page no matter what.
- ADDR is offset by DISKFS_DEVICE_START. If an error occurs, EIO is
- returned. */
-error_t
-diskfs_device_read_sync (off_t addr, vm_address_t *data, size_t len)
-{
- unsigned read;
- if (device_read (diskfs_device, 0, diskfs_device_start + addr, len,
- (io_buf_ptr_t *)data, &read)
- || read != len)
- return EIO;
- return 0;
-}
-
diff --git a/libdiskfs/dev-open.c b/libdiskfs/dev-open.c
deleted file mode 100644
index 5b45c30e..00000000
--- a/libdiskfs/dev-open.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Standard device opening
-
- Copyright (C) 1995 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#include <diskfs.h>
-
-/* Uses the values of DISKFS_DEVICE_ARG and DISKFS_USE_MACH_DEVICE, and
- attempts to open the device and set the values of DISKFS_DEVICE,
- DISKFS_DEVICE_NAME, DISKFS_DEVICE_START, DISKFS_DEVICE_SIZE, and
- DISKFS_DEVICE_BLOCK_SIZE. */
-error_t
-diskfs_device_open ()
-{
- error_t err;
- if (diskfs_use_mach_device)
- {
- diskfs_device_name = diskfs_device_arg;
- err =
- diskfs_get_mach_device (diskfs_device_name, &diskfs_device,
- &diskfs_device_start, &diskfs_device_size,
- &diskfs_device_block_size);
- }
- else
- err =
- diskfs_get_file_device (diskfs_device_arg,
- &diskfs_device_name, &diskfs_device,
- &diskfs_device_start, &diskfs_device_size,
- &diskfs_device_block_size);
-
- if (! err)
- {
- diskfs_log2_device_block_size = 0;
- while ((1 << diskfs_log2_device_block_size) < diskfs_device_block_size)
- diskfs_log2_device_block_size++;
- while ((1 << diskfs_log2_device_block_size) != diskfs_device_block_size)
- diskfs_log2_device_block_size = 0;
-
- diskfs_log2_device_blocks_per_page = 0;
- while ((diskfs_device_block_size << diskfs_log2_device_blocks_per_page)
- < vm_page_size)
- diskfs_log2_device_blocks_per_page++;
- if ((diskfs_device_block_size << diskfs_log2_device_blocks_per_page)
- != vm_page_size)
- diskfs_log2_device_blocks_per_page = 0;
- }
-
- return err;
-}