More cleanup: no more CMOS and SCSI ioctls
This commit is contained in:
parent
c4bce95897
commit
34c14b1cab
6 changed files with 2 additions and 78 deletions
|
@ -3,7 +3,7 @@
|
|||
.PATH: ${MINIXSRCDIR}/common/include/sys
|
||||
|
||||
INCS+= elf32.h elf64.h elf_common.h elf_generic.h \
|
||||
ioc_cmos.h ioc_file.h ioc_scsi.h ioc_tape.h \
|
||||
ioc_disk.h ioc_memory.h ioc_sound.h ioc_tty.h \
|
||||
ioc_file.h ioc_tape.h ioc_disk.h \
|
||||
ioc_memory.h ioc_sound.h ioc_tty.h \
|
||||
kbdio.h mtio.h svrctl.h video.h vm.h
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/* sys/ioc_cmos.h - CMOS ioctl() command codes.
|
||||
*/
|
||||
|
||||
#ifndef _S_I_CMOS_H
|
||||
#define _S_I_CMOS_H
|
||||
|
||||
#include <minix/ioctl.h>
|
||||
|
||||
#define CIOCGETTIME _IOR('c', 1, struct tm)
|
||||
#define CIOCGETTIMEY2K _IOR('c', 2, struct tm)
|
||||
#define CIOCSETTIME _IOW('c', 3, u32_t)
|
||||
#define CIOCSETTIMEY2K _IOW('c', 4, u32_t)
|
||||
|
||||
#endif /* _S_I_CMOS_H */
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/* sys/ioc_scsi.h - SCSI ioctl() command codes. Author: Kees J. Bot
|
||||
* 23 Nov 2002
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _S_I_SCSI_H
|
||||
#define _S_I_SCSI_H
|
||||
|
||||
#include <minix/ioctl.h>
|
||||
|
||||
#define SCIOCCMD _IOW('S', 1, struct scsicmd)
|
||||
|
||||
#endif /* _S_I_SCSI_H */
|
|
@ -18,9 +18,7 @@
|
|||
#include <sys/ioc_disk.h> /* 'd' */
|
||||
#include <sys/ioc_file.h> /* 'f' */
|
||||
#include <sys/ioc_memory.h> /* 'm' */
|
||||
#include <sys/ioc_cmos.h> /* 'c' */
|
||||
#include <sys/ioc_tape.h> /* 'M' */
|
||||
#include <sys/ioc_scsi.h> /* 'S' */
|
||||
#include <sys/ioc_sound.h> /* 's' */
|
||||
|
||||
#endif /* _S_IOCTL_H */
|
||||
|
|
|
@ -239,50 +239,6 @@ look like a sequence of files.
|
|||
If a tape has been written to or opened in write-only mode, then a filemark
|
||||
is written if the tape is closed or if a space command is issued. No extra
|
||||
filemark is written if the drive is instructed to write filemarks.
|
||||
.SS "Raw Access Devices"
|
||||
Under Minix-vmd one can use the raw access devices to program a SCSI
|
||||
device entirely from user mode. The disk and tape devices probe for devices
|
||||
when opened, start disks and load tapes, but the raw access devices do
|
||||
nothing at all. Given an open file descriptor to any SCSI character device
|
||||
(not just the raw access devices) one can use the following ioctl:
|
||||
.PP
|
||||
.RS
|
||||
ioctl(fd, SCIOCCMD, &scsicmd)
|
||||
.RE
|
||||
.PP
|
||||
The structure whose address is passed as the third argument is defined
|
||||
in <sys/scsi.h> as follows:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
struct scsicmd {
|
||||
void *cmd;
|
||||
size_t cmdlen;
|
||||
void *buf;
|
||||
size_t buflen;
|
||||
void *sense;
|
||||
size_t senselen;
|
||||
int dir;
|
||||
};
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
.B Cmd
|
||||
and
|
||||
.B cmdlen
|
||||
hold the address and length of an object holding a Group 0 or Group 1
|
||||
SCSI command. The next two fields describe a buffer of at most 8 kilobytes
|
||||
used in the data in or out phase.
|
||||
.B Dir
|
||||
is 0 if data is to be read from the device, 1 if data is written to the
|
||||
device. If the ioctl succeeds then 0 is returned, otherwise -1 with
|
||||
.B errno
|
||||
set to
|
||||
.B EIO
|
||||
and the request sense info returned in the buffer described by the sense and
|
||||
senselen fields. If the sense key is zero on error then a host adapter
|
||||
error occurred, this means that the device is most likely turned off or not
|
||||
present.
|
||||
.SH DRIVERS
|
||||
By setting the Boot variables
|
||||
.BR c0
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#include <sys/ioc_disk.h> /* 'd' */
|
||||
#include <sys/ioc_file.h> /* 'f' */
|
||||
#include <sys/ioc_memory.h> /* 'm' */
|
||||
#include <sys/ioc_cmos.h> /* 'c' */
|
||||
#include <sys/ioc_tape.h> /* 'M' */
|
||||
#include <sys/ioc_scsi.h> /* 'S' */
|
||||
#include <sys/ioc_sound.h> /* 's' */
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
|
|
Loading…
Reference in a new issue