diff options
author | Thomas Haller <thaller@redhat.com> | 2023-03-14 09:13:52 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-03-15 17:04:37 +0100 |
commit | b4856e825c3de3f684638c598059e3a3601a549f (patch) | |
tree | 2b3b5c866bd269fe40040744d63663dc6c5856b2 | |
parent | d453188ed223102e9459d1c0c48ec43952fc5975 (diff) |
ifcfg-rh: return ENOKEY errno from svGetValueEnum() for missing key
ENOENT is about files. ENOKEY seems a better code.
-rw-r--r-- | src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 2 | ||||
-rw-r--r-- | src/core/settings/plugins/ifcfg-rh/shvar.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index 832e969fb5..f46783f5e3 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -2591,7 +2591,7 @@ make_ip6_setting(shvarFile *ifcfg, shvarFile *network_ifcfg, gboolean routes_rea &local)) { PARSE_WARNING("%s", local->message); g_clear_error(&local); - } else if (errno == ENOENT) { + } else if (errno == ENOKEY) { /* The key is not specified. If "v" (IPV6_TOKEN) is set, * we default to EUI64. Otherwise, the connection would not verify. */ if (v) diff --git a/src/core/settings/plugins/ifcfg-rh/shvar.c b/src/core/settings/plugins/ifcfg-rh/shvar.c index fe8187c395..7230d98674 100644 --- a/src/core/settings/plugins/ifcfg-rh/shvar.c +++ b/src/core/settings/plugins/ifcfg-rh/shvar.c @@ -1328,7 +1328,7 @@ svGetValueEnum(shvarFile *s, const char *key, GType gtype, int *out_value, GErro if (!svalue) { /* don't touch out_value. The caller is supposed * to initialize it with the default value. */ - errno = ENOENT; + errno = ENOKEY; return TRUE; } |