]> git.ipfire.org Git - thirdparty/util-linux.git/commit
chrt: produce better error message for missing priority with implied -r
authorBenno Schulenberg <bensberg@telfort.nl>
Tue, 5 Aug 2025 09:24:40 +0000 (11:24 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Aug 2025 09:20:35 +0000 (11:20 +0200)
commitd15fbc946f73a2b7942d594b3e1cbc2ad89d0554
treeb3455a851410b99d919b7d721137fc3b2c77928e
parentec46779106a2573082b14dfda679471a42dcba97
chrt: produce better error message for missing priority with implied -r

Since commit 4c425142844d, the following two equivalent commands produce
different error messages:

  # chrt -r ls NEWS
  chrt: invalid priority argument: 'ls'
  # chrt ls NEWS
  chrt: unsupported priority value for the policy: 0: see --max for valid range

The latter error message is enigmatic: where did the user specify '0'?

Before the mentioned commit, the second command would produce the same
error message as the first.  Restore that behavior.

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
schedutils/chrt.c