poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] poke: fix handling of alien tokens


From: Jose E. Marchesi
Subject: Re: [PATCH v2 1/2] poke: fix handling of alien tokens
Date: Wed, 01 Nov 2023 14:36:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

> On Wed, Nov 01, 2023 at 02:10:54PM +0100, Jose E. Marchesi wrote:
>> 
>> > +++ b/poke/pk-ios.c
>> > @@ -245,10 +245,10 @@ pk_ios_alien_token_handler (char delimiter,
>> >  
>> >    assert (delimiter == '<');
>> >  
>> > -  if (id_len == 3)
>> > +  if (id_len == 2)  /* <> */
>> >      goto error;
>> 
>> I think that was supposed to be < 2.  Empty $<> can be weird, but useful
>> at some point.
>> 
>
> Then, if there's no IOS:
>     $<> leads to "invalid IO space"
> if there's on IOS:
>     $<> represent it.
> else:
>     $<> leads to "invalid IO space"

I don't think $<> shall match to anything, even with PARTIAL.  Not very
intuitive.  pk_ios_search could make sure to always return NULL if the
given HANDLER is the empty string (if you do this, please update the
documentation of the function in libpoke.h.)

>
> For me this sounds good.
> Do you have any objections?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]