brand); //error_log("...Sled image type:".$image_info->type); //error_log("...Sled image interface type:".$image_info->interface_type); // // insure that images are only uploaded for installed drive types // // build unqiue array of drive types // error_log("getting all drive types for image upload check ..."); $drives = get_all_drives($user, $sortCriteria); $utypes=array(); foreach($drives as $drive) { if( $drive->interfaceType == "Fibre" ) { error_log("===>drive_>vendor = ". $drive->vendor); error_log("===>drive_>driveType = ". $drive->driveType); error_log("===>drive_>interfaceType = ". $drive->interfaceType); error_log("utypes[$drive->vendor][$drive->driveType] = ". $utypes[$drive->vendor][$drive->driveType] ); $utypes[$drive->vendor][$drive->driveType] = $drive->interfaceType; } } $typeExists=FALSE; if( isset($utypes[$image_info->brand]) ) { error_log("\n Brand matched"); if( isset($utypes[$image_info->brand][$typeMap[$image_info->type]][$ifMap[$image_info->interface_type]]) ) { error_log("\n second key exists"); if( $ifMap[$image_info->interface_type] == "Fibre" ) { error_log("\n third match exists"); $typeExists=TRUE; } } } if( !$typeExists ) { error_log("Did not find a drive for this type of image: DISALLOW."); $status->setErrorCode("4608"); print $status->out_complete(); return; } error_log("Found a drive for this type of image: ALLOW."); $fileName=$image_info->brand."_".$image_info->type."_".$image_info->interface_type.".DRV"; $newLocation=dirLocation.$fileName; error_log("New brick image file name:".$newLocation); if(move_uploaded_file($_FILES['brickUpdate']['tmp_name'],$newLocation)) { error_log("file move successful"); } } else { if (is_null($_FILES['brickUpdate']) ) { error_log("The file is too big, brickUpdate is NULL"); $status->setErrorCode("4109"); } else { switch ($HTTP_POST_FILES['brickUpdate']['error']) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form error_log("The file you are trying to upload is too big."); $status->setErrorCode("4109"); break; case 3: //uploaded file was only partially uploaded error_log("The file you are trying upload was only partially uploaded."); $status->setErrorCode("4110"); break; case 4: //no file was uploaded error_log("You must select an image for upload."); $status->setErrorCode("4111"); break; default: error_log("There was a problem with your upload."); $status->setErrorCode("4108"); break; } } } } else if( $operation == "remove" ) { error_log("Removing drive brick firmware files"); $removeFiles=$_POST['removeList']; error_log("remove files:".$removeFiles); $removeList=explode(":",$removeFiles); foreach($removeList as $file) { error_log("file: ".$file); error_log("path: ".dirLocation); $removePath=dirLocation.$file; error_log("Removing file: ".$removePath); @unlink($removePath); } error_log("Removing done"); } else { error_log("Unknown operation type!"); } print $status->out_complete(); return; } ?> Tape Drive Firmware Auto Level
Upload Tape Drive Images
Tape Drive Images may only be uploaded for the below installed drive types.

 Vendor   Type   Interface Type 

Send this tape drive firmware file: