cant remember?
[php-bacula-disk-changer.git] / bin / pbdc-bacula.php
index c86a4bc..bb7804f 100644 (file)
@@ -156,9 +156,9 @@ function list_tapes()
                }
                $tn = "$amloc/".$dn."/pbdc/".$argv[1]."/tapes/$tapename";
                if(file_exists($tn)) {
-                       echo "slot $sn: $tapename\n";
+                       echo "$sn:$tapename\n";
                } else {
-                       echo "slot $sn:\n";
+                       echo "$sn:\n";
                }
        }
        
@@ -178,31 +178,8 @@ function num_slots()
                $mslot = $row[0];
        }
        
-       return $mslot;
-       
-//     $amloc = conf_getVal($changer, "automountdir");
-       
-//     $ret = false;
-//     $i=1;
-//     foreach($res as $row) {
-//             //echo "Listing tapes for disk ".$row["disk_id"].", ".$row["disk_name"]."\n";
-//             //echo "dir: $amloc/".$row["disk_name"]."/pbdc/".$argv[1]."/tapes/\n";
-//             //exit(0);
-//             $dh = opendir("$amloc/".$row["disk_name"]."/pbdc/".$argv[1]."/tapes/");
-//             while(($file = readdir($dh)) !== false) {
-//                     if(ereg("d[0-9]+_vol[0-9]+", $file)!=false) {
-//                             $i++;
-//                     } else {
-//                             //echo "didnt match: $file\n";
-//                     }
-//                     //exit(0);
-//             }
-//             closedir($dh);
-//     }
-//     $i--;
-       
-//     echo "$i\n";
-       
+       echo "$mslot\n";
+       return; 
 }
 
 function listall()