From 6ba9fe35f1716763cfa95ed8c27510822b4b96d0 Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 17 Apr 2014 16:29:52 +0100 Subject: [PATCH] Remember to convert '/' back to '.' in sysctl before returning --- sysctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysctl.c b/sysctl.c index b7f2223..e9a3898 100644 --- a/sysctl.c +++ b/sysctl.c @@ -59,6 +59,10 @@ getsysctl(char *variable, char **value) if (p) *p = '\0'; + for (p = variable; *p; p++) + if (*p == '/') + *p = '.'; + *value = buf; close(fd);