From 30ef4192e0ee772a763749c22752680fe521710b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 7 Mar 2009 21:28:22 +0000 Subject: [PATCH] When deleting a Volume by MediaId require the Id to be prefixed by a * to avoid confusing with an integer volume name. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8511 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/ua_select.c | 6 +++--- bacula/technotes-2.5 | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c index 749afd4c81..aabc4c51ea 100644 --- a/bacula/src/dird/ua_select.c +++ b/bacula/src/dird/ua_select.c @@ -570,11 +570,11 @@ int select_media_dbr(UAContext *ua, MEDIA_DBR *mr) } mr->PoolId = pr.PoolId; db_list_media_records(ua->jcr, ua->db, mr, prtit, ua, HORZ_LIST); - if (!get_cmd(ua, _("Enter MediaId or Volume name: "))) { + if (!get_cmd(ua, _("Enter *MediaId or Volume name: "))) { return 0; } - if (is_a_number(ua->cmd)) { - mr->MediaId = str_to_int64(ua->cmd); + if (ua->cmd[0] == '*' && is_a_number(ua->cmd+1)) { + mr->MediaId = str_to_int64(ua->cmd+1); } else { bstrncpy(mr->VolumeName, ua->cmd, sizeof(mr->VolumeName)); } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index fc11943e10..4c66186718 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -26,6 +26,9 @@ mixed priorities General: 07Mar09 +kes When deleting a Volume by MediaId require the Id to be + prefixed by a * to avoid confusing with an integer volume + name. kes Prevent bls from printing binary data when a plugin stream encountered. This fixes bug #1238 kes Prepare to add JS_Warnings termination status. -- 2.39.5