On Mon, Dec 05, 2016 at 12:18:15PM +0100, Thomas Haller wrote:
> On Mon, 2016-12-05 at 15:37 +0800, Shih-Yuan Lee (FourDollars) wrote:
> > The sysfs path may not exist due to race conditions while accessing
> > sysfs.
> > 
> > It's better to check the prefix 'wlan' as the last fallback method.
> ...
> How about, wifi_utils_is_wifi() gets also an argument ifindex.
> Instead of operating on the path name directly, it would first
> open("/sys/class/net/wlan0") and then use openat to navigate inside
> this directory.
> 
>   int
>   nmp_utils_open_sysctl(int ifindex, const char *ifname)
>   {

This seems a good idea to me.

Beniamino

Attachment: signature.asc
Description: PGP signature

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to