1*49cdfc7eSAndroid Build Coastguard Worker /* 2*49cdfc7eSAndroid Build Coastguard Worker * SPDX-License-Identifier: GPL-2.0-or-later 3*49cdfc7eSAndroid Build Coastguard Worker * 4*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2019 Cyril Hrubis <[email protected]> 5*49cdfc7eSAndroid Build Coastguard Worker */ 6*49cdfc7eSAndroid Build Coastguard Worker 7*49cdfc7eSAndroid Build Coastguard Worker #ifndef MBIND_H__ 8*49cdfc7eSAndroid Build Coastguard Worker #define MBIND_H__ 9*49cdfc7eSAndroid Build Coastguard Worker mbind_flag_name(unsigned flag)10*49cdfc7eSAndroid Build Coastguard Workerstatic inline const char *mbind_flag_name(unsigned flag) 11*49cdfc7eSAndroid Build Coastguard Worker { 12*49cdfc7eSAndroid Build Coastguard Worker switch (flag) { 13*49cdfc7eSAndroid Build Coastguard Worker case 0: 14*49cdfc7eSAndroid Build Coastguard Worker return "0"; 15*49cdfc7eSAndroid Build Coastguard Worker case MPOL_MF_STRICT: 16*49cdfc7eSAndroid Build Coastguard Worker return "MPOL_MF_STRICT"; 17*49cdfc7eSAndroid Build Coastguard Worker case MPOL_MF_MOVE: 18*49cdfc7eSAndroid Build Coastguard Worker return "MPOL_MF_MOVE"; 19*49cdfc7eSAndroid Build Coastguard Worker case MPOL_MF_MOVE_ALL: 20*49cdfc7eSAndroid Build Coastguard Worker return "MPOL_MF_MOVE_ALL"; 21*49cdfc7eSAndroid Build Coastguard Worker default: 22*49cdfc7eSAndroid Build Coastguard Worker return "???"; 23*49cdfc7eSAndroid Build Coastguard Worker } 24*49cdfc7eSAndroid Build Coastguard Worker } 25*49cdfc7eSAndroid Build Coastguard Worker 26*49cdfc7eSAndroid Build Coastguard Worker #endif /* MBIND_H__ */ 27