storage: warn user on badly named provisioning file
PATCH 1/1 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(-)
src/storage.c +5 -1
@@ -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' ;
Signature · 1 line
2.34.1