-->

Previous | Table of Contents | Next

Page 1079

The action of the following ioctls depends on the first byte in the struct pointed to by argp, referred to here as the subcode. These are legal only for the superuser or the owner of the current tty.

TIOCLINUX, subcode=0 Dump the screen. Disappeared in 1.1.92. (With kernel 1.1.92 or later, read from /dev/vcsN or /dev/vcsaN instead.)
TIOCLINUX, subcode=1 Get task information. Disappeared in 1.1.92.
TIOCLINUX, subcode=2 Set selection. argp points to a struct{fchar subcode; short xs, ys, xe, ye; short sel_mode; }
xs and ys are the starting column and row. xe and ye are the ending column and row. (Upper-left corner is row=column=1.) sel_mode is 0 for character-by-character selection, 1 for word-by-word selection, or 2 for line-by-line selection. The indicated screen characters are highlighted and saved in the static array sel buffer in devices/char/console.c.
TIOCLINUX, subcode=3 Paste selection. The characters in the selection buffer are written to fd.
TIOCLINUX, subcode=4 Unblank the screen.
TIOCLINUX, subcode=5 Sets contents of a 256-bit look up table defining characters in a "word", for word-by-word selection. (Since 1.1.32.)
TIOCLINUX, subcode=6 argp points to a char that is set to the value of the kernel variable shift state. (Since 1.1.32.)
TIOCLINUX, subcode=7 argp points to a char that is set to the value of the kernel variable report mouse. (Since 1.1.33.)
TIOCLINUX, subcode=8 Dump screen width and height, cursor position, and all the character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With kernel 1.1.92 or later, read from /dev/vcsa* instead.)
TIOCLINUX, subcode=9 Restore screen width and height, cursor position, and all the character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With kernel 1.1.92 or later, write to /dev/vcsa* instead.)
TIOCLINUX, subcode=10 Handles the power saving feature of the new generation of monitors. VESA screen blanking mode is set to argp[1], which governs what screen blanking does:

0     Screen blanking is disabled.

1     The current video adapter register settings are saved, then

      the controller is programmed to turn off the vertical

      synchronization pulses. This puts the monitor into standby mode. If your monitor

      has an Off_Mode timer, then it will eventually power down by itself.

2     The current settings are saved, then both the vertical and

      horizontal synchronization pulses are turned off. This puts the monitor into

      off mode. If your monitor has no Off_Mode timer, or if you want

      your monitor to power down immediately when the blank timer times

      out, then you choose this option. (Caution: Powering down

      frequently will damage the monitor.) (Since 1.1.76.)

Return Values

-1 for error, and errno is set.

Errors

errno may take on these values:

EBADF File descriptor is invalid.
ENOTTY File descriptor is not associated with a character special device, or the specified request does not apply to it.

Page 1080

EINVAL File descriptor or argp is invalid.
EPERM Permission violation.


WARNING
Do not regard this man page as documentation of the Linux console ioctls. This is provided for the curious only, as an alternative to reading the source. Ioctls are undocumented Linux internals, liable to be changed without warning. (And indeed, this page more or less describes the situation as of kernel version 1.1.94; there are many minor and not-so-minor differences with earlier versions.)

Very often, ioctls are introduced for communication between the kernel and one particular well-known program (fdisk, hdparm, setserial, tunelp, loadkeys, selection, setfont, and so on), and their behavior will be changed when required by this particular program.

Programs using these ioctls will not be portable to other versions of UNIX, will not work on older versions of Linux, ad will not work on future versions of Linux.
Use POSIX functions.

See Also


kbd_mode(1), loadkeys(1), dumpkeys(1), mknod(1), setleds(1), setmetamode(1), ioperm(2), termios(2), execve(2), fcntl(2),

charsets(4), console(4), console_codes(4), mt(4), sd(4), tty(4), ttys(4), vcs(4), vcsa(4), mapscrn(8), setfont(8), resizecons(8),

/usr/include/linux/kd.h,          /usr/include/linux/vt.h.

Linux, 18 September 1995

fd

fd—Floppy disk device

CONFIGURATION

Floppy drives are block devices with major number 2. Typically, they are owned by root.floppy (that is, user root, group floppy) and have either mode 0660 (access checking via group membership) or mode 0666 (everybody has access). The minor numbers encode the device type, drive number, and controller number. For each device type (that is, combination of density and track count), there is a base minor number. To this base number, add the drive's number on its controller and 128 if the drive is on the secondary controller. In the following device tables, n represents the drive number.

WARNING
If you use formats with more tracks than supported by your drive, you may cause it mechanical damage. Trying once if more tracks than the usual 40/80 are supported should not damage it, but no warranty is given for that. Don't create device entries for those formats to prevent their usage if you are not sure.

Page 1081

Drive-independent device files that automatically detect the media format and capacity are

Name Base minor #
fdn 0

5.25-inch double density device files:

Name Capac. Cyl. Sect. Heads Base minor #
fdnd360 360K 40 9 2 4

5.25-inch high density device files:

Name Capac. Cyl. Sect. Heads Base minor #
fdnh360 360K 40 9 2 20
fdnh410 410K 41 10 2 48
fdnh420 420K 42 10 2 64
fdnh720 720K 80 9 2 24
fdnh880 880K 80 11 2 80
fdnh1200 1200K 80 15 2 8
fdnh1440 1440K 80 18 2 40
fdnh1476 1476K 82 18 2 56
fdnh1494 1494K 83 18 2 72
fdnh1600 1600K 80 20 2 92

3.5-inch double density device files:

Name Capac. Cyl. Sect. Heads Base minor #
fdnD360 360K 80 9 1 12
fdnD720 720K 80 9 2 16
fdnD800 800K 80 10 2 120
fdnD1040 1040K 80 13 2 84
fdnD1120 1120K 80 14 2 88

3.5-inch high density device files:

Name Capac. Cyl. Sect. Heads Base minor #
fdnH360 360K 40 9 2 12
fdnH720 720K 80 9 2 16
fdnH820 820K 82 10 2 52
fdnH830 830K 83 10 2 68
fdnH1440 1440K 80 18 2 28
fdnH1600 1600K 80 20 2 124
fdnH1680 1680K 80 21 2 44
fdnH1722 1722K 82 21 2 60
fdnH1743 1743K 83 21 2 76
fdnH1760 1760K 80 22 2 96
fdnH1840 1840K 80 23 2 116
fdnH1920 1920K 80 24 2 100

Previous | Table of Contents | Next