Subject: Re: Multiboot support for review
To: None <pavel.cahyna@st.mff.cuni.cz>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 02/05/2006 15:07:21
El 04/02/2006, a las 23:34, Pavel Cahyna escribi=F3:

> On Tue, Jan 31, 2006 at 09:19:21PM +0100, Julio M. Merino Vidal wrote:
>> Here come some things I'd like to discuss:
>>
>> - In the past days, someone suggested the idea of adding a textual
>>   data representation to pass variable/value pairs between the kernel
>>   and userspace.  I've had to do something similar to pass some boot
>>   information between GRUB and the kernel, and hence implemented such
>>   an interface.
>>
>>   It is currently very, very simple, but it may do the job in the
>>   cases where it's needed (e.g., mount(2) arguments).
>>
>>   It is named 'optstr' and is implemented in sys/optstr.h and
>>   kern/subr_optstr.c.  See the manual page in the patch file.
>
> While I like to see Multiboot support coming, I don't think that using
> optstr (or any other text-based mechanism) for mount(2) is a good =20
> idea.
> Text-based formats have the disadvantage of not allowing some =20
> arbitrary
> characters (in this case, spaces), without some quoting mechanism =20
> which
> would complicate it. Space is not an unreasonable character in a mount
> option...

That's a good point.  Maybe a variable-sized array of key/value pairs
could be better.  Then, the representation as an "options string" could
be up to the userland utility.

Even though, I guess there might still be cases where "options strings"
as such may be useful (outside Multiboot, that is).  If not... well...
I guess that code could be merged inside the Multiboot stuff.

--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/