sysctl: do not error out showing write-only data. Closes 6386
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
a2796223cb
commit
6554d03735
@ -129,6 +129,9 @@ static int sysctl_act_on_setting(char *setting)
|
||||
|
||||
if (fd < 0) {
|
||||
switch (errno) {
|
||||
case EACCES:
|
||||
/* Happens for write-only settings, e.g. net.ipv6.route.flush */
|
||||
goto end;
|
||||
case ENOENT:
|
||||
if (option_mask32 & FLAG_SHOW_KEY_ERRORS)
|
||||
bb_error_msg("error: '%s' is an unknown key", outname);
|
||||
|
Loading…
Reference in New Issue
Block a user