From: Tollef Fog Heen Date: Tue, 22 Feb 2011 15:16:30 +0000 (+0100) Subject: Make ionice $command work X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddea327767d9280debfb5ae6671939d691040d2d;p=util-linux Make ionice $command work ionice $command would previously report: ionice: cannot parse number '$command' This has been fixed so that it now tries to run the command under the default I/O priority as per the man page. Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563904 Signed-off-by: Tollef Fog Heen --- diff --git a/schedutils/ionice.c b/schedutils/ionice.c index a57cf7f2..fd299b87 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -163,7 +163,7 @@ int main(int argc, char *argv[]) errx(EXIT_FAILURE, _("bad prio class %d"), ioclass); } - if (!set) { + if (!set && pid) { ioprio_print(pid); for(; argv[optind]; ++optind) {