Commit Graph

8 Commits

Author SHA1 Message Date
sin
87cb818ac0 No need for a temporary variable in streplace() 2014-04-17 17:18:55 +01:00
sin
edc39cef27 If at least one entry fails, return EXIT_FAILURE in sysctl 2014-04-17 17:08:52 +01:00
sin
3985929b6d Error out if there are multiple separators in sysctl 2014-04-17 17:05:13 +01:00
sin
0897d999e6 Implement streplace()
Restore variable as early as possible and in error conditions
2014-04-17 16:42:26 +01:00
sin
6ba9fe35f1 Remember to convert '/' back to '.' in sysctl before returning 2014-04-17 16:33:18 +01:00
sin
e4fa3f5c59 Don't leak `buf' if realloc fails
Not an issue in ubase but someone might want to re-use this
function elsewhere.
2014-04-17 16:27:06 +01:00
sin
3803adfd7e Don't hardcode the buffer size in sysctl 2014-04-17 16:21:55 +01:00
sin
8b32decb6f Add initial implementation of sysctl(8)
Needs a bit of cleanup (avoiding magic numbers etc.).
2014-04-17 15:31:42 +01:00