]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/status.c
new devel_bacula + fixes to conio/console
[bacula/bacula] / bacula / src / filed / status.c
index 9c4aa0deffa385e0062a5ac40128291cd740a6c6..4207bb1157df197f83e841780ca05b8832bc4583 100755 (executable)
@@ -59,8 +59,7 @@ static void do_status(void sendit(char *msg, int len, void *sarg), void *arg)
    len = Mmsg(&msg, "%s Version: " VERSION " (" BDATE ") %s %s %s\n", my_name,
              HOST_OS, DISTNAME, DISTVER);
    sendit(msg, len, arg);
-   bstrftime(dt, sizeof(dt), daemon_start_time);
-   strcpy(dt+7, dt+9);               /* cut century */
+   bstrftime_nc(dt, sizeof(dt), daemon_start_time);
    len = Mmsg(&msg, _("Daemon started %s, %d Job%s run.\n"), dt, last_job.NumJobs,
         last_job.NumJobs == 1 ? "" : "s");
    sendit(msg, len, arg);
@@ -89,8 +88,7 @@ static void do_status(void sendit(char *msg, int len, void *sarg), void *arg)
       struct s_last_job *je;
       lock_last_jobs_list();
       for (je=NULL; (je=(s_last_job *)last_jobs->next(je)); ) {
-        bstrftime(dt, sizeof(dt), je->end_time);
-        strcpy(dt+7, dt+9);            /* cut century */
+        bstrftime_nc(dt, sizeof(dt), je->end_time);
          len = Mmsg(&msg, _("Last Job %s finished at %s\n"), je->Job, dt);
         sendit(msg, len, arg);
 
@@ -110,8 +108,7 @@ static void do_status(void sendit(char *msg, int len, void *sarg), void *arg)
    Dmsg0(200, "Begin status jcr loop.\n");
    lock_jcr_chain();
    for (njcr=NULL; (njcr=get_next_jcr(njcr)); ) {
-      bstrftime(dt, sizeof(dt), njcr->start_time);
-      strcpy(dt+7, dt+9);            /* cut century */
+      bstrftime_nc(dt, sizeof(dt), njcr->start_time);
       if (njcr->JobId == 0) {
          len = Mmsg(&msg, _("Director connected at: %s\n"), dt);
       } else {
@@ -181,17 +178,16 @@ static void list_terminated_jobs(void *arg)
    lock_last_jobs_list();
    msg =  _("\nTerminated Jobs:\n"); 
    sendit(msg, strlen(msg), arg);
-   msg =  _(" JobId  Level   Files        Bytes Status   Finished        Name \n");
+   msg =  _(" JobId  Level   Files          Bytes Status   Finished        Name \n");
    sendit(msg, strlen(msg), arg);
-   msg = _("====================================================================\n"); 
+   msg = _("======================================================================\n"); 
    sendit(msg, strlen(msg), arg);
    for (je=NULL; (je=(s_last_job *)last_jobs->next(je)); ) {
       char JobName[MAX_NAME_LENGTH];
       char *termstat;
       char buf[1000];
 
-      bstrftime(dt, sizeof(dt), je->end_time);
-      strcpy(dt+7, dt+9);     /* cut century */
+      bstrftime_nc(dt, sizeof(dt), je->end_time);
       switch (je->JobType) {
       case JT_ADMIN:
       case JT_RESTORE:
@@ -231,7 +227,7 @@ static void list_terminated_jobs(void *arg)
            *p = 0;
         }
       }
-      bsnprintf(buf, sizeof(buf), _("%6d  %-4s %8s %12s %-7s  %-8s %s\n"), 
+      bsnprintf(buf, sizeof(buf), _("%6d  %-4s %8s %14s %-7s  %-8s %s\n"), 
         je->JobId,
         level, 
         edit_uint64_with_commas(je->JobFiles, b1),