RFC: making gpart default
Marcel Moolenaar
xcllnt at mac.com
Sat Nov 29 14:32:32 PST 2008
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 at mac.com
More information about the freebsd-arch
mailing list