-->
Page 1094
MM PROTOCOL
The MM protocol uses 1 start bit, 8 data bits, odd parity, and 1 stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3-byte packets. dx and dy are sent as single signed values, the sign bit indicating a negative value. lb (mb, rb) is set when the left (middle, right) button is pressed:
Byte | d7 | d6 | d5 | d4 | d3 | d2 | d1 | d0 |
1 | 1 | ? | ? | dxs | dys | lb | mb | rb |
2 | 0 | dx6 | dx5 | dx4 | dx3 | dx2 | dx1 | dx0 |
3 | 0 | dy6 | dy5 | dy4 | dy3 | dy2 | dy1 | dy0 |
FILES
/dev/mouse a commonly used symlink pointing to a mouse device
SEE ALSO
cua(4), bm(4)
Linux, 10 February 1996
null, zeroData sink.
DESCRIPTION
Data written on a null or zero special file is discarded.
Reads from the null special file always return end of file, whereas reads from zero always return \0 characters.
null and zero are typically created by
mknod -m 666 /dev/null c 1 3 mknod -m 666 /dev/zero c 1 5 chown root.mem /dev/null /dev/zero
NOTES
If these devices are not writable and readable for all users, many programs will act strangely.
FILES
/dev/null /dev/zero
SEE ALSO
mknod(1), chown(1)
Linux, 21 November 1992
ramRam disk device.
Page 1095
DESCRIPTION
ram is a block device to access the ram disk in raw mode.
It is typically created by
mknod -m 660 /dev/ram b 1 1 chown root.disk /dev/ram
FILES
/dev/ram
SEE ALSO
mknod(1), chown(1), mount(8)
Linux, 21 November 1992
sdDriver for SCSI disk drives.
SYNOPSIS
#include <linux/hdreg.h>
CONFIG
The block device name has the following form: sdlp, where l is a letter denoting the physical drive, and p is a number denoting the partition on that physical drive. Often, the partition number, p, will be left off when the device corresponds to the whole drive.
SCSI disks have a major device number of 8 and a minor device number of the form (16 * drive_number) + partition_number, where drive_number is the number of the physical drive in order of detection and partition_number is as follows:
Partition 0 | The whole drive |
Partitions 1-4 | The DOS "primary" partitions |
Partitions 5-8 | The DOS "extended" (or "logical") partitions |
For example, /dev/sda will have major 8 and minor 0 and will refer to all the first SCSI drives in the system; /dev/sdb3 will have major 8 and minor 19 and will refer to the third DOS "primary" partition on the second SCSI drive in the system.
At this time, only block devices are provided. Raw devices have not yet been implemented.
DESCRIPTION
The following ioctls are provided:
HDIO_REQ | Returns the BIOS disk parameters in the following structure: |
struct hd geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; | |
A pointer to this structure is passed as the ioctl(2) parameter. The information returned in the parameter is the disk geometry of the drive as understood by DOS! This geometry is not the physical geometry of the drive. It is used when constructing the drive's partition table, |
Page 1096
however, and is needed for convenient operation of fdisk(1), efdisk(1), and lilo(1). If the geometry information is not available, zero is returned for all the parameters. | |
BLKGETSIZE | Returns the device size in sectors. The ioctl(2) parameter should be a pointer to a long. |
BLKRRPART | Forces a re-read of the SCSI disk partition tables. No parameter is needed. |
The scsi(4) ioctls are also supported. If the ioctl(2) parameter is required and it is NULL, then ioctl(2) will return -EINVAL. |
FILES
/dev/sd[a-h]: The whole device
/dev/sd[a-h][0-8]: Individual block partitions
SEE ALSO
scsi(4)
17 December 1992
stSCSI tape device.
SYNOPSIS
#include <sys/mtio.h> int ioctl(int fd, int request [, (void *)arg3]) int ioctl(int fd, MTIOCTOP, (struct mtop *)mt_cmd) int ioctl(int fd, MTIOCGET, (struct mtget *)mt_status) int ioctl(int fd, MTIOCPOS, (struct mtpos *)mt_pos)
DESCRIPTION
The st driver provides the interface to a variety of SCSI tape devices. Currently, the driver takes control of all detected devices of type sequential-access. The st driver uses major device number 9.
Each device uses two minor device numbers: a principal minor device number, n, assigned sequentially in order of detection, and a no-rewind device number, (n + 128). Devices opened using the principal device number are sent a REWIND command when they are closed. Devices opened using the no-rewind device number are not. Options such as density or block size are not coded in the minor device number. These options must be set by explicit ioctl() calls and remain in effect when the device is closed and reopened.
Devices are typically created by
mknod -m 660 /dev/st0 c 9 0 mknod -m 660 /dev/st1 c 9 1 mknod -m 660 /dev/nst0 c 9 128 mknod -m 660 /dev/nst1 c 9 129
There is no corresponding block device. The character device provides buffering and read-ahead by default and supports reads and writes of arbitrary size (limited by the driver's internal buffer size, which defaults to 32768 bytes but can be changed either by using a kernel startup option or by changing a compile-time constant).
Device /dev/tape is usually created as a hard or soft link to the default tape device on the system.