?? da.h
字號(hào):
#ifndef HAD_SC_DA_H#define HAD_SC_DA_H/* da.h -- functions for direct access devices 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>/* mode pages */#define SC_MODE_DA_CACHE 0x08struct sc_mode_da_cache {#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 :5, wce:1, mf:1, rcd:1; u_char drrp:4, wrp:4;#else u_char rcd:1, mf:1, wce:1, :5; u_char wrp:4, drrp:4;#endif u_char dptl[2]; /* disable pre-fetch transfer length */ u_char minp[2]; /* minimum pre-fetch */ u_char maxp[2]; /* maximum pre-fetch */ u_char maxpc[2]; /* maximum pre-fetch ceiling */};#define SC_MODE_DA_FLEXIBLE_DISK 0x05struct sc_mode_da_flexible_disk {#if SC_BIGENDIAN u_char ps:1, :1, pc:6;#else u_char pc:6, :1, ps:1;#endif u_char length; u_char tr[2]; /* transfer rate */ u_char noh; /* number of heads */ u_char spt; /* sectors per track */ u_char dbps[2]; /* data bytes per sector */ u_char noc[2]; /* number of cylinders */ u_char scwp[2]; /* starting cylinder-write precompensation */ u_char scrwc[2]; /* starting cylinder-reduced write current */ u_char dsr[2]; /* drive step rate */ u_char dspw; /* drive step pulse width */ u_char hsd[2]; /* head settle delay */ u_char mond; /* motor on delay */ u_char moffd; /* motor off delay */#if SC_BIGENDIAN u_char trdy:1, ssn:1, mo:1, :5; u_char :4, spc:4;#else u_char :5, mo:1, ssn:1, trdy:1; u_char spc:4, :4;#endif u_char wc; /* write compensation */ u_char hld; /* head load delay */ u_char hud; /* head unload delay */#if SC_BIGENDIAN u_char pin34:4, pin2:4; u_char pin4:4, pin1:4;#else u_char pin2:4, pin34:4; u_char pin1:4, pin4:4;#endif u_char mrr[2]; /* medium rotation rate */ u_char r30[2];};#define SC_MODE_DA_FORMAT_DEVICE 0x03struct sc_mode_da_format_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 tpz[2]; /* track per zone */ u_char aspz[2]; /* alternate sectors per zone */ u_char atpz[2]; /* alternate tracks per zone */ u_char atplu[2]; /* alternate tracks per logical unit */ u_char spt[2]; /* sectors per track */ u_char dbpps[2]; /* data bytes per physical sector */ u_char interleave[2]; u_char tsf[2]; /* track skew factor */ u_char csf[2]; /* cylinder skew factor */#if SC_BIGENDIAN u_char ssec:1, hsec:1, rmb:1, surf:1, :4;#else u_char :4, surf:1, rmb:1, hsec:1, ssec:1;#endif u_char r21[3];};int sc_da_format_unit(SCSI *fd, u_long interleave);int sc_da_lock_unlock_cache(SCSI *fd, u_long lba, u_short nob);int sc_da_prefetch(SCSI *fd, int immed, u_long lba, u_short tl);int sc_da_read10(SCSI *fd, u_long lba, u_short tl, size_t len, u_char *data);int sc_cd_read_capacity(SCSI *fd, u_long *lba, u_long *bl, int pmi);int sc_da_write6(SCSI *fd, u_long lba, u_char tl, size_t len, u_char *data);int sc_da_write10(SCSI *fd, u_long lba, u_short tl, size_t len, u_char *data);int sc_da_rezero_unit(SCSI *fd);int sc_da_prevent_allow_medium_removal(SCSI *fd, int flag);int sc_da_synchronize_cache(SCSI *fd, int imm, u_long lba, u_short nob);int sc_da_start_stop_unit(SCSI *fd, int imm, int loej, int start);#endif /* da.h */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -