Re: [PATCH 1/1] command: add read command

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:15 Fri 27 Sep , Sascha Hauer wrote: > On Thu, Sep 26, 2013 at 07:45:56AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > +static int do_read(int argc, char *argv[]) > > +{ > > + int opt; > > + int cont = 0; > > + int ret = -EINVAL; > > + char *var; > > + char *buf = xzallo

Re: [PATCH 1/1] command: add read command

2013-09-27 Thread Sascha Hauer
On Thu, Sep 26, 2013 at 07:45:56AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > +static int do_read(int argc, char *argv[]) > +{ > + int opt; > + int cont = 0; > + int ret = -EINVAL; > + char *var; > + char *buf = xzalloc(2049); > + char *filename = NULL; > + > + if

[PATCH 1/1] command: add read command

2013-09-25 Thread Jean-Christophe PLAGNIOL-VILLARD
this will allow us to read file content into a var Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- commands/Kconfig | 4 ++ commands/Makefile | 1 + commands/read.c | 126 ++ 3 files changed, 131 insertions(+) create mode 100644 com