commit e88a0757ab303ab27c7a092740b2382ae57740c9
parent ba1253df3b2b087e7210fb28cc90f3049a423d9b
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Thu, 16 Jun 2022 02:02:18 +0200
storage: Log a message on network file parse errors
Most users of storage_network_open don't log errors when the function
returns a NULL and fall back to defaults (empty l_settings).
storage_network_open() itself only logs errors if the flie is encrypted.
Now also log an error when l_settings_load_from_file() fails to help track
down potential syntax errors.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/storage.c b/src/storage.c
@@ -597,8 +597,10 @@ struct l_settings *storage_network_open(enum security type, const char *ssid)
settings = l_settings_new();
- if (!l_settings_load_from_file(settings, path))
+ if (!l_settings_load_from_file(settings, path)) {
+ l_error("Error loading %s", path);
goto error;
+ }
if (type != SECURITY_NONE && !storage_decrypt(settings, path, ssid))
goto error;