⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 all.h

📁 使用libscsi做的一系列cdrom操作工具程序。包含cdwrite,cdflush,cdda三个程序
💻 H
字号:
#ifndef HAD_SC_ALL_H#define HAD_SC_ALL_H/*  all.h -- functions for devices of all types  Copyright (C) 1996 Dieter Baron and Armin Obersteiner  This file is part of libscsi, a library for direct scsi device access  The authors can be contacted at	<dillo@giga.or.at>	<armin.obersteiner@giga.or.at>  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 2 of the License, or  (at your option) any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include <scsi/scsi.h>struct sc_inquiry {#if SC_BIGENDIAN    u_char type_qual:3, type:5;    u_char removable:1, type_mod:7;    u_char iso_ver:2, ecma_ver:3, ansi_ver:3;    u_char aenc:1, trmiop:1, :2, format:3;    u_char reladr:1, wbus32:1, wbus16:1, sync:1, linked:1, :1,	cmdque:1, sftre:1;#else    u_char type:5, type_qual:3;    u_char type_mod:7, removable:1;    u_char ansi_ver:3, ecma_ver:3, iso_ver:2;    u_char format:3, :2, trmiop:1, aenc:1;    u_char sftre:1, cmdque:1, :1, linked:1, sync:1, wbus16:1,	wbus32:1, reladr:1;#endif    char *vendor, *product, *revision;    u_char *vspec1, *vspec2;    int vlen1, vlen2;};/* mode header */struct sc_mode_header6 {    u_char length;	/* mode data length		*/    u_char mtype;	/* medium type			*/    u_char dspec;	/* device-specivic parameter	*/    u_char bdno;	/* block descriptor length	*/};struct sc_mode_header10 {    u_short length;	/* mode data length		*/    u_char mtype;	/* medium type			*/    u_char dspec;	/* device-specivic parameter	*/    u_char r4[2];    u_short bdno;	/* block descriptor length	*/};struct sc_mode_block_descriptor {    u_char dcode;	/* density code			*/    u_char nob[3];	/* number of blocks		*/    u_char r4;    u_char bl[3];	/* block length			*/};/* mode pages */#define SC_MODE_CONTROL	0x0astruct sc_mode_control {#if SC_BIGENDIAN    u_char ps:1, :1, pc:6;#else    u_char pc:6, :1, ps:1;#endif    u_char length;#if SC_BIGENDIAN    u_char :7, rlec:1;    u_char qam:4, :2, qerr:1, dque:1;    u_char eeca:1, :4, raenp:1, uaaenp:1, eaenp:1;#else    u_char rlec:1, :7;    u_char dque:1, qerr:1, :2, qam:4;    u_char eaenp:1, uaaenp:1, raenp:1, :4, eeca:1;#endif    u_char r5;    u_char raenhp[2];};#define SC_MODE_DISCONNECT_RECONNECT	0x02struct sc_mode_disconnect_reconnect {#if SC_BIGENDIAN    u_char ps:1, :1, pc:6;#else    u_char pc:6, :1, ps:1;#endif    u_char length;    u_char bfr;		/* buffer full ratio		*/    u_char ber;		/* buffer empty ratio		*/    u_char bil[2];	/* bus inactivity limit		*/    u_char dtl[2];	/* disconnect time limit	*/    u_char ctl[2];	/* connect time limit		*/    u_char mbs[2];	/* maximum burst size		*/#if SC_BIGENDIAN    u_char :6, dtdc:2;#else    u_char dtdc:2, :6;#endif    u_char r13[3];};#define SC_MODE_PERIPHERAL_DEVICE  0x09struct sc_mode_peripheral_device {#if SC_BIGENDIAN    u_char ps:1, :1, pc:6;#else    u_char pc:6, :1, ps:1;#endif    u_char length;    u_char interface[2];	/* interface identifier	*/    u_char r4[4];    u_char vendor[1];		/* vendor specific	*/};int sc_test_unit_ready(SCSI *fd);int sc_inquiry(SCSI *fd, struct sc_inquiry *page);int sc_mode_sense6(SCSI *fd, u_char page, int dbd, int pc,		   u_char len, u_char *data);int sc_mode_sense10(SCSI *fd, u_char page, int dbd, int pc,		    u_short len, u_char *data);int sc_mode_select6(SCSI *fd, int pf, int sp, u_char len, u_char *data);int sc_mode_select10(SCSI *fd, int pf, int sp, u_short len,		     u_char *data);int sc_request_sense(SCSI *fd, u_char len, u_char *data);#endif /* all.h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -