commands: add lodvar - load variable from file content
PATCH 1/1 commands: add lodvar - load variable from file content
This adds a command to load a variable from file content. It is a work-a-round for "var=$(cat file)".
--- commands/Kconfig | 7 +++++ commands/Makefile | 1 + commands/loadvar.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 commands/loadvar.c
commands/Kconfig +7 -0
@@ -752,6 +752,13 @@ config CMD_SAVEENV /dev/env0. Note that envfs can only handle files, directories are being skipped silently. +config CMD_LOADVAR + tristate + prompt "loadvar" + help + Load variables from file contents. + Usage: loadvar VAR FILE + # end Environment commands endmenu
commands/Makefile +1 -0
@@ -103,3 +103,4 @@ obj-$(CONFIG_CMD_LSPCI) += lspci.o obj-$(CONFIG_CMD_IMD) += imd.o obj-$(CONFIG_CMD_HWCLOCK) += hwclock.o obj-$(CONFIG_CMD_USBGADGET) += usbgadget.o +obj-$(CONFIG_CMD_LOADVAR) += loadvar.o
commands/loadvar.c new file +90 -0
90 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Sebastian,
Quoted 3 lines · Sebastian Block
This adds a command to load a variable from file content. It is a work-a-round for "var=$(cat file)".
doesn't commands/readf.c do similar things?
- Alex
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Alex,
Quoted 7 lines · Sebastian Block
Quoted 3 lines
This adds a command to load a variable from file content. It is a work-a-round for "var=$(cat file)".
doesn't
commands/readf.cdo similar things?
you are right. Please forget this patch.
Sebastian
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 12 lines · Sebastian Block
Hi Alex,
Quoted 7 lines · Sebastian Block
Quoted 3 lines
This adds a command to load a variable from file content. It is a work-a-round for "var=$(cat file)".
doesn't
commands/readf.cdo similar things?you are right. Please forget this patch.
Please don't interpret this as negative comment, you are always welcome to introduce new commands. :-)
- Alex
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox