]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/status.c
Merge branch 'master' into readline-bconsole-restore
[bacula/bacula] / bacula / src / stored / status.c
index f91444e4e985d490312634acd3406862df35c0ea..11939fb247c99b873501a2505ac0436c81283488 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2003-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2003-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -42,8 +42,6 @@
 
 /* Imported variables */
 extern BSOCK *filed_chan;
-extern int r_first, r_last;
-extern struct s_res resources[];
 extern void *start_heap;
 
 /* Static variables */
@@ -99,7 +97,7 @@ void output_status(STATUS_PKT *sp)
    list_devices(sp);
 
 
-   len = Mmsg(msg, _("In Use Volume status:\n"));
+   len = Mmsg(msg, _("Used Volume status:\n"));
    if (!sp->api) sendit(msg, len, sp);
 
    list_volumes(sendit, (void *)sp);
@@ -309,11 +307,11 @@ static void send_blocked_status(DEVICE *dev, STATUS_PKT *sp)
    }
    /* Send autochanger slot status */
    if (dev->is_autochanger()) {
-      if (dev->Slot > 0) {
+      if (dev->get_slot() > 0) {
          len = Mmsg(msg, _("    Slot %d is loaded in drive %d.\n"), 
-            dev->Slot, dev->drive_index);
+            dev->get_slot(), dev->drive_index);
          sendit(msg, len, sp);
-      } else if (dev->Slot == 0) {
+      } else if (dev->get_slot() == 0) {
          len = Mmsg(msg, _("    Drive %d is not loaded.\n"), dev->drive_index);
          sendit(msg, len, sp);
       } else {
@@ -402,12 +400,12 @@ static void list_running_jobs(STATUS_PKT *sp)
    foreach_jcr(jcr) {
       if (jcr->JobStatus == JS_WaitFD) {
          len = Mmsg(msg, _("%s Job %s waiting for Client connection.\n"),
-            job_type_to_str(jcr->JobType), jcr->Job);
+            job_type_to_str(jcr->get_JobType()), jcr->Job);
          sendit(msg, len, sp);
       }
       dcr = jcr->dcr;
       rdcr = jcr->read_dcr;
-      if ((dcr && dcr->device) || rdcr && rdcr->device) {
+      if ((dcr && dcr->device) || (rdcr && rdcr->device)) {
          bstrncpy(JobName, jcr->Job, sizeof(JobName));
          /* There are three periods after the Job name */
          char *p;
@@ -419,8 +417,8 @@ static void list_running_jobs(STATUS_PKT *sp)
          if (rdcr && rdcr->device) {
             len = Mmsg(msg, _("Reading: %s %s job %s JobId=%d Volume=\"%s\"\n"
                             "    pool=\"%s\" device=%s\n"),
-                   job_level_to_str(jcr->JobLevel),
-                   job_type_to_str(jcr->JobType),
+                   job_level_to_str(jcr->get_JobLevel()),
+                   job_type_to_str(jcr->get_JobType()),
                    JobName,
                    jcr->JobId,
                    rdcr->VolumeName,
@@ -432,8 +430,8 @@ static void list_running_jobs(STATUS_PKT *sp)
          if (dcr && dcr->device) {
             len = Mmsg(msg, _("Writing: %s %s job %s JobId=%d Volume=\"%s\"\n"
                             "    pool=\"%s\" device=%s\n"),
-                   job_level_to_str(jcr->JobLevel),
-                   job_type_to_str(jcr->JobType),
+                   job_level_to_str(jcr->get_JobLevel()),
+                   job_type_to_str(jcr->get_JobType()),
                    JobName,
                    jcr->JobId,
                    dcr->VolumeName,
@@ -551,6 +549,9 @@ static void list_terminated_jobs(STATUS_PKT *sp)
       case JS_Terminated:
          termstat = _("OK");
          break;
+      case JS_Warnings:
+         termstat = _("OK -- with warnings");
+         break;
       default:
          termstat = _("Other");
          break;