3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-19 02:39:29 +01:00

wiphy: Make sure path is valid

DBus has certain rules on what constitutes a valid path.  Since the
wiphy name is freeform, it is possible to set it such that the contents
do not contain a valid path.

We fall back to simply using the wiphy index as the path.
This commit is contained in:
Denis Kenzior 2017-03-07 12:01:40 -06:00
parent c3b33a2cfd
commit 97191d56f1

View File

@ -108,7 +108,7 @@ const char *wiphy_get_path(struct wiphy *wiphy)
{
static char path[15];
snprintf(path, sizeof(path), "/%s", wiphy->name);
snprintf(path, sizeof(path), "/%d", wiphy->id);
return path;
}