From: Eugene Syromyatnikov Date: Mon, 27 Aug 2018 19:26:04 +0000 (+0200) Subject: ioprio: move constant definitions to xlat X-Git-Tag: v4.25~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a56b8a1b7c2f49ed90d152a1ff765214016c95a;p=strace ioprio: move constant definitions to xlat * xlat/ioprio_class.in: Add fallback values. * xlat/ioprio_who.in: Likewise. * ioprio.c: Remove IOPRIO_WHO_* and IOPRIO_CLASS_* enums. --- diff --git a/ioprio.c b/ioprio.c index 19ea74cb..a9d42889 100644 --- a/ioprio.c +++ b/ioprio.c @@ -29,21 +29,7 @@ #include "defs.h" #include "xstring.h" -enum { - IOPRIO_WHO_PROCESS = 1, - IOPRIO_WHO_PGRP, - IOPRIO_WHO_USER -}; - #include "xlat/ioprio_who.h" - -enum { - IOPRIO_CLASS_NONE, - IOPRIO_CLASS_RT, - IOPRIO_CLASS_BE, - IOPRIO_CLASS_IDLE -}; - #include "xlat/ioprio_class.h" #define IOPRIO_CLASS_SHIFT (13) diff --git a/xlat/ioprio_class.in b/xlat/ioprio_class.in index 5020e5a1..f7a3ed25 100644 --- a/xlat/ioprio_class.in +++ b/xlat/ioprio_class.in @@ -1,5 +1,4 @@ -#unconditional -IOPRIO_CLASS_NONE -IOPRIO_CLASS_RT -IOPRIO_CLASS_BE -IOPRIO_CLASS_IDLE +IOPRIO_CLASS_NONE 0 +IOPRIO_CLASS_RT 1 +IOPRIO_CLASS_BE 2 +IOPRIO_CLASS_IDLE 3 diff --git a/xlat/ioprio_who.in b/xlat/ioprio_who.in index 20b1bd18..dfb967c2 100644 --- a/xlat/ioprio_who.in +++ b/xlat/ioprio_who.in @@ -1,4 +1,3 @@ -#unconditional -IOPRIO_WHO_PROCESS -IOPRIO_WHO_PGRP -IOPRIO_WHO_USER +IOPRIO_WHO_PROCESS 1 +IOPRIO_WHO_PGRP 2 +IOPRIO_WHO_USER 3