From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 17:36:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A669106564A; Wed, 8 Apr 2009 17:36:00 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout011.mac.com (asmtpout011.mac.com [17.148.16.86]) by mx1.freebsd.org (Postfix) with ESMTP id 421AA8FC12; Wed, 8 Apr 2009 17:36:00 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from vmittal-t60.jnpr.net ([66.129.224.36]) by asmtp011.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHS007OEM7ZZK60@asmtp011.mac.com>; Wed, 08 Apr 2009 10:36:00 -0700 (PDT) Message-id: <55F7CC42-D280-46C2-9C02-C1FBC5EE760D@mac.com> From: Marcel Moolenaar To: Max Laier In-reply-to: <200904081912.48347.max@love2party.net> Date: Wed, 08 Apr 2009 10:34:38 -0700 References: <200904081618.n38GIHG8064477@svn.freebsd.org> <200904081912.48347.max@love2party.net> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r190849 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 08 Apr 2009 17:36:00 -0000 On Apr 8, 2009, at 10:12 AM, Max Laier wrote: > On Wednesday 08 April 2009 18:18:17 Marcel Moolenaar wrote: >> Author: marcel >> Date: Wed Apr 8 16:18:16 2009 >> New Revision: 190849 >> URL: http://svn.freebsd.org/changeset/base/190849 >> >> Log: >> Don't use hexadecimal in the EBR partition names, because 'a'..'f' >> are more commonly known as BSD partition names. >> >> Discussed with: ivoras@ >> >> Modified: >> head/sys/geom/part/g_part_ebr.c >> >> Modified: head/sys/geom/part/g_part_ebr.c >> = >> = >> = >> = >> = >> = >> ===================================================================== >> === --- head/sys/geom/part/g_part_ebr.c Wed Apr 8 16:12:28 2009 >> (r190848) >> +++ head/sys/geom/part/g_part_ebr.c Wed Apr 8 16:18:16 2009 >> (r190849) @@ >> -344,7 +344,7 @@ g_part_ebr_name(struct g_part_table *tab >> char *buf, size_t bufsz) >> { >> >> - snprintf(buf, bufsz, "+%08x", entry->gpe_index); > > Not to bikeshed, but why not use "+%08X" instead? "gpart show" prints the index in decimal. By using decimal in the device name, you don't have to convert between dec and hex when you need to derive the device name from the index: fbsdvm% gpart show md0s1 => 0 262134 md0s1 EBR (128M) 0 131067 1 freebsd (64M) 131067 131067 14564 freebsd (64M) fbsdvm% ls /dev/md0s1* | cat /dev/md0s1 /dev/md0s1+00000001 /dev/md0s1+00014564 The leading zeroes are annoying in this respect. I think it's more readable to have: not-real% ls /dev/md0s1* | cat /dev/md0s1 /dev/md0s1+1 /dev/md0s1+14564 But this affects alphabetical ordering, as in: /dev/md0s1+100 /dev/md0s1+2 Ah well... -- Marcel Moolenaar xcllnt@mac.com