| 1 |
/* COVERAGE: sysctl */ |
| 2 |
|
| 3 |
#define _GNU_SOURCE |
| 4 |
#include <unistd.h> |
| 5 |
#include <linux/sysctl.h> |
| 6 |
#include <sys/syscall.h> |
| 7 |
|
| 8 |
int main() |
| 9 |
{ |
| 10 |
// Man page states that this syscall is deprecated |
| 11 |
// and is likely to disappear in future kernel versions. |
| 12 |
|
| 13 |
#ifdef SYS__sysctl |
| 14 |
struct __sysctl_args args; |
| 15 |
|
| 16 |
syscall(SYS__sysctl, &args); |
| 17 |
//staptest// sysctl (XXXX) = -NNNN |
| 18 |
|
| 19 |
syscall(SYS__sysctl, (struct __sysctl_args *)-1); |
| 20 |
#ifdef __s390__ |
| 21 |
//staptest// sysctl (0x[7]?[f]+) = -NNNN |
| 22 |
#else |
| 23 |
//staptest// sysctl (0x[f]+) = -NNNN |
| 24 |
#endif |
| 25 |
#endif |
| 26 |
|
| 27 |
return 0; |
| 28 |
} |