Our asprintf and vasprintf have different prototypes than the glibc
functions. This causes trouble when we want to share barebox code
with userspace code. Change the prototypes for (v)asprintf to match
the glibc prototypes. Since the current (v)asprintf are convenient
to use change the existing functions to b(v)asprintf.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some EFI get_variable() implementations don't set the attributes when
returning EFI_BUFFER_TOO_SMALL.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Implement the standard FS ops for writing/manipulating
efivars.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We don't have a use-case yet where we need to manipulate
the attributes of a variable and it confuses "normal"
users of the variables.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Preserve info needed for easy manipulation of variables.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cleans the code a bit and will allow us to implement
removing of vars quite a bit easier.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This implements a filesystem for accessing EFI variables.
It is compatible to the Linux Kernel efivarfs filesystem.
Currently the variables can only be accessed readonly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>