From 1a8f41bc4c3c1508dd0d0c821074d3d527326a1d Mon Sep 17 00:00:00 2001 From: okuji Date: Sun, 3 Oct 1999 08:45:15 +0000 Subject: [PATCH] fix a bug in gunzip_test_header. --- ChangeLog | 7 +++++++ stage2/gunzip.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 732a8d151..d91c6ce70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-10-03 OKUJI Yoshinori + + * stage2/gunzip.c (gunzip_test_header): Check if CURRENT_DRIVE + is 0x20 instead of if the fs type is TFTP, because GRUB does not + mount CURRENT_DRIVE when using a block file. Reported by Pavel + Roskin. + 1999-10-02 OKUJI Yoshinori * stage2/builtins.c (cat_func): Do not read the whole of a file diff --git a/stage2/gunzip.c b/stage2/gunzip.c index 076e10499..fdd994d41 100644 --- a/stage2/gunzip.c +++ b/stage2/gunzip.c @@ -271,7 +271,9 @@ gunzip_test_header (void) unsigned char buf[10]; int is_tftp = 0; - if (grub_strcmp (fsys_table[fsys_type].name, "tftp") == 0) + /* XXX: currently, if CURRENT_DRIVE is a network device, we use only + tftp. */ + if (current_drive == 0x20) is_tftp = 1; /* "compressed_file" is already reset to zero by this point */