From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 4 Jul 2012 16:39:20 +0200 Subject: [U-Boot] [PATCH 5/7] dfu:cmd: Support for DFU u-boot command In-Reply-To: <20120704112846.33deb5c8@lmajewski.digital.local> References: <1341308291-14663-1-git-send-email-l.majewski@samsung.com> <201207032332.54228.marex@denx.de> <20120704112846.33deb5c8@lmajewski.digital.local> Message-ID: <201207041639.21012.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lukasz Majewski, > Hi Marek, > > > Dear Lukasz Majewski, > > > > > Support for u-boot's command line command "dfu > > > [list]". > > > > > > Signed-off-by: Lukasz Majewski > > > Signed-off-by: Kyungmin Park > > > Cc: Marek Vasut > > > --- > > > > [...] > > > > > +int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const > > > argv[]) +{ > > > + char *str_env = NULL, *env_bkp = NULL; > > > + static char *s = "dfu"; > > > + int ret = 0; > > > + > > > + if (argc < 3) > > > + return CMD_RET_USAGE; > > > + > > > + str_env = getenv("dfu_alt_info"); > > > + if (str_env == NULL) { > > > + printf("%s: \"dfu_alt_info\" env variable not > > > defined!\n", > > > + __func__); > > > > I was always curious if it's not possible to do something like > > > > puts(__func__ "rest of string"); > > > > Maybe it'd help the overhead a bit? Certainly, it's beyond the scope > > of this patchset, I'm just curious :) > > It is a good idea, since many error/info messages are supposed to > produce following output: > > "dfu_write: Not enough space!" > > Putting there the __func__ name would improve structure and speed up > finding right place. And if you want to use even __LINE__, look up __stringify patch in the ML archives ;-) > > > + return CMD_RET_FAILURE; > > > + } > > > > [...] > > > > Best regards, > > Marek Vasut Best regards, Marek Vasut