Date: Sat, 29 Nov 2008 13:32:31 -0800 From: Marcel Moolenaar <xcllnt@mac.com> To: Peter Wemm <peter@wemm.org> Cc: FreeBSD Arch <arch@freebsd.org> Subject: Re: RFC: making gpart default Message-ID: <0F1745AA-611F-40B2-85F3-32FD78BC4B58@mac.com> In-Reply-To: <e7db6d980811282007j48903cdas289c302e1811a0b9@mail.gmail.com> References: <57809A37-B81C-4F50-A418-CD9303F06B72@mac.com> <e7db6d980811282007j48903cdas289c302e1811a0b9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 28, 2008, at 8:07 PM, Peter Wemm wrote: > First, the 'gpart create' man page doesn't say what "scheme" is. Yes, the manpage needs some work. > After guessing, I tried: > > overcee# gpart create -s gpt /dev/twed1 > gpart: 22 scheme 'gpt' > > What does that mean? It turns out that I didn't have GEOM_PART_GPT > compiled in. Oops, forgot about parsing the error string... I just fixed it (rev 185454). The background: geom(8) simply prints the error that the kernel creates. This then requires that the kernel creates a user-friendly error message. This is not a good idea, because it side-steps things like i18n completely. So, for gpart I chose a different approach. The kernel uses a certain form for the error messages, which is: <errno> [<parameter> 'value'] The intend is to have user-space interpret what is meant and print something the user understands. This I forgot to do. For now, the translation is straight-forward, but it should not be too hard to improve upon it further. In general, geom(8) needs to do a bit more pre- and post- processing. It mostly just converts the command line into a gctl request and as such forces the user to do all the work. I'll work on that... -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0F1745AA-611F-40B2-85F3-32FD78BC4B58>