Add progress module to display load progress of files.
* grub-core/lib/progress.c: New file. * grub-core/Makefile.core.def (progress): New module. * grub-core/kern/file.c (grub_file_open): File name added. * (grub_file_read): Progress hook added. * grub-core/fs/cbfs.c (grub_cbfs_read): Likewise. * grub-core/fs/cpio_common.c (grub_cpio_read): Likewise. * grub-core/net/net.c (grub_net_fs_read_real): Likewise. * include/grub/file.h (struct grub_file): Add progress module * members. * include/grub/term.h (struct grub_term_output): Likewise. * grub-core/osdep/unix/emuconsole.c (grub_console_term_output): Terminal velocity added. * grub-core/osdep/windows/emuconsole.c (grub_console_term_output): * Likewise. * grub-core/term/arc/console.c (grub_console_term_output): Likewise. * grub-core/term/efi/console.c (grub_console_term_output): Likewise. * grub-core/term/gfxterm.c (grub_video_term): Likewise. * grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output): * Likewise. * grub-core/term/i386/pc/console.c (grub_console_term_output): * Likewise. * grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise. * grub-core/term/ieee1275/console.c (grub_console_term_output): * Likewise. * grub-core/term/morse.c (grub_audio_term_output): Likewise. * grub-core/term/serial.c (grub_serial_term_output): Likewise. * grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise. * grub-core/term/uboot/console.c (uboot_console_term_output): * Likewise.
This commit is contained in:
parent
0d711431c7
commit
84a0e9699f
22 changed files with 205 additions and 7 deletions
|
@ -59,6 +59,10 @@
|
|||
#define GRUB_TERM_TAB '\t'
|
||||
#define GRUB_TERM_BACKSPACE '\b'
|
||||
|
||||
#define GRUB_PROGRESS_NO_UPDATE -1
|
||||
#define GRUB_PROGRESS_FAST 0
|
||||
#define GRUB_PROGRESS_SLOW 2
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
#include <grub/err.h>
|
||||
|
@ -215,6 +219,10 @@ struct grub_term_output
|
|||
/* The feature flags defined above. */
|
||||
grub_uint32_t flags;
|
||||
|
||||
/* Progress data. */
|
||||
grub_uint32_t progress_update_divisor;
|
||||
grub_uint32_t progress_update_counter;
|
||||
|
||||
void *data;
|
||||
};
|
||||
typedef struct grub_term_output *grub_term_output_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue