pxelinux: don't rely on PXENV_GET_FILE_SIZE in gPXE support mode
authorH. Peter Anvin <hpa@zytor.com>
Tue, 25 Mar 2008 22:03:09 +0000 (15:03 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 25 Mar 2008 22:03:09 +0000 (15:03 -0700)
Don't rely on PXENV_GET_FILE_SIZE in gPXE support mode.  It sometimes
successfully returns wrong information.

pxelinux.asm

index 862fc47..00adc83 100644 (file)
@@ -1373,10 +1373,14 @@ searchdir:
                mov di,gpxe_get_file_size
                mov [di+2],ax
 
+%if 0
+               ; Disable this for now since gPXE doesn't always
+               ; return valid information in PXENV_GET_FILE_SIZE
                mov bx,PXENV_GET_FILE_SIZE
                call pxenv
                mov eax,[di+4]          ; File size
                jnc .oksize
+%endif
                or eax,-1               ; Size unknown
 .oksize:
                mov [si+tftp_filesize],eax