diff --git a/mediachanger/castorrmc/h/smc_struct.h b/mediachanger/castorrmc/h/smc_struct.h index 661b93f059fbac6addfabc26b8b4690d55e1c78d..4d518908a0734e2a175a2a827fd2e92742e25117 100644 --- a/mediachanger/castorrmc/h/smc_struct.h +++ b/mediachanger/castorrmc/h/smc_struct.h @@ -22,7 +22,6 @@ struct robot_info { struct extended_robot_info { int smc_fd; char smc_ldr[CA_MAXRBTNAMELEN+1]; - int smc_support_voltag; struct robot_info robot_info; }; diff --git a/mediachanger/castorrmc/rmc/rmc_procreq.c b/mediachanger/castorrmc/rmc/rmc_procreq.c index bd835e21d57b26ef77f249fb7ca79ad5f8c07d36..46da40333d8e74f188ccf2065eb28f918999bc8c 100644 --- a/mediachanger/castorrmc/rmc/rmc_procreq.c +++ b/mediachanger/castorrmc/rmc/rmc_procreq.c @@ -123,14 +123,9 @@ int rmc_srv_findcart(const struct rmc_srv_rqst_context *const rqst_context) { rmc_logit (func, "returns %d\n", ERMCUNREC); return ERMCUNREC; } - if (extended_robot_info.smc_support_voltag) - c = smc_find_cartridge (extended_robot_info.smc_fd, - extended_robot_info.smc_ldr, template, type, startaddr, - nbelem, element_info); - else - c = smc_find_cartridgeWithoutSendVolumeTag (extended_robot_info.smc_fd, - extended_robot_info.smc_ldr, template, type, startaddr, - nbelem, element_info); + c = smc_find_cartridge (extended_robot_info.smc_fd, + extended_robot_info.smc_ldr, template, type, startaddr, + nbelem, element_info); if (c < 0) { c = smc_lasterror (&smc_status, &msgaddr); free (element_info); diff --git a/mediachanger/castorrmc/rmc/rmc_serv.c b/mediachanger/castorrmc/rmc/rmc_serv.c index 4d5ac3b8262bedab41364411040a188d4511ba5f..01c7e5bdb47085bfd89fc0e46454722897209603 100644 --- a/mediachanger/castorrmc/rmc/rmc_serv.c +++ b/mediachanger/castorrmc/rmc/rmc_serv.c @@ -51,17 +51,13 @@ struct extended_robot_info extended_robot_info; int rmc_main(const char *const robot) { int c; - unsigned char cdb[12]; char domainname[CA_MAXHOSTNAMELEN+1]; struct sockaddr_in from; socklen_t fromlen = sizeof(from); const char *msgaddr; - int nb_sense_ret; int on = 1; /* for REUSEADDR */ - char plist[40]; fd_set readfd, readmask; int s; - char sense[MAXSENSE]; struct sockaddr_in sin; struct smc_status smc_status; struct timeval timeval; @@ -125,27 +121,6 @@ int rmc_main(const char *const robot) } } - /* check if robot support Volume Tag */ - - extended_robot_info.smc_support_voltag = 1; - memset (cdb, 0, sizeof(cdb)); - cdb[0] = 0xB6; /* send volume tag */ - cdb[5] = 5; - cdb[9] = 40; - memset (plist, 0, sizeof(plist)); - strcpy (plist, "DUMMY0"); - c = rmc_send_scsi_cmd (extended_robot_info.smc_fd, - extended_robot_info.smc_ldr, 0, cdb, 12, (unsigned char*)plist, 40, - sense, 38, SCSI_OUT, &nb_sense_ret, &msgaddr); - if (c < 0) { - if (c == -4 && nb_sense_ret >= 14 && (sense[2] & 0xF) == 5 && - sense[12] == 0x20) { - extended_robot_info.smc_support_voltag = 0; - } else { - rmc_logit (func, RMC02, "find_cartridge", msgaddr); - exit (SYERR); - } - } FD_ZERO (&readmask); FD_ZERO (&readfd); signal (SIGPIPE, SIG_IGN); diff --git a/mediachanger/castorrmc/rmc/rmc_smcsubr.c b/mediachanger/castorrmc/rmc/rmc_smcsubr.c index 18d98ceba42b5becb51b929c4c61464e2d23e73d..91e4a444442a0a71034abe2ba12a7e9c0bbd8b94 100644 --- a/mediachanger/castorrmc/rmc/rmc_smcsubr.c +++ b/mediachanger/castorrmc/rmc/rmc_smcsubr.c @@ -441,8 +441,7 @@ int smc_find_cartridge( strncpy(func, "findWithVT", sizeof(func)); func[sizeof(func) - 1] = '\0'; - /* for Spectra like library we will skip 0xB6 cdb command as soon as - is does not supported to speed up the function */ + /* Skip the 0xB6 cdb command if the tape library is Spectra like */ smcLibraryType = getconfent("SMC","LIBRARY_TYPE",0); if (NULL != smcLibraryType && 0 == strcasecmp(smcLibraryType,"SPECTRA")) {