From: Christian Goeschel Ndjomouo Date: Fri, 8 May 2026 17:41:03 +0000 (-0400) Subject: chrt: improve error message for invalid policy value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d02e979c467f8820f8904b1277d84ff1d2e41544;p=thirdparty%2Futil-linux.git chrt: improve error message for invalid policy value Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 2be2ed9ce..710548df0 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -596,8 +596,9 @@ int main(int argc, char **argv) if (ctl->priority < sched_get_priority_min(ctl->policy) || sched_get_priority_max(ctl->policy) < ctl->priority) errx(EXIT_FAILURE, - _("unsupported priority value for the policy: %d: see --max for valid range"), - ctl->priority); + _("unsupported priority value '%d' for the %s policy\n" + "use 'chrt --max' to list valid ranges"), + ctl->priority, get_policy_name(ctl->policy)); set_sched(ctl); if (ctl->verbose)