diff --git a/ChangeLog b/ChangeLog index 988e5f616..34df1f590 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +1999-09-04 Pavel Roskin + + * docs/menu.lst: More meaningful examples. Not using (0x80,0) + notation anymore. + * stage2/stage2.c (run_menu): Erase the entered password before + get_cmdline(). Help on TAB disabled when entering the password. + * stage2/char_io.c (get_cmdline): Restore command-line even if + there is no help string. + * configure.in: --disable-gunzip disables decompression in + stage2. + * stage2/gunzip.c [NO_DECOMPRESSION]: Disable all code if + decompression is disabled. + 1999-09-03 OKUJI Yoshinori * stage2/boot.c (load_image): Use PHDR->P_PADDR instead of diff --git a/NEWS b/NEWS index b36df051a..324cdfd31 100644 --- a/NEWS +++ b/NEWS @@ -4,8 +4,7 @@ New in 0.5.93: * ELF format of FreeBSD kernel is supported. * Support the partition ids for NetBSD and OpenBSD. * Exit from the grub shell just by pushing the key `q' in the menu. -* The options --disable-ext2fs, --disable-fat and --disable-ffs disable - ext2fs, FAT and FFS support in Stage 2 respectively. +* New options for configure can disable some functions in Stage 2. * FAT32 support is added. * Minix fs support is added. * New commands "hide" and "unhide". diff --git a/configure b/configure index 519a90a99..621311c4e 100644 --- a/configure +++ b/configure @@ -22,6 +22,8 @@ ac_help="$ac_help --disable-ffs disable FFS support in Stage 2" ac_help="$ac_help --disable-minix disable Minix fs support in Stage 2" +ac_help="$ac_help + --disable-gunzip disable decompression in Stage 2" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -563,7 +565,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:567: checking for a BSD compatible install" >&5 +echo "configure:569: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -620,7 +622,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:624: checking whether build environment is sane" >&5 +echo "configure:626: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -681,7 +683,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:685: checking for $ac_word" >&5 +echo "configure:687: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -711,7 +713,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:715: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:717: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -760,7 +762,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:764: checking for working aclocal" >&5 +echo "configure:766: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -773,7 +775,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:777: checking for working autoconf" >&5 +echo "configure:779: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -786,7 +788,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:790: checking for working automake" >&5 +echo "configure:792: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -799,7 +801,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:803: checking for working autoheader" >&5 +echo "configure:805: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -812,7 +814,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:816: checking for working makeinfo" >&5 +echo "configure:818: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -832,7 +834,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:836: checking for $ac_word" >&5 +echo "configure:838: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -873,7 +875,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:877: checking host system type" >&5 +echo "configure:879: checking host system type" >&5 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then # Make sure we can run config.sub. @@ -958,7 +960,7 @@ fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:962: checking build system type" >&5 +echo "configure:964: checking build system type" >&5 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then # Make sure we can run config.sub. @@ -1005,7 +1007,7 @@ fi # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1009: checking for $ac_word" >&5 +echo "configure:1011: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1037,7 +1039,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1041: checking for $ac_word" >&5 +echo "configure:1043: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1067,7 +1069,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1071: checking for $ac_word" >&5 +echo "configure:1073: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1118,7 +1120,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1122: checking for $ac_word" >&5 +echo "configure:1124: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1150,7 +1152,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1154: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:1156: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1161,12 +1163,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1165 "configure" +#line 1167 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1192,12 +1194,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1201: checking whether we are using GNU C" >&5 +echo "configure:1203: checking whether we are using GNU C" >&5 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1206,7 +1208,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1225,7 +1227,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1229: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1231: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1259,7 +1261,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1263: checking for $ac_word" >&5 +echo "configure:1265: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1294,7 +1296,7 @@ if test "x$ac_cv_prog_gcc" = xyes; then STAGE1_CFLAGS="-O2" GRUB_CFLAGS="-O2" echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6 -echo "configure:1298: checking whether optimization for size works" >&5 +echo "configure:1300: checking whether optimization for size works" >&5 if eval "test \"\${size_flag+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1302,14 +1304,14 @@ else saved_CFLAGS=$CFLAGS CFLAGS="-Os -g" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* size_flag=yes else @@ -1342,7 +1344,7 @@ CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused" # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1346: checking for $ac_word" >&5 +echo "configure:1348: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1374,7 +1376,7 @@ fi # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args. set dummy ${ac_tool_prefix}objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1378: checking for $ac_word" >&5 +echo "configure:1380: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_OBJCOPY+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1407,7 +1409,7 @@ fi # Defined in acinclude.m4. echo $ac_n "checking symbol names produced by ${CC-cc}""... $ac_c" 1>&6 -echo "configure:1411: checking symbol names produced by ${CC-cc}" >&5 +echo "configure:1413: checking symbol names produced by ${CC-cc}" >&5 if eval "test \"\${grub_cv_asm_ext_c+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1420,7 +1422,7 @@ func (int *list) } EOF -if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then : +if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then : else { echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; } fi @@ -1449,7 +1451,7 @@ EOF echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6 -echo "configure:1453: checking whether ${OBJCOPY} works for absolute addresses" >&5 +echo "configure:1455: checking whether ${OBJCOPY} works for absolute addresses" >&5 if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1461,21 +1463,21 @@ blah (void) } EOF -if { (eval echo configure:1465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then : +if { (eval echo configure:1467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then : else { echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; } fi grub_cv_prog_objcopy_absolute=yes for link_addr in 2000 8000 7C00; do - if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : + if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : else { echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; } fi - if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : + if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : else { echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; } fi - if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then mv -f conftest conftest.old else grub_cv_prog_objcopy_absolute=no @@ -1492,7 +1494,7 @@ fi echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6 -echo "configure:1496: checking for .code16 addr32 assembler support" >&5 +echo "configure:1498: checking for .code16 addr32 assembler support" >&5 if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1502,7 +1504,7 @@ l1: addr32 movb %al, l1 EOF -if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then +if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then grub_cv_asm_addr32=yes else grub_cv_asm_addr32=no @@ -1517,7 +1519,7 @@ fi echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6 -echo "configure:1521: checking whether addr32 must be in the same line as the instruction" >&5 +echo "configure:1523: checking whether addr32 must be in the same line as the instruction" >&5 if eval "test \"\${grub_cv_asm_prefix_requirement+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1526,7 +1528,7 @@ else l1: addr32 movb %al, l1 EOF -if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then +if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then grub_cv_asm_prefix_requirement=yes else grub_cv_asm_prefix_requirement=no @@ -1557,7 +1559,7 @@ fi # Check for curses libraries. echo $ac_n "checking for getch in -lncurses""... $ac_c" 1>&6 -echo "configure:1561: checking for getch in -lncurses" >&5 +echo "configure:1563: checking for getch in -lncurses" >&5 ac_lib_var=`echo ncurses'_'getch | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1565,7 +1567,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1599,7 +1601,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getch in -lcurses""... $ac_c" 1>&6 -echo "configure:1603: checking for getch in -lcurses" >&5 +echo "configure:1605: checking for getch in -lcurses" >&5 ac_lib_var=`echo curses'_'getch | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1607,7 +1609,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1648,7 +1650,7 @@ fi # Check for headers. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1652: checking how to run the C preprocessor" >&5 +echo "configure:1654: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1663,13 +1665,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1680,13 +1682,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1697,13 +1699,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1731,17 +1733,17 @@ for ac_hdr in string.h strings.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1735: checking for $ac_hdr" >&5 +echo "configure:1737: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1815,6 +1817,17 @@ if test x"$enable_minix" != xno; then FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_MINIX=1" fi +# Check whether --enable-gunzip or --disable-gunzip was given. +if test "${enable_gunzip+set}" = set; then + enableval="$enable_gunzip" + : +fi + + +if test x"$enable_gunzip" = xno; then + FSYS_CFLAGS="$FSYS_CFLAGS -DNO_DECOMPRESSION=1" +fi + diff --git a/configure.in b/configure.in index bde73d064..df623e11f 100644 --- a/configure.in +++ b/configure.in @@ -148,6 +148,13 @@ if test x"$enable_minix" != xno; then FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_MINIX=1" fi +AC_ARG_ENABLE(gunzip, + [ --disable-gunzip disable decompression in Stage 2]) + +if test x"$enable_gunzip" = xno; then + FSYS_CFLAGS="$FSYS_CFLAGS -DNO_DECOMPRESSION=1" +fi + AC_SUBST(FSYS_CFLAGS) diff --git a/docs/menu.lst b/docs/menu.lst index bba586dd0..114f077bf 100644 --- a/docs/menu.lst +++ b/docs/menu.lst @@ -21,13 +21,13 @@ kernel (hd1,0)/vmlinuz root=/dev/hdb1 # For booting Mach (getting kernel from floppy) title Utah Mach4 multiboot root (hd0,2) -pause My test!! +pause Insert the diskette now!! kernel (fd0)/boot/kernel root=hd0s3 module (fd0)/boot/bootstrap # For booting FreeBSD (getting kernel from floppy) -title FreeBSD 2.2-SNAP -root (hd0,2) +title FreeBSD +root (hd0,2,a) kernel (fd0)/kernel # For booting OS/2 @@ -39,9 +39,9 @@ chainloader +1 # This is similar to "chainload", but loads a specific file #chainloader /boot/chain.os2 -# For booting Windows NT 3.5 or Windows95 -title Windows NT 3.5/Windows 95 boot menu -root (0x80,0) +# For booting Windows NT or Windows95 +title Windows NT / Windows 95 boot menu +root (hd0,0) makeactive chainloader +1 @@ -49,3 +49,5 @@ chainloader +1 title Install GRUB into the hard disk root (hd0,0) install /boot/grub/stage1 d (hd0) /boot/grub/stage2 0x8000 p +# For loading DOS if Windows NT is installed +# chainload /bootsect.dos diff --git a/stage2/char_io.c b/stage2/char_io.c index 2a5d8ae88..a949230fa 100644 --- a/stage2/char_io.c +++ b/stage2/char_io.c @@ -292,8 +292,6 @@ get_cmdline (char *prompt, char *commands, char *cmdline, int maxlen, } else if (commands) printf (commands); - else - break; /* restore command-line */ cmdline[lpos] = c; diff --git a/stage2/gunzip.c b/stage2/gunzip.c index ce30459ca..b8061adc6 100644 --- a/stage2/gunzip.c +++ b/stage2/gunzip.c @@ -124,6 +124,7 @@ the two sets of lengths. */ +#ifndef NO_DECOMPRESSION #include "shared.h" @@ -1219,3 +1220,5 @@ gunzip_read (char *buf, int len) return ret; } + +#endif /* ! NO_DECOMPRESSION */ diff --git a/stage2/stage2.c b/stage2/stage2.c index 50511d187..65b332189 100644 --- a/stage2/stage2.c +++ b/stage2/stage2.c @@ -362,7 +362,10 @@ restart: char *pptr = password; gotoxy(1, 21); - get_cmdline (" Password: ", commands, entered, 31, '*'); + + /* Wipe out the previously entered password */ + memset (entered, 0, sizeof (entered)); + get_cmdline (" Password: ", NULL, entered, 31, '*'); while (! isspace (*pptr) && *pptr) pptr ++; @@ -373,7 +376,6 @@ restart: if (! strcmp (password, entered)) { char *new_file = config_file; - memset (entered, 0, sizeof (entered)); while (isspace (*pptr)) pptr ++; while ((*(new_file ++) = *(pptr ++)) != 0); @@ -381,7 +383,6 @@ restart: } else { - memset (entered, 0, sizeof (entered)); printf("Failed!\n Press any key to continue..."); getkey (); goto restart;