From a276243e9afc3e2ab49c5205cc46b1c4719c21eb Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 14 Jun 2022 16:35:29 -0700 Subject: [PATCH] storage: warn user on badly named provisioning file The man pages (iwd.network) have a section about how to name provisioning files containing non-alphanumeric characters but not everyone reads the entire man page. Warning them that the provisioning file was not read and pointing to 'man iwd.network' should lead someone in the right direction. --- src/storage.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage.c b/src/storage.c index 77be36c8..d6e478bd 100644 --- a/src/storage.c +++ b/src/storage.c @@ -321,8 +321,12 @@ const char *storage_network_ssid_from_path(const char *path, if (!isalnum(*c) && !strchr("-_ ", *c)) break; - if (c < end) + if (c < end) { + l_warn("Provisioning file %s contains non-alphanumeric " + "characters in the name. Please hex-encode. " + "See man iwd.network", path); return NULL; + } memcpy(buf, filename, end - filename); buf[end - filename] = '\0';