* [U-Boot] [PATCH] net: Fix arguments in tftpput command @ 2011-12-17 4:24 Simon Glass 2011-12-17 18:54 ` Mike Frysinger 2011-12-17 20:00 ` Wolfgang Denk 0 siblings, 2 replies; 4+ messages in thread From: Simon Glass @ 2011-12-17 4:24 UTC (permalink / raw) To: u-boot The switch to strict_strtoul() was not done correctly - this fixes the compile error when CONFIG_CMD_TFTPPUT is active. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/cmd_net.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_net.c b/common/cmd_net.c index f89a24b..be7cc01 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -221,8 +221,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, #ifdef CONFIG_CMD_TFTPPUT case 4: - save_addr = strict_strtoul(argv[1], NULL, 16); - save_size = strict_strtoul(argv[2], NULL, 16); + strict_strtoul(argv[1], 16, &save_addr); + strict_strtoul(argv[2], 16, &save_size); copy_filename(BootFile, argv[3], sizeof(BootFile)); break; #endif -- 1.7.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] net: Fix arguments in tftpput command 2011-12-17 4:24 [U-Boot] [PATCH] net: Fix arguments in tftpput command Simon Glass @ 2011-12-17 18:54 ` Mike Frysinger 2011-12-17 20:00 ` Wolfgang Denk 1 sibling, 0 replies; 4+ messages in thread From: Mike Frysinger @ 2011-12-17 18:54 UTC (permalink / raw) To: u-boot Acked-by: Mike Frysinger <vapier@gentoo.org> -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111217/01d22ff1/attachment.pgp> ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] net: Fix arguments in tftpput command 2011-12-17 4:24 [U-Boot] [PATCH] net: Fix arguments in tftpput command Simon Glass 2011-12-17 18:54 ` Mike Frysinger @ 2011-12-17 20:00 ` Wolfgang Denk 2011-12-18 5:52 ` Simon Glass 1 sibling, 1 reply; 4+ messages in thread From: Wolfgang Denk @ 2011-12-17 20:00 UTC (permalink / raw) To: u-boot Dear Simon Glass, In message <1324095888-22757-1-git-send-email-sjg@chromium.org> you wrote: > The switch to strict_strtoul() was not done correctly - this fixes > the compile error when CONFIG_CMD_TFTPPUT is active. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > common/cmd_net.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/common/cmd_net.c b/common/cmd_net.c > index f89a24b..be7cc01 100644 > --- a/common/cmd_net.c > +++ b/common/cmd_net.c > @@ -221,8 +221,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, > > #ifdef CONFIG_CMD_TFTPPUT > case 4: > - save_addr = strict_strtoul(argv[1], NULL, 16); > - save_size = strict_strtoul(argv[2], NULL, 16); > + strict_strtoul(argv[1], 16, &save_addr); > + strict_strtoul(argv[2], 16, &save_size); strict_strtoul() returns error codes. We should not ignore these. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Vulcans believe peace should not depend on force. -- Amanda, "Journey to Babel", stardate 3842.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] net: Fix arguments in tftpput command 2011-12-17 20:00 ` Wolfgang Denk @ 2011-12-18 5:52 ` Simon Glass 0 siblings, 0 replies; 4+ messages in thread From: Simon Glass @ 2011-12-18 5:52 UTC (permalink / raw) To: u-boot Hi Wolfgang, On Sat, Dec 17, 2011 at 12:00 PM, Wolfgang Denk <wd@denx.de> wrote: > Dear Simon Glass, > > In message <1324095888-22757-1-git-send-email-sjg@chromium.org> you wrote: >> The switch to strict_strtoul() was not done correctly - this fixes >> the compile error when CONFIG_CMD_TFTPPUT is active. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> >> --- >> ?common/cmd_net.c | ? ?4 ++-- >> ?1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/common/cmd_net.c b/common/cmd_net.c >> index f89a24b..be7cc01 100644 >> --- a/common/cmd_net.c >> +++ b/common/cmd_net.c >> @@ -221,8 +221,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, >> >> ?#ifdef CONFIG_CMD_TFTPPUT >> ? ? ? case 4: >> - ? ? ? ? ? ? save_addr = strict_strtoul(argv[1], NULL, 16); >> - ? ? ? ? ? ? save_size = strict_strtoul(argv[2], NULL, 16); >> + ? ? ? ? ? ? strict_strtoul(argv[1], 16, &save_addr); >> + ? ? ? ? ? ? strict_strtoul(argv[2], 16, &save_size); > > strict_strtoul() returns error codes. ?We should not ignore these. Er yes, I wondered about that. I will resubmit with a cmd_usage() in that case. Regards, Simon > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > Vulcans believe peace should not depend on force. > ? ? ? ?-- Amanda, "Journey to Babel", stardate 3842.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-18 5:52 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-17 4:24 [U-Boot] [PATCH] net: Fix arguments in tftpput command Simon Glass 2011-12-17 18:54 ` Mike Frysinger 2011-12-17 20:00 ` Wolfgang Denk 2011-12-18 5:52 ` Simon Glass
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox