diff options
| author | Michael Brown | 2007-06-29 02:42:59 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-06-29 02:42:59 +0200 |
| commit | 40d6d3dcf4b283272d3bd8166164b4622a85530b (patch) | |
| tree | edb41056ca755b6fc3252bd7e802f45d70537ed0 /src/interface/pxe/pxe_tftp.c | |
| parent | Initial notes on RIS (diff) | |
| download | ipxe-40d6d3dcf4b283272d3bd8166164b4622a85530b.tar.gz ipxe-40d6d3dcf4b283272d3bd8166164b4622a85530b.tar.xz ipxe-40d6d3dcf4b283272d3bd8166164b4622a85530b.zip | |
Windows RIS now gets as far as downloading NTLDR.
Diffstat (limited to 'src/interface/pxe/pxe_tftp.c')
| -rw-r--r-- | src/interface/pxe/pxe_tftp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interface/pxe/pxe_tftp.c b/src/interface/pxe/pxe_tftp.c index 919d5c9e2..56529b155 100644 --- a/src/interface/pxe/pxe_tftp.c +++ b/src/interface/pxe/pxe_tftp.c @@ -56,8 +56,10 @@ static unsigned int pxe_single_blkidx; * @v port Server port (in network byte order) * @v filename File name * @v blksize Requested block size, or 0 + * + * The URI string buffer must be at least @c PXE_URI_LEN bytes long. */ -static void pxe_tftp_build_uri ( char uri_string[PXE_URI_LEN], +static void pxe_tftp_build_uri ( char *uri_string, uint32_t ipaddress, unsigned int port, const unsigned char *filename, int blksize ) { @@ -73,7 +75,7 @@ static void pxe_tftp_build_uri ( char uri_string[PXE_URI_LEN], blksize = TFTP_MAX_BLKSIZE; tftp_set_request_blksize ( blksize ); - snprintf ( uri_string, sizeof ( uri_string ), "tftp://%s:%d%s%s", + snprintf ( uri_string, PXE_URI_LEN, "tftp://%s:%d%s%s", inet_ntoa ( address ), ntohs ( port ), ( ( filename[0] == '/' ) ? "" : "/" ), filename ); } @@ -372,6 +374,9 @@ PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE tftp_read_file->FileName, 0 ); DBG ( " %s", uri_string ); + DBG ( " to %08lx+%lx", tftp_read_file->Buffer, + tftp_read_file->BufferSize ); + /* Open URI */ fd = open ( uri_string ); if ( fd < 0 ) { |
