Hello,

If there is any interest of displaying tape library drives in bat
status, please have a look at the dirty but effective patch sent along
with the email :).

Tested with mhvtl tool.

Thx

Jj
--- src/qt-console/storage/content.cpp.ori      2010-09-01 19:59:38.910814456 
+0200
+++ src/qt-console/storage/content.cpp  2010-09-01 23:24:17.403065689 +0200
@@ -183,7 +183,7 @@
    struct tm tm;
 
    QStringList results_all;
-   QString cmd("status slots drive=0 storage=\"" + m_currentStorage + "\"");
+   QString cmd("status mtx drive=0 storage=\"" + m_currentStorage + "\"");
    m_console->dir_cmd(cmd, results_all);
 
    Freeze frz(*tableContent); /* disable updating*/
@@ -192,7 +192,7 @@
 
    tableContent->clearContents();
    tableTray->clearContents();
-   tableTray->clearContents();
+   tableDrive->clearContents();
 
    // take only valid records, TODO: Add D to get drive status
    QStringList results = results_all.filter(QRegExp("^[IS]\\|[0-9]+\\|"));
@@ -276,11 +276,14 @@
 
    tableDrive->verticalHeader()->hide();
    QStringList drives = results_all.filter(QRegExp("^D\\|[0-9]+\\|"));
+   tableDrive->setRowCount(drives.size());
    row = 0;
    foreach (resultline, drives) {
       fieldlist = resultline.split("|");
-      if (fieldlist.size() < 4)
+      if (fieldlist.size() < 4) {
+         Pmsg1(0, "Discarding %s\n", resultline.data());
          continue; /* some fields missing, ignore row */
+      }
 
       int index=0;
       QStringListIterator fld(fieldlist);
--- ./src/dird/ua_status.c.ori  2010-09-01 19:58:27.492064479 +0200
+++ ./src/dird/ua_status.c      2010-09-01 20:44:46.442814740 +0200
@@ -162,7 +162,11 @@
             if (find_arg(ua, NT_("slots")) > 0) {
                status_slots(ua, store);
             } else {
-               do_storage_status(ua, store, NULL);
+               if (find_arg(ua, NT_("mtx")) > 0) {
+                       status_content(ua, store);
+                               } else {
+                    do_storage_status(ua, store, NULL);
+                               }
             }
          }
          return 1;
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to