diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/sysctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c index ef1a1b99f..a42a91247 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -247,15 +247,16 @@ static int sysctl_handle_preload_file(const char *filename) | |||
247 | /* Must do it _after_ config_open(): */ | 247 | /* Must do it _after_ config_open(): */ |
248 | xchdir("/proc/sys"); | 248 | xchdir("/proc/sys"); |
249 | 249 | ||
250 | //TODO: ';' is comment char too | ||
251 | //TODO: <space><tab><space>#comment is also comment, not strictly 1st char only | ||
252 | parse_flags = 0; | 250 | parse_flags = 0; |
253 | parse_flags &= ~PARSE_COLLAPSE; // NO (var==val is not var=val) - treat consecutive delimiters as one | 251 | parse_flags &= ~PARSE_COLLAPSE; // NO (var==val is not var=val) - treat consecutive delimiters as one |
254 | parse_flags &= ~PARSE_TRIM; // NO - trim leading and trailing delimiters | 252 | parse_flags &= ~PARSE_TRIM; // NO - trim leading and trailing delimiters |
255 | parse_flags |= PARSE_GREEDY; // YES - last token takes entire remainder of the line | 253 | parse_flags |= PARSE_GREEDY; // YES - last token takes entire remainder of the line |
256 | parse_flags &= ~PARSE_MIN_DIE; // NO - die if < min tokens found | 254 | parse_flags &= ~PARSE_MIN_DIE; // NO - die if < min tokens found |
257 | parse_flags &= ~PARSE_EOL_COMMENTS; // NO (only first char) - comments are recognized even if not first char | 255 | parse_flags &= ~PARSE_EOL_COMMENTS; // NO (only first char) - comments are recognized even if not first char |
258 | while (config_read(parser, token, 2, 2, "#=", parse_flags)) { | 256 | parse_flags |= PARSE_ALT_COMMENTS;// YES - two comment chars: ';' and '#' |
257 | /* <space><tab><space>#comment is also comment, not strictly 1st char only */ | ||
258 | parse_flags |= PARSE_WS_COMMENTS; // YES - comments are recognized even if there is whitespace before | ||
259 | while (config_read(parser, token, 2, 2, ";#=", parse_flags)) { | ||
259 | char *tp; | 260 | char *tp; |
260 | 261 | ||
261 | trim(token[1]); | 262 | trim(token[1]); |