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

📄 scsi.h.in

📁 使用libscsi做的一系列cdrom操作工具程序。包含cdwrite,cdflush,cdda三个程序
💻 IN
字号:
#ifndef HAD_SCSI_H#define HAD_SCSI_H/*  scsi.h -- general include file  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 <sys/types.h>#define SC_BIGENDIAN	@WORDS_BIGENDIAN@#define SC_READ		1#define SC_WRITE	2#if SC_BIGENDIAN#define sc_store_l(s, l)	\	(*((u_long *)(s)) = l)#define sc_store_s(s, l)	\	(*((u_short *)(s)) = l)#define sc_fetch_l(l, s)	\	(l = *((u_long *)(s)))#define sc_fetch_s(l, s)	\	(l = *((u_short *)(s)))#else#define sc_store_l(s, l)	\	((s)[0]=(((l)>>24)&255), (s)[1]=(((l)>>16)&255), \	 (s)[2]=(((l)>>8)&255), (s)[3]=((l)&255))#define sc_store_s(s, l)	\	((s)[0]=(((l)>>8)&255), (s)[1]=((l)&255))#define sc_fetch_l(l, s)	\	((l)=((s)[0]<<24) | ((s)[1]<<16) | ((s)[2]<<8) | ((s)[3]))#define sc_fetch_s(l, s)	\	((l)=((s)[0]<<8) | ((s)[1]))#endifstruct sc_sense_data {#if SC_BIGENDIAN    u_char vaild:1, ecode:7;#else    u_char ecode:7, vaild:1;#endif    u_char segnr;#if SC_BIGENDIAN    u_char fmark:1, eom:1, ili:1, :1, skey:4;#else    u_char skey:4, :1, ili:1, eom:1, fmark:1;#endif    u_char info[4];    u_char length;    u_char cspec[4];    u_char asc;    u_char asq;    u_char fruc;    u_char kspec[4];    u_char additional[1];};struct sc_sense {    int status;    int len;    struct sc_sense_data data;};#include <scsi/os.h>SCSI *sc_open(char *device);int sc_close(SCSI *s);int sc_send(SCSI *s, int direction, int cmdlen, char *cmd,	    int datalen, char *data);int sc_set_timeout(SCSI *s, u_long timeout);/*int sc_fstatus(SCSI *s, FILE *f, char *prg, char *msg, int vlevel);*/void sc_clearerr(SCSI *fd);#endif /* scsi.h */

⌨️ 快捷键说明

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