1 /************************************************************************ 2 * Copyright (c) International Business Machines Corp., 2008 3 * This program is free software; you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation; either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 11 * the GNU General Public License for more details. 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 * 16 ***************************************************************************/ 17 #include <stdio.h> 18 #include "test.h" 19 20 const char *TCID = "pm_get_sched_values"; 21 22 int get_supp_sched_mc(void) 23 { 24 if (tst_kvercmp(2, 6, 29) < 0) 25 return 1; 26 else 27 return 2; 28 } 29 30 int get_supp_sched_smt(void) 31 { 32 if (tst_kvercmp(2, 6, 29) < 0) 33 return 1; 34 else 35 return 2; 36 } 37 38 int main(int argc, char **argv) 39 { 40 char *param; 41 if (argc == 0) 42 return 1; 43 else { 44 param = argv[1]; 45 if (strcmp(param, "sched_mc") == 0) 46 return get_supp_sched_mc(); 47 if (strcmp(param, "sched_smt") == 0) 48 return get_supp_sched_smt(); 49 } 50 51 return 1; 52 } 53