summaryrefslogtreecommitdiffstats
path: root/man2/sysctl.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sysctl.2')
-rw-r--r--man2/sysctl.216
1 files changed, 8 insertions, 8 deletions
diff --git a/man2/sysctl.2 b/man2/sysctl.2
index 83af5efd4..44134d82b 100644
--- a/man2/sysctl.2
+++ b/man2/sysctl.2
@@ -120,15 +120,15 @@ It is not yet possible to change operating system by writing to
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
#include <linux/sysctl.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
+\&
int _sysctl(struct __sysctl_args *args);
-
+\&
#define OSNAMESZ 100
-
+\&
int
main(void)
{
@@ -136,15 +136,15 @@ main(void)
char osname[OSNAMESZ];
size_t osnamelth;
struct __sysctl_args args;
-
+\&
memset(&args, 0, sizeof(args));
args.name = name;
args.nlen = ARRAY_SIZE(name);
args.oldval = osname;
args.oldlenp = &osnamelth;
-
+\&
osnamelth = sizeof(osname);
-
+\&
if (syscall(SYS__sysctl, &args) == \-1) {
perror("_sysctl");
exit(EXIT_FAILURE);