From: Dan K. <da...@ke...> - 2002-12-31 17:24:09
|
Aniruddha M Marathe wrote: > Hi, > I am writing test cases for swapon(2). > > Swapon system call returns EPERM when number of swapfiles is more than MAX_SWAPFILES. > > MAX_SWAPFILES is a macro defined in linux/swap.h as: > #define MAX_SWAPFILES_SHIFT 5 > #define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT) > ... > What should I do? > 1. drop test for this errno > 2. include linux/swap.h (restriction will come on glibc) > 3. hardcode it to 32 ( restriction will come on kernel version) Hmm, I wonder if Linux should define sysconf(_SC_MAX_SWAPFILES)... -- Dan Kegel Linux User #78045 http://www.kegel.com |