]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_update.c
Ignore unknown dot commands in restore tree code
[bacula/bacula] / bacula / src / dird / ua_update.c
index 5fd7619cf20bbd6798d8d9b0422c930f315cbcb6..107079f88b991dae6cf37e154fd9902ff8632a68 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -64,8 +64,9 @@ int update_cmd(UAContext *ua, const char *cmd)
       NT_("volume"), /* 1 */
       NT_("pool"),   /* 2 */
       NT_("slots"),  /* 3 */
-      NT_("jobid"),  /* 4 */
-      NT_("stats"),  /* 5 */
+      NT_("slot"),   /* 4 */
+      NT_("jobid"),  /* 5 */
+      NT_("stats"),  /* 6 */
       NULL};
 
    if (!open_client_db(ua)) {
@@ -81,12 +82,13 @@ int update_cmd(UAContext *ua, const char *cmd)
       update_pool(ua);
       return 1;
    case 3:
+   case 4:
       update_slots(ua);
       return 1;
-   case 4:
+   case 5:
       update_job(ua);
       return 1;
-   case 5:
+   case 6:
       update_stats(ua);
       return 1;
    default:
@@ -344,7 +346,8 @@ void update_vol_recyclepool(UAContext *ua, char *val, MEDIA_DBR *mr)
 {
    POOL_DBR pr;
    POOL_MEM query(PM_MESSAGE);
-   char ed1[50], ed2[50], *poolname;
+   char ed1[50], ed2[50];
+   const char *poolname;
 
    if(val && *val) { /* update volume recyclepool="Scratch" */
      /* If a pool name is given, look up the PoolId */
@@ -485,7 +488,7 @@ static void update_vol_actiononpurge(UAContext *ua, char *val, MEDIA_DBR *mr)
       ua->error_msg(_("Error updating media record ActionOnPurge: ERR=%s"),
                     db_strerror(ua->db));
    } else {
-      ua->info_msg(_("New ActionOnPurge is: %d\n"), 
+      ua->info_msg(_("New ActionOnPurge is: %s\n"), 
                    aop_to_str(mr->ActionOnPurge, ret));
    }
 }
@@ -585,9 +588,9 @@ static int update_volume(UAContext *ua)
          case 13:
             update_vol_recyclepool(ua, ua->argv[j], &mr);
             break;
-        case 14:
-           update_vol_actiononpurge(ua, ua->argv[j], &mr);
-           break;
+         case 14:
+            update_vol_actiononpurge(ua, ua->argv[j], &mr);
+            break;
          }
          done = true;
       }
@@ -816,14 +819,14 @@ static int update_volume(UAContext *ua)
 
       case 16:
          pm_strcpy(ret, "");
-        ua->info_msg(_("Current ActionOnPurge is: %s\n"), 
+         ua->info_msg(_("Current ActionOnPurge is: %s\n"), 
                       aop_to_str(mr.ActionOnPurge, ret));
-        if (!get_cmd(ua, _("Enter new ActionOnPurge: (one of: Truncate, None) "))) {
+         if (!get_cmd(ua, _("Enter new ActionOnPurge (one of: Truncate, None): "))) {
             return 0;
-        }
+         }
 
          update_vol_actiononpurge(ua, ua->cmd, &mr);
-        break;
+         break;
 
       default:                        /* Done or error */
          ua->info_msg(_("Selection terminated.\n"));