From b901a125510486e190dd841dfa616cafff0c9242 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 22 May 2007 23:27:46 -0700 Subject: Make it safe to call close_file on an already closed file. The SYSLINUX internal API closes a file automatically upon reading to block EOF (not necessarily file EOF!) Thus, it's fairly likely we'll get SI == 0 (closed file) passed to close_file at some point or another. Just plain admit it, and make close_file accept SI == 0 by spec. --- pxelinux.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pxelinux.asm') diff --git a/pxelinux.asm b/pxelinux.asm index 253aa0f1..3e50245f 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -1078,8 +1078,10 @@ memory_scan_for_pxenv_struct: ; side and send a courtesy ERROR packet to the server. ; close_file: + and si,si + jz .closed mov word [si],0 ; Not in use - ret +.closed: ret ; ; searchdir: -- cgit