Re: [PATCH] bnep: Add extra debug information for bnep_up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On Thursday 09 of October 2014 13:17:43 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
> 
> Adding extra debug information helps to investigate failing cases
> ---
>  profiles/network/bnep.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index 136709d..a6b8728 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -210,7 +210,8 @@ static int bnep_if_up(const char *devname)
>  	close(sk);
>  
>  	if (err < 0) {
> -		error("Could not bring up %s", devname);
> +		error("Could not bring up %s: %s(%d)", devname, strerror(errno),
> +									errno);
>  		return err;
>  	}

You should use -err no errno here. Errno might be already overwritten by call
to close().
 

-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux