[RFC PATCH 03/28] cli: lil: Replace strclone with strdup

Tom Rini trini at konsulko.com
Fri Jul 2 16:28:47 CEST 2021


On Fri, Jul 02, 2021 at 09:38:26AM -0400, Sean Anderson wrote:
> On 7/2/21 4:36 AM, Rasmus Villemoes wrote:
> > On 01/07/2021 08.15, Sean Anderson wrote:
> > > Apparently strdup is not portable, so LIL used its own. Use strdup.
> > 
> > You could reduce the churn by just making strclone "#define strclone(x)
> > strdup(x)", but I suppose you end up modifying the upstream code so much
> > that there's not really anything gained by that.
> > 
> > But that begs the question: What is the long-term plan for this? While
> > it does seem to be an improvement compared to hush, will we ever be able
> > to incorporate fixes&features from upstream, or will this code end up in
> > the same situation as hush?
> 
> Well, since Hush was never updated, I don't believe LIL will be either.
> I think reducing the amount of ifdefs makes the code substantially
> easier to maintain. My intention is to just use LIL as a starting point
> which can be modified as needed to better suit U-Boot.
> 
> The other half of this is that LIL is not particularly actively
> developed. I believe the author sees his work as essentially
> feature-complete, so I expect no major features which we might like to
> backport.

Port it and forget it was a problem, not a bug, of our hush
implementation.  For other things, I'm trying to keep us in sync
regularly, but having less luck as some stuff has already gotten well
behind and is non-trivial to resync.  A digression, but for this thread
I think keeping abreast of LIL releases is important.  I diff'd 20190821
to 20210502 and it was (as you note in another part of the thread)
copyright, license addition and I saw one line of code move around but
didn't check if that applied here too or not.  A monthly calendar
reminder to check the site for new releases (which is what I do for
Kconfiglib) should keep us in-sync, especially given the LIL project
intentions.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210702/d4361824/attachment.sig>


More information about the U-Boot mailing list