528938d503
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 <ps@pks.im> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
.. | ||
man | ||
autoiso.cfg | ||
fdl.texi | ||
font_char_metrics.png | ||
font_char_metrics.txt | ||
grub-dev.texi | ||
grub.cfg | ||
grub.texi | ||
Makefile.am | ||
mdate-sh | ||
osdetect.cfg | ||
texinfo.tex |