From: Eric Bollengier Date: Sun, 22 Aug 2010 16:34:13 +0000 (+0200) Subject: Allow limit= for all list sub commands X-Git-Tag: Release-7.0.0~1596 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fb2d84a522a89cebe75c8af743c101ee71d6a723;p=bacula%2Fbacula Allow limit= for all list sub commands --- 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 */