]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_cmds.c
Fix typo
[bacula/bacula] / bacula / src / dird / ua_cmds.c
index ac4b89fc77bf5550e5c0fa5f66339499400ed210..b5650d868621733d30cdce06fc87ae52f90ce6b5 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 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.
@@ -155,7 +155,7 @@ bool do_a_command(UAContext *ua)
    BSOCK *user = ua->UA_sock;
 
 
-   Dmsg1(900, "Command: %s\n", ua->UA_sock->msg);
+   Dmsg1(900, "Command: %s\n", ua->argk[0]);
    if (ua->argc == 0) {
       return false;
    }
@@ -1411,10 +1411,14 @@ static int delete_volume(UAContext *ua)
       "and all Jobs saved on that volume from the Catalog\n"),
       mr.VolumeName);
 
-   bsnprintf(buf, sizeof(buf), _("Are you sure you want to delete Volume \"%s\"? (yes/no): "),
-      mr.VolumeName);
-   if (!get_yesno(ua, buf)) {
-      return 1;
+   if (find_arg(ua, "yes") >= 0) {
+      ua->pint32_val = 1; /* Have "yes" on command line already" */
+   } else {
+      bsnprintf(buf, sizeof(buf), _("Are you sure you want to delete Volume \"%s\"? (yes/no): "),
+         mr.VolumeName);
+      if (!get_yesno(ua, buf)) {
+         return 1;
+      }
    }
    if (ua->pint32_val) {
       db_delete_media_record(ua->jcr, ua->db, &mr);