亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tapeinfo.c

?? 通用SCSI設備備份/讀寫程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* Copyright 2000 Enhanced Software Technologies Inc. *   Released under terms of the GNU General Public License as * required by the license on 'mtxl.c'. * $Date: 2001/06/19 21:51:32 $ * $Revision: 1.2 $ *//*#define DEBUG_PARTITION *//*#define DEBUG 1 *//* What this does: This basically dumps out the contents of the following * pages: * * Inquiry -- prints full inquiry info. If it's not a tape drive, this is * the end of things. *    DeviceType: *    Manufacturer: *    ProdID:   *    ProdRevision: * * Log Sense: TapeAlert Page (if supported): *    TapeAlert:[message#]<Message>  e.g. "TapeAlert:[22]Cleaning Cartridge Worn Out" *   * Mode Sense:  *  Data Compression Page: *    DataCompEnabled:<yes|no> *    DataCompCapable:<yes|no> *    DataDeCompEnabled:<yes|no> *    CompType:<number> *    DeCompType:<number> * *  Device Configuration Page: *    ActivePartition:<#> *    DevConfigComp:<#>    -- the compression byte in device config page. *    EarlyWarningSize:<#> -- size of early warning buffer? * *  Medium Partition Page: *    NumPartitions:<#> *    MaxPartitions:<#> *    Partition[0]:<size> *    Partition[1]:<size>... * * Read Block Limits command: *    MinBlock:<#>  -- Minimum block size. *    MaxBlock:<#>  -- Maximum block size.  */#include <stdio.h>#include <string.h>#include "mtx.h"#include "mtxl.h"char  *argv0;void usage(void) {  FatalError("Usage: tapeinfo -f <generic-device>\n");}/* A table for printing out the peripheral device type as ASCII. */ static char *PeripheralDeviceType[32] = {  "Disk Drive",  "Tape Drive",  "Printer",  "Processor",  "Write-once",  "CD-ROM",  "Scanner",  "Optical",  "Medium Changer",  "Communications",  "ASC IT8",  "ASC IT8",  "RAID Array",  "Enclosure Services",  "OCR/W",  "Bridging Expander", /* 0x10 */  "Reserved",  /* 0x11 */  "Reserved", /* 0x12 */  "Reserved",  /* 0x13 */  "Reserved",  /* 0x14 */  "Reserved",  /* 0x15 */  "Reserved",  /* 0x16 */  "Reserved",  /* 0x17 */  "Reserved",  /* 0x18 */  "Reserved",  /* 0x19 */  "Reserved",  /* 0x1a */  "Reserved",  /* 0x1b */  "Reserved",  /* 0x1c */  "Reserved",  /* 0x1d */  "Reserved",  /* 0x1e */  "Unknown"    /* 0x1f */};/* we call it MediumChangerFD for history reasons, sigh. *//* now to print inquiry information: Copied from other one.... */static void ReportInquiry(DEVICE_TYPE MediumChangerFD){  RequestSense_T RequestSense;  Inquiry_T *Inquiry;  int i;  Inquiry = RequestInquiry(MediumChangerFD,&RequestSense);  if (Inquiry == NULL)     {      PrintRequestSense(&RequestSense);      FatalError("INQUIRY Command Failed\n");    }    printf("Product Type: %s\n",PeripheralDeviceType[Inquiry->PeripheralDeviceType]);  printf("Vendor ID: '");  for (i = 0; i < sizeof(Inquiry->VendorIdentification); i++)    printf("%c", Inquiry->VendorIdentification[i]);  printf("'\nProduct ID: '");  for (i = 0; i < sizeof(Inquiry->ProductIdentification); i++)    printf("%c", Inquiry->ProductIdentification[i]);  printf("'\nRevision: '");  for (i = 0; i < sizeof(Inquiry->ProductRevisionLevel); i++)    printf("%c", Inquiry->ProductRevisionLevel[i]);  printf("'\n");\  if (Inquiry->MChngr) {  /* check the attached-media-changer bit... */    printf("Attached Changer: Yes\n");  } else {    printf("Attached Changer: No\n");  }  free(Inquiry);  /* well, we're about to exit, but ... */}/* Okay, now for the Log Sense Tape Alert Page (if supported): */#define TAPEALERT_SIZE 2048  /* max size of tapealert buffer. */ #define MAX_TAPE_ALERT 0x41static char *tapealert_messages[]= {  "Undefined", /* 0 */  "         Read: Having problems reading (slowing down)", /* 1 */  "        Write: Having problems writing (losing capacity)", /* 2 */  "   Hard Error: Uncorrectable read/write error", /* 3 */  "        Media: Media Performance Degraded, Data Is At Risk", /* 4 */  " Read Failure: Tape faulty or tape drive broken", /* 5 */  "Write Failure: Tape faulty or tape drive broken", /* 6 */  "   Media Life: The tape has reached the end of its useful life", /* 7 */  "Not Data Grade:Replace cartridge with one  containing data grade tape",/*8*/  "Write Protect: Attempted to write to a write-protected cartridge",/*9 */  "   No Removal: Cannot unload, initiator is preventing media removal", /*a*/  "Cleaning Media:Cannot back up or restore to a cleaning cartridge", /* b */  "   Bad Format: The loaded tape contains data in an unsupported format", /*c */  " Snapped Tape: The data cartridge contains a broken tape", /* d */  "Undefined", /* e */  "Undefined", /* f */  "Undefined", /* 10 */  "Undefined", /* 11 */  "Undefined", /* 12 */  "Undefined", /* 13 */  "    Clean Now: The tape drive neads cleaning NOW", /* 0x14 */  "Clean Periodic:The tape drive needs to be cleaned at next opportunity", /* 0x15 */  "Cleaning Media:Cannot clean because cleaning cartridge used up, insert new cleaning cartridge to clean the drive", /* 0x16 */  "Undefined", /* 0x17 */  "Undefined", /* 0x18 */  "Undefined", /* 0x19 */  "Undefined", /* 0x1a */  "Undefined", /* 0x1b */  "Undefined", /* 0x1c */  "Undefined", /* 0x1d */  "   Hardware A: Tape drive has a problem not read/write related", /* 0x1e */  "   Hardware B: Tape drive has a problem not read/write related", /* 0x1f */  "    Interface: Problem with SCSI interface between tape drive and initiator", /* 0x20 */  "  Eject Media: The current operation has failed. Eject and reload media", /* 0x21 */  "Download Fail: Attempt to download new firmware failed", /* 0x22 */  "Undefined", /* 0x23 */  "Undefined", /* 0x24 */  "Undefined", /* 0x25 */  "Undefined", /* 0x26 */  "Undefined", /* 0x27 */  "Loader Hardware A: Changer having problems communicating with tape drive", /* 0x28   40 */  "Loader Stray Tape: Stray tape left in drive from prior error", /* 0x29 41 */  "Loader Hardware B: Autoloader mechanism has a fault", /* 0x2a 42 */  "  Loader Door: Loader door is open, please close it", /* 0x2b 43 */  "Undefined", /* 0x2c */  "Undefined", /* 0x2d */  "Undefined", /* 0x2e */  "Undefined", /* 0x2f */  "Undefined", /* 0x30 */  "Undefined", /* 0x31 */  "Undefined", /* 0x32 */  "Undefined", /* 0x33 */  "Undefined", /* 0x34 */  "Undefined", /* 0x35 */  "Undefined", /* 0x36 */  "Undefined", /* 0x37 */  "Undefined", /* 0x38 */  "Undefined", /* 0x39 */  "Undefined", /* 0x3a */  "Undefined", /* 0x3b */  "Undefined", /* 0x3c */  "Undefined", /* 0x3d */  "Undefined", /* 0x3e */  "Undefined", /* 0x3f */  "Undefined" /* 0x40 */};struct tapealert_struct {  int length;  unsigned char *data;};    static struct tapealert_struct *RequestTapeAlert(DEVICE_TYPE fd, RequestSense_T *sense) {  CDB_T CDB;    struct tapealert_struct *result;  int i,tapealert_len,result_idx;    unsigned char buffer[TAPEALERT_SIZE];  unsigned char *walkptr;  slow_bzero(buffer,TAPEALERT_SIZE); /*zero it... */  /* now to create the CDB block: */  CDB[0]=0x4d;   /* Log Sense */  CDB[1]=0;     CDB[2]=0x2e;   /* Tape Alert Page. */  CDB[3]=0;  CDB[4]=0;  CDB[5]=0;  CDB[6]=0;  CDB[7]=TAPEALERT_SIZE>>8 & 0xff;  /* hi byte, allocation size */  CDB[8]=TAPEALERT_SIZE & 0xff;     /* lo byte, allocation size */  CDB[9]=0;  /* reserved */   if (SCSI_ExecuteCommand(fd,Input,&CDB,10,buffer,TAPEALERT_SIZE,sense)!=0){    return NULL;  }  result=xmalloc(sizeof(struct tapealert_struct));  /* okay, we have stuff in the result buffer: the first 4 bytes are a header:   * byte 0 should be 0x2e, byte 1 == 0, bytes 2,3 tell how long the   * tapealert page is.    */  if ((buffer[0]&0x3f) != 0x2e) {    result->data=NULL;    result->length=0;    return result;  }  tapealert_len=(((int)buffer[2])<<8) + buffer[3];    if (!tapealert_len) {    result->length=0;    result->data=NULL;    return result;  }  /* okay, now allocate data and move the buffer over there: */  result->length=MAX_TAPE_ALERT;  result->data=xzmalloc(MAX_TAPE_ALERT); /* alloc & zero. */    walkptr=&buffer[4];  i=0;  while (i<tapealert_len) {        result_idx=(((int)walkptr[0])<<8) + walkptr[1]; /* the parameter #. */    if (result_idx > 0 && result_idx < MAX_TAPE_ALERT) {      if (walkptr[4]) {	result->data[result_idx]=1;       } else {	result->data[result_idx]=0;      }#ifdef DEBUGOLD1      fprintf(stderr,"Alert[0x%x]=%d\n",result_idx,result->data[result_idx]);      fflush(stderr);#endif    } else {      FatalError("Invalid tapealert page: %d\n",result_idx);    }    i=i+4+walkptr[3]; /* length byte! */    walkptr=walkptr+4+walkptr[3]; /* next! */  }  return result;}static void ReportTapeAlert(DEVICE_TYPE fd) {  /* we actually ignore a bad sense reading, like might happen if the    * tape drive does not support the tapealert page.    */    RequestSense_T RequestSense;    struct tapealert_struct *result;  int i;  result=RequestTapeAlert(fd,&RequestSense);  if (!result) return; /* sorry. Don't print sense here. */  if (!result->length) return; /* sorry, no alerts valid. */    for (i=0;i<result->length;i++) {    if (result->data[i]) {      printf("TapeAlert[%d]:%s.\n",i,tapealert_messages[i]);    }  }  free(result->data);  free(result);  return;}static unsigned char*mode_sense(DEVICE_TYPE fd, int pagenum, int alloc_len,  RequestSense_T *RequestSense) {  CDB_T CDB;  unsigned char *input_buffer; /*the input buffer -- has junk prepended to				* actual sense page. 				*/  unsigned char *tmp;  unsigned char *retval;  /* the return value. */  int i,pagelen;  if (alloc_len > 255) {    FatalError("mode_sense(6) can only read up to 255 characters!\n");  }  input_buffer=(unsigned char *)xzmalloc(256); /* overdo it, eh? */  /* clear the sense buffer: */  slow_bzero((char *)RequestSense,sizeof(RequestSense_T));    /* returns an array of bytes in the page, or, if not possible, NULL. */  CDB[0]=0x1a; /* Mode Sense(6) */  CDB[1]=0;   CDB[2]=pagenum; /* the page to read. */  CDB[3]=0;  CDB[4]=255; /* allocation length. This does max of 256 bytes! */  CDB[5]=0;    if (SCSI_ExecuteCommand(fd,Input,&CDB,6,			  input_buffer,255,RequestSense) != 0) {#ifdef DEBUG_MODE_SENSE    fprintf(stderr,"Could not execute mode sense...\n");    fflush(stderr);#endif    return NULL; /* sorry, couldn't do it. */  }  /* Oh hell, write protect is the only thing I have: always print   * it if our mode page was 0x0fh, before skipping past buffer:    * if the media is *NOT* write protected, just skip, sigh.    *   * Oh poops, the blocksize is reported in the block descriptor header<   * too. Again, just print if our mode page was 0x0f...   */  if (pagenum == 0x0f) {    int blocklen;    if (input_buffer[2] & 0x80) {      printf("WriteProtect: yes\n");    }    if (input_buffer[2] & 0x70) {      printf("BufferedMode: yes\n");    }    if (input_buffer[1] ) {      printf("Medium Type: 0x%x\n", input_buffer[1]);    } else {      printf("Medium Type: Not Loaded\n");    }    printf("Density Code: 0x%x\n", input_buffer[4]);    /* Put out the block size: */    blocklen=((int)input_buffer[9]<<16)+      ((int)input_buffer[10]<<8)+      input_buffer[11];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费色视频| 亚洲欧洲三级电影| 亚洲国产精品v| 亚洲成av人**亚洲成av**| 久久电影网电视剧免费观看| 99re热视频这里只精品| 日韩欧美一级二级三级| 亚洲丝袜制服诱惑| 国产精品99久| 欧美va天堂va视频va在线| 亚洲精品久久嫩草网站秘色| 国产精品一区在线观看你懂的| 一本久道久久综合中文字幕| 久久九九国产精品| 美女网站色91| 欧美日韩aaa| 亚洲国产欧美在线人成| 99久久国产综合精品女不卡| 国产日韩精品一区二区浪潮av | 欧美一二三在线| 亚洲精品中文字幕在线观看| 粉嫩高潮美女一区二区三区| 日韩精品一区二区三区四区视频| 天堂资源在线中文精品| 欧美视频一区在线| 亚洲国产精品自拍| 欧美日韩卡一卡二| 一片黄亚洲嫩模| 欧美性高清videossexo| 亚洲毛片av在线| 欧美这里有精品| 亚洲午夜精品在线| 欧美剧情片在线观看| 亚洲.国产.中文慕字在线| 欧美日韩在线亚洲一区蜜芽| 一二三四社区欧美黄| 欧美日韩精品一区二区三区四区| 亚洲精品高清在线| 欧美日本在线一区| 琪琪一区二区三区| 精品久久久久久久久久久久包黑料| 免费观看91视频大全| 日韩欧美国产一区二区三区 | 亚洲综合在线电影| 在线亚洲一区二区| 亚洲成人一区在线| 精品久久人人做人人爰| 国产一区91精品张津瑜| 日本一区二区不卡视频| 91丨九色丨黑人外教| 一区二区三区四区高清精品免费观看| 91亚洲资源网| 日韩国产欧美三级| 久久久久久久网| 色网站国产精品| 日韩国产欧美一区二区三区| 精品国产91乱码一区二区三区 | 日韩一区二区影院| 国产精品一二二区| 亚洲久本草在线中文字幕| 欧美日韩免费观看一区二区三区| 日本亚洲视频在线| 欧美国产日韩在线观看| 在线观看www91| 国内外精品视频| 亚洲免费高清视频在线| 3751色影院一区二区三区| 国产一区激情在线| 一区二区三区日韩在线观看| 欧美一二三区精品| 一本色道久久综合精品竹菊| 麻豆国产精品一区二区三区 | 婷婷久久综合九色综合绿巨人| 精品va天堂亚洲国产| 91在线观看视频| 国产一区二三区好的| 一级做a爱片久久| 国产三级精品三级在线专区| 欧美日韩性生活| 成人涩涩免费视频| 奇米一区二区三区| 亚洲激情五月婷婷| 中文字幕高清一区| 日韩视频国产视频| 91福利在线导航| 国产成人av网站| 秋霞影院一区二区| 亚洲一区av在线| 日韩毛片在线免费观看| 久久久久久毛片| 日韩美女一区二区三区| 在线视频亚洲一区| 99re亚洲国产精品| 国产·精品毛片| 国产精品77777竹菊影视小说| 日本视频在线一区| 亚洲国产一区二区视频| 最新日韩av在线| 日本一区二区三区四区| 亚洲精品在线电影| 欧美大片拔萝卜| 日韩手机在线导航| 欧美日韩一区精品| 欧美日韩一区二区三区不卡| 91香蕉视频在线| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 一区二区三区.www| 日韩理论片网站| 亚洲视频电影在线| 国产日韩精品一区二区三区在线| 精品99一区二区三区| 日韩欧美一二三区| 26uuu国产电影一区二区| 欧美成人一区二区三区| 欧美哺乳videos| 欧美一级二级在线观看| 日韩欧美自拍偷拍| 欧美成人伊人久久综合网| 精品精品国产高清一毛片一天堂| 欧美一级欧美一级在线播放| 911国产精品| 欧美成人a∨高清免费观看| 欧美一二三四区在线| 精品剧情在线观看| 国产人伦精品一区二区| 欧美韩国一区二区| 综合久久综合久久| 一二三四区精品视频| 天天av天天翘天天综合网 | 日韩一二在线观看| 精品处破学生在线二十三| 久久久久国色av免费看影院| 亚洲国产成人一区二区三区| 国产精品国产三级国产专播品爱网| 中文字幕日韩一区| 午夜天堂影视香蕉久久| 九九**精品视频免费播放| 国产成人福利片| 欧美亚洲精品一区| 欧美老年两性高潮| 欧美精品一区二区蜜臀亚洲| 久久九九全国免费| 夜夜亚洲天天久久| 精品一区二区三区免费视频| 成人免费黄色在线| 在线电影一区二区三区| 久久婷婷国产综合精品青草| 中文字幕色av一区二区三区| 亚洲国产精品久久一线不卡| 美女国产一区二区| av一二三不卡影片| 日韩美女主播在线视频一区二区三区| 欧美—级在线免费片| 午夜欧美视频在线观看| 国产成人免费xxxxxxxx| 欧美日韩视频一区二区| 精品国精品国产尤物美女| 国产精品美女一区二区在线观看| 日韩精品久久久久久| 不卡av在线免费观看| 91精品国产全国免费观看| 日韩理论电影院| 国产传媒欧美日韩成人| 欧美日韩1234| 亚洲毛片av在线| 国产成人亚洲综合色影视| 欧美日韩亚洲国产综合| 亚洲欧洲av另类| 黄色日韩网站视频| 欧美日韩www| 亚洲女人****多毛耸耸8| 国产福利91精品一区二区三区| 欧美精品视频www在线观看 | 91小视频免费观看| 久久久精品天堂| 蜜桃av噜噜一区二区三区小说| av中文字幕一区| 国产夜色精品一区二区av| 美女mm1313爽爽久久久蜜臀| 欧美午夜电影网| 一区二区不卡在线视频 午夜欧美不卡在| 国产一区999| 久久久久99精品一区| 国内精品国产成人国产三级粉色| 欧美精品视频www在线观看| 一区二区不卡在线视频 午夜欧美不卡在| 成人免费三级在线| 欧美国产亚洲另类动漫| 国产高清不卡一区| 国产欧美精品国产国产专区| 激情久久五月天| 久久精品日韩一区二区三区| 日本成人在线不卡视频| 欧美日韩中文精品| 亚洲国产精品麻豆| 欧美日韩不卡一区| 青青草91视频| 精品久久国产老人久久综合| 久久99精品久久久久久国产越南 | 3d动漫精品啪啪1区2区免费|