- /*
- * Hmm retry it if it fails ?
- */
- cnt = 0;
- true = 1;
- while (true)
- {
- if ((errstr = tape_rewind(pDev[DeviceFD].dev)) == NULL)
- {
- true = 0;
- DebugPrint(DEBUG_INFO, SECTION_TAPE,"Rewind OK, (after %d tries)\n", cnt);
- } else {
- DebugPrint(DEBUG_INFO, SECTION_TAPE,"Rewind failed %s\n",errstr);
- /*
- * DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP GenericRewind (-1)\n");
- * return(-1);
- */
- cnt++;
- sleep(1);
- if (cnt > 60)
- {
- DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP GenericRewind (-1), retry limit reached\n");
- return(-1);
- }
- }
- }
+ /* We don't retry if it fails; that is left to the vtape driver. */
+ if ((errstr = tape_rewind(pDev[DeviceFD].dev)) == NULL) {
+ true = 0;
+ DebugPrint(DEBUG_INFO, SECTION_TAPE,"Rewind OK,\n", cnt);
+ } else {
+ DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Rewind failed %s\n",errstr);
+ DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP GenericRewind (-1)\n");
+ amfree(pRequestSense);
+ return(-1);
+ }