Skip to content

Commit

Permalink
#15 Add grub wait view
Browse files Browse the repository at this point in the history
  • Loading branch information
yunheur committed Aug 18, 2015
1 parent 9b57a54 commit 8cb5593
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
4 changes: 2 additions & 2 deletions grub/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#if defined (GRUB_BUILD)
#undef ENABLE_NLS
#define BUILD_SIZEOF_LONG 4
#define BUILD_SIZEOF_VOID_P 4
#define BUILD_SIZEOF_LONG 8
#define BUILD_SIZEOF_VOID_P 8
#if defined __APPLE__
# if defined __BIG_ENDIAN__
# define BUILD_WORDS_BIGENDIAN 1
Expand Down
28 changes: 28 additions & 0 deletions grub/grub-core/normal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <grub/charset.h>
#include <grub/script_sh.h>
#include <grub/bufio.h>
#include <grub/time.h>

GRUB_MOD_LICENSE ("GPLv3+");

Expand Down Expand Up @@ -254,11 +255,38 @@ read_lists_hook (struct grub_env_var *var __attribute__ ((unused)),
return val ? grub_strdup (val) : NULL;
}

/* Wait GRUB Network Boot */
static void
grub_network_boot_wait (void)
{
int n = 0;

grub_cls ();

grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
grub_printf ("Welcome to GRUB Network!\n");
grub_printf ("Security Mulit-Bootloader @TNTeam #1st NHN CodeCamp\n\n");

grub_printf ("Wait");
while(n < 10)
{

grub_sleep (1);
grub_printf (".");

n++;
}

grub_cls ();
}

/* Read the config file CONFIG and execute the menu interface or
the command line interface if BATCH is false. */
void
grub_normal_execute (const char *config, int nested, int batch)
{
grub_network_boot_wait();

grub_menu_t menu = 0;
const char *prefix;

Expand Down
37 changes: 36 additions & 1 deletion grub/po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
./config-util.h
./config.h
./grub-core/boot/decompressor/minilib.c
./grub-core/boot/decompressor/none.c
Expand Down Expand Up @@ -230,7 +231,9 @@
./grub-core/gfxmenu/view.c
./grub-core/gfxmenu/widget-box.c
./grub-core/gnulib/alloca.c
./grub-core/gnulib/alloca.h
./grub-core/gnulib/alloca.in.h
./grub-core/gnulib/arg-nonnull.h
./grub-core/gnulib/argp-ba.c
./grub-core/gnulib/argp-eexst.c
./grub-core/gnulib/argp-fmtstream.c
Expand All @@ -247,6 +250,8 @@
./grub-core/gnulib/asnprintf.c
./grub-core/gnulib/basename-lgpl.c
./grub-core/gnulib/btowc.c
./grub-core/gnulib/c++defs.h
./grub-core/gnulib/configmake.h
./grub-core/gnulib/dirname-lgpl.c
./grub-core/gnulib/dirname.h
./grub-core/gnulib/dosname.h
Expand All @@ -262,15 +267,18 @@
./grub-core/gnulib/getdelim.c
./grub-core/gnulib/getline.c
./grub-core/gnulib/getopt.c
./grub-core/gnulib/getopt.h
./grub-core/gnulib/getopt.in.h
./grub-core/gnulib/getopt1.c
./grub-core/gnulib/getopt_int.h
./grub-core/gnulib/gettext.h
./grub-core/gnulib/intprops.h
./grub-core/gnulib/itold.c
./grub-core/gnulib/langinfo.h
./grub-core/gnulib/langinfo.in.h
./grub-core/gnulib/localcharset.c
./grub-core/gnulib/localcharset.h
./grub-core/gnulib/locale.h
./grub-core/gnulib/locale.in.h
./grub-core/gnulib/localeconv.c
./grub-core/gnulib/malloc.c
Expand Down Expand Up @@ -306,46 +314,60 @@
./grub-core/gnulib/regexec.c
./grub-core/gnulib/size_max.h
./grub-core/gnulib/sleep.c
./grub-core/gnulib/stdalign.h
./grub-core/gnulib/stdalign.in.h
./grub-core/gnulib/stdbool.in.h
./grub-core/gnulib/stddef.in.h
./grub-core/gnulib/stdint.in.h
./grub-core/gnulib/stdio.h
./grub-core/gnulib/stdio.in.h
./grub-core/gnulib/stdlib.h
./grub-core/gnulib/stdlib.in.h
./grub-core/gnulib/strcasecmp.c
./grub-core/gnulib/strchrnul.c
./grub-core/gnulib/streq.h
./grub-core/gnulib/strerror-override.c
./grub-core/gnulib/strerror-override.h
./grub-core/gnulib/strerror.c
./grub-core/gnulib/string.h
./grub-core/gnulib/string.in.h
./grub-core/gnulib/strings.h
./grub-core/gnulib/strings.in.h
./grub-core/gnulib/stripslash.c
./grub-core/gnulib/strncasecmp.c
./grub-core/gnulib/strndup.c
./grub-core/gnulib/strnlen.c
./grub-core/gnulib/strnlen1.c
./grub-core/gnulib/strnlen1.h
./grub-core/gnulib/sys/types.h
./grub-core/gnulib/sys_types.in.h
./grub-core/gnulib/sysexits.in.h
./grub-core/gnulib/unistd.c
./grub-core/gnulib/unistd.h
./grub-core/gnulib/unistd.in.h
./grub-core/gnulib/unitypes.h
./grub-core/gnulib/unitypes.in.h
./grub-core/gnulib/uniwidth.h
./grub-core/gnulib/uniwidth.in.h
./grub-core/gnulib/uniwidth/cjk.h
./grub-core/gnulib/uniwidth/width.c
./grub-core/gnulib/vasnprintf.c
./grub-core/gnulib/vasnprintf.h
./grub-core/gnulib/verify.h
./grub-core/gnulib/vsnprintf.c
./grub-core/gnulib/warn-on-use.h
./grub-core/gnulib/wchar.h
./grub-core/gnulib/wchar.in.h
./grub-core/gnulib/wcrtomb.c
./grub-core/gnulib/wctype-h.c
./grub-core/gnulib/wctype.h
./grub-core/gnulib/wctype.in.h
./grub-core/gnulib/wcwidth.c
./grub-core/gnulib/xsize.c
./grub-core/gnulib/xsize.h
./grub-core/grub_script.tab.c
./grub-core/grub_script.tab.h
./grub-core/grub_script.yy.c
./grub-core/grub_script.yy.h
./grub-core/hello/hello.c
./grub-core/hook/datehook.c
./grub-core/io/bufio.c
Expand Down Expand Up @@ -786,12 +808,15 @@
./grub-core/partmap/sun.c
./grub-core/partmap/sunpc.c
./grub-core/parttool/msdospart.c
./grub-core/rs_decoder.h
./grub-core/script/argv.c
./grub-core/script/execute.c
./grub-core/script/function.c
./grub-core/script/lexer.c
./grub-core/script/main.c
./grub-core/script/script.c
./grub-core/symlist.c
./grub-core/symlist.h
./grub-core/term/arc/console.c
./grub-core/term/arc/serial.c
./grub-core/term/at_keyboard.c
Expand Down Expand Up @@ -833,6 +858,8 @@
./grub-core/tests/video_checksum.c
./grub-core/tests/videotest_checksum.c
./grub-core/tests/xnu_uuid_test.c
./grub-core/trigtables.c
./grub-core/unidata.c
./grub-core/video/bitmap.c
./grub-core/video/bitmap_scale.c
./grub-core/video/bochs.c
Expand Down Expand Up @@ -860,6 +887,11 @@
./grub-core/video/sm712.c
./grub-core/video/sm712_init.c
./grub-core/video/video.c
./grub_fstest_init.c
./grub_script.tab.c
./grub_script.tab.h
./grub_script.yy.c
./grub_script.yy.h
./include/grub/acorn_filecore.h
./include/grub/acpi.h
./include/grub/aout.h
Expand Down Expand Up @@ -949,6 +981,8 @@
./include/grub/fs.h
./include/grub/fshelp.h
./include/grub/gcry/types.h
./include/grub/gcrypt/g10lib.h
./include/grub/gcrypt/gcrypt.h
./include/grub/gcrypt/gpg-error.h
./include/grub/gdb.h
./include/grub/gfxmenu_model.h
Expand Down Expand Up @@ -1222,6 +1256,7 @@
./include/grub/zfs/zio_checksum.h
./include/multiboot.h
./include/multiboot2.h
./libgrub_a_init.c
./tests/cmp_unit_test.c
./tests/date_unit_test.c
./tests/example_unit_test.c
Expand Down

0 comments on commit 8cb5593

Please sign in to comment.