From df27164d5e6e9ec619bae3ad97717d4664c8a96c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 5 May 2020 08:23:16 +0200 Subject: [PATCH] shared: add nm_keyfile_error_is_not_found() helper --- shared/nm-keyfile/nm-keyfile-utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shared/nm-keyfile/nm-keyfile-utils.h b/shared/nm-keyfile/nm-keyfile-utils.h index 9b35e17ed6..4764311bb0 100644 --- a/shared/nm-keyfile/nm-keyfile-utils.h +++ b/shared/nm-keyfile/nm-keyfile-utils.h @@ -10,9 +10,21 @@ #error Cannot use this header. #endif +/*****************************************************************************/ + +#include "nm-glib-aux/nm-shared-utils.h" + +/*****************************************************************************/ + #define NM_KEYFILE_GROUP_VPN_SECRETS "vpn-secrets" #define NM_KEYFILE_GROUPPREFIX_WIREGUARD_PEER "wireguard-peer." +#define nm_keyfile_error_is_not_found(error) \ + nm_g_error_matches (error, \ + G_KEY_FILE_ERROR, \ + G_KEY_FILE_ERROR_GROUP_NOT_FOUND, \ + G_KEY_FILE_ERROR_KEY_NOT_FOUND) + const char *nm_keyfile_plugin_get_alias_for_setting_name (const char *setting_name); const char *nm_keyfile_plugin_get_setting_name_for_alias (const char *alias);