]> err.no Git - util-linux/commitdiff
Make ionice $command work
authorTollef Fog Heen <tfheen@err.no>
Tue, 22 Feb 2011 15:16:30 +0000 (16:16 +0100)
committerTollef Fog Heen <tfheen@err.no>
Tue, 22 Feb 2011 15:16:30 +0000 (16:16 +0100)
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 <tfheen@err.no>
schedutils/ionice.c

index a57cf7f26729860d5b6bebe4f702c22f7474c45b..fd299b87f6c16cdf2c33fc3d9c64df79e8653360 100644 (file)
@@ -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) {