mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
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.
This commit is contained in:
parent
16739cb4e6
commit
a276243e9a
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user