It would be good to clean it up so out can be used for both. Just teach it that ) ends the parse. On June 4, 2014 2:06:22 PM PDT, 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. > >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-- Sent from my mobile phone. Please pardon brevity and lack of formatting.
On Wed, Jun 4, 2014 at 6:17 PM, H. Peter Anvin <hpa at zytor.com> wrote:> It would be good to clean it up so out can be used for both. Just teach it that ) ends the parse.Sounds reasonable, I will do that!> > On June 4, 2014 2:06:22 PM PDT, 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. >> >>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 > > -- > Sent from my mobile phone. Please pardon brevity and lack of formatting.-- Raphael S. Carvalho
On 06/04/2014 02:23 PM, Raphael S Carvalho wrote:> On Wed, Jun 4, 2014 at 6:17 PM, H. Peter Anvin <hpa at zytor.com> wrote: >> It would be good to clean it up so out can be used for both. Just teach it that ) ends the parse. > Sounds reasonable, I will do that!I guess I should clarify a bit... I don't mean we should copy all of opt_parse_args(). Rather, I mean the handling of opt.drivename and opt.partition. The splitting of those should probably be moved out of opt_parse_args(), too. So yes, some code restructuring is definitely needed, but I'd like us to end up using the same code. -hpa