noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \
test_strtosize test_tt
+if LINUX
if HAVE_CPU_SET_T
noinst_PROGRAMS += test_cpuset
endif
+endif
test_blkdev_SOURCES = blkdev.c
test_ismounted_SOURCES = ismounted.c
test_wholedisk_SOURCES = wholedisk.c
test_mangle_SOURCES = mangle.c
test_strtosize_SOURCES = strtosize.c
+if LINUX
test_cpuset_SOURCES = cpuset.c
+endif
test_tt_SOURCES = tt.c
if LINUX
" -i | --idle set policy to SCHED_IDLE\n"
" -o | --other set policy to SCHED_OTHER\n"
" -r | --rr set policy to SCHED_RR (default)\n"
+#ifdef SCHED_RESET_ON_FORK
"\nScheduling flags:\n"
" -R | --reset-on-fork set SCHED_RESET_ON_FORK for FIFO or RR\n"
+#endif
"\nOptions:\n"
" -h | --help display this help\n"
" -p | --pid operate on existing given pid\n"
case SCHED_FIFO:
printf("SCHED_FIFO\n");
break;
+#ifdef SCHED_RESET_ON_FORK
case SCHED_FIFO|SCHED_RESET_ON_FORK:
printf("SCHED_FIFO|SCHED_RESET_ON_FORK\n");
break;
+#endif
#ifdef SCHED_IDLE
case SCHED_IDLE:
printf("SCHED_IDLE\n");
case SCHED_RR:
printf("SCHED_RR\n");
break;
+#ifdef SCHED_RESET_ON_FORK
case SCHED_RR|SCHED_RESET_ON_FORK:
printf("SCHED_RR|SCHED_RESET_ON_FORK\n");
break;
+#endif
#ifdef SCHED_BATCH
case SCHED_BATCH:
printf("SCHED_BATCH\n");
case 'f':
policy = SCHED_FIFO;
break;
+#ifdef SCHED_RESET_ON_FORK
case 'R':
policy_flag |= SCHED_RESET_ON_FORK;
break;
+#endif
case 'i':
#ifdef SCHED_IDLE
policy = SCHED_IDLE;
if (errno)
err(EXIT_FAILURE, _("failed to parse priority"));
+#ifdef SCHED_RESET_ON_FORK
/* sanity check */
if ((policy_flag & SCHED_RESET_ON_FORK) &&
!(policy == SCHED_FIFO || policy == SCHED_RR))
errx(EXIT_FAILURE, _("SCHED_RESET_ON_FORK flag is suppoted for "
"SCHED_FIFO and SCHED_RR policies only"));
+#endif
policy |= policy_flag;
#include "topology.h"
#define EVMS_MAJOR 117
+
+#ifndef _IOT__IOTBASE_u_int32_t
+#define _IOT__IOTBASE_u_int32_t IOT_SIMPLE(u_int32_t)
+#endif
+#define _IOT_evms_stripe_info _IOT (_IOTS(u_int32_t), 2, 0, 0, 0, 0)
#define EVMS_GET_STRIPE_INFO _IOR(EVMS_MAJOR, 0xF0, struct evms_stripe_info)
struct evms_stripe_info {
#define MD_MAJOR 9
#endif
+#ifndef _IOT__IOTBASE_uint32_t
+#define _IOT__IOTBASE_uint32_t IOT_SIMPLE(uint32_t)
+#endif
+#define _IOT_md_array_info _IOT (_IOTS(uint32_t), 18, 0, 0, 0, 0)
#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, struct md_array_info)
struct md_array_info {