From owner-svn-src-head@FreeBSD.ORG Sat Jul 5 04:10:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B311E668; Sat, 5 Jul 2014 04:10:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9406F21FE; Sat, 5 Jul 2014 04:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s654APMH087793; Sat, 5 Jul 2014 04:10:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s654AP4D087788; Sat, 5 Jul 2014 04:10:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407050410.s654AP4D087788@svn.freebsd.org> From: Alexander Motin Date: Sat, 5 Jul 2014 04:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268283 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2014 04:10:25 -0000 Author: mav Date: Sat Jul 5 04:10:24 2014 New Revision: 268283 URL: http://svnweb.freebsd.org/changeset/base/268283 Log: Improve readability of XML generated by CTL_LUN_LIST. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Jul 5 03:49:20 2014 (r268282) +++ head/sys/cam/ctl/ctl.c Sat Jul 5 04:10:24 2014 (r268283) @@ -3007,7 +3007,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, "%s" + retval = sbuf_printf(sb, "\t%s" "\n", (lun->backend == NULL) ? "none" : lun->backend->name); @@ -3015,7 +3015,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, "%d\n", + retval = sbuf_printf(sb, "\t%d\n", lun->be_lun->lun_type); if (retval != 0) @@ -3028,20 +3028,20 @@ ctl_ioctl(struct cdev *dev, u_long cmd, continue; } - retval = sbuf_printf(sb, "%ju\n", + retval = sbuf_printf(sb, "\t%ju\n", (lun->be_lun->maxlba > 0) ? lun->be_lun->maxlba + 1 : 0); if (retval != 0) break; - retval = sbuf_printf(sb, "%u\n", + retval = sbuf_printf(sb, "\t%u\n", lun->be_lun->blocksize); if (retval != 0) break; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) break; @@ -3057,7 +3057,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) break; @@ -3078,7 +3078,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } STAILQ_FOREACH(opt, &lun->be_lun->options, links) { - retval = sbuf_printf(sb, "<%s>%s", opt->name, opt->value, opt->name); + retval = sbuf_printf(sb, "\t<%s>%s\n", + opt->name, opt->value, opt->name); if (retval != 0) break; } Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sat Jul 5 03:49:20 2014 (r268282) +++ head/sys/cam/ctl/ctl_backend_block.c Sat Jul 5 04:10:24 2014 (r268283) @@ -2509,7 +2509,7 @@ ctl_be_block_lun_info(void *be_lun, stru lun = (struct ctl_be_block_lun *)be_lun; retval = 0; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\t"); if (retval != 0) goto bailout; @@ -2519,7 +2519,7 @@ ctl_be_block_lun_info(void *be_lun, stru if (retval != 0) goto bailout; - retval = sbuf_printf(sb, ""); + retval = sbuf_printf(sb, "\n"); bailout: