bacula/bacula-5.2.11-fix-estimate.patch

31 lines
1.0 KiB
Diff
Raw Normal View History

2012-09-13 07:58:24 +00:00
From 78e58ff112266e983d099be37a6ec73dfd4e5a21 Mon Sep 17 00:00:00 2001
From: Eric Bollengier <eric@baculasystems.com>
Date: Thu, 13 Sep 2012 06:49:44 +0000
Subject: Fix accurate option in the estimate command
---
diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c
index 603990e..d42bc7f 100644
--- a/bacula/src/dird/ua_cmds.c
+++ b/bacula/src/dird/ua_cmds.c
@@ -1144,9 +1144,14 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
}
}
if (strcasecmp(ua->argk[i], NT_("accurate")) == 0) {
- if (!is_yesno(ua->argv[i], &accurate)) {
- ua->error_msg(_("Invalid value for accurate. "
- "It must be yes or no.\n"));
+ if (ua->argv[i]) {
+ if (!is_yesno(ua->argv[i], &accurate)) {
+ ua->error_msg(_("Invalid value for accurate. "
+ "It must be yes or no.\n"));
+ }
+ continue;
+ } else {
+ ua->error_msg(_("Accurate value missing.\n"));
}
}
}
--
cgit v0.8.3.4