Permalink
Browse files

修正lz4、vhd不显示解压缩进度指示。增加lzma解压缩进度指示。

  • Loading branch information...
1 parent 4cdcd3c commit e81350b0d145678aa0dccca50092f064a0a4bade yaya committed Dec 8, 2016
Showing with 16 additions and 2 deletions.
  1. +6 −0 ChangeLog_chenall.txt
  2. +9 −1 stage2/dec_lzma.c
  3. +1 −1 stage2/disk_io.c
@@ -1,4 +1,10 @@
更新说明:
+2016-12-08(yaya)
+ 修正lz4、vhd不显示解压缩进度指示。增加lzma解压缩进度指示。
+
+2016-11-09(不点)
+ 0x8205 bit 5 = 1: 使checkkey闲置循环停止指令。
+
2016-04-13(yaya)
支持动画菜单
setmenu --graphic-entry=类型=菜单行数=菜单列数=图形宽(像素)=图形高(像素)=菜单行间距(像素) 菜单项0的路径文件名
View
@@ -1274,6 +1274,7 @@ unsigned long long
dec_lzma_read (unsigned long long buf, unsigned long long len, unsigned long write)
{
UInt64 outTx, outSkip;
+ UInt64 in_len = len, step_len = 0x800000ULL;
//grub_printf("LZMA read buf=%lX len=%lX dic=%X inp=%X\n",buf,len,lzmadec.dic,lzmadec.inp);
//getkey();
@@ -1307,6 +1308,8 @@ dec_lzma_read (unsigned long long buf, unsigned long long len, unsigned long wri
outTx = 0;
outSkip = ufp - dFP;
+ if (len > 0x800000ULL)
+ grub_printf("\r [0M/%ldM]",len>>20);
//grub_printf ("ufp=%lX dFP=%lX\n", ufp, dFP);
//getkey();
@@ -1354,6 +1357,11 @@ dec_lzma_read (unsigned long long buf, unsigned long long len, unsigned long wri
outTx += outTxCur;
ufp += outTxCur;
len -= outTxCur;
+ if (outTx > step_len)
+ {
+ grub_printf("\r [%ldM/%ldM]",step_len>>20,in_len>>20);
+ step_len += 0x800000ULL;
+ }
//grub_printf (" remaining size %lX\n", len);
//getkey();
if (len == 0)
@@ -1419,7 +1427,7 @@ dec_lzma_read (unsigned long long buf, unsigned long long len, unsigned long wri
//grub_printf ("LZMA read end %lX\n", outTx);
//getkey();
-
+ grub_printf("\r \r");
return outTx;
}
View
@@ -2321,7 +2321,7 @@ grub_read (unsigned long long buf, unsigned long long len, unsigned long write)
|| fsys_table[fsys_type].read_func == pxe_read
#endif
#ifndef NO_DECOMPRESSION
- || (compressed_file && decomp_type != DECOMP_TYPE_GZ)
+ || (compressed_file && decomp_type == DECOMP_TYPE_LZMA)
#endif /* NO_DECOMPRESSION */
)
{

0 comments on commit e81350b

Please sign in to comment.