Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: pg.h
/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/* pg.h (c) 1998 Grant R. Guenther <grant@torque.net>
[1] Fix | Delete
Under the terms of the GNU General Public License
[2] Fix | Delete
[3] Fix | Delete
[4] Fix | Delete
pg.h defines the user interface to the generic ATAPI packet
[5] Fix | Delete
command driver for parallel port ATAPI devices (pg). The
[6] Fix | Delete
driver is loosely modelled after the generic SCSI driver, sg,
[7] Fix | Delete
although the actual interface is different.
[8] Fix | Delete
[9] Fix | Delete
The pg driver provides a simple character device interface for
[10] Fix | Delete
sending ATAPI commands to a device. With the exception of the
[11] Fix | Delete
ATAPI reset operation, all operations are performed by a pair
[12] Fix | Delete
of read and write operations to the appropriate /dev/pgN device.
[13] Fix | Delete
A write operation delivers a command and any outbound data in
[14] Fix | Delete
a single buffer. Normally, the write will succeed unless the
[15] Fix | Delete
device is offline or malfunctioning, or there is already another
[16] Fix | Delete
command pending. If the write succeeds, it should be followed
[17] Fix | Delete
immediately by a read operation, to obtain any returned data and
[18] Fix | Delete
status information. A read will fail if there is no operation
[19] Fix | Delete
in progress.
[20] Fix | Delete
[21] Fix | Delete
As a special case, the device can be reset with a write operation,
[22] Fix | Delete
and in this case, no following read is expected, or permitted.
[23] Fix | Delete
[24] Fix | Delete
There are no ioctl() operations. Any single operation
[25] Fix | Delete
may transfer at most PG_MAX_DATA bytes. Note that the driver must
[26] Fix | Delete
copy the data through an internal buffer. In keeping with all
[27] Fix | Delete
current ATAPI devices, command packets are assumed to be exactly
[28] Fix | Delete
12 bytes in length.
[29] Fix | Delete
[30] Fix | Delete
To permit future changes to this interface, the headers in the
[31] Fix | Delete
read and write buffers contain a single character "magic" flag.
[32] Fix | Delete
Currently this flag must be the character "P".
[33] Fix | Delete
[34] Fix | Delete
*/
[35] Fix | Delete
[36] Fix | Delete
#ifndef _LINUX_PG_H
[37] Fix | Delete
#define _LINUX_PG_H
[38] Fix | Delete
[39] Fix | Delete
#define PG_MAGIC 'P'
[40] Fix | Delete
#define PG_RESET 'Z'
[41] Fix | Delete
#define PG_COMMAND 'C'
[42] Fix | Delete
[43] Fix | Delete
#define PG_MAX_DATA 32768
[44] Fix | Delete
[45] Fix | Delete
struct pg_write_hdr {
[46] Fix | Delete
[47] Fix | Delete
char magic; /* == PG_MAGIC */
[48] Fix | Delete
char func; /* PG_RESET or PG_COMMAND */
[49] Fix | Delete
int dlen; /* number of bytes expected to transfer */
[50] Fix | Delete
int timeout; /* number of seconds before timeout */
[51] Fix | Delete
char packet[12]; /* packet command */
[52] Fix | Delete
[53] Fix | Delete
};
[54] Fix | Delete
[55] Fix | Delete
struct pg_read_hdr {
[56] Fix | Delete
[57] Fix | Delete
char magic; /* == PG_MAGIC */
[58] Fix | Delete
char scsi; /* "scsi" status == sense key */
[59] Fix | Delete
int dlen; /* size of device transfer request */
[60] Fix | Delete
int duration; /* time in seconds command took */
[61] Fix | Delete
char pad[12]; /* not used */
[62] Fix | Delete
[63] Fix | Delete
};
[64] Fix | Delete
[65] Fix | Delete
#endif /* _LINUX_PG_H */
[66] Fix | Delete
[67] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function