Lines Matching refs:pathstr
432 char *pathstr; in get_mac80211_phydev() local
438 if (asprintf(&pathstr, "/sys/class/net/%s/phy80211", device) == -1) { in get_mac80211_phydev()
444 bytes_read = readlink(pathstr, phydev_path, phydev_max_pathlen); in get_mac80211_phydev()
451 free(pathstr); in get_mac80211_phydev()
455 errno, "%s: Can't readlink %s", device, pathstr); in get_mac80211_phydev()
456 free(pathstr); in get_mac80211_phydev()
459 free(pathstr); in get_mac80211_phydev()
1550 char *pathstr; in get_if_flags() local
1552 if (asprintf(&pathstr, "/sys/class/net/%s/type", name) == -1) { in get_if_flags()
1559 fh = fopen(pathstr, "r"); in get_if_flags()
1578 free(pathstr); in get_if_flags()
1602 free(pathstr); in get_if_flags()
1727 char *pathstr; in is_wifi() local
1734 if (asprintf(&pathstr, "/sys/class/net/%s/wireless", device) == -1) { in is_wifi()
1740 if (stat(pathstr, &statb) == 0) { in is_wifi()
1741 free(pathstr); in is_wifi()
1744 free(pathstr); in is_wifi()
4981 char *pathstr; in iface_dsa_get_proto_info() local
4994 fd = asprintf(&pathstr, "/sys/class/net/%s/dsa/tagging", device); in iface_dsa_get_proto_info()
5001 fd = open(pathstr, O_RDONLY); in iface_dsa_get_proto_info()
5002 free(pathstr); in iface_dsa_get_proto_info()