sg.h

来自「<Linux1.0核心游记>电子书+书后源码+Linux1.0源码」· C头文件 代码 · 共 34 行

H
34
字号
/*   History:    Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user      process control of SCSI devices.    Development Sponsored by Killy Corp. NY NY*//*  An SG device is accessed by writting "packets" to it, the replies are then read using the read call. The same header is used for  reply, just ignore reply_len field.*/struct sg_header {  int pack_len;    /* length of incoming packet <4096 (including header) */  int reply_len;   /* maximum length <4096 of expected reply */  int pack_id;     /* id number of packet */  int result;      /* 0==ok, otherwise refer to errno codes */  /* command follows then data for command */ };/* ioctl's */#define SG_SET_TIMEOUT 0x2201  /* set timeout *(int *)arg==timeout */#define SG_GET_TIMEOUT 0x2202  /* get timeout return timeout */#define SG_DEFAULT_TIMEOUT 6000 /* 1 minute timeout */#define SG_DEFAULT_RETRIES 1#define SG_MAX_QUEUE 4 /* maximum outstanding request, arbitrary, may be                          changed if sufficient DMA buffer room available */#define SG_BIG_BUFF 32768

⌨️ 快捷键说明

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