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-5.2.1~1131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d15aa121fce83be8c9ea3914c00c4f53c450d34a;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 */