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

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

?? tapeinfo.c

?? 通用SCSI設備備份/讀寫程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
    printf("BlockSize: %d\n", blocklen);    /* This doesn't seem to do anything useful on my Tandberg so I     * am taking it out -- elg     */     /* Put out the # Blocks */    /* blocklen=((int)input_buffer[5]<<16)+ */    /*      ((int)input_buffer[6]<<8)+ */    /*      input_buffer[7]; */    /* printf("Num Blocks:  %d\n", blocklen); */  }  /* First skip past any header.... */  tmp=input_buffer+4+input_buffer[3];  /* now find out real length of page... */  pagelen=tmp[1]+2;  retval=xmalloc(pagelen);  /* and copy our data to the new page. */  for (i=0;i<pagelen;i++) {    retval[i]=tmp[i];  }  /* okay, free our input buffer: */  free(input_buffer);  return retval;}#define DCE_MASK 0x80#define DCC_MASK 0x40#define DDE_MASK 0x80static void ReportCompressionPage(DEVICE_TYPE fd) {  /* actually ignore a bad sense reading, like might happen if the tape   * drive does not support the mode sense compression page.    */  RequestSense_T RequestSense;  unsigned char *compression_page;  compression_page=mode_sense(fd,0x0f,16,&RequestSense);  if (!compression_page) {    return;  /* sorry! */  }  /* Okay, we now have the compression page. Now print stuff from it: */  printf("DataCompEnabled: %s\n", (compression_page[2]&DCE_MASK)? "yes" : "no");  printf("DataCompCapable: %s\n", (compression_page[2]&DCC_MASK)? "yes" : "no");  printf("DataDeCompEnabled: %s\n", (compression_page[3]&DDE_MASK)? "yes" : "no");  printf("CompType: 0x%x\n",	 (compression_page[4]<<24)+(compression_page[5]<<16)+(compression_page[6]<<8)+compression_page[7]);  printf("DeCompType: 0x%x\n",	(compression_page[8]<<24)+ (compression_page[9]<<16)+(compression_page[10]<<8)+compression_page[11]);  free(compression_page);  return;}  /* Now for the device configuration mode page: */static void ReportConfigPage(DEVICE_TYPE fd) {  RequestSense_T RequestSense;  unsigned char *config_page;    config_page=mode_sense(fd,0x10,16,&RequestSense);  if (!config_page) return;  /* Now to print the stuff: */  printf("ActivePartition: %d\n",config_page[3]);  /* The following does NOT work accurately on any tape drive I know of... */  /*  printf("DevConfigComp: %s\n", config_page[14] ? "yes" : "no"); */  printf("EarlyWarningSize: %d\n",	 (config_page[11]<<16)+(config_page[12]<<8)+config_page[13]);  return;}/* *************************************** * Medium Partition Page: *  * The problem here, as we oh so graphically demonstrated during debugging * of the Linux 'st' driver :-), is that there are actually *TWO* formats for * the Medium Partition Page: There is the "long" format, where there is a * partition size word for each partition on the page, and there is a "short" * format, beloved of DAT drives, which only has a partition size word for * partition #1 (and no partition size word for partition #0, and no * provisions for any more partitions). So we must look at the size and * # of partitions defined to know what to report as what.  * ********************************************/static void ReportPartitionPage(DEVICE_TYPE fd) {  RequestSense_T RequestSense;  unsigned char *partition_page;  int num_parts,max_parts;  int i;  partition_page=mode_sense(fd,0x11,255,&RequestSense);  if (!partition_page) return;  /* Okay, now we have either old format or new format: */  num_parts=partition_page[3];  max_parts=partition_page[2];  printf("NumPartitions:%d\n",num_parts);  printf("MaxPartitions:%d\n",max_parts);  if (!num_parts) {  /* if no additional partitions, then ... */     free(partition_page);    return;  }    /* we know we have at least one partition if we got here. Check the   * page size field. If it is 8 or below, then we are the old format....   */#ifdef DEBUG_PARTITION  fprintf(stderr,"partition_page[1]=%d\n",partition_page[1]);  fflush(stderr);#endif  if (partition_page[1]==8) {    /* old-style! */    printf("Partition1:%d\n",(partition_page[8]<<8)+partition_page[9]);  } else {    /* new-style! */    for (i=0;i<=max_parts;i++) {#ifdef DEBUG_PARTITION          fprintf(stderr,"partition%d:[%d]%d [%d]%d\n",i,8+i*2,	      partition_page[8+i*2]<<8, 9+i*2,partition_page[9+i*2]);      fflush(stderr);#endif      printf("Partition%d:%d\n",i,	     (partition_page[8+i*2]<<8)+partition_page[9+i*2]);    }  }  free(partition_page);  return;}static void ReportSerialNumber(DEVICE_TYPE fd) {  /* actually ignore a bad sense reading, like might happen if the     tape drive does not support the inquiry page 0x80.   */  RequestSense_T sense;  CDB_T CDB;#define WILD_SER_SIZE 30  unsigned char buffer[WILD_SER_SIZE]; /* just wildly overestimate serial# length! */  int i,lim;  char *bufptr;     CDB[0]=0x12;  /* INQUIRY */  CDB[1]= 1;     /* EVPD = 1 */  CDB[2]=0x80;   /* The serial # page, hopefully. */  CDB[3]=0  ; /* reserved */  CDB[4]=WILD_SER_SIZE;  CDB[5]=0;  if (SCSI_ExecuteCommand(fd, Input, &CDB, 6,			  &buffer, sizeof(buffer), &sense) != 0)  {    /* PrintRequestSense(&sense); */ /* zap debugging output :-) */    /* printf("No Serial Number: None\n"); */    return;   }    /* okay, we have something in our buffer. Byte 3 should be the length of     the sernum field, and bytes 4 onward are the serial #. */    lim=(int)buffer[3];  bufptr= &(buffer[4]);    printf("SerialNumber: '");  for (i=0;i<lim;i++) {    putchar(*bufptr++);  }  printf("'\n");  return ; /* done! */}    /*  Read Block Limits! */void ReportBlockLimits(DEVICE_TYPE fd) {  RequestSense_T sense;  CDB_T CDB;  unsigned char buffer[6];  CDB[0]=0x05;  /* READ_BLOCK_LIMITS */  CDB[1]=0;  CDB[2]=0;  CDB[3]=0;  /* 1-5 all unused. */  CDB[4]=0;  CDB[5]=0;   slow_bzero((unsigned char *)&sense,sizeof(RequestSense_T));  if (SCSI_ExecuteCommand(fd,Input,&CDB,6,buffer,6,&sense)!=0){    return;  }    /* okay, but if we did get a result, print it: */  printf("MinBlock:%d\n",	 (buffer[4]<<8)+buffer[5]);  printf("MaxBlock:%d\n",	 (buffer[1]<<16)+(buffer[2]<<8)+buffer[3]);  return;}  /* Do a READ_POSITION. This may not be always valid, but (shrug). */void ReadPosition(DEVICE_TYPE fd) {  RequestSense_T sense;  CDB_T CDB;  unsigned char buffer[20];  unsigned int position;  CDB[0]=0x34;  /* READ_POSITION */  CDB[1]=0;  CDB[2]=0;  CDB[3]=0;  /* 1-9 all unused. */  CDB[4]=0;  CDB[5]=0;   CDB[6]=0;  CDB[7]=0;  CDB[8]=0;  CDB[9]=0;  slow_bzero((unsigned char *)&sense,sizeof(RequestSense_T));  /* set the timeout: */  SCSI_Set_Timeout(2); /* set timeout to 2 seconds! */  /* if we don't get a result (e.g. we issue this to a disk drive), punt. */  if (SCSI_ExecuteCommand(fd,Input,&CDB,10,buffer,20,&sense)!=0){    return;  }    SCSI_Default_Timeout(); /* reset it to 5 minutes, sigh! */  /* okay, but if we did get a result, print it: */#define RBL_BOP 0x80#define RBL_EOP 0x40#define RBL_BCU 0x20#define RBL_BYCU  0x10#define RBL_R1 0x08#define RBL_BPU 0x04#define RBL_PERR 0x02  /* If we have BOP, go ahead and print that. */  if (buffer[0]&RBL_BOP) {    printf("BOP: yes\n");  }  /* if we have valid data, print it: */  if (buffer[0]&RBL_BPU) {    printf("Block Position: -1");  } else {        position= (unsigned int) (((unsigned int)buffer[4]<<24) +			      ((unsigned int)buffer[5]<<16) + 			      ((unsigned int)buffer[6]<<8) + buffer[7]);    printf("Block Position: %d\n",position);  }  return;}/* Test unit ready: This will tell us whether the tape drive * is currently ready to read or write. */int TestUnitReady(DEVICE_TYPE fd) {  RequestSense_T sense;  CDB_T CDB;  unsigned char buffer[6];  CDB[0]=0x00;  /* TEST_UNIT_READY */  CDB[1]=0;  CDB[2]=0;  CDB[3]=0;  /* 1-5 all unused. */  CDB[4]=0;  CDB[5]=0;   slow_bzero((unsigned char *)&sense,sizeof(RequestSense_T));  if (SCSI_ExecuteCommand(fd,Input,&CDB,6,buffer,0,&sense)!=0){    printf("Ready: no\n");    return 0;  }    printf("Ready: yes\n");  return 1;}/* We write a filemarks of 0 before going to grab position, in order * to insure that data in the buffer is not a problem.  */int WriteFileMarks(DEVICE_TYPE fd,int count) {  RequestSense_T sense;  CDB_T CDB;  unsigned char buffer[6];  CDB[0]=0x10;  /* WRITE_FILE_MARKS */  CDB[1]=0;  CDB[2]=(count >> 16) & 0xff;  CDB[3]=(count >>8) & 0xff;  CDB[4]=count & 0xff;  CDB[5]=0;   /* we really don't care if this command works or not, sigh.  */  slow_bzero((unsigned char *)&sense,sizeof(RequestSense_T));  if (SCSI_ExecuteCommand(fd,Input,&CDB,6,buffer,0,&sense)!=0){    return 1;  }  return 0;}/* This will get the SCSI ID and LUN of the target device, if such * is available from the OS. Currently only Linux supports this, * but other drivers could, if someone wants to write a  * SCSI_GetIDLun function for them.  */#ifdef HAVE_GET_ID_LUNstatic void ReportIDLun(DEVICE_TYPE fd) {  scsi_id_t *scsi_id;  scsi_id=SCSI_GetIDLun(fd);  printf("SCSI ID: %d\nSCSI LUN: %d\n",scsi_id->id,scsi_id->lun);}#endif/* we only have one argument: "-f <device>". */int main(int argc, char **argv) {  DEVICE_TYPE fd;  char *filename;  argv0=argv[0];    if (argc != 3) {    fprintf(stderr,"argc=%d",argc);    usage();  }  if (strcmp(argv[1],"-f")!=0) {    usage();  }  filename=argv[2];    fd=SCSI_OpenDevice(filename);    /* Now to call the various routines: */  ReportInquiry(fd);  ReportSerialNumber(fd);  ReportTapeAlert(fd);  /* ReportConfigPage(fd);  */  /* ReportPartitionPage(fd); */  ReportBlockLimits(fd); #ifdef HAVE_GET_ID_LUN  ReportIDLun(fd);#endif  /* okay, we should only report position if the unit is ready :-(. */  if (TestUnitReady(fd)) {    ReportCompressionPage(fd);     ReadPosition(fd);   }  exit(0);}      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美在线综合网| 国产mv日韩mv欧美| 91麻豆精品国产91久久久资源速度| 亚洲精品免费在线| 欧美影院精品一区| 蜜臀国产一区二区三区在线播放 | 亚洲国产精品一区二区久久恐怖片| 91麻豆国产在线观看| 夜夜夜精品看看| 日韩欧美久久一区| 成人一道本在线| 亚洲在线免费播放| 日韩你懂的电影在线观看| 国产乱子伦视频一区二区三区| 国产精品传媒在线| 欧美午夜不卡视频| 激情文学综合网| 亚洲乱码国产乱码精品精的特点| 欧美日韩www| 国产精品自在欧美一区| 中文字幕在线不卡一区二区三区| 欧美日韩美少妇| 国产黄色91视频| 午夜精品福利久久久| 国产三级欧美三级日产三级99| 色婷婷香蕉在线一区二区| 日韩**一区毛片| 国产精品乱子久久久久| 欧美高清一级片在线| 国产不卡在线一区| 午夜精品久久久久久久99樱桃| 亚洲精品一区二区三区精华液 | 狠狠色狠狠色综合| 国产精品久久久久久久裸模| 欧美日韩国产大片| 国产乱对白刺激视频不卡| 亚洲午夜激情av| 国产精品免费观看视频| 欧美丰满美乳xxx高潮www| 97久久超碰精品国产| 久久精品国产秦先生| 亚洲精品视频观看| 久久免费国产精品| 日韩一区二区免费电影| 91视频免费看| 国产精华液一区二区三区| 奇米影视在线99精品| 一区二区在线观看不卡| 日本一区二区电影| 日韩欧美在线一区二区三区| 欧美视频日韩视频在线观看| 成人在线一区二区三区| 久久成人羞羞网站| 香蕉乱码成人久久天堂爱免费| 国产精品青草久久| 国产日韩欧美制服另类| 精品国产一区二区三区不卡 | 亚洲综合一区二区三区| 国产精品久久久久久亚洲毛片| 久久影视一区二区| 日韩欧美一区二区视频| 欧美丰满美乳xxx高潮www| 精品视频1区2区| 欧美色视频一区| 欧洲亚洲国产日韩| 91丝袜呻吟高潮美腿白嫩在线观看| 国产一区二区在线电影| 精品一区二区国语对白| 紧缚捆绑精品一区二区| 九九精品视频在线看| 久久成人久久爱| 激情久久五月天| 激情综合一区二区三区| 精品写真视频在线观看 | 亚洲自拍另类综合| 亚洲免费在线观看视频| 亚洲欧美日韩系列| 亚洲综合999| 亚洲va欧美va天堂v国产综合| 亚洲大片免费看| 日韩中文字幕麻豆| 毛片av一区二区| 国产又粗又猛又爽又黄91精品| 国产一区在线不卡| 高清视频一区二区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美日韩视频不卡| 欧美日韩国产天堂| 6080亚洲精品一区二区| 日韩一区二区三区高清免费看看| 欧美一区二区国产| 国产亚洲欧美中文| 最新国产の精品合集bt伙计| 亚洲欧美一区二区视频| 亚洲精品日韩一| 美日韩一级片在线观看| 黑人巨大精品欧美一区| 成人av电影免费观看| 欧美高清视频不卡网| 欧美一区二区视频观看视频| 欧美va亚洲va| 亚洲欧洲日产国码二区| 亚洲最色的网站| 美女脱光内衣内裤视频久久影院| 国产在线不卡一卡二卡三卡四卡| 国产91综合一区在线观看| 色爱区综合激月婷婷| 日韩欧美一级在线播放| 国产精品久久久久久久久搜平片| 亚洲精品老司机| 日韩不卡手机在线v区| 国产精品一区二区三区四区| 色噜噜久久综合| 欧美成人福利视频| 亚洲三级小视频| 久久99热狠狠色一区二区| 91猫先生在线| 久久美女艺术照精彩视频福利播放| 亚洲日本中文字幕区| 久久99热这里只有精品| 一本到高清视频免费精品| 日韩欧美视频在线| 一区二区三区四区乱视频| 国产自产v一区二区三区c| 91蜜桃婷婷狠狠久久综合9色| 日韩欧美激情四射| 伊人色综合久久天天| 风间由美一区二区三区在线观看| 7878成人国产在线观看| 综合亚洲深深色噜噜狠狠网站| 蓝色福利精品导航| 欧美三级蜜桃2在线观看| 国产日韩亚洲欧美综合| 欧美aⅴ一区二区三区视频| 91九色02白丝porn| 国产亚洲精品aa午夜观看| 日韩1区2区3区| 欧美影院一区二区三区| 国产精品乱人伦一区二区| 精品一区二区三区在线观看| 欧美日韩在线三区| 日韩久久一区二区| 国产成人免费视频| 欧美zozo另类异族| 亚洲成人1区2区| 色婷婷久久综合| 最近日韩中文字幕| 成人h版在线观看| 久久久精品影视| 国产一区美女在线| 日韩免费视频一区| 亚瑟在线精品视频| 在线观看视频一区| 一个色在线综合| 91一区二区在线观看| 国产精品麻豆久久久| 国模大尺度一区二区三区| 日韩丝袜美女视频| 人人狠狠综合久久亚洲| 欧美视频一区二区在线观看| 一区二区三区四区五区视频在线观看| 处破女av一区二区| 欧美国产禁国产网站cc| 成人一级片网址| 中文字幕一区在线观看视频| thepron国产精品| 一色桃子久久精品亚洲| 91免费视频观看| 悠悠色在线精品| 欧美日韩国产高清一区二区| 日日夜夜免费精品视频| 宅男在线国产精品| 九九精品一区二区| 国产片一区二区三区| voyeur盗摄精品| 一区二区三区四区在线播放| 欧美日韩精品一二三区| 肉丝袜脚交视频一区二区| 日韩欧美一区电影| 国产成a人无v码亚洲福利| ...av二区三区久久精品| 色综合激情久久| 亚洲va韩国va欧美va| 欧美一三区三区四区免费在线看| 久久精品噜噜噜成人88aⅴ| 久久久久久久综合狠狠综合| www.视频一区| 亚洲男帅同性gay1069| 欧美乱熟臀69xxxxxx| 久久精品国产99国产| 中文字幕第一区| 91麻豆免费看片| 蜜桃一区二区三区在线观看| 久久久不卡网国产精品一区| 成人黄色电影在线| 亚洲福利视频导航| 精品久久久久久最新网址| www.在线欧美| 蜜臀av一区二区三区| 国产午夜久久久久|