[U-Boot] [PATCH v2] common: add a grepenv command

Mike Frysinger vapier at gentoo.org
Sat Apr 2 01:06:28 CEST 2011


On Fri, Apr 1, 2011 at 6:46 PM, Kim Phillips wrote:
> u-boot environments, esp. when boards are shared across multiple
> users, can get pretty large and time consuming to visually parse.
> The grepenv command this patch adds can be used in lieu of printenv
> to facilitate searching.  grepenv works like printenv but limits
> its output only to environment strings (variable name and value
> pairs) that match the user specified substring.

please add a proper #ifdef like CONFIG_CMD_GREPENV and do not enable
it by default.

> +int do_grepenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

static

> +       char buf[CONFIG_SYS_CBSIZE], *searchstr;

i dont think that is correct usage of this define
-mike


More information about the U-Boot mailing list