mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-21 18:15:39 +00:00
Fix various compiler warnings. Fix bug causing double free when a file isn't found. Fix bug using uninitialized variable parsing null filename. Fix bug causing crash when format 3 retrieval pointer encountered. Add support for readline (command line editing and history on Unix) Untangle NT I/O so it builds without the direct access SCSI API & works. Report errors as text messages everywhere. Add MSVC project files. Implement most of dir/full Partially implement XABITM Add help to command tables. Allow choice of VMS qualifiers or Unix options. mount /write // /dev/cdrom or mount -write /dev/cdrom Parse quoted strings as command parameters. Mount /write "/dev/cdrom" search [*...]*.txt "My words for you" Resolve command, parameter & qualifier ambiguity from tables. Consolidate the various makefiles into a common file with very small platform-specific wrappers. This simplifies maintenance. Add diskio module to allow easy access to .iso images and simulator files. Removes requirement for loop device or equivalent. Builds as a separate executable. Writes to the ODS2 volumes are broken.
53 lines
2.0 KiB
C
53 lines
2.0 KiB
C
#ifndef PHYIO_H
|
|
#define PHYIO_H
|
|
|
|
/* Phyio.h v1.2-2 Definition of Physical I/O routines */
|
|
|
|
/*
|
|
This is part of ODS2 written by Paul Nankervis,
|
|
email address: Paulnank@au1.ibm.com
|
|
|
|
ODS2 is distributed freely for all members of the
|
|
VMS community to use. However all derived works
|
|
must maintain comments in their source to acknowledge
|
|
the contibution of the original author.
|
|
*/
|
|
|
|
/* To set up physical I/O for a new system a group of phyio
|
|
routines need to be set up. They are:-
|
|
phyio_show() which doesn't need to do anything - but
|
|
it would generally print some statistics
|
|
about the other phyio calls.
|
|
phyio_init() to prepare a device for use by future
|
|
read/write calls. The device name would usually
|
|
map to a local device - for example rra: to /dev/rra
|
|
on a Unix system. The call needs to return a handle
|
|
(channel, file handle, reference number...) for
|
|
future reference, and optionally some device
|
|
information.
|
|
phyio_read() will return a specified number of bytes into a
|
|
buffer from the start of a 512 byte block on the
|
|
device referred to by the handle.
|
|
phyio_write() will write a number of bytes out to a 512 byte block
|
|
address on a device.
|
|
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#define PHYIO_READONLY 1
|
|
|
|
struct phyio_info {
|
|
unsigned status;
|
|
unsigned long long sectors;
|
|
unsigned sectorsize;
|
|
};
|
|
|
|
void phyio_show(void);
|
|
unsigned phyio_init(int devlen,char *devnam,unsigned *handle,struct phyio_info *info);
|
|
unsigned phyio_read(unsigned handle,unsigned block,unsigned length,char *buffer);
|
|
unsigned phyio_write(unsigned handle,unsigned block,unsigned length,char *buffer);
|
|
void phyio_help(FILE *fp );
|
|
|
|
#endif
|