]> git.ipfire.org Git - thirdparty/util-linux.git/commit
ionice: fix -p
authorKarel Zak <kzak@redhat.com>
Thu, 21 Jul 2011 14:44:55 +0000 (16:44 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jul 2011 15:02:52 +0000 (17:02 +0200)
commit7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
treeb9c787bd479cb1cf1bd0efcf8cb542794eadc0bc
parent560cdabbfab344605c7960839214e63f44e8c1d3
ionice: fix -p

 $ ionice 123
 none: prio 4
 none: prio 4

It calls ioprio_get(0x1, 0) and ioprio_get(0x1, 123), because the
code does not check it the "-p" options was specified.

The proper command line syntax is:

  $ ionice -p 123

and the ioprio_get() should be called only once.

Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/ionice.c