Hi, some functions within oskit-mach:./oskit (ds_notify, ds_device_write, ds_device_write_inband, ds_device_read, ds_device_read_inband, ds_asyncio_ready, ds_osenv_init, ds_request_init, ds_netdev_open) are used implicitely in sources within oskit-mach/oskit. One could perhaps provide a file named oskit/ds_routines.h, that declares prototypes of them.
This conflicts with another header device/ds_routines.h, which has been used in gnumach, but in oskit-mach--since the device interface of oskit is used--seems to be of no other use as to provide a global variable declaration of device_io_map. This patch - moves the declaration of device_io_map into oskit/ds_routines.c (where it is used), - creates a new header oskit/ds_routines.h with prototypes for some of the above functions and an external declaration of device_io_map. If this patch will be used, device/ds_routines.h must be removed. The new oskit/ds_routines.h still lacks a license header, since I was not sure, whether this is concerned to be modified Utah code or should be GPLed code. ---------------------------------------------------------------------- 2002-03-03 Michael Teichgraeber <[EMAIL PROTECTED]> * oskit/ds_routines.c: Declared device_io_map (former place: device/ds_routines.h) * oskit/ds_partition.c: Include ds_routines.h. * oskit/ds_routines.h: New file, declare device_io_map and some function prototypes of ds_routines.c. * device/dev_pager.c (device_pager_data_write): Don't include ds_routines.h. * oskit/ds_net.c: Likewise. * device/ds_routines.h: Removed. Index: device/dev_pager.c =================================================================== RCS file: /cvsroot/hurd/gnumach/device/dev_pager.c,v retrieving revision 1.1.1.1.2.2 diff -u -p -r1.1.1.1.2.2 dev_pager.c --- device/dev_pager.c 5 Apr 2001 06:52:46 -0000 1.1.1.1.2.2 +++ device/dev_pager.c 3 Mar 2002 21:40:00 -0000 @@ -48,11 +48,11 @@ #include <vm/vm_kern.h> #include <device/device_types.h> -#include <device/ds_routines.h> #include <device/dev_hdr.h> #include "../oskit/ds_oskit.h" + extern vm_offset_t block_io_mmap(); /* dummy routine to allow mmap for block devices */ @@ -420,9 +420,11 @@ kern_return_t device_pager_data_write( register pointer_t addr, vm_size_t data_count) { +#if 0 register dev_pager_t ds; register device_t device; kern_return_t result; +#endif panic("(device_pager)data_write: called"); #if 0 Index: device/net_io.c =================================================================== RCS file: /cvsroot/hurd/gnumach/device/net_io.c,v retrieving revision 1.1.1.1.2.2 diff -u -p -r1.1.1.1.2.2 net_io.c --- device/net_io.c 5 Apr 2001 06:52:46 -0000 1.1.1.1.2.2 +++ device/net_io.c 3 Mar 2002 21:24:02 -0000 @@ -47,7 +47,6 @@ #include <device/net_io.h> #include <device/if_hdr.h> /*#include <device/io_req.h> */ -#include <device/ds_routines.h> #include <mach/boolean.h> #include <mach/vm_param.h> Index: oskit/ds_routines.c =================================================================== RCS file: /cvsroot/hurd/gnumach/oskit/Attic/ds_routines.c,v retrieving revision 1.1.2.7 diff -u -p -r1.1.2.7 ds_routines.c --- oskit/ds_routines.c 12 Dec 2001 11:12:47 -0000 1.1.2.7 +++ oskit/ds_routines.c 3 Mar 2002 21:24:05 -0000 @@ -58,6 +58,8 @@ #define NDEVICES 256 #define DEVICE_IO_MAP_SIZE (4 * 1024 * 1024) +vm_map_t device_io_map; /* map for device IO memory */ + zone_t dev_hdr_zone; zone_t io_inband_zone; /* for inband reads */ Index: oskit/ds_partition.c =================================================================== RCS file: /cvsroot/hurd/gnumach/oskit/Attic/ds_partition.c,v retrieving revision 1.1.2.1 diff -u -p -r1.1.2.1 ds_partition.c --- oskit/ds_partition.c 25 Nov 1999 23:27:12 -0000 1.1.2.1 +++ oskit/ds_partition.c 3 Mar 2002 21:46:44 -0000 @@ -6,6 +6,8 @@ #include <oskit/io/blkio.h> #include <oskit/diskpart/diskpart.h> +#include "ds_routines.h" + static io_return_t adjust_recnum (device_t dev, recnum_t *recnum, unsigned int count) { diff -Nau ../oskit-mach.orig/oskit/ds_routines.h oskit/ds_routines.h --- ../oskit-mach.orig/oskit/ds_routines.h Thu Jan 1 01:00:00 1970 +++ oskit/ds_routines.h Sun Mar 3 22:22:47 2002 @@ -0,0 +1,48 @@ +#ifndef DS_ROUTINES_H +#define DS_ROUTINES_H + + +#include <vm/vm_map.h> + +extern vm_map_t device_io_map; /* map for device IO memory */ + + +boolean_t ds_notify (mach_msg_header_t * msg); + + +/* Server functions for RPCs to open devices. */ + +io_return_t ds_device_write (device_t dev, + ipc_port_t reply_port, + mach_msg_type_name_t reply_port_type, + dev_mode_t mode, + recnum_t recnum, + io_buf_ptr_t data, + unsigned int count, int *bytes_written); + +io_return_t ds_device_write_inband (device_t dev, + ipc_port_t reply_port, + mach_msg_type_name_t reply_port_type, + dev_mode_t mode, + recnum_t recnum, + io_buf_ptr_inband_t data, + unsigned count, int *bytes_written); + +io_return_t ds_device_read (device_t dev, + ipc_port_t reply_port, + mach_msg_type_name_t reply_port_type, + dev_mode_t mode, + recnum_t recnum, + int count, + io_buf_ptr_t * data, unsigned *bytes_read); + +io_return_t ds_device_read_inband (device_t dev, + ipc_port_t reply_port, + mach_msg_type_name_t reply_port_type, + dev_mode_t mode, + recnum_t recnum, + int count, + char *data, unsigned *bytes_read); + + +#endif /* DS_ROUTINES_H */ _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd