--- mtx-1.2.18rel/tapeinfo.c.dce 2001-06-19 23:51:32.000000000 +0200 +++ mtx-1.2.18rel/tapeinfo.c 2004-08-11 10:49:58.409457056 +0200 @@ -435,86 +435,6 @@ 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. @@ -734,7 +654,6 @@ ReportInquiry(fd); ReportSerialNumber(fd); ReportTapeAlert(fd); - /* ReportConfigPage(fd); */ /* ReportPartitionPage(fd); */ ReportBlockLimits(fd); #ifdef HAVE_GET_ID_LUN --- mtx-1.2.18rel/scsitape.c.dce 2002-01-17 19:29:27.000000000 +0100 +++ mtx-1.2.18rel/scsitape.c 2004-08-11 10:51:47.900811840 +0200 @@ -95,42 +95,6 @@ char *argv0; -/* 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 */ -}; - - /* open_device() -- set the 'fh' variable.... */ void open_device(void) {