2014-10-09 11:57:06

by Vikrampal Yadav

[permalink] [raw]
Subject: [PATCH] Monitor: Fix indentation for AVRCP PASS THROUGH commands

Intendation for AVRCP PASS THROUGH commands' decoding fixed.
---
monitor/avctp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/monitor/avctp.c b/monitor/avctp.c
index a4e34c5..4abd18f 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct avctp_frame *avctp_frame,
if (!l2cap_frame_get_u8(frame, &op))
return false;

- print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
+ print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ', op,
op2str(op), op & 0x80 ? "Released" : "Pressed");

if (!l2cap_frame_get_u8(frame, &len))
return false;

- print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
+ print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);

packet_hexdump(frame->data, frame->size);
return true;
--
1.9.1



2014-10-09 12:59:31

by Vikrampal Yadav

[permalink] [raw]
Subject: RE: [PATCH] Monitor: Fix indentation for AVRCP PASS THROUGH commands

Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:[email protected]]
> Sent: Thursday, October 09, 2014 5:29 PM
> To: Vikrampal Yadav
> Cc: [email protected]; Dmitry Kasatkin; [email protected]
> Subject: Re: [PATCH] Monitor: Fix indentation for AVRCP PASS THROUGH
> commands
>
> Hi Vikram,
>
> On Thu, Oct 9, 2014 at 2:57 PM, Vikrampal Yadav
> <[email protected]> wrote:
> > Intendation for AVRCP PASS THROUGH commands' decoding fixed.
>
> Please use lower case at the beginning e.g. monitor:
>
> > ---
> > monitor/avctp.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/monitor/avctp.c b/monitor/avctp.c index a4e34c5..4abd18f
> > 100644
> > --- a/monitor/avctp.c
> > +++ b/monitor/avctp.c
> > @@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct
> avctp_frame *avctp_frame,
> > if (!l2cap_frame_get_u8(frame, &op))
> > return false;
> >
> > - print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
> > + print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ',
> > + op,
> > op2str(op), op & 0x80 ? "Released" :
> > "Pressed");
> >
> > if (!l2cap_frame_get_u8(frame, &len))
> > return false;
> >
> > - print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
> > + print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);
> >
> > packet_hexdump(frame->data, frame->size);
> > return true;
> > --
> > 1.9.1
>
>
> Could you please start adding the output of the btmon to the description
> once you add new parsers like this that way we can spot more easily
> formatting bugs such as this.
>
>
>
> --
> Luiz Augusto von Dentz

Sure!

Regards,
Vikram


2014-10-09 11:58:35

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] Monitor: Fix indentation for AVRCP PASS THROUGH commands

Hi Vikram,

On Thu, Oct 9, 2014 at 2:57 PM, Vikrampal Yadav <[email protected]> wrote:
> Intendation for AVRCP PASS THROUGH commands' decoding fixed.

Please use lower case at the beginning e.g. monitor:

> ---
> monitor/avctp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/monitor/avctp.c b/monitor/avctp.c
> index a4e34c5..4abd18f 100644
> --- a/monitor/avctp.c
> +++ b/monitor/avctp.c
> @@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct avctp_frame *avctp_frame,
> if (!l2cap_frame_get_u8(frame, &op))
> return false;
>
> - print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
> + print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ', op,
> op2str(op), op & 0x80 ? "Released" : "Pressed");
>
> if (!l2cap_frame_get_u8(frame, &len))
> return false;
>
> - print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
> + print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);
>
> packet_hexdump(frame->data, frame->size);
> return true;
> --
> 1.9.1


Could you please start adding the output of the btmon to the
description once you add new parsers like this that way we can spot
more easily formatting bugs such as this.



--
Luiz Augusto von Dentz