From owner-freebsd-arch@FreeBSD.ORG Sat Nov 29 22:32:32 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553CC106564A for ; Sat, 29 Nov 2008 22:32:32 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout022.mac.com (asmtpout022.mac.com [17.148.16.97]) by mx1.freebsd.org (Postfix) with ESMTP id 48DC88FC13 for ; Sat, 29 Nov 2008 22:32:32 +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 [192.168.1.96] (209-128-86-226.BAYAREA.NET [209.128.86.226]) by asmtp022.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KB400J3U6I72B40@asmtp022.mac.com> for arch@freebsd.org; Sat, 29 Nov 2008 13:32:32 -0800 (PST) Message-id: <0F1745AA-611F-40B2-85F3-32FD78BC4B58@mac.com> From: Marcel Moolenaar To: Peter Wemm In-reply-to: Date: Sat, 29 Nov 2008 13:32:31 -0800 References: <57809A37-B81C-4F50-A418-CD9303F06B72@mac.com> X-Mailer: Apple Mail (2.929.2) Cc: FreeBSD Arch Subject: Re: RFC: making gpart default X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 22:32:32 -0000 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: [ '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