linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usbip: tools usbip_attach: Fix cryptic error messages
@ 2018-02-27 22:23 ` Shuah Khan
  2018-02-27 22:23   ` [PATCH] usbip: tools usbip_network: " Shuah Khan
  2018-02-27 22:45   ` [PATCH] usbip: tools usbip_attach: " Krzysztof Opasiak
  0 siblings, 2 replies; 4+ messages in thread
From: Shuah Khan @ 2018-02-27 22:23 UTC (permalink / raw)
  To: valentina.manea.m, shuah, gregkh
  Cc: Shuah Khan, yuyang.du, k.opasiak, nobuo.iwata, linux-usb, linux-kernel

Attach device error message is cryptic and useless. Fix it to be
informative.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
---
 tools/usb/usbip/src/usbip_attach.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c
index 7f07b2d50f59..f60738735398 100644
--- a/tools/usb/usbip/src/usbip_attach.c
+++ b/tools/usb/usbip/src/usbip_attach.c
@@ -195,7 +195,8 @@ static int attach_device(char *host, char *busid)
 
 	rhport = query_import_device(sockfd, busid);
 	if (rhport < 0) {
-		err("query");
+		err("Attach request for Device %s. Is this device exported?",
+		    busid);
 		return -1;
 	}
 
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] usbip: tools usbip_network: Fix cryptic error messages
  2018-02-27 22:23 ` [PATCH] usbip: tools usbip_attach: Fix cryptic error messages Shuah Khan
@ 2018-02-27 22:23   ` Shuah Khan
  2018-02-27 22:45   ` [PATCH] usbip: tools usbip_attach: " Krzysztof Opasiak
  1 sibling, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2018-02-27 22:23 UTC (permalink / raw)
  To: valentina.manea.m, shuah, gregkh; +Cc: Shuah Khan, linux-usb, linux-kernel

Kernel and tool version mismatch message is cryptic. Fix it to be
informative.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/usb/usbip/src/usbip_network.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/usb/usbip/src/usbip_network.c b/tools/usb/usbip/src/usbip_network.c
index b4c37e76a6e0..90325fa8bc38 100644
--- a/tools/usb/usbip/src/usbip_network.c
+++ b/tools/usb/usbip/src/usbip_network.c
@@ -179,8 +179,8 @@ int usbip_net_recv_op_common(int sockfd, uint16_t *code)
 	PACK_OP_COMMON(0, &op_common);
 
 	if (op_common.version != USBIP_VERSION) {
-		dbg("version mismatch: %d %d", op_common.version,
-		    USBIP_VERSION);
+		err("USBIP Kernel and tool version mismatch: %d %d:",
+		    op_common.version, USBIP_VERSION);
 		goto err;
 	}
 
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usbip: tools usbip_attach: Fix cryptic error messages
  2018-02-27 22:23 ` [PATCH] usbip: tools usbip_attach: Fix cryptic error messages Shuah Khan
  2018-02-27 22:23   ` [PATCH] usbip: tools usbip_network: " Shuah Khan
@ 2018-02-27 22:45   ` Krzysztof Opasiak
  2018-02-27 22:51     ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Opasiak @ 2018-02-27 22:45 UTC (permalink / raw)
  To: Shuah Khan, valentina.manea.m, shuah, gregkh
  Cc: yuyang.du, nobuo.iwata, linux-usb, linux-kernel



On 02/27/2018 11:23 PM, Shuah Khan wrote:
> Attach device error message is cryptic and useless. Fix it to be
> informative.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>   tools/usb/usbip/src/usbip_attach.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c
> index 7f07b2d50f59..f60738735398 100644
> --- a/tools/usb/usbip/src/usbip_attach.c
> +++ b/tools/usb/usbip/src/usbip_attach.c
> @@ -195,7 +195,8 @@ static int attach_device(char *host, char *busid)
>   
>   	rhport = query_import_device(sockfd, busid);
>   	if (rhport < 0) {
> -		err("query");
> +		err("Attach request for Device %s. Is this device exported?",
> +		    busid);
>   		return -1;
>   	}

The code itself is ok and you may put my:

Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>

but just because of my curiosity, there is a number of places in usbip 
tools where the same level of descriptiveness is used for error message. 
Why did you choose to fix this one not any other or all others?;)

Best regards,
-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usbip: tools usbip_attach: Fix cryptic error messages
  2018-02-27 22:45   ` [PATCH] usbip: tools usbip_attach: " Krzysztof Opasiak
@ 2018-02-27 22:51     ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2018-02-27 22:51 UTC (permalink / raw)
  To: Krzysztof Opasiak, valentina.manea.m, shuah, gregkh
  Cc: yuyang.du, nobuo.iwata, linux-usb, linux-kernel, Shuah Khan

On 02/27/2018 03:45 PM, Krzysztof Opasiak wrote:
> 
> 
> On 02/27/2018 11:23 PM, Shuah Khan wrote:
>> Attach device error message is cryptic and useless. Fix it to be
>> informative.
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>   tools/usb/usbip/src/usbip_attach.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c
>> index 7f07b2d50f59..f60738735398 100644
>> --- a/tools/usb/usbip/src/usbip_attach.c
>> +++ b/tools/usb/usbip/src/usbip_attach.c
>> @@ -195,7 +195,8 @@ static int attach_device(char *host, char *busid)
>>         rhport = query_import_device(sockfd, busid);
>>       if (rhport < 0) {
>> -        err("query");
>> +        err("Attach request for Device %s. Is this device exported?",
>> +            busid);
>>           return -1;
>>       }
> 
> The code itself is ok and you may put my:
> 
> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
> 
> but just because of my curiosity, there is a number of places in usbip tools where the same level of descriptiveness is used for error message. Why did you choose to fix this one not any other or all others?;)
> 
> Best regards,

Yes there are several very cryptic and useless error message all over the
place in usbip tools that could use refinement. This just happens to be the
one that I seem to run into very frequently. It frustrated me enough that
I decided to fix this one first. :)

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-27 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180227222421epcas2p23e030c5de1620f5976cf4f91a2685682@epcas2p2.samsung.com>
2018-02-27 22:23 ` [PATCH] usbip: tools usbip_attach: Fix cryptic error messages Shuah Khan
2018-02-27 22:23   ` [PATCH] usbip: tools usbip_network: " Shuah Khan
2018-02-27 22:45   ` [PATCH] usbip: tools usbip_attach: " Krzysztof Opasiak
2018-02-27 22:51     ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).