fix and improve tftp_read.

This commit is contained in:
okuji 2000-02-25 06:13:50 +00:00
parent b9ff0c2f81
commit ab6cc80541
2 changed files with 19 additions and 9 deletions

View file

@ -1,3 +1,14 @@
2000-02-25 OKUJI Yoshinori <okuji@gnu.org>
* netboot/fsys_tftp.c (tftp_read): Set BUF_READ to zero if
FILEPOS is less than SAVED_FILEPOS, before calling buf_fill.
Don't discard all of the copied data so that we can move FILEPOS
backwards cheaply. Now SAVED_FILEPOS indicates the file position
corresponding to the first byte of BUF. If (FILEPOS -
SAVED_FILEPOS) is greater than (FSYS_BUFLEN / 2), move the data
forwards and add (FSYS_BUFLEN / 2) into SAVED_FILEPOS and
subtract the same value from BUF_READ.
2000-02-24 OKUJI Yoshinori <okuji@gnu.org>
* stage2/disk_io.c [!STAGE1_5] (print_fsys_type): Mask