fix a bug in tftp.

This commit is contained in:
okuji 2000-05-22 19:27:35 +00:00
parent 3c5b1b14d9
commit f6e3c77ef1
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2000-05-23 OKUJI Yoshinori <okuji@gnu.org>
* netboot/fsys_tftp.c (tftp_dir): Append "0\0" to the request
string, because the "tsize" option must be followed by zero,
according to RFC 2349.
2000-05-22 OKUJI Yoshinori <okuji@gnu.org>
Synchronize the documentation with the code.

View file

@ -401,8 +401,8 @@ tftp_dir (char *dirname)
ch = nul_terminate (dirname);
/* Make the request string (octet, blksize and tsize). */
len = (grub_sprintf ((char *) tp.u.rrq,
"%s%coctet%cblksize%c%d%ctsize%c0",
dirname, 0, 0, 0, TFTP_MAX_PACKET, 0, 0)
"%s%coctet%cblksize%c%d%ctsize%c0%c0",
dirname, 0, 0, 0, TFTP_MAX_PACKET, 0, 0, 0)
+ TFTP_MIN_PACKET + 1);
/* Restore the original DIRNAME. */
dirname[grub_strlen (dirname)] = ch;