grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/6] json: Import upstream jsmn-1.1.0


From: Daniel Kiper
Subject: Re: [PATCH v3 1/6] json: Import upstream jsmn-1.1.0
Date: Thu, 14 Nov 2019 11:15:00 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Nov 13, 2019 at 02:22:33PM +0100, Patrick Steinhardt wrote:
> The upcoming support for LUKS2 encryption will require a JSON parser to
> decode all parameters required for decryption of a drive. As there is
> currently no other tool that requires JSON, and as gnulib does not
> provide a parser, we need to introduce a new one into the code base. The
> backend for the JSON implementation is going to be the jsmn library [1].
> It has several benefits that make it a very good fit for inclusion in
> GRUB:
>
>     - It is licensed under MIT.
>     - It is written in C89.
>     - It has no dependencies, not even libc.
>     - It is small with only about 500 lines of code.
>     - It doesn't do any dynamic memory allocation.
>     - It is testen on x86, amd64, ARM and AVR.
>
> The library itself comes as a single header, only, that contains both
> declarations and definitions. The exposed interface is kind of
> simplistic, though, and does not provide any convenience features
> whatsoever. Thus there will be a separate interface provided by GRUB
> around this parser that is going to be implemented in the following
> commit. This change only imports "jsmn.h" from tag v1.1.0 and adds it
> unmodified to a new "json" module with the following command:
>
> ```
> curl -L https://raw.githubusercontent.com/zserge/jsmn/v1.1.0/jsmn.h \
>     -o grub-core/lib/json/jsmn.h
> ```
>
> Upstream jsmn commit hash: fdcef3ebf886fa210d14956d3c068a653e76a24e
> Upstream jsmn commit name: Modernize (#149), 2019-04-20
>
> [1]: https://github.com/zserge/jsmn
>
> Signed-off-by: Patrick Steinhardt <address@hidden>

Reviewed-by: Daniel Kiper <address@hidden>

Daniel



reply via email to

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