Date: Wed, 08 Apr 2009 10:34:38 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: Max Laier <max@love2party.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org Subject: Re: svn commit: r190849 - head/sys/geom/part Message-ID: <55F7CC42-D280-46C2-9C02-C1FBC5EE760D@mac.com> In-Reply-To: <200904081912.48347.max@love2party.net> References: <200904081618.n38GIHG8064477@svn.freebsd.org> <200904081912.48347.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55F7CC42-D280-46C2-9C02-C1FBC5EE760D>