diff mbox

libceph: separate multiple ops with commas in debugfs output

Message ID 1412757436-6996-1-git-send-email-idryomov@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ilya Dryomov Oct. 8, 2014, 8:37 a.m. UTC
For requests with multiple ops, separate ops with commas instead of \t,
which is a field separator here.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
---
 net/ceph/debugfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sage Weil Oct. 8, 2014, 2:56 p.m. UTC | #1
Reviewed-by: Sage Weil <sage@redhat.com>

On Wed, 8 Oct 2014, Ilya Dryomov wrote:

> For requests with multiple ops, separate ops with commas instead of \t,
> which is a field separator here.
> 
> Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
> ---
>  net/ceph/debugfs.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
> index d1a62c69a9f4..d2d525529f87 100644
> --- a/net/ceph/debugfs.c
> +++ b/net/ceph/debugfs.c
> @@ -169,7 +169,8 @@ static int osdc_show(struct seq_file *s, void *pp)
>  
>  		for (i = 0; i < req->r_num_ops; i++) {
>  			opcode = req->r_ops[i].op;
> -			seq_printf(s, "\t%s", ceph_osd_op_name(opcode));
> +			seq_printf(s, "%s%s", (i == 0 ? "\t" : ","),
> +				   ceph_osd_op_name(opcode));
>  		}
>  
>  		seq_printf(s, "\n");
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
index d1a62c69a9f4..d2d525529f87 100644
--- a/net/ceph/debugfs.c
+++ b/net/ceph/debugfs.c
@@ -169,7 +169,8 @@  static int osdc_show(struct seq_file *s, void *pp)
 
 		for (i = 0; i < req->r_num_ops; i++) {
 			opcode = req->r_ops[i].op;
-			seq_printf(s, "\t%s", ceph_osd_op_name(opcode));
+			seq_printf(s, "%s%s", (i == 0 ? "\t" : ","),
+				   ceph_osd_op_name(opcode));
 		}
 
 		seq_printf(s, "\n");