]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ionice: Fix output for case ioclass==0
authorMichael Bunk <bunk@iat.uni-leipzig.de>
Wed, 15 Jan 2014 16:38:37 +0000 (17:38 +0100)
committerMichael Bunk <bunk@iat.uni-leipzig.de>
Wed, 15 Jan 2014 16:38:37 +0000 (17:38 +0100)
output "none" instead of "unknown"

schedutils/ionice.c

index 03e41b772a5cf2e2df4e4498e00fad6f54dff1fc..50616dfc6c51262c2756bb9223d07dbef7a629c2 100644 (file)
@@ -78,7 +78,7 @@ static void ioprio_print(int pid)
                int ioclass = IOPRIO_PRIO_CLASS(ioprio);
                const char *name = _("unknown");
 
-               if (ioclass > 0 && (size_t) ioclass < ARRAY_SIZE(to_prio))
+               if (ioclass >= 0 && (size_t) ioclass < ARRAY_SIZE(to_prio))
                        name = to_prio[ioclass];
 
                if (ioclass != IOPRIO_CLASS_IDLE)