TFTP: add host ip addr support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 1 patch 0 repliesNew
Patches in v1 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot-Users] [PATCH 0/1] TFTP: add host ip addr support
Quoted 11 lines · Andre Renaud
Jean-Christophe PLAGNIOL-VILLARD wrote:
Doesn't this mean that TftpServerIP will be undefined if no server is specified. Should it not be:
(quoted diff) +1
-1@@ -464,19 +464,27 @@ TftpStart (void) printf ("*** Warning: no boot file name; using '%s'\n", tftp_filename); } else { - tftp_filename = BootFile; + char *p=BootFile;
Review TftpStart (void) · line 477
Quoted 10 lines
(quoted diff) +9
-0+ p = strchr (p, ':'); + if (p != NULL) { + TftpServerIP = string_to_ip (BootFile); + ++p; + strcpy (tftp_filename, p); + } else { + TftpServerIP = NetServerIP; + strcpy (tftp_filename, BootFile); + }
I will prefer
+ TftpServerIP = NetServerIP;
if (BootFile[0] == '\0') {
sprintf(default_filename, "%02lX%02lX%02lX%02lX.img",
NetOurIP & 0xFF,
@@ -464,19 +465,26 @@ TftpStart (void)
printf ("*** Warning: no boot file name; using '%s'\n",
tftp_filename);
} else {
- tftp_filename = BootFile;
+ char *p=BootFile;
+ p = strchr (p, ':');
+ if (p != NULL) {
+ TftpServerIP = string_to_ip (BootFile);
+ ++p;
+ strcpy (tftp_filename, p);+ } else
+ strcpy (tftp_filename, BootFile);
Quoted 10 lines
Andre
Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solutions Centre Andre Renaud Bluewater Systems Ltd Phone: +64 3 3779127 (Aus 1 800 148 751) Level 17, 119 Armagh St Fax: +64 3 3779135 PO Box 13889 Email: arenaud at bluewatersys.com Christchurch Web: http://www.bluewatersys.com New Zealand