From d15aa121fce83be8c9ea3914c00c4f53c450d34a Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 22 Aug 2010 18:34:13 +0200 Subject: [PATCH] Allow limit= for all list sub commands --- bacula/src/dird/ua_output.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bacula/src/dird/ua_output.c b/bacula/src/dird/ua_output.c index 8623677cff..35e8e7a5da 100644 --- a/bacula/src/dird/ua_output.c +++ b/bacula/src/dird/ua_output.c @@ -288,15 +288,16 @@ static int do_list_cmd(UAContext *ua, const char *cmd, e_list_type llist) ua->error_msg(_("Hey! DB is NULL\n")); } + /* Apply any limit */ + j = find_arg_with_value(ua, NT_("limit")); + if (j >= 0) { + jr.limit = atoi(ua->argv[j]); + } + /* Scan arguments looking for things to do */ for (i=1; iargc; i++) { /* List JOBS */ if (strcasecmp(ua->argk[i], NT_("jobs")) == 0) { - /* Apply any limit */ - j = find_arg_with_value(ua, NT_("limit")); - if (j >= 0) { - jr.limit = atoi(ua->argv[j]); - } db_list_job_records(ua->jcr, ua->db, &jr, prtit, ua, llist); /* List JOBTOTALS */ -- 2.39.5