[syslinux] MultiFS syntax definition

Raphael S Carvalho raphael.scarv at gmail.com
Wed Jun 4 14:20:27 PDT 2014


On Wed, Jun 4, 2014 at 6:06 PM, Raphael S Carvalho
<raphael.scarv at gmail.com> wrote:
> On Wed, Jun 4, 2014 at 5:36 PM, Raphael S Carvalho
> <raphael.scarv at gmail.com> wrote:
>> On Wed, Jun 4, 2014 at 5:21 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>>> On 06/04/2014 11:09 AM, Raphael S Carvalho wrote:
>>>> Before proceeding with the MultiFS patchset, let's discuss the MultiFS syntax.
>>>>
>>>> It's currently as follows:
>>>> (hd[disk number]:[partition number])/path/to/file
>>>>
>>>> Any objections?
>>>>
>>>
>>> As others have pointed out, I'd rather use a comma, but even more
>>> specifically, we already *have* a very sophisticated syntax for
>>> partition selection: this is what chain.c32 currently consumes.  It lets
>>> us specify partitions not just by disk/partition number but also by
>>> various kinds of other attributes like MBR signatures and UUIDs.
>>>
>>> So we should just (re-)use that syntax.
>> Agreed. the whole chain directory will have to be moved to com32/lib,
>> or common code pulled into a new file. Which one does sound better
>> to you?
> Although the syntax parser (in option.c) doesn't assume the parentheses
> neither the path post the closed parentheses, it's also bloated and seems
> not to fit well the MultiFS purposes.
We could though adapt opt_parse_args in chain/options.c to work with MultiFS
syntax (hda,b)/path/, it currently works only for hda,b.

Something like:
s = malloc(len = strlen());
memcpy(s, path, len);
if (s[0] == '(') s++; if (closed_p = strtol(s, ')') *closed_p = '\0';
>
> On the other hand, find_dp and its helper functions at chain.c could be
> nicely re-used with a few changes.
>
>>>
>>>         -hpa
>>>
>>>
>>
>>
>>
>> --
>> Raphael S. Carvalho
>
>
>
> --
> Raphael S. Carvalho



-- 
Raphael S. Carvalho


More information about the Syslinux mailing list