Re: [PATCH] linux: check the prefix 'wlan' for WiFi device as the last fallback method

2016-12-05 Thread Beniamino Galvani
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. > ..

Re: [PATCH] linux: check the prefix 'wlan' for WiFi device as the last fallback method

2016-12-05 Thread Thomas Haller
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. > > For example, 'wlan0' has been renamed to 'wlp1s0', but it's still > chec

[PATCH] linux: check the prefix 'wlan' for WiFi device as the last fallback

2016-12-04 Thread Shih-Yuan Lee (FourDollars)
https://bugzilla.gnome.org/show_bug.cgi?id=767317 Signed-off-by: Shih-Yuan Lee (FourDollars) --- src/platform/wifi/wifi-utils.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/platform/wifi/wifi-utils.c b/src/platform/wifi/wifi-utils.c index de858e4..95aae81 100644 --- a/src/pla

[PATCH] linux: check the prefix 'wlan' for WiFi device as the last fallback method

2016-12-04 Thread Shih-Yuan Lee (FourDollars)
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. For example, 'wlan0' has been renamed to 'wlp1s0', but it's still checking 'wlan0' above so it will always fail. You can see this problem below. Nov 2