| diff -Naur grub-0.97_splash/stage2/builtins.c grub-0.97_chinese/stage2/builtins.c |
| --- grub-0.97_splash/stage2/builtins.c 2010-01-03 20:22:31.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/builtins.c 2010-01-03 21:53:30.000000000 +0800 |
| @@ -459,7 +459,10 @@ |
| blocklist_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "blocklist FILE", |
| - "Print the blocklist notation of the file FILE." |
| + "Print the blocklist notation of the file FILE.", |
| + "blocklist FILE", |
| + "\t´òÓ¡³öÎļþ FILE µÄ¡°¿éÇåµ¥¡±±í´ï·¨£¨¸Ã±í´ï·¨Ò²ÊǺϷ¨µÄ GRUB ÎļþÃû£¬" |
| + "\n\t²¢ÇÒÍêÈ«µÈ¼ÛÓÚ FILE¡££©¡£" |
| }; |
| |
| #if ! defined(GRUB_UTIL) && ! defined (STAGE1_5) |
| @@ -1098,7 +1101,9 @@ |
| boot_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "boot", |
| - "Boot the OS/chain-loader which has been loaded." |
| + "Boot the OS/chain-loader which has been loaded.", |
| + "boot", |
| + "\tÒýµ¼ÒѼÓÔصIJÙ×÷ϵͳ»òÉÈÇøÁ´Ê½¼ÓÔØÆ÷¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| |
| @@ -1145,7 +1150,10 @@ |
| "bootp [--with-configfile]", |
| "Initialize a network device via BOOTP. If the option `--with-configfile'" |
| " is given, try to load a configuration file specified by the 150 vendor" |
| - " tag." |
| + " tag.", |
| + "bootp [--with-configfile]", |
| + "\tͨ¹ý BOOTP ³õÊÔ»¯ÍøÂçÉ豸¡£Èç¹ûʹÓÃÁË --with-configfile ²ÎÊý£¬´ËÃüÁî" |
| + "\n\t½«»áÊÔͼȥ¼ÓÔØÒ»¸öÌض¨µÄÅäÖÃÎļþ¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| #endif /* SUPPORT_NETBOOT */ |
| @@ -1426,7 +1434,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "cat [--hex] [--skip=S] [--length=L] [--locate=STRING] [--locate-align=A] FILE", |
| "Print the contents of the file FILE, or print the locations " |
| - "of the string STRING in FILE." |
| + "of the string STRING in FILE.", |
| + "cat [--hex] [--skip=S] [--length=L] [--locate=STRING] [--locate-align=A] FILE", |
| + "\tÏÔʾָ¶¨ÎļþµÄÄÚÈÝ£¬»òÕßÏÔʾÎļþÖÐÖ¸¶¨×Ö·û´®µÄλÖá£" |
| }; |
| |
| |
| @@ -1483,7 +1493,11 @@ |
| "cdrom --add-io-ports=P | --init | --stop", |
| "Initialise/stop atapi cdroms or set additional I/O ports for a possible atapi cdrom device." |
| " The high word of P specifies the base register of the control block registers, and" |
| - " the low word of P specifies the base register of the command block registers." |
| + " the low word of P specifies the base register of the command block registers.", |
| + "cdrom --add-io-ports=P | --init | --stop", |
| + "\t³õʼ»¯»òÕßÍ£Ö¹ËùÓÐµÄ ATAPI CDROM É豸, »òÕßΪһ¸ö¿ÉÄÜµÄ ATAPI CDROM" |
| + "\n\tÉ豸ÉèÖø½¼ÓµÄ IO ¶Ë¿Ú¡£P µÄ¸ß×ÖÖ¸¶¨É豸¿ØÖƼĴæÆ÷×éµÄ¶Ë¿Ú»ùÖ·£¬P µÄ" |
| + "\n\tµÍ×ÖÖ¸¶¨É豸ÃüÁî¼Ä´æÆ÷×éµÄ¶Ë¿Ú»ùÖ·¡£" |
| }; |
| #endif /* ! defined(GRUB_UTIL) && ! defined (STAGE1_5) */ |
| |
| @@ -2542,7 +2556,19 @@ |
| " RAM boot file format. Use --disable-a20 if you wish to turn off" |
| " A20 when transferring control to the boot image." |
| " SL specifies length in bytes at the beginning of the image to be" |
| - " skipped when loading." |
| + " skipped when loading.", |
| + "chainloader [--force] [--load-segment=LS] [--load-offset=LO]" |
| + " [--load-length=LL] [--skip-length=SL] [--boot-cs=CS] [--boot-ip=IP]" |
| + " [--ebx=EBX] [--edx=EDX] [--sdi] [--enable-a20] FILE", |
| + "\t¼ÓÔØÁ´Ê½¼ÓÔØÆ÷ FILE¡£ÈôÖ¸¶¨ÁË --force, ÔòÇ¿ÖƼÓÔضø²»¼ì²éµÚÒ»ÉÈÇø" |
| + "\n\tβ²¿µÄºÏ·¨Òýµ¼±êÇ©(55 AA)ÊÇ·ñ´æÔÚ¡£LS:LO ÓÃÓÚÖ¸¶¨ÓбðÓÚ 0000:7C00" |
| + "\n\tµÄÆô¶¯Ó³Ïñ¼ÓÔصØÖ·¡£LL ÓÃÓÚÖ¸¶¨Æô¶¯Ó³ÏñµÄ³¤¶È£¨ÔÚ 512 ×Ö½ÚÖÁ 640K" |
| + "\n\tÖ®¼ä£©¡£SL ÓÃÓÚÖ¸¶¨×°ÈëÆô¶¯Ó³Ïñ֮ǰÐèÒª´ÓÓ³Ïñ¿ªÍ·Ìø¹ýµÄ³¤¶È£¨ÒÔ×Ö½Ú" |
| + "\n\t¼ÆÊý£©¡£CS:IP ÓÃÓÚÖ¸¶¨ÈÃÆô¶¯Ó³Ïñ»ñµÃ¿ØÖÆÐèÒªÌøתµ½µÄµØÖ·¡£EBX/EDX" |
| + "\n\t·Ö±ðÓÃÓÚÖ¸¶¨ÔÚÆô¶¯Ó³Ïñ»ñµÃ¿ØÖƵÄÄÇÒ»¿Ì EBX/EDX ¼Ä´æÆ÷Ó¦ÓеÄÖµ¡£ÓÃ" |
| + "\n\t--sdi ¿ÉÒÔÇ¿ÖÆ°Ñ FILE µ±×÷ Windows XP µÄÒ»¸öÄÚ´æÆô¶¯Îļþ¸ñʽ(System" |
| + "\n\tDeployment Image)À´¶Ô´ý(Çë²Î¿¼Î¢ÈíÏàÓ¦Îĵµ)¡£Èç¹ûÄãÏ£ÍûÔÚ¿ØÖÆ´«µÝ¸ø" |
| + "\n\tÆô¶¯Ó³ÏñʱÇÐ¶Ï CPU µÄµØÖ·Ïß A20£¬¿ÉÒÔÓà --disable-a20 ²ÎÊý×öµ½¡£" |
| }; |
| |
| |
| @@ -2718,7 +2744,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "cmp [--hex] FILE1 FILE2", |
| "Compare the file FILE1 with the FILE2 and inform the different values" |
| - " if any." |
| + " if any.", |
| + "cmp FILE1 FILE2", |
| + "\t±È½ÏÁ½¸öÎļþ, ²¢ÇÒ±¨¸æÁ½ÕßÖ®¼äµÄ²»Í¬µÄÐÅÏ¢¡£" |
| }; |
| |
| |
| @@ -2916,7 +2944,16 @@ |
| " A symbolic color name must be one of these: black, blue, green," |
| " cyan, red, magenta, brown, light-gray, dark-gray, light-blue," |
| " light-green, light-cyan, light-red, light-magenta, yellow and white." |
| - " You can prefix \"blink-\" to FG if you want a blinking foreground color." |
| + " You can prefix \"blink-\" to FG if you want a blinking foreground color.", |
| + "color NORMAL [HIGHLIGHT [HELPTEXT [HEADING]]]", |
| + "\t¸Ä±ä²Ëµ¥µÄÑÕÉ«¡£Normal ÓÃÓÚÖ¸¶¨²Ëµ¥ÏîµÄδѡÖÐʱµÄÑÕÉ«£¬HIGHLIGHT Ôò" |
| + "\n\tÓÃÓÚÖ¸¶¨²Ëµ¥ÏîµÄ±»Ñ¡ÖÐʱµÄÑÕÉ«¡£Èç¹ûÄãδָ¶¨ HIGHLIGHT É«£¬ÄÇô" |
| + "\n\t½«Ê¹Óà NORMAL µÄ·´É«Öµ¡£Èç¹ûδָ¶¨ HELPTEXT »ò HEADING£¬ÄÇô" |
| + "\n\t¾ÍÓà NORMAL µÄÑÕÉ«¡£FG ºÍ BG ÊÇÑÕÉ«µÄÃû³Æ£¬ÈçÏ£ºblack(ºÚ), " |
| + "\n\tblue(À¶), green(ÂÌ), cyan(Çà), red(ºì), magenta(·Ûºì), brown(×Ø), " |
| + "\n\tlight-gray(ÁÁ»Ò),dark-gray(°µ»Ò), light-blue(dzÀ¶), light-green(µÂÌ), " |
| + "\n\tlight-cyan(µÇà), light-red(Ã÷ºì), light-magenta(dzºì), yellow(»Æ)ºÍ " |
| + "\n\twhite(°×)¡£ÈôÏëʹÓÃÉÁ˸µÄÇ°¾°É«£¬Äã¿ÉÒÔÔÚ FG ǰʹÓà blink- ǰ׺¡£" |
| }; |
| |
| |
| @@ -3077,7 +3114,9 @@ |
| configfile_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "configfile FILE", |
| - "Load FILE as the configuration file." |
| + "Load FILE as the configuration file.", |
| + "configfile FILE", |
| + "\t°ÑÎļþ FILE ×÷ΪÅäÖÃÎļþÁ¢¼´¼ÓÔØÖ´ÐУ¨Ö»Óе±¼ÓÔØʧ°Üʱ²Å·µ»Ø£©¡£" |
| }; |
| |
| |
| @@ -3576,7 +3615,16 @@ |
| " of IF will be discarded. OF cannot be a gzipped file. If IF is a gzipped" |
| " file, it will be decompressed automatically when copying. dd is dangerous," |
| " use at your own risk. To be on the safe side, you should only use dd to" |
| - " write a file in memory. ADDR and SIZE are used for user-defined buffer." |
| + " write a file in memory. ADDR and SIZE are used for user-defined buffer.", |
| + "dd if=IF of=OF [bs=BS] [count=C] [skip=IN] [seek=OUT] [buf=ADDR] [buflen=SIZE]", |
| + "\t¸´ÖÆÎļþ IF µ½ OF¡£BS ÊÇ¿é´óС£¬Ä¬ÈÏÖµ 512¡£C ÊÇÒª¸´ÖƵĿéÊý£¬" |
| + "\n\tĬÈÏÖµÊÇ IF Ëù°üº¬µÄ¿éÊý¡£IN ÊǶÁ IF ʱҪÌø¹ýµÄ¿éÊý£¬Ä¬ÈÏÖµ 0¡£" |
| + "\n\tOUT ÊÇд OF ʱҪÌø¹ýµÄ¿éÊý£¬Ä¬ÈÏÖµ 0¡£±»Ìø¹ýµÄ¿éµÄÄÚÈݱ£³Ö" |
| + "\n\t²»±ä¡£IF ºÍ OF ±ØÐ붼´æÔÚ¡£¸´ÖƲ»»áµ¼Ö OF µÄ³¤¶ÈÔö¼õ£¬IF" |
| + "\n\tÖÐÊ£ÓàµÄβ°Í½«¶ªÆú¡£OF ²»ÄÜÊÇ gzip ѹËõ¸ñʽ¡£Èç¹û IF ÊÇ gzip" |
| + "\n\tѹËõ¸ñʽ£¬¸´ÖÆʱ½«×Ô¶¯¶ÔËü½âѹ¡£dd ÊÇÒ»ÌõΣÏÕÃüÁʹÓÃʱ" |
| + "\n\tÄã×Ô¼ºÒª³Ðµ£·çÏÕ¡£±£ÏÕÆð¼û£¬ÄãÓ¦¸ÃÖ»ÓÃËüдÈëÄÚ´æÖеÄÎļþ¡£" |
| + "\n\tADDR ºÍ SIZE ·Ö±ðÖ¸¶¨Óû§×Ô¶¨ÒåµÄ»º³åÇøµØÖ·ºÍ³¤¶È¡£" |
| }; |
| |
| |
| @@ -3618,7 +3666,9 @@ |
| debug_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "debug [on | off | normal | status | INTEGER]", |
| - "Turn on/off or display/set the debug level." |
| + "Turn on/off or display/set the debug level.", |
| + "debug [on | off | normal | status | INTEGER]", |
| + "\t´ò¿ª¡¢¹Ø±Õ »òÕß ÏÔʾ¡¢ÉèÖà DEBUG£¨µ÷ÊÔ¡¢³ý´í£©¼¶±ð¡£" |
| }; |
| |
| |
| @@ -3713,7 +3763,12 @@ |
| " the key word `saved\' is specified, or to the entry number previously" |
| " saved in the specified file FILE. When FILE is specified, all subsequent" |
| " `savedefault\' commands will save default entry numbers into" |
| - " FILE." |
| + " FILE.", |
| + "default [NUM | `saved' | FILE]", |
| + "\tÉèÖÃĬÈÏÆô¶¯µÄ²Ëµ¥Èë¿ÚÏîΪ NUM (0 ´ú±íµÚÒ»Ïî)£¬»òÕßÓÉ savedefault" |
| + "\n\tËù±£´æµÄÈë¿ÚÏÈç¹ûÖ¸¶¨Á˹ؼü×Ö saved£©£¬»òÕßÏÈÇ°±£´æÔÚÎļþ FILE" |
| + "\n\tÖеÄÈë¿ÚÏî¡£µ±Ö¸¶¨ÁË FILE ʱ£¬ºóÐøµÄ savedefault ÃüÁ½«°ÑÈë¿ÚÏî" |
| + "\n\t±£´æµ½ FILE ÖС£" |
| #if 0 |
| "default [NUM | `saved']", |
| "Set the default entry to entry number NUM (if not specified, it is" |
| @@ -3758,7 +3813,10 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "device DRIVE DEVICE", |
| "Specify DEVICE as the actual drive for a BIOS drive DRIVE. This command" |
| - " can be used only in the grub shell." |
| + " can be used only in the grub shell.", |
| + "device DRIVE DEVICE", |
| + "\tÖ¸¶¨ DEVICE ×÷Ϊ BIOS Çý¶¯Æ÷ DRIVE Ëù¶ÔÓ¦µÄʵ¼ÊÇý¶¯Æ÷¡£ÕâÌõÃüÁîÖ»ÓÃÓÚ" |
| + "\n\t²Ù×÷ϵͳ Linux ϵÄÆô¶¯¹ÜÀí¹¤¾ß grub ÖУ¨Ëü½Ð×ö grub shell£©¡£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -3778,12 +3836,13 @@ |
| dhcp_func, |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "dhcp", |
| - "Initialize a network device via DHCP." |
| + "Initialize a network device via DHCP.", |
| + "dhcp", |
| + "\tͨ¹ý DHCP ³õÊÔ»¯ÍøÂçÉ豸¡£" |
| }; |
| #endif /* SUPPORT_NETBOOT */ |
| |
| - |
| -static int terminal_func (char *arg, int flags); |
| +static int terminal_func (char *arg, int flags); |
| |
| #ifdef SUPPORT_GRAPHICS |
| extern char splashimage[64]; |
| @@ -3840,7 +3899,9 @@ |
| splashimage_func, |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "splashimage FILE", |
| - "Load FILE as the background image when in graphics mode." |
| + "Load FILE as the background image when in graphics mode.", |
| + "splashimage FILE", |
| + "\tͼÐÎģʽÏÂÔØÈë±³¾°Í¼Æ¬Îļþ¡£", |
| }; |
| |
| |
| @@ -3870,7 +3931,10 @@ |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "foreground RRGGBB", |
| "Sets the foreground color when in graphics mode." |
| - "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal." |
| + "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal.", |
| + "foreground RRGGBB", |
| + "\tÉèÖÃͼÐÎģʽϵÄÇ°¾°É«¡£RR ´ú±íºìÉ«, GG ´ú±íÂÌÉ«, BB ´ú±íÀ¶É«¡£" |
| + "\n\tÕâЩÊýÖµ¶¼ÊÇÓÃÊ®Áù½øÖÆÀ´±íʾµÄ¡£" |
| }; |
| |
| |
| @@ -3899,7 +3963,10 @@ |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "background RRGGBB", |
| "Sets the background color when in graphics mode." |
| - "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal." |
| + "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal.", |
| + "background RRGGBB", |
| + "\tÉèÖÃͼÐÎģʽϵı³¾°É«¡£RR ´ú±íºìÉ«, GG ´ú±íÂÌÉ«, BB ´ú±íÀ¶É«¡£" |
| + "\n\tÕâЩÊýÖµ¶¼ÊÇÓÃÊ®Áù½øÖÆÀ´±íʾµÄ¡£" |
| }; |
| |
| #endif /* SUPPORT_GRAPHICS */ |
| @@ -3983,7 +4050,9 @@ |
| checkrange_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "checkrange RANGE COMMAND", |
| - "Return true if the return value of COMMAND is in RANGE and false otherwise." |
| + "Return true if the return value of COMMAND is in RANGE and false otherwise.", |
| + "checkrange RANGE COMMAND", |
| + "\tÈç¹ûCOMMANDµÄ·µ»ØÖµ´¦ÓÚRANGEµ±ÖУ¬Ôò·µ»ØÕ棻·ñÔò·µ»Ø¼Ù¡£" |
| }; |
| #ifndef GRUB_UTIL |
| /* checktime */ |
| @@ -4122,7 +4191,9 @@ |
| checktime_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "checktime min hour dom month dow", |
| - "Check time." |
| + "Check time.", |
| + "checktime min hour dom month dow", |
| + "\t¼ì²éʱ¼ä¡£" |
| }; |
| #endif |
| |
| @@ -4142,7 +4213,9 @@ |
| clear_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "clear", |
| - "Clear the screen" |
| + "Clear the screen", |
| + "clear", |
| + "\tÇåÆÁÄ»¡£" |
| }; |
| |
| |
| @@ -4184,7 +4257,9 @@ |
| displayapm_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "displayapm", |
| - "Display APM BIOS information." |
| + "Display APM BIOS information.", |
| + "displayapm", |
| + "\tÏÔʾ APM BIOS µÄÏà¹ØÐÅÏ¢¡£" |
| }; |
| #endif |
| |
| @@ -4194,22 +4269,59 @@ |
| displaymem_func (char *arg, int flags) |
| { |
| if (get_eisamemsize () != -1) |
| - grub_printf (" EISA Memory BIOS Interface is present\n"); |
| + { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf (" EISAÄÚ´æBIOS½Ó¿Ú´æÔÚ\n"); |
| + else |
| + grub_printf (" EISA Memory BIOS Interface is present\n"); |
| +#else |
| + grub_printf (" EISA Memory BIOS Interface is present\n"); |
| +#endif |
| +} |
| if (get_mmap_entry ((void *) SCRATCHADDR, 0) != 0 |
| || *((int *) SCRATCHADDR) != 0) |
| - grub_printf (" Address Map BIOS Interface is present\n"); |
| - |
| - grub_printf (" Lower memory: %uK, " |
| + { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + { |
| + grub_printf (" µØÖ·±ä»»BIOS½Ó¿Ú´æÔÚ\n"); |
| + grub_printf (" µÍ¶ËÄÚ´æ: %uK, " |
| + "ÉÏλÄÚ´æ: %uK\n", |
| + (unsigned long)saved_mem_lower, (unsigned long)saved_mem_upper); |
| + } |
| + else |
| + { |
| + grub_printf (" Address Map BIOS Interface is present\n"); |
| + grub_printf (" Lower memory: %uK, " |
| "Upper memory (to first chipset hole): %uK\n", |
| (unsigned long)saved_mem_lower, (unsigned long)saved_mem_upper); |
| + } |
| +#else |
| + grub_printf (" Address Map BIOS Interface is present\n"); |
| + grub_printf (" Lower memory: %uK, " |
| + "Upper memory (to first chipset hole): %uK\n", |
| + (unsigned long)saved_mem_lower, (unsigned long)saved_mem_upper); |
| +#endif |
| +} |
| |
| if (mbi.flags & MB_INFO_MEM_MAP) |
| { |
| struct AddrRangeDesc *map = (struct AddrRangeDesc *) saved_mmap_addr; |
| unsigned long end_addr = saved_mmap_addr + saved_mmap_length; |
| |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf (" [µØÖ·ÇøÓòÃèÊö·û" |
| + "½ôËæÓÚ(ֵΪ64λ)]\n"); |
| + else |
| + grub_printf (" [Address Range Descriptor entries " |
| + "immediately follow (values are 64-bit)]\n"); |
| +#else |
| grub_printf (" [Address Range Descriptor entries " |
| "immediately follow (values are 64-bit)]\n"); |
| +#endif |
| + |
| while (end_addr > (unsigned long) map) |
| { |
| char *str; |
| @@ -4218,6 +4330,14 @@ |
| str = "Usable RAM"; |
| else |
| str = "Reserved"; |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf (" %s: »ùÖ·: 0x%lX, ³¤¶È: 0x%lX\n", |
| + str, |
| + (unsigned long long)(map->BaseAddr), |
| + (unsigned long long)(map->Length)); |
| + else |
| +#endif |
| grub_printf (" %s: Base: 0x%lX, Length: 0x%lX\n", |
| str, |
| (unsigned long long)(map->BaseAddr), |
| @@ -4237,7 +4357,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "displaymem", |
| "Display what GRUB thinks the system address space map of the" |
| - " machine is, including all regions of physical RAM installed." |
| + " machine is, including all regions of physical RAM installed.", |
| + "displaymem", |
| + "\tÏÔʾ GRUB ËùÅжϵ½µÄµ±Ç°ÏµÍ³µÄÄÚ´æ·Ö²¼£¬°üÀ¨ËùÓÐÎïÀíÄÚ´æÇøÓò¡£" |
| }; |
| |
| |
| @@ -4296,7 +4418,10 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT, |
| "dump FROM TO", |
| "Dump the contents of the file FROM to the file TO. FROM must be" |
| - " a GRUB file and TO must be an OS file." |
| + " a GRUB file and TO must be an OS file.", |
| + "dump FROM TO", |
| + "\tÏÔʾÖî¶àÎļþµÄÄÚÈÝ¡£×¢Ò⣬FROM ËùÖ¸¶¨µÄ±ØÐëÊÇÒ»¸ö GRUB Îļþ£¬TO Ëù" |
| + "\n\tÖ¸¶¨µÄ±ØÐëÊÇÒ»¸ö²Ù×÷ϵͳÎļþ¡£ÕâÌõÃüÁîÖ»ÔÚ grub shell ÖвÅÓС£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -4444,7 +4569,11 @@ |
| "embed STAGE1_5 DEVICE", |
| "Embed the Stage 1.5 STAGE1_5 in the sectors after MBR if DEVICE" |
| " is a drive, or in the \"bootloader\" area if DEVICE is a FFS partition." |
| - " Print the number of sectors which STAGE1_5 occupies if successful." |
| + " Print the number of sectors which STAGE1_5 occupies if successful.", |
| + "embed STAGE1_5 DEVICE", |
| + "\tÈç¹ûÉ豸ÊǸöÇý¶¯Æ÷, Ôò½« Stage 1.5 ǶÈëµ½Ö÷Òýµ¼ÉÈÇøÖ®ºó. Èç¹ûÊÇ FFS" |
| + "\n\t·ÖÇø, Ôò¿ÉǶÈëµ½¸ÃÉ豸µÄ¡°Òýµ¼´úÂ롱ÇøÖС£³É¹¦Ê±´òÓ¡³ö Stage 1.5 Ëù" |
| + "\n\tÕ¼µÄÉÈÇøÊý¡£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -4552,7 +4681,10 @@ |
| " errors, instead of waiting for the user to do anything, it" |
| " immediately starts over using the NUM entry (same numbering as the" |
| " `default' command). This obviously won't help if the machine" |
| - " was rebooted by a kernel that GRUB loaded." |
| + " was rebooted by a kernel that GRUB loaded.", |
| + "fallback NUM...", |
| + "\t½øÈëÎÞÈ˸ÉÔ¤Æô¶¯Ä£Ê½£ºÈç¹ûĬÈÏÆô¶¯Èë¿ÚÏî³ö´íʧ°Ü£¬Á¢¼´ÓÃÈë¿ÚÏî NUM" |
| + "\n\tÀ´Æô¶¯£¨ÕâÀïµÄ¡°Èë¿ÚÏÓë default ÃüÁîÖеġ°Èë¿ÚÏÒâÒåÏàͬ£©¡£" |
| #endif |
| }; |
| |
| @@ -4725,7 +4857,10 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "command [--set-path=PATH] FILE [ARGS]", |
| "Run executable file FILE with arguments ARGS." |
| - "--set-path sets a search PATH for executable files,default is (bd)/grub." |
| + "--set-path sets a search PATH for executable files,default is (bd)/grub.", |
| + "command [--set-path=PATH] FILE [ARGS]", |
| + "\tÔËÐпÉÖ´ÐÐÎļþ FILE£¬¿ÉÒÔ´ø²ÎÊý ARGS¡£" |
| + "\n\t--set-path ²ÎÊýÉèÖÃĬÈÏ¿ÉÖ´ÐÐÎļþËÑË÷·¾¶£¬ÈôδÉèÖÃĬÈÏÊÇ(bd)/grub" |
| }; |
| |
| |
| @@ -4715,7 +4849,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| #if 1 |
| "commandline", |
| - "Enter command-line prompt mode." |
| + "Enter command-line prompt mode.", |
| + "commandline", |
| + "\t½øÈëÃüÁîÐÐÌáʾ·û·½Ê½¡£" |
| #endif |
| }; |
| |
| @@ -5209,7 +5345,14 @@ |
| " If the option --set-root is used and FILENAME is found on a device, then" |
| " stop the find immediately and set the device as new root." |
| " If the option --ignore-floppies is present, the search will bypass all" |
| - " floppies. And --ignore-cd will skip (cd)." |
| + " floppies. And --ignore-cd will skip (cd).", |
| + "find [--set-root[=DIR]] [--ignore-floppies] [--ignore-cd] [FILENAME] [CONDITION]", |
| + "\tÔÚËùÓзÖÇøÉϲéÕÒÎļþÃû, ²¢ÏÔʾ°üº¬¸ÃÎļþ²¢Âú×ã¸ø¶¨Ìõ¼þµÄÉ豸¡£" |
| + "\n\tCONDITIONÊÇÒ»¸öÆÕͨµÄgrubÃüÁ·µ»Ø·ÇÁã±íʾÕ棬Áã±íʾ¼Ù¡£" |
| + "\n\tÈç¹ûʹÓÃÁË --set-root Ñ¡Ïî, ÄÇôµ±ÔÚij¸öÉ豸ÉÏÕÒµ½ FILENAME ʱ," |
| + "\n\tÁ¢¼´Í£Ö¹²éÕÒ, ²¢½«´ËÉ豸É趨ΪÐ嵀 root É豸¡£Èç¹ûÖ¸¶¨ÁË" |
| + "\n\t--ignore-floppies Ñ¡Ïî, ÄÇô²éÕÒ¹ý³Ì½«ÂÔ¹ýËùÓеÄÈíÅÌ¡£ÈôÖ¸¶¨" |
| + "\n\t--ignore-cd Ôò»áÌø¹ý (cd)¡£" |
| }; |
| |
| |
| @@ -5421,7 +5564,14 @@ |
| " on all devices(if UUID is not specified). If DEVICE is specified," |
| " return true or false according to whether or not the DEVICE matches" |
| " the specified UUID(if UUID is specified), or just list the uuid of" |
| - " DEVICE(if UUID is not specified)." |
| + " DEVICE(if UUID is not specified).", |
| + "uuid [DEVICE] [UUID]", |
| + "\tÈç¹û DEVICE δָ¶¨£¬ÔÚËùÓеķÖÇøÖÐËÑË÷´øÓÐ UUID µÄ" |
| + "\n\t·ÖÇø£¬ÕÒµ½ºóÉèÖÃΪÐ嵀 root É豸£¨Èç¹ûÖ¸¶¨ÁË UUID£©£¬" |
| + "\n\t»òÕßÖ»ÊÇÁгö¸÷¸ö·ÖÇøµÄ uuid£¨Èç¹ûδָ¶¨ UUID£©¡£" |
| + "\n\tÈç¹ûÖ¸¶¨ÁË DEVICE£¬½ö½ö·µ»ØÒ»¸öÕæ¼ÙÖµ£¬±íʾÊÇ·ñÓë" |
| + "\n\t¸ø¶¨µÄ UUID ÏàÆ¥Å䣨Èç¹ûÖ¸¶¨ÁË UUID£©£¬»òÕßÖ»ÊÇÁгö" |
| + "\n\tDEVICE µÄ uuid Öµ£¨Èç¹ûδָ¶¨ UUID£©¡£" |
| }; |
| |
| static void |
| @@ -5539,7 +5689,9 @@ |
| fstest_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "fstest [on | off | status]", |
| - "Turn on/off or display the fstest mode, or toggle it if no argument." |
| + "Turn on/off or display the fstest mode, or toggle it if no argument.", |
| + "fstest [on | off | status]", |
| + "\tÇл»ÎļþϵͳµÄ¸ú×Ù²âÊÔģʽ¡£" |
| }; |
| |
| #ifdef SUPPORT_GFX |
| @@ -5872,7 +6024,12 @@ |
| " tuned value. If --sync is specified, the C/H/S values in partition table" |
| " of DRIVE and H/S values in BPB of each primary partition of DRIVE" |
| "(or BPB of floppy DRIVE) will be updated according to the current" |
| - " geometry of DRIVE in use." |
| + " geometry of DRIVE in use.", |
| + "geometry [--tune] [--sync] [DRIVE]", |
| + "\tÊä³öÇý¶¯Æ÷µÄÏà¹ØÐÅÏ¢. Èç¹ûÖ¸¶¨ÁË --tune£¬ÄÇôÕâ¸öÇý¶¯Æ÷µÄ¼¸ºÎ²ÎÊý" |
| + "\n\t½«±ä³Éµ÷ÕûºóµÄÖµ¡£Èç¹ûÖ¸¶¨ÁË --sync£¬ÄÇôÇý¶¯Æ÷µÄ·ÖÇø±íÒÔ¼°ÏàÓ¦" |
| + "\n\tµÄ¸÷¸öÖ÷·ÖÇøµÄBPB±í£¨»òÕßÈíÅ̵ÄBPB±í£©¶¼Òª¸ù¾Ýµ±Ç°ÕýÔÚʹÓõÄ" |
| + "\n\t¸ÃÇý¶¯Æ÷µÄ¼¸ºÎ²ÎÊý½øÐиüС£" |
| #endif /* GRUB_UTIL */ |
| }; |
| |
| @@ -5897,7 +6054,10 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "halt [--no-apm]", |
| "Halt your system. If APM is avaiable on it, turn off the power using" |
| - " the APM BIOS, unless you specify the option `--no-apm'." |
| + " the APM BIOS, unless you specify the option `--no-apm'.", |
| + "halt [--no-apm]", |
| + "\t¹Ø±Õϵͳ¡£Èç¹ûAPM(¸ß¼¶µçÔ´¹ÜÀí)¹¦ÄÜ´æÔÚ£¬½«Ê¹Óà APM BIOS ¹Ø±Õϵͳ£¬" |
| + "\n\t³ý·ÇÖ¸¶¨ÁË --no-apm Ñ¡Ïî¡£" |
| }; |
| |
| |
| @@ -5984,11 +6144,23 @@ |
| char *doc = (*builtin)->long_doc; |
| |
| /* At first, print the name and the short doc. */ |
| - grub_printf ("%s: %s\n", |
| + if ((*builtin)->short_doc) |
| + grub_printf ("%s: %s\n", |
| (*builtin)->name, (*builtin)->short_doc); |
| |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + { |
| + if ((*builtin)->sc_long_doc) |
| + grub_putstr ((*builtin)->sc_long_doc); |
| + grub_putchar ('\n'); |
| + continue; |
| + } |
| +#endif |
| + |
| /* Print the long doc. */ |
| - while (*doc) |
| + if (doc) |
| + while (*doc) |
| { |
| int len = grub_strlen (doc); |
| int i; |
| @@ -6025,7 +6197,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "help [--all] [PATTERN ...]", |
| "Display helpful information about builtin commands. Not all commands" |
| - " aren't shown without the option `--all'." |
| + " aren't shown without the option `--all'.", |
| + "help [--all] [PATTERN ...]", |
| + "\tÏÔʾÄÚ²¿ÃüÁîµÄ°ïÖúÐÅÏ¢¡£Òª²é¿´ËùÓÐÃüÁîµÄ°ïÖú£¬¿ÉʹÓà --all ²ÎÊý¡£" |
| }; |
| |
| |
| @@ -6083,7 +6257,10 @@ |
| "hide [PARTITION]", |
| "Hide PARTITION by setting the \"hidden\" bit in" |
| " its partition type code. The default partition is the current" |
| - " root device." |
| + " root device.", |
| + "hide [PARTITION]", |
| + "\tͨ¹ýÔÚ·ÖÇøÀàÐÍÂëÉÏÉèÖá°Òþ²Ø¡±±êÖ¾£¬À´Òþ²Ø·ÖÇø PARTITION¡£" |
| + "\n\tĬÈϵķÖÇøÊǵ±Ç°µÄ¸ùÉ豸¡£" |
| }; |
| |
| |
| @@ -6128,6 +6305,10 @@ |
| "Hide/unhide PARTITION by setting/clearing the \"hidden\" bit in" |
| " its partition type code, or report the hidden status." |
| " The default partition is the current root device." |
| + , "hiddenflag [--set | --clear] [PARTITION]", |
| + "\tͨ¹ýÉèÖ㨻òÇå³ý£©·ÖÇøÀàÐÍÂëÖеġ°Òþ²Ø¡±±ê־λÀ´Òþ²Ø£¨»ò²»Òþ²Ø£©·ÖÇø" |
| + "\n\tPARTITION¡£µ± --set ºÍ --clear ¶¼Î´Ö¸¶¨Ê±£¬Ö»±¨¸æ·ÖÇøµÄÒþ²Ø״̬¡£" |
| + "\n\tµ± PARTITION δָ¶¨Ê±£¬Ê¹Óõ±Ç°µÄ¸ùÉ豸¡£" |
| }; |
| |
| |
| @@ -6140,7 +6321,14 @@ |
| |
| if (! eth_probe ()) |
| { |
| - grub_printf ("No ethernet card found.\n"); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("δ·¢ÏÖÍø¿¨.\n"); |
| + else |
| + grub_printf ("No ethernet card found.\n"); |
| +#else |
| + grub_printf ("No ethernet card found.\n"); |
| +#endif |
| errnum = ERR_DEV_VALUES; |
| return 0; |
| } |
| @@ -6181,7 +6369,10 @@ |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "ifconfig [--address=IP] [--gateway=IP] [--mask=MASK] [--server=IP]", |
| "Configure the IP address, the netmask, the gateway and the server" |
| - " address or print current network configuration." |
| + " address or print current network configuration.", |
| + "ifconfig [--address=IP] [--gateway=IP] [--mask=MASK] [--server=IP]", |
| + "\tÖ¸¶¨ IP µØÖ·, ×ÓÍøÑÚÂë, Íø¹ØºÍ·þÎñÆ÷µØÖ·¡£²»´ø²ÎÊýʱ£¬½«ÏÔʾµ±Ç°µÄ" |
| + "\n\tÍøÂçÅäÖá£" |
| }; |
| #endif /* SUPPORT_NETBOOT */ |
| |
| @@ -6215,7 +6406,10 @@ |
| "impsprobe", |
| "Probe the Intel Multiprocessor Specification 1.1 or 1.4" |
| " configuration table and boot the various CPUs which are found into" |
| - " a tight loop." |
| + " a tight loop.", |
| + "impsprobe", |
| + "\t̽²â Intel ¶à´¦ÀíÆ÷¹æ·¶ 1.1/1.4 ÅäÖÃ±í²¢Ê¹ËùÕÒµ½µÄ¸÷´¦ÀíÆ÷Æô¶¯½øÈë" |
| + "\n\t±ÕÑ»·¡£" |
| }; |
| #endif |
| |
| @@ -6248,7 +6442,9 @@ |
| "initrd FILE [FILE ...]", |
| "Load an initial ramdisk FILE for a Linux format boot image and set the" |
| " appropriate parameters in the Linux setup area in memory. For Linux" |
| - " 2.6+ kernels, multiple cpio files can be loaded." |
| + " 2.6+ kernels, multiple cpio files can be loaded.", |
| + "initrd FILE [FILE ...]", |
| + "\t¼ÓÔØ Linux ¸ñʽµÄ³õʼ»¯ÐéÄâÅÌ, ²¢ÉèÖñØÒªµÄ²ÎÊý¡£" |
| }; |
| |
| |
| @@ -6822,7 +7018,15 @@ |
| " patched with the configuration filename REAL_CONFIG_FILE." |
| " If the option `--force-lba' is specified, disable some sanity checks" |
| " for LBA mode. If the option `--stage2' is specified, rewrite the Stage" |
| - " 2 via your OS's filesystem instead of the raw device." |
| + " 2 via your OS's filesystem instead of the raw device.", |
| + "install [--stage2=STAGE2_FILE] [--force-lba] STAGE1 [d] DEVICE STAGE2 [ADDR] [p] [CONFIG_FILE] [REAL_CONFIG_FILE]", |
| + "\t°²×° STAGE1 µ½Ö¸¶¨É豸ÉÏ, °²×°¼ÓÔØ STAGE2 ÐèÒªµÄ¿éÁÐ±íµ½ STAGE2 ÉÏ¡£" |
| + "\n\tÈç¹ûʹÓÃÁËÑ¡Ïî'd', STAGE1 ×ÜÊÇÊÔͼʹÓð²×° STAGE2 µÄÇý¶¯Æ÷, ¶ø²»ÊÇ" |
| + "\n\tÆô¶¯ÅÌ¡£STAGE2 ½«¼ÓÔØÔÚÖ¸¶¨µØÖ·ÉÏ, Èç¹ûδÉùÃ÷µØÖ·, Ôò×Ô¶¯¼ì²â¡£Èç¹û" |
| + "\n\tʹÓÃÁËÑ¡Ïî 'p' »ò¸ø³öÁËÅäÖÃÎļþ, ½«ÐÞ¸Ä STAGE2 µÄµÚÒ»¸öÊý¾Ý¿é, ÐÞÕý" |
| + "\n\tʵ¼Ê Stage2 Æô¶¯Ê±Ê¹ÓõÄÅäÖÃÎļþλÖ᣶ÔÓÚ Stage 1.5, ¸ÃֵΪ Stage2" |
| + "\n\tµÄ·¾¶¡£Èç¹û°²×°µÄÊÇ Stage1.5, ÇÒÖ¸¶¨ÁËʵ¼ÊÅäÖÃÎļþ, Ôò½«¸ÃÅäÖÃÎļþ" |
| + "\n\t·¾¶Ð´Èë Stage2 ÖС£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -6933,7 +7137,13 @@ |
| " to suggest what type of kernel to be loaded. TYPE must be either of" |
| " \"netbsd\", \"freebsd\", \"openbsd\", \"linux\", \"biglinux\" and" |
| " \"multiboot\". The option --no-mem-option tells GRUB not to pass a" |
| - " Linux's mem option automatically." |
| + " Linux's mem option automatically.", |
| + "kernel [--no-mem-option] [--type=TYPE] FILE [ARG ...]", |
| + "\t³¢ÊÔÔØÈëÖ÷Òýµ¼Ó°ÏñÎļþ¡£ÆäËüÏ±»×÷ΪÄں˵ÄÃüÁîÐвÎÊý¶ø´«µÝ¸øÄںˡ£" |
| + "\n\tʹÓôËÃüÁîÒÔÇ°£¬ÄÚºËËùÓõ½µÄÄ£¿éÓ¦¸Ã±»ÖØÐÂÔØÈë¡£²ÎÊý --type ÓÃÓÚ˵" |
| + "\n\tÃ÷Äں˵ÄÀàÐÍ£¬°üÀ¨ netbsd, freebsd, openbsd, linux, biglinux ºÍ" |
| + "\n\tmultiboot¡£²ÎÊý --no-mem-option ÓÃÓÚ˵Ã÷²»±Ø×Ô¶¯´«µÝ Linux µÄÄÚ´æ²Î" |
| + "\n\tÊý¡£" |
| }; |
| |
| |
| @@ -6956,7 +7166,9 @@ |
| lock_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "lock", |
| - "Break a command execution unless the user is authenticated." |
| + "Break a command execution unless the user is authenticated.", |
| + "lock", |
| + "\tÈç¹ûÓû§Î´±»ÈÏÖ¤£¬ÔòÖÕÖ¹ÃüÁîµÄÖ´ÐС£" |
| }; |
| |
| |
| @@ -6980,7 +7192,9 @@ |
| ls_func, |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "ls [FILE_OR_DIR]", |
| - "List file or directory." |
| + "List file or directory.", |
| + "ls [FILE_OR_DIR]", |
| + "\tÁгöÎļþ»òĿ¼¡£" |
| }; |
| #endif /* STAGE1_5 */ |
| |
| @@ -7082,7 +7296,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "makeactive [--status] [PART]", |
| "Activate the partition PART. PART defaults to the current root device." |
| - " This command is limited to _primary_ PC partitions on a hard disk." |
| + " This command is limited to _primary_ PC partitions on a hard disk.", |
| + "makeactive [--status] [PART]", |
| + "\t¼¤»î PART ·ÖÇø(»òµ±Ç°Ä¬ÈÏ·ÖÇø)¡£´ËÃüÁîÖ»ÄÜÓÃÓÚÓ²Å̵ġ°Ö÷¡±·ÖÇø¡£" |
| }; |
| |
| |
| @@ -9356,7 +9572,29 @@ |
| " memdrive is (-RESERV) in 512-byte-sectors. if RESERV is used and > 0," |
| " the memdrive will occupy the mem area starting at absolute physical" |
| " address RESERV in 512-byte-sectors and ending at the end of this mem" |
| - " block(usually the end of physical mem)." |
| + " block(usually the end of physical mem).", |
| + "map [--status] [--mem[=RESERV]] [--hook] [--unhook] [--unmap=DRIVES]\n [--rehook] [--floppies=M] [--harddrives=N] [--memdisk-raw=RAW]\n [--a20-keep-on=AKO] [--safe-mbr-hook=SMH] [--int13-scheme=SCH]\n [--ram-drive=RD] [--rd-base=ADDR] [--rd-size=SIZE] [[--read-only]\n [--fake-write] [--unsafe-boot] [--disable-chs-mode] [--disable-lba-mode]\n [--heads=H] [--sectors-per-track=S] TO_DRIVE FROM_DRIVE]", |
| + "\t¶ÔÉ豸½øÐÐÓ³Éä¡£Õâ¶ÔÓÚÉÈÇøÁ´Ê½Òýµ¼ÊǺÜÓÐÓõŦÄÜ£¬±ÈÈç DOS¡£ÕâÀĿ" |
| + "\n\tµÄÇý¶¯Æ÷ TO_DRIVE ¿ÉÒÔÊÇÒ»¸ö´ÅÅÌÎļþ£¨×¢Ò⣬µ±Ã»ÓÐÖ¸¶¨ --mem ʱ£¬Õâ" |
| + "\n\tÒªÇó´ÅÅÌÎļþÊÇÁ¬Ðø´æ·ÅÓÚ½éÖÊÖеġ£ÁíÍ⣬ÈôʹÓÃÁË --read-only ²ÎÊý," |
| + "\n\t¸Ã¹¦Äܽ«Ê¹·ÂÕæ´ÅÅÌ´¦ÓÚÖ»¶Á; ÈôʹÓÃÁË --fake-write ²ÎÊý£¬¸Ã¹¦Äܽ«Ê¹" |
| + "\n\t·ÂÕæ´ÅÅÌ´¦ÓÚ¼Ùд£¬¼´¼òµ¥µØ·µ»Ø¡°Ð´È롱³É¹¦£¬µ«Êµ¼ÊÉϲ»Ö´ÐÐдÈë²Ù×÷;" |
| + "\n\tÈôʹÓÃÁË --unsafe-boot ²ÎÊý£¬¸Ã¹¦Äܽ«Ê¹·ÂÕæ´ÅÅ̵ĵÚÒ»ÉÈÇø´¦ÓÚ¿Éд;" |
| + "\n\t£¨Ä¬ÈÏʱ·ÂÕæ´ÅÅ̵ĵÚÒ»ÉÈÇø±»±£»¤£¬²»ÄܾÓÉ int13/AH=03h ¶øдÈ룩¡£" |
| + "\n\tÈôʹÓÃÁË --disable-chs-mode ²ÎÊý£¬CHS ·ÃÎʹ¦Äܽ«±»½ûÓÃ; ÈôʹÓÃÁË" |
| + "\n\t--disable-lba-mode ²ÎÊý£¬ LBA ·ÃÎʹ¦Äܽ«±»½ûÓÃ; H ºÍ S Ö¸¶¨ÁËÐéÄâ´Å" |
| + "\n\tÅ̵ÄÎïÀí²ÎÊý¡£ÈôʹÓÃÁË --status, --hook, --unhook, --rehook," |
| + "\n\t--floppies, --harddrives, --ram-drive, --rd-base, --rd-size," |
| + "\n\t--memdisk-raw, --a20-keep-on, --safe-mbr-hook, --int13-scheme Öî²ÎÊý" |
| + "\n\tÖ®Ò»£¬ÄÇôÆäËüµÄÃüÁîÐвÎÊý½«±»ºöÂÔ¡£--floppies ÓÃÓÚÐÞ¸Ä BIOS Êý¾ÝÇø" |
| + "\n\t0x410 ´¦µÄÈíÅ̸öÊýλÓò¡£--harddrives ÓÃÓÚÐÞ¸Ä BIOS Êý¾ÝÇø 0x475 ´¦µÄ" |
| + "\n\tÓ²Å̸öÊý×Ö½Ú¡£--mem ²ÎÊýÖ¸¶¨Ê¹ÓÃÄÚ´æÀ´·ÂÕæ´ÅÅÌ£¨´Ëʱ TO_DRIVE ¿ÉÒÔÊÇ" |
| + "\n\tgzip ¸ñʽµÄѹËõÎļþ£©¡£--ram-drive ÓÃÓÚÐ޸Ĵú±íÄÚ´æÅÌµÄ BIOS ´ÅÅ̺Å" |
| + "\n\tÂë¡£--rd-base Ö¸¶¨ÄÚ´æÅ̵ÄÆðʼµØÖ·¡£--rd-size Ö¸¶¨ÄÚ´æÅ̵ĴóС£¨ÒÔ×Ö" |
| + "\n\t½Ú¼ÆÊý£©¡£Èç¹û RESERV <= 0, ÄÇôÖÁÉÙ±£Áô (-RESERV * 512) ×Ö½ÚµÄÄÚ´æ" |
| + "\n\tÓÃÀ´´æ·Å¸ÃÄÚ´æÅ̵ÄÉÈÇøÊý¾Ý£»Èç¹û RESERV > 0, ¸ÃÄÚ´æÅ̽«ÆðʼÓÚ¾ø¶ÔÎï" |
| + "\n\tÀíµØÖ· (RESERV * 512)£¬¶øÖÕÖ¹ÓÚ¸ÃÆðʼµØÖ·ËùÔÚµÄÁ¬ÐøÄÚ´æ¿éµÄ½áβ£¨Í¨" |
| + "\n\t³£µÈÓÚ»ò½Ó½üÓÚÎïÀíÄÚ´æµÄ½á⣩¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| |
| @@ -9423,7 +9661,9 @@ |
| md5crypt_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "md5crypt", |
| - "Generate a password in MD5 format." |
| + "Generate a password in MD5 format.", |
| + "md5crypt", |
| + "\t²úÉúÒ»¸ö MD5 ¸ñʽµÄÃÜÂë¡£" |
| }; |
| #endif /* USE_MD5_PASSWORDS */ |
| |
| @@ -9472,7 +9712,11 @@ |
| " interpretation of the file contents is made, so users of this" |
| " command must know what the kernel in question expects). The" |
| " rest of the line is passed as the \"module command line\", like" |
| - " the `kernel' command." |
| + " the `kernel' command.", |
| + "module FILE [ARG ...]", |
| + "\tΪ¶àÖØÆô¶¯Ó³Ïñ¸ñʽµÄÒýµ¼Ó³Ïñ¼ÓÔØÆô¶¯Ä£¿éÎļþ FILE£¨¶Ô¸ÃÎļþµÄÄÚÈݲ»" |
| + "\n\t×÷ÈκνâÊÍ, Òò´ËʹÓÃÕâÌõÃüÁîµÄÓû§±ØÐëÁ˽âËùÌáµ½µÄÄÚºËÓ³ÏñµÄÒªÇ󣩡£" |
| + "\n\tÆäÓà²ÎÊý×÷Ϊ¡°Ä£¿éÃüÁîÐС±´«µÝ, ¾ÍÏñ kernel ÃüÁîÄÇÑù¡£" |
| }; |
| |
| |
| @@ -9505,7 +9749,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "modulenounzip FILE [ARG ...]", |
| "The same as `module', except that automatic decompression is" |
| - " disabled." |
| + " disabled.", |
| + "modulenounzip FILE [ARG ...]", |
| + "\tÓë¡°module¡±ÃüÁîÏàͬ, ²î±ðÊÇ GRUB ²»»á¶Ô FILE ½øÐÐ×Ô¶¯½âѹËõ¡£" |
| }; |
| |
| #ifdef SUPPORT_GRAPHICS |
| @@ -9539,7 +9785,9 @@ |
| outline_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "outline [on | off | status]", |
| - "Turn on/off or display the outline mode, or toggle it if no argument." |
| + "Turn on/off or display the outline mode, or toggle it if no argument.", |
| + "outline [on | off | status]", |
| + "\t´ò¿ª/¹Ø±Õ »òÕß ÏÔʾ×Ö·ûÂÖÀªÄ£Ê½¡£ÎÞ²ÎÊýʱ£¬Çл»×Ö·ûÂÖÀªÄ£Ê½¡£" |
| }; |
| #endif /* SUPPORT_GRAPHICS */ |
| |
| @@ -9573,7 +9821,9 @@ |
| pager_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "pager [on | off | status]", |
| - "Turn on/off or display the pager mode, or toggle it if no argument." |
| + "Turn on/off or display the pager mode, or toggle it if no argument.", |
| + "pager [on | off | status]", |
| + "\t´ò¿ª/¹Ø±Õ »òÕß ÏÔʾ·Öҳģʽ¡£ÎÞ²ÎÊýʱ£¬Çл»·Öҳģʽ¡£" |
| }; |
| |
| |
| @@ -9896,7 +10146,13 @@ |
| " If --active is used, the new partition will be active. START can be" |
| " a contiguous file that will be used as the content/data of the new" |
| " partition, in which case the LEN parameter is ignored, and TYPE can" |
| - " be either 0x00 for auto or 0x10 for hidden-auto." |
| + " be either 0x00 for auto or 0x10 for hidden-auto.", |
| + "partnew [--active] PART TYPE START [LEN]", |
| + "\t´´½¨Ò»¸öеÄÖ÷·ÖÇø¡£START ΪÆðʼÉÈÇøºÅ£¬LEN ΪÆä°üº¬µÄÉÈÇøÊý£¬TYPE" |
| + "\n\tΪÆä·ÖÇøÀàÐÍ¡£Èç¹ûÓÃÁË --active£¬ÄÇôн¨µÄ·ÖÇø½«ÊÇ¡°¼¤»î¡±µÄ¡£" |
| + "\n\tSTART ¿ÉÒÔÊÇÒ»¸öÁ¬ÐøµÄÎļþ£¨Ã»ÓÐËé¿é£©£¬¸ÃÎļþ½«±»ÓÃ×÷н¨·ÖÇø" |
| + "\n\tµÄÄÚÈÝ£¨¼´·ÖÇøµÄÊý¾Ý£©£¬ÔÚÕâÖÖÇé¿öÏ£¬LEN ²ÎÊý±»ºöÂÔ£¬¶øÇÒ TYPE" |
| + "\n\t¿ÉÒÔÊÇ 0x00 ±íʾ¡°×Ô¶¯¡±£¬Ò²¿ÉÒÔÊÇ 0x10 ±íʾ¡°Òþ²Ø-×Ô¶¯¡±¡£" |
| }; |
| |
| |
| @@ -10008,7 +10264,10 @@ |
| "parttype [PART] [TYPE]", |
| "Change the type of the partition PART to TYPE. If TYPE is omitted, return " |
| "the partition type of the specified device(instead of changing it). PART " |
| - "default to the current root device." |
| + "default to the current root device.", |
| + "parttype [PART] [TYPE]", |
| + "\t°ÑÖ¸¶¨·ÖÇø PART µÄ·ÖÇøÀàÐ͸ÄΪ TYPE¡£Èç¹ûÊ¡ÂÔ TYPE£¬ÔòÖ»·µ»ØÖ¸¶¨·ÖÇøµÄ" |
| + "\n\tµ±Ç°ÀàÐͶø²»ÊÇÐÞ¸ÄÖ¸¶¨·ÖÇøµÄÀàÐÍ¡£Èç¹ûÊ¡ÂÔ PART£¬ÔòʹÓõ±Ç°Ä¬ÈÏ·ÖÇø¡£" |
| }; |
| |
| |
| @@ -10086,7 +10345,13 @@ |
| " instructions. You can also use it in the script section, in" |
| " which case it will ask for the password, before continueing." |
| " The option --md5 tells GRUB that PASSWD is encrypted with" |
| - " md5crypt." |
| + " md5crypt.", |
| + "password [--md5] PASSWD [FILE]", |
| + "\tµ±Æä´¦Óڲ˵¥ÎļþµÄÊ×Ïîʱ£¬½«½ûÓÃËùÓеĽ»»¥Ê½²Ëµ¥±à¼¹¦ÄÜ£¬°üÀ¨±à¼" |
| + "\n\t²Ëµ¥Ïî(`e')/½øÈëÃüÁîÐÐ(`c')¡£µ±ÕýÈ·ÊäÈëÃÜÂë(ÓÉ PASSWD Ö¸¶¨)ºó, ÔØÈë" |
| + "\n\tеIJ˵¥Îļþ(ÓÉ FILE Ö¸¶¨)¡£Èç¹ûÄãûÓÐÖ¸¶¨ FILE ÏÄÇôÉÏÊö±»½ûÓÃ" |
| + "\n\tµÄ¹¦Äܽ«±»ÆôÓÃÁË¡£µ±È»£¬ÄãÒ²¿ÉÒÔ½«´ËÃüÁîÓõ½Ä³¸ö²Ëµ¥ÏîÀÓÃÒÔÌá¸ß" |
| + "\n\tϵͳ°²È«ÐÔ¡£²ÎÊý --md5 ˵Ã÷ÃÜÂë PASSWD ÊÇʹÓà md5crypt ¼ÓÃܵġ£" |
| }; |
| |
| |
| @@ -10152,7 +10417,10 @@ |
| pause_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_NO_ECHO, |
| "pause [--wait=T] [MESSAGE ...]", |
| - "Print MESSAGE, then wait until a key is pressed or T seconds has passed." |
| + "Print MESSAGE, then wait until a key is pressed or T seconds has passed.", |
| + "pause [--wait=T] [MESSAGE ...]", |
| + "\t´òÓ¡ÐÅÏ¢ MESSAGE£¬È»ºóµÈ´ý£¬Ö±µ½°´ÏÂÒ»¼ü£¬»òÕß T Ãë¹ýºó£¬ÃüÁî½áÊø£¬" |
| + "\n\t¿ØÖÆ·µ»Øµ½ GRUB£¬¼ÌÐøÖ´ÐÐÏÂÒ»ÌõÃüÁî¡£" |
| }; |
| |
| |
| @@ -10186,7 +10454,9 @@ |
| quit_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "quit", |
| - "Exit from the GRUB shell." |
| + "Exit from the GRUB shell.", |
| + "quit", |
| + "\t´Ó GRUB ÃüÁîÐÐÖÐÍ˳ö¡£" |
| }; |
| #else |
| /* quit */ |
| @@ -10279,7 +10549,9 @@ |
| quit_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "quit [--disable-a20]", |
| - "Go back to DOS if GRUB was previously launched from DOS." |
| + "Go back to DOS if GRUB was previously launched from DOS.", |
| + "quit [--disable-a20]", |
| + "\tÈç¹û GRUB ÏÈÇ°ÊÇ´Ó DOS Æô¶¯µÄ£¬¾Í·µ»Øµ½ DOS¡£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -10309,7 +10581,9 @@ |
| rarp_func, |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "rarp", |
| - "Initialize a network device via RARP." |
| + "Initialize a network device via RARP.", |
| + "rarp", |
| + "\tÓà RARP ³õʼ»¯ÍøÂçÉ豸¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| #endif /* SUPPORT_NETBOOT */ |
| @@ -10337,7 +10611,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "read ADDR", |
| "Read a 32-bit value from memory at address ADDR and" |
| - " display it in hex format." |
| + " display it in hex format.", |
| + "read ADDR", |
| + "\t´ÓÄÚ´æµÄÖ¸¶¨Î»ÖöÁÈ¡Ò»¸ö 32-bit µÄÖµ£¬²¢ÒÔÊ®Áù½øÖÆÐÎʽÏÔʾ³öÀ´¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| |
| @@ -10687,7 +10963,9 @@ |
| write_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "write [--offset=SKIP] ADDR_OR_FILE INTEGER_OR_STRING", |
| - "Write a 32-bit value to memory or write a string to file(or device!)." |
| + "Write a 32-bit value to memory or write a string to file(or device!).", |
| + "write [--offset=SKIP] ADDR_OR_FILE INTEGER_OR_STRING", |
| + "\tдһ¸ö32λµÄÖµµ½ÄÚ´æ»òÕßдһ¸ö×Ö·û´®µ½Îļþ£¨»òÉ豸£¡£©¡£" |
| }; |
| |
| |
| @@ -10707,7 +10985,9 @@ |
| reboot_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST | BUILTIN_BOOTING, |
| "reboot", |
| - "Reboot your system." |
| + "Reboot your system.", |
| + "reboot", |
| + "\tÖØÆôϵͳ¡£" |
| }; |
| #endif /* ! GRUB_UTIL */ |
| |
| @@ -10981,6 +11261,78 @@ |
| return next ? 1 : (saved_drive & 0x80); |
| } |
| |
| +#ifdef SUPPORT_GRAPHICS |
| +/* Chinese Support by Gandalf |
| + * These codes used for defining a proper fontfile |
| + */ |
| +char fontfile[256]; |
| +static int font_func (char *arg, int flags) { |
| + int i; |
| + |
| + if (grub_strlen(arg) <= 0) |
| + { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf("µ±Ç°×ÖÌåÎļþ: %s", fontfile); |
| + else |
| + grub_printf("Current font file is: %s", fontfile); |
| +#else |
| + grub_printf("Current font file is: %s", fontfile); |
| +#endif |
| + return 1; |
| + } |
| + |
| + while(arg[0]==' '||arg[0]=='\t') arg++; |
| + |
| + if (strlen(arg) > 256) |
| + return !(errnum = ERR_WONT_FIT); |
| + |
| +// if (flags == BUILTIN_CMDLINE) { |
| + if (! grub_open(arg)) |
| + return 0; |
| + grub_close(); |
| +// } |
| + |
| + strcpy(fontfile, arg); |
| + |
| + /* get rid of TERM_NEED_INIT from the graphics terminal. */ |
| + for (i = 0; term_table[i].name; i++) { |
| + if (grub_strcmp (term_table[i].name, "graphics") == 0) { |
| + term_table[i].flags &= ~TERM_NEED_INIT; |
| + break; |
| + } |
| + } |
| + |
| + //graphics_set_splash (splashimage); |
| + |
| + if (/* flags == BUILTIN_CMDLINE && */ graphics_inited) { |
| + graphics_end(); |
| + if (! graphics_init()) |
| + return !(errnum = ERR_EXEC_FORMAT); |
| + graphics_cls(); |
| + } |
| + |
| + /* FIXME: should we be explicitly switching the terminal as a |
| + * side effect here? */ |
| + terminal_func("graphics", flags); |
| + |
| + return 1; |
| +} |
| + |
| +static struct builtin builtin_fontfile = |
| +{ |
| + "fontfile", |
| + font_func, |
| + BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, |
| + "fontfile FILE", |
| + "Specify the Chinese Font File. " |
| + "If you want display chinese character, please run" |
| + "splashimage command later.", |
| + "fontfile FILE", |
| + "\tÖ¸¶¨ÖÐÎÄ×ÖÌåÎļþ£¬²¢Çл»µ½¼òÌåÖÐÎÄÏÔʾ·½Ê½¡£" |
| +}; |
| +#endif /* SUPPORT_GRAPHICS */ |
| + |
| static int |
| root_func (char *arg, int flags) |
| { |
| @@ -11002,7 +11354,13 @@ |
| " optional HDBIAS parameter is a number to tell a BSD kernel" |
| " how many BIOS drive numbers are on controllers before the current" |
| " one. For example, if there is an IDE disk and a SCSI disk, and your" |
| - " FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS." |
| + " FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS.", |
| + "root [DEVICE [HDBIAS]]", |
| + "\tÉèÖøù·ÖÇøΪָ¶¨É豸(DEVICE), È»ºó³¢ÊԹҽӸ÷ÖÇøÒԵõ½·ÖÇø´óС(ÓÃÓÚ" |
| + "\n\tÔÚES:ESIÖд«µÝ, ÉÈÇøÁ´Ê½Æô¶¯·½Ê½ÒªÇóÕâÑù)¡£BSD Çý¶¯ÀàÐÍÓÃÓÚÆô¶¯ BSD" |
| + "\n\tµÄºËÐÄÆô¶¯), ºÍÈ·¶¨ BSD ×Ó·ÖÇøËùÔÚµÄ PC ·ÖÇø¡£¿ÉÑ¡µÄ´ÅÅÌÆ«ÒƲÎÊý, ÓÃ" |
| + "\n\tÓÚ BSD ºËÐÄÈ·¶¨ÓжàÉÙ¸ö¿ØÖÆÆ÷ÔÚµ±Ç°¿ØÖÆÆ÷Ç°¡£±ÈÈç, ¼ÙÉèͬʱÓÐÒ»¸ö" |
| + "\n\tIDE ºÍ SCSI ÅÌ, ¶ø BSD ¸ù·ÖÇøÔÚ SCSI ÅÌÉÏ, ÄÇô´ÅÅÌÆ«ÒƾÍΪ 1¡£" |
| }; |
| |
| |
| @@ -11023,7 +11381,12 @@ |
| " is useful for when an OS is outside of the area of the disk that" |
| " GRUB can read, but setting the correct root device is still" |
| " desired. Note that the items mentioned in `root' which" |
| - " derived from attempting the mount will NOT work correctly." |
| + " derived from attempting the mount will NOT work correctly.", |
| + "rootnoverify [DEVICE [HDBIAS]]", |
| + "\tÀàËÆÓÚ¡°root¡±Ö¸Áî, µ«²»³¢ÊԹҽӸ÷ÖÇø¡£ÕâÓÃÓÚÓÐЩ²Ù×÷ϵͳ°²×°ÔÚ" |
| + "\n\tGRUB ÄÜ·ÃÎʵ½µÄ´ÅÅÌÇøÓòÖ®Í⣬»òÕßÆäÎļþϵͳ²»Äܱ» GRUB ʶ±ð³öÀ´£¬" |
| + "\n\tµ«ÄãÈÔÈ»Ïë°ÑÕâ¸öÉ豸ǿÖÆÉèÖÃΪ root É豸µÄÇé¿ö¡£ËµÃ÷£ºÕâÑùÒ»À´£¬" |
| + "\n\tÔÀ´ÔÚ root ÃüÁîÖг¢ÊÔ¹Ò½ÓµÄÄÇЩÏîÄ¿£¬ÏÖÔÚ½«²»Æð×÷ÓÃÁË¡£" |
| }; |
| |
| |
| @@ -11358,7 +11721,13 @@ |
| " `fallback' is used, next fallback entry is saved." |
| " If T is not 0, prompt the user to confirm the write operation by" |
| " pressing the Y key, and if no key-press detected within T seconds," |
| - " the write will be discarded." |
| + " the write will be discarded.", |
| + "savedefault", |
| + "\tÈç¹ûûÓÐÖ¸¶¨²ÎÊý£¬¾Í°Ñµ±Ç°²Ëµ¥Ïî±£´æΪĬÈϵÄÒýµ¼Ïî¡£Èç¹ûÖ¸¶¨Á˲ÎÊý" |
| + "\n\tNUM£¬ÄÇô±£´æµÄ¾ÍÊÇËü¡£Èç¹ûÖ¸¶¨µÄÊǹؼü×Ö fallback£¬ÄÇô±£´æµÄÊÇ" |
| + "\n\tfallback ÃüÁîËùÖ¸¶¨µÄ²Ëµ¥Ïî¡£Èç¹û T ²»ÊÇ 0£¬½«ÌáʾÓû§°´Ï Y ¼üÀ´" |
| + "\n\tÈ·ÈÏдÅ̲Ù×÷£¬Èç¹ûÔÚ T ÃëÖ®ÄÚûÓа´¼ü£¬»òÕß°´¼ü²»ÊÇ Y£¬ÄÇôдÅ̱£´æ" |
| + "\n\tµÄ²Ù×÷½«±»È¡Ïû¡£" |
| }; |
| |
| |
| @@ -11510,7 +11879,13 @@ |
| " PARITY is the type of parity, which is one of `no', `odd' and `even'." |
| " STOP is the length of stop bit(s). The option --device can be used only" |
| " in the grub shell, which specifies the file name of a tty device. The" |
| - " default values are COM1, 9600, 8N1." |
| + " default values are COM1, 9600, 8N1.", |
| + "serial [--unit=UNIT] [--port=PORT] [--speed=SPEED] [--word=WORD] [--parity=PARITY] [--stop=STOP] [--device=DEV]", |
| + "\t³õʼ»¯Ò»¸ö´®¿ÚÉ豸¡£UNIT ÓÃÓÚÖ¸¶¨ÒªÊ¹ÓõĴ®¿ÚÉ豸(È磬0 == COM1);" |
| + "\n\tPORT ÓÃÓÚÖ¸¶¨¶Ë¿ÚºÅ; SPEED ÓÃÓÚÖ¸¶¨Í¨Ñ¶µÄÊýÂÊ; WORD Ϊ×Ö³¤;" |
| + "\n\tPARITY ΪÆæżÀàÐÍ(È¡ `no', `odd' ºÍ `even' Ö®Ò»µÄÖµ¡£); STOP ÊÇÍ£Ö¹" |
| + "\n\tλµÄ³¤¶ÈÖµ; Ñ¡Ïî --device ½öÓÃÓÚÃüÁîÐÐģʽ£¬ÓÃÒÔÖ¸¶¨ tty É豸µÄÎļþ" |
| + "\n\tÃû¡£Ä¬ÈÏÖµÊÇÕâÑùµÄ£¬COM1, 9600, 8N1¡£" |
| }; |
| #endif /* SUPPORT_SERIAL */ |
| |
| @@ -11762,7 +12137,18 @@ |
| " quote, doublequote, backquote, tilde, shift, backslash, bar, comma," |
| " less, period, greater, slash, question, alt, space, capslock, FX (X" |
| " is a digit), and delete. If no argument is specified, reset key" |
| - " mappings." |
| + " mappings.", |
| + "setkey [TO_KEY FROM_KEY]", |
| + "\t¸Ä±ä¼üÅÌÓ³Éä¹Øϵ¡£°ÑFROM_KEYÓ³ÉäΪTO_KEY¡£ÕâÀïµÄ¼ü±ØÐëÊÇ×Öĸ, Êý×Ö," |
| + "\n\tºÍÒÔÏÂÌØÊâ¼ü: escape(תÒå), exclam(!), at(@), numbersign(#)," |
| + "\n\tdollar($), parenright[)], caret(^), ampersand(&), asterisk(*)," |
| + "\n\tplus(+), percent(%), minus(-), underscore(_), equal(=)," |
| + "\n\tparenleft[(], backspace(Í˸ñ), tab(ÖƱí), bracketleft([)," |
| + "\n\tbraceleft({), bracketright(]), braceright(}), enter(»Ø³µ)," |
| + "\n\tcontrol(¿ØÖÆ), semicolon(;), colon(:), quote('), doublequote(\")," |
| + "\n\tslash(/), backquote(`), tilde(~), shift(»»µµ), backslash(\\)," |
| + "\n\tbar(|), comma(,), less(<), period(.), greater(>), question(?)," |
| + "\n\talt(½»»¥), space(¿Õ¸ñ), capslock(´óд), Fx(¹¦Äܼü) ºÍ delete(ɾ³ý)¡£" |
| }; |
| |
| |
| @@ -12093,7 +12479,14 @@ |
| " doesn't work in LBA mode, specify the option `--force-lba'." |
| " If you install GRUB under the grub shell and you cannot unmount the" |
| " partition where GRUB images reside, specify the option `--stage2'" |
| - " to tell GRUB the file name under your OS." |
| + " to tell GRUB the file name under your OS.", |
| + "setup [--prefix=DIR] [--stage2=STAGE2_FILE] [--force-lba] INSTALL_DEVICE [IMAGE_DEVICE]", |
| + "\t×Ô¶¯°²×° GRUB. ÕâÌõÃüÁîʹÓøüÁé»îµÄ install ÃüÁ GRUB °²×°µ½Ö¸¶¨" |
| + "\n\tÉ豸ÉÏ¡£Èç¹û¸ø³öÁËÓ³ÏóÉ豸, ½«ÔÚ¸ÃÉ豸ѰÕÒ GRUB, ·ñÔòʹÓÃȱʡµÄ¸ùÉè" |
| + "\n\t±¸¡£¸ùÉ豸¿ÉÓà root Ö¸ÁîÖ¸¶¨¡£Èç¹ûÄãÈ·ÈÏϵͳµÄ BIOS Ó¦¸ÃÖ§³Ö LBA Ä£" |
| + "\n\tʽ, µ«ÊÇ GRUB ȴûÓй¤×÷ÓÚ¸Ãģʽ, ÔòÇëÖ¸¶¨ --force-lba ²ÎÊý¡£ÈçÈôÄã" |
| + "\n\tÔÚÃüÁîÐÐÖÐÒÑ°²×°ÁËÒ»´Î GRUB, ¿ÉÊÇÄãÈ´ÎÞ·¨Ð¶ÔØ GRUB ³ÌÐòËùÔڵķÖÇø£¬" |
| + "\n\tÇëÖ¸¶¨ `--stage2' ²ÎÊý¡£" |
| }; |
| #endif /* GRUB_UTIL */ |
| |
| @@ -12293,7 +12686,16 @@ |
| " If you specify --no-edit, the BASH-like editing feature will be disabled." |
| " If --timeout is present, this command will wait at most for SECS" |
| " seconds. The option --lines specifies the maximum number of lines." |
| - " The option --silent is used to suppress messages." |
| + " The option --silent is used to suppress messages.", |
| + "terminal [--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] [--silent] [console] [serial] [hercules] [graphics]", |
| + "\tÑ¡ÔñÒ»¸öÖնˡ£µ±Ö¸¶¨Á˶à¸öÖÕ¶ËÒÔºó, °´ÈÎÒâ¼ü·½¿É¼ÌÐø²Ù×÷¡£Èç¹û¿ØÖÆ" |
| + "\n\t̨ºÍ´®¿Ú¶¼±»Ö¸¶¨ÁË, ÄÇôÄãÊ×ÏÈÔÚÆäÖа´Ï¼üÅ̵ÄÖն˽«±»Ê×ÏÈÑ¡ÖС£" |
| + "\n\tÈç¹ûûÓÐÖ¸¶¨ÈκβÎÊý, ÄÇô´ËÃüÁÏÔʾ³öµ±Ç°µÄÖÕ¶ËÉèÖÃ; ²ÎÊý --dumb" |
| + "\n\tÓÃÒÔÖ¸¶¨Ò»¸öÑÆÖÕ¶Ë, ·ñÔò¼´Îª vt100 ¼æÈÝÐÍ; ÈôʹÓÃÁË --no-echo ²ÎÊý," |
| + "\n\tÆÁÄ»ÉϽ«²»»á»ØÏÔÊäÈëµÄ×Ö·û; ÈôʹÓÃÁË --no-edit ²ÎÊý, the BASH-like" |
| + "\n\tµÄ±à¼¹¦Äܽ«±»½ûÓÃ; ÈôʹÓÃÁË --timeout ²ÎÊý, ¸ÃÃüÁµÈ´ýÊýÃëÖÓ(ÓÉ" |
| + "\n\tSECS Ö¸¶¨); ¿ÉʹÓà --lines Ö¸¶¨×î´óµÄÐÐÊý; ¿ÉʹÓà --silent Ñ¡Ïî¹Ø±Õ" |
| + "\n\tÏûÏ¢ÏÔʾ¡£" |
| }; |
| #endif /* SUPPORT_SERIAL || SUPPORT_HERCULES || SUPPORT_GRAPHICS */ |
| |
| @@ -12409,7 +12811,13 @@ |
| "Define the capabilities of your terminal. Use this command to" |
| " define escape sequences, if it is not vt100-compatible." |
| " You may use \\e for ESC and ^X for a control character." |
| - " If no option is specified, the current settings are printed." |
| + " If no option is specified, the current settings are printed.", |
| + "terminfo [--name=NAME --cursor-address=SEQ [--clear-screen=SEQ]" |
| + " [--enter-standout-mode=SEQ] [--exit-standout-mode=SEQ]]", |
| + |
| + "\tÖ¸¶¨Öն˵ŦÄÜ¡£Èç¹û´ËÖÕ¶ËΪ vt100 ¼æÈÝÐ͵ģ¬Ôò¿ÉÖ¸¶¨»»Âë˳Ðò(¼´Ê¹" |
| + "\n\tÓà \\e ´ú±í ESC, ^X¡¡´ú±í¿ØÖÆÂë); ÔÚδ¸øÈκβÎÊýµÄÇé¿öÏ£¬½«¸ø³ö" |
| + "\n\tµ±Ç°ÅäÖÃÐÅÏ¢¡£" |
| }; |
| #endif /* SUPPORT_SERIAL */ |
| |
| @@ -12499,7 +12907,13 @@ |
| " filepos=Y' reading has X and Y equal, then it is definitely" |
| " consistent, and very likely works correctly subject to a" |
| " consistent offset error. If this test succeeds, then a good next" |
| - " step is to try loading a kernel." |
| + " step is to try loading a kernel.", |
| + "testload FILE", |
| + "\tÓü¸ÖÖ²»Í¬µÄ·½Ê½¶ÁÈ¡Îļþ FILE µÄÕû¸öÄÚÈݲ¢±È½ÏËüÃÇ£¬ÒÔ²âÊÔÎļþϵͳ" |
| + "\n\t´úÂëµÄÕýÈ·ÐÔ¡£Êä³ö¿´ÆðÀ´»áÓеã¶ù»ìÂÒ£¬µ«ÊÇ£¬Èç¹ûûÓб¨¸æ´íÎ󣬶øÇÒ" |
| + "\n\t×îºóµÄ¡°i=X, filepos=Y¡±ÖÐµÄ X ºÍ Y ÊÇÏàµÈµÄ»°£¬ÄÇô´úÂëÎÞÒÉÊÇ¿É¿¿" |
| + "\n\tµÄ£¬¶øÇҺܿÉÄÜÕýÈ·ÎÞÎóµØ¹¤×÷¶ø²»»á³öÏÖ±ðµÄ²î´í¡£Èç¹û²âÊԳɹ¦£¬ÏÂÒ»" |
| + "\n\t²½¾¡¿É³¢ÊÔ¼ÓÔØÒ»¸öÄںˡ£" |
| }; |
| #endif |
| |
| @@ -12624,7 +13038,9 @@ |
| testvbe_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "testvbe MODE", |
| - "Test the VBE mode MODE. Hit any key to return." |
| + "Test the VBE mode MODE. Hit any key to return.", |
| + "testvbe MODE", |
| + "\t²âÊÔËùÖ¸¶¨ MODE µÄ VBE ģʽ¡£" |
| }; |
| |
| static inline unsigned long vbe_far_ptr_to_linear (unsigned long ptr) |
| @@ -12774,7 +13190,10 @@ |
| "setvbe [MODE_3D]", |
| "Set the VBE mode MODE_3D(which is of the form 1024x768x32) for each subsequent kernel command-line." |
| " If no argument is specified, clear(nullify, invalidate) the video option" |
| - " string setup by the previous setvbe command." |
| + " string setup by the previous setvbe command.", |
| + "setvbe [MODE_3D]", |
| + "\tΪºóÐøµÄÿ¸ö kernel ÃüÁîÐÐÉèÖà VBE ģʽ MODE_3D(ÀýÈç 1024x768x32)¡£" |
| + "\n\tÈô²»Ö¸¶¨²ÎÊý£¬ÔòÇå¿ÕÓÉÏÈÇ°µÄ setvbe ÃüÁîËùÉèÖõÄÊÓƵѡÏî×Ö·û´®¡£" |
| }; |
| |
| |
| @@ -12799,7 +13218,9 @@ |
| tftpserver_func, |
| BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_MENU | BUILTIN_HELP_LIST, |
| "tftpserver IPADDR", |
| - "Override the TFTP server address." |
| + "Override the TFTP server address.", |
| + "tftpserver IPADDR", |
| + "\tÖ¸¶¨ TFTP ·þÎñÆ÷µÄ IP µØÖ·¡£" |
| }; |
| #endif /* SUPPORT_NETBOOT */ |
| |
| @@ -12876,7 +13297,9 @@ |
| tpm_func, |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "tpm --init", |
| - "Initialise TPM." |
| + "Initialise TPM.", |
| + "tpm --init", |
| + "\t³õʼ»¯TPM¡£" |
| }; |
| #endif /* ! defined(GRUB_UTIL) && ! defined (STAGE1_5) */ |
| |
| @@ -12905,7 +13328,10 @@ |
| "unhide [PARTITION]", |
| "Unhide PARTITION by clearing the \"hidden\" bit in its" |
| " partition type code. The default partition is the current" |
| - " root device." |
| + " root device.", |
| + "unhide [PARTITION]", |
| + "\tͨ¹ýÇå³ý·ÖÇøÀàÐÍÂëÉϵġ°Òþ²Ø¡±±êÖ¾£¬À´½â³ý¶Ô·ÖÇø PARTITION µÄÒþ²Ø¡£" |
| + "\n\tĬÈϵķÖÇøÊǵ±Ç°µÄ¸ùÉ豸¡£" |
| }; |
| |
| |
| @@ -12928,7 +13354,10 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "uppermem KBYTES", |
| "Force GRUB to assume that only KBYTES kilobytes of upper memory are" |
| - " installed. Any system address range maps are discarded." |
| + " installed. Any system address range maps are discarded.", |
| + "uppermem KBYTES", |
| + "\tÇ¿ÖÆ GRUB ³ÐÈÏϵͳÖÐÖ»°²×°ÁË (KBYTES) KB µÄÉÏλÄÚ´æ¡£ÂÔ¹ýÈκÎÐÎʽµÄ" |
| + "\n\tϵͳÄÚ´æµØÖ·ÇøÓò²éÕÒ²½Öè¡£" |
| }; |
| #endif |
| |
| @@ -13032,7 +13461,9 @@ |
| BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST, |
| "vbeprobe [MODE]", |
| "Probe VBE information. If the mode number MODE is specified, show only" |
| - " the information about only the mode." |
| + " the information about only the mode.", |
| + "vbeprobe [MODE]", |
| + "\tÕì²â VBE µÄÐÅÏ¢¡£Èç¹ûÖ¸¶¨ÁËÒ»¸öģʽ MODE£¬Ôò½öÏÔʾÕâ¸öģʽµÄÐÅÏ¢¡£" |
| }; |
| |
| |
| @@ -13086,6 +13517,7 @@ |
| &builtin_fallback, |
| &builtin_find, |
| #ifdef SUPPORT_GRAPHICS |
| + &builtin_fontfile, /* Chinese Support Function by Gandalf*/ |
| &builtin_foreground, |
| #endif |
| &builtin_fstest, |
| diff -Naur grub-0.97_splash/stage2/char_io.c grub-0.97_chinese/stage2/char_io.c |
| --- grub-0.97_splash/stage2/char_io.c 2010-01-03 20:18:13.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/char_io.c 2010-01-03 21:53:30.000000000 +0800 |
| @@ -462,8 +462,17 @@ |
| { |
| cls (); |
| |
| +#ifdef SUPPORT_GRAPHICS |
| +if (graphics_inited && ushFontReaded) |
| + grub_printf ("GNU GRUB ÖÐÎÄ»¯°æ£Û°æ±¾ %s£Ý(%dK µÍ¶Ë / %dK ÉÏλ ÄÚ´æ)\n", |
| + version_string, saved_mem_lower, saved_mem_upper); |
| +else |
| grub_printf ("GNU GRUB version %s (%dK lower / %dK upper memory)\n", |
| version_string, saved_mem_lower, saved_mem_upper); |
| +#else |
| + grub_printf ("GNU GRUB version %s (%dK lower / %dK upper memory)\n", |
| + version_string, saved_mem_lower, saved_mem_upper); |
| +#endif |
| } |
| |
| #endif |
| diff -Naur grub-0.97_splash/stage2/cmdline.c grub-0.97_chinese/stage2/cmdline.c |
| --- grub-0.97_splash/stage2/cmdline.c 2009-12-29 02:59:47.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/cmdline.c 2010-01-03 21:53:30.000000000 +0800 |
| @@ -58,10 +58,23 @@ |
| void |
| print_cmdline_message (int forever) |
| { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + printf (" £Û ÌṩÀàËÆ BASH µÄÐб༹¦ÄÜ¡£¶ÔÓÚµÚÒ»¸ö´Ê, TAB ¼üÁгö¿ÉÄܵÄ\n" |
| + " ÍêÕûÃüÁî¡£·ñÔò¼´Áгö¿ÉÄܵÄÉ豸/Îļþ¡£%s £Ý\n", |
| + (forever ? "" : " °´ `ESC` ¼´¿ÉÍ˳öµ±Ç°×´Ì¬¡£")); |
| + else |
| printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n" |
| " lists possible command completions. Anywhere else TAB lists the possible\n" |
| " completions of a device/filename.%s ]\n", |
| (forever ? "" : " ESC at any time exits.")); |
| + |
| +#else |
| + printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n" |
| + " lists possible command completions. Anywhere else TAB lists the possible\n" |
| + " completions of a device/filename.%s ]\n", |
| + (forever ? "" : " ESC at any time exits.")); |
| +#endif |
| } |
| |
| extern int command_func (char *arg, int flags); |
| diff -Naur grub-0.97_splash/stage2/graphics.c grub-0.97_chinese/stage2/graphics.c |
| --- grub-0.97_splash/stage2/graphics.c 2009-11-27 11:01:29.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/graphics.c 2010-01-03 21:53:30.000000000 +0800 |
| @@ -1,4 +1,5 @@ |
| /* graphics.c - graphics mode support for GRUB */ |
| +/* Chinese double-byte character support by Gandalf <f22_storm@163.com> */ |
| /* Implemented as a terminal type by Jeremy Katz <katzj@redhat.com> based |
| * on a patch by Paulo César Pereira de Andrade <pcpa@conectiva.com.br> |
| */ |
| @@ -30,8 +31,13 @@ |
| #include <shared.h> |
| #include <graphics.h> |
| |
| +#define BASE_FONT_ADDR 0x500000; /* Raw base address for Chinese Font.*/ |
| + |
| +unsigned short stg2_ptborder = 0; /* Is called from stage2 drawing the menu border? */ |
| + |
| static int saved_videomode = 0; |
| extern unsigned char *font8x16; |
| +static int dbcs_ending_byte = 0; |
| |
| int outline = 0; |
| int disable_space_highlight = 0; |
| @@ -62,6 +68,9 @@ |
| extern int fontx; |
| extern int fonty; |
| |
| +//static char* chrMsg = "(r)Powered by Gandalf, f22_storm@163.com, 07/15/2004"; |
| + |
| +unsigned short ushFontReaded = 0; /* font loaded? */ |
| /* global state so that we don't try to recursively scroll or cursor */ |
| static int no_scroll = 0; |
| |
| @@ -119,17 +128,47 @@ |
| * invalidate the kernel_type. */ |
| kernel_type = KERNEL_TYPE_NONE; |
| if (! graphics_CURSOR) graphics_CURSOR = (void *)&graphics_cursor; |
| - |
| + |
| if (! graphics_inited) |
| { |
| saved_videomode = set_videomode (0x12); |
| } |
| |
| + if (! ushFontReaded) |
| + { |
| + ushFontReaded = 1; |
| + |
| + /* remove them all. |
| + grub_open("/boot/grub/fonts") || |
| + grub_open("/boot/fonts") || |
| + grub_open("/grub/fonts") || |
| + grub_open("/fonts") |
| + */ |
| + |
| + if (grub_strlen (fontfile) > 0) |
| + { |
| + if (grub_open (fontfile) ) |
| + { |
| + grub_read ((unsigned long long)(unsigned int)(char *) RAW_ADDR (0x500000), -1, 0xedde0d90); |
| + |
| + grub_close (); |
| + } |
| + else |
| + { |
| + ushFontReaded = 0; |
| + grub_printf ("load fontfile failed!\n"); |
| + } |
| + } |
| + } |
| + |
| if (! read_image (splashimage)) |
| { |
| - set_videomode (saved_videomode); |
| - grub_printf("failed to read image\n"); |
| - return 0; |
| + if (! ushFontReaded) |
| + { |
| + set_videomode (saved_videomode); |
| + grub_printf ("failed to read image\n"); |
| + return 0; /* graphics_init failure! */ |
| + } |
| } |
| |
| font8x16 = (unsigned char *) graphics_get_font (); /* code in asm.S */ |
| @@ -140,7 +179,7 @@ |
| graphics_highlight_color = ((graphics_normal_color >> 4) | |
| ((graphics_normal_color & 0xf) << 4)); |
| |
| - return 1; |
| + return 1; /* graphics_init success */ |
| } |
| |
| /* Leave graphics mode */ |
| @@ -151,9 +190,12 @@ |
| { |
| set_videomode (saved_videomode); |
| graphics_inited = 0; |
| + ushFontReaded = 0; |
| } |
| } |
| |
| +static unsigned char by[32], chsa[16], chsb[16]; |
| + |
| /* Print ch on the screen. Handle any needed scrolling or the like */ |
| void |
| graphics_putchar (int ch) |
| @@ -183,12 +225,12 @@ |
| |
| text[fonty * 80 + fontx] = ch; |
| text[fonty * 80 + fontx] &= 0x00ff; |
| - if (graphics_current_color & 0xf0) |
| + if (graphics_current_color == graphics_highlight_color)//if (graphics_current_color & 0xf0) |
| text[fonty * 80 + fontx] |= 0x10000;//0x100; |
| |
| graphics_CURSOR(0); |
| |
| - if ((fontx + 1) >= x1) |
| + if (fontx + 1 >= x1) |
| { |
| if (fonty + 1 < y1) |
| graphics_setxy(x0, fonty + 1); |
| @@ -538,24 +580,100 @@ |
| static unsigned char chr[16 << 2]; |
| static unsigned char mask[16]; |
| |
| +/* This function was modified by Gandalf for Chinese Support |
| + * |
| + * Change Log: |
| + * N/A |
| + * TODO: |
| + * There is a empty line of the center of Chinese Character. !!! |
| + */ |
| static void |
| graphics_cursor (int set) |
| { |
| unsigned char *pat, *mem, *ptr; |
| - int i, ch, offset; |
| + int i, ch, offset, n, ch1, ch2; |
| int invert = 0; |
| |
| if (set && no_scroll) |
| return; |
| |
| offset = cursorY * 80 + fontx; |
| + |
| ch = text[fonty * 80 + fontx] & 0xff; |
| if (ch != ' ' || ! disable_space_highlight) |
| invert = (text[fonty * 80 + fontx] & /*0xff00*/ 0xffff0000) != 0; |
| + |
| pat = font8x16 + (ch << 4); |
| |
| + dbcs_ending_byte = 0; |
| + |
| + if (ushFontReaded && ch >= 0xa1 && |
| + (! stg2_ptborder || |
| + (ch != DISP_VERT && |
| + ch != DISP_UR && |
| + ch != DISP_LL && |
| + ch != DISP_HORIZ && |
| + ch != DISP_LR && |
| + ch != DISP_UL |
| + ) |
| + ) |
| + ) |
| + { |
| + /* here is one trick, look one line as a string with '\0' ended, so, |
| + * if the last byte is the 1st byte of a Chinese Character,,, ,,, */ |
| + for (n = 0; n < fontx; n++) |
| + { |
| + ch1 = text[fonty * 80 + n] & 0xff; |
| + ch2 = text[fonty * 80 + n+1] & 0xff; |
| + |
| + if ((ch1>=0xa1 && ch1<=0xfe)&&(ch2>=0xa1 && ch2<=0xfe)) |
| + { |
| + if (n == fontx-1) |
| + { |
| + int dotpos; |
| + |
| + dbcs_ending_byte = ch; |
| + dotpos = (ch1-0xa1)*94 + ch2 - 0xa1; |
| + dotpos<<=5; |
| + |
| + grub_memmove(by, (unsigned char *) RAW_ADDR (0x500000 + dotpos), 32); |
| + |
| + for (i = 0; i <32; i ++) |
| + { |
| + if (i%2) |
| + chsb[i/2] = by[i]; |
| + else |
| + chsa[i/2] = by[i]; |
| + } |
| + } |
| + n++; |
| + } |
| + } |
| + if (! dbcs_ending_byte) |
| + { |
| + if (fontx == 79) |
| + { |
| + graphics_putchar (' '); |
| + text[fonty * 80 + fontx] = ch; |
| + text[fonty * 80 + fontx] &= 0x00ff; |
| + if (graphics_current_color == graphics_highlight_color)//if (graphics_current_color & 0xf0) |
| + text[fonty * 80 + fontx] |= 0x10000;//0x100; |
| + } |
| + return; |
| + } |
| + } |
| + |
| mem = (unsigned char*)VIDEOMEM + offset; |
| |
| + if (dbcs_ending_byte) |
| + { |
| + mem--;//mem = (unsigned char*)VIDEOMEM + offset -1; |
| + offset--; |
| + pat = chsa; |
| + } |
| + |
| +write_char: |
| + |
| if (set) |
| { |
| MapMask(15); |
| @@ -644,6 +762,17 @@ |
| } |
| |
| MapMask(15); |
| + |
| + if (dbcs_ending_byte) |
| + { |
| + dbcs_ending_byte = 0; |
| + |
| + /* reset the mem position */ |
| + mem++;//mem += 1;//mem = (unsigned char*)VIDEOMEM + offset; |
| + offset = cursorY * 80 + fontx; |
| + pat = chsb; |
| + goto write_char; |
| + } |
| } |
| |
| #endif /* SUPPORT_GRAPHICS */ |
| diff -Naur grub-0.97_splash/stage2/shared.h grub-0.97_chinese/stage2/shared.h |
| --- grub-0.97_splash/stage2/shared.h 2010-01-03 21:20:55.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/shared.h 2010-01-03 21:53:30.000000000 +0800 |
| @@ -479,6 +479,12 @@ |
| * Below this should be ONLY defines and other constructs for C code. |
| */ |
| |
| + |
| +extern char fontfile[256]; |
| +unsigned short stg2_ptborder; |
| +extern int graphics_inited; |
| +extern unsigned short ushFontReaded; |
| + |
| /* multiboot stuff */ |
| |
| #include "mb_header.h" |
| @@ -1153,6 +1159,10 @@ |
| char *short_doc; |
| /* The long version of the documentation. */ |
| char *long_doc; |
| + /* The short-chinese version of the documentation. */ |
| + char *sc_short_doc; |
| + /* The long version-chinese of the documentation. */ |
| + char *sc_long_doc; |
| }; |
| |
| /* All the builtins are registered in this. */ |
| diff -Naur grub-0.97_splash/stage2/stage2.c grub-0.97_chinese/stage2/stage2.c |
| --- grub-0.97_splash/stage2/stage2.c 2009-12-29 03:04:06.000000000 +0800 |
| +++ grub-0.97_chinese/stage2/stage2.c 2010-01-03 21:53:30.000000000 +0800 |
| @@ -128,6 +128,12 @@ |
| static void |
| print_default_help_message (char *config_entries) |
| { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("\n Óà %c ºÍ %c Á½¼ü½«Ò»¸ö²Ëµ¥ÏîÖÃΪ¸ßÁÁ¡£", |
| + DISP_UP, DISP_DOWN); |
| + else |
| +#endif |
| grub_printf ("\n Use the %c and %c keys to highlight an entry.", |
| (unsigned long)(unsigned char)DISP_UP, (unsigned long)(unsigned char)DISP_DOWN); |
| |
| @@ -143,18 +149,38 @@ |
| } |
| #endif |
| #endif |
| + |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_putstr ("°´»Ø³µ»ò b ¼üÆô¶¯¡£°´ p ¼üÈ¡µÃ\n" |
| + " ÌØȨ¿ØÖƹ¦ÄÜ¡£"); |
| + else |
| +#endif |
| grub_putstr (" Press ENTER or \'b\' to boot.\n" |
| " Press \'p\' to gain privileged control."); |
| } |
| else |
| { |
| if (config_entries) |
| - grub_putstr (" Press ENTER or \'b\' to boot.\n" |
| - " Press \'e\' to edit the commands before booting, or \'c\' for a command-line."); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_putstr ("°´»Ø³µ»ò b ¼üÆô¶¯£»°´ e ¼ü¿ÉÔÚ\n" |
| + " Æô¶¯Ç°ÖðÌõ±à¼²Ëµ¥ÖеÄÃüÁîÐòÁУ»°´ c ¼ü½øÈëÃüÁîÐС£"); |
| + else |
| +#endif |
| + grub_putstr (" Press ENTER or \'b\' to boot.\n" |
| + " Press \'e\' to edit the commands before booting, or \'c\' for a command-line."); |
| else |
| - grub_putstr (" At a selected line, press \'e\' to\n" |
| - " edit, \'d\' to delete, or \'O\'/\'o\' to open a new line before/after. When done,\n" |
| - " press \'b\' to boot, \'c\' for a command-line, or ESC to go back to the main menu."); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_putstr (" °´ e ¼ü±à¼µ±Ç°ÐУ»°´ d ¼üɾ\n" |
| + " ³ýµ±Ç°ÐУ»°´ O ¼ü»ò o ¼ü·Ö±ðÔÚµ±Ç°ÐÐ֮ǰ»òÖ®ºó²åÈëÒ»¸öÐÂÐС£±à¼½áÊøʱ£¬\n" |
| + " °´ b ¼üÆô¶¯£»°´ c ¼ü½øÈëÃüÁîÐУ»°´ Esc ¼üÍ˻ص½Ö÷²Ëµ¥¡£"); |
| + else |
| +#endif |
| + grub_putstr (" At a selected line, press \'e\' to\n" |
| + " edit, \'d\' to delete, or \'O\'/\'o\' to open a new line before/after. When done,\n" |
| + " press \'b\' to boot, \'c\' for a command-line, or ESC to go back to the main menu."); |
| } |
| |
| default_help_message_destoyed = 0; |
| @@ -367,6 +393,8 @@ |
| |
| gotoxy (MENU_BOX_X - 2, y); |
| |
| + stg2_ptborder = 1; /* Chinese Season */ |
| + |
| grub_putchar (DISP_UL); |
| for (i = 0; i < MENU_BOX_W + 1; i++) |
| grub_putchar (DISP_HORIZ); |
| @@ -394,6 +422,8 @@ |
| |
| gotoxy (MENU_BOX_X - 2, MENU_BOX_B + 1); |
| |
| + stg2_ptborder = 0; |
| + |
| if (current_term->setcolorstate) |
| current_term->setcolorstate (COLOR_STATE_STANDARD); |
| } |
| @@ -648,8 +678,14 @@ |
| /* Print a message. */ |
| if (! silent_hiddenmenu) |
| { |
| - grub_printf ("\rPress any key to enter the menu... %d ", |
| - grub_timeout); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("\r °´ÈÎÒâ¼ü½øÈë²Ëµ¥¡¡ %d ", |
| + grub_timeout); |
| + else |
| +#endif |
| + grub_printf ("\rPress any key to enter the menu... %d ", |
| + grub_timeout); |
| } |
| } |
| } |
| @@ -685,7 +721,12 @@ |
| print_default_help_message (config_entries); |
| |
| if (current_term->flags & TERM_DUMB) |
| - grub_printf ("\n\nThe selected entry is %d ", entryno); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("\n\n µ±Ç°Ñ¡ÖÐÏîΪ£º%d ", entryno); |
| + else |
| +#endif |
| + grub_printf ("\n\nThe selected entry is %d ", entryno); |
| else |
| print_entries (first_entry, entryno, menu_entries, config_entries); |
| } |
| @@ -721,14 +762,25 @@ |
| current_term->setcolorstate (COLOR_STATE_HELPTEXT); |
| |
| if (current_term->flags & TERM_DUMB) |
| - grub_printf ("\r Entry %d will be booted automatically in %d seconds. ", |
| - entryno, grub_timeout); |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("\r ÌõÄ¿ %d ½«»á×Ô¶¯ÔËÐÐÓÚ %d ÃëÖ®ºó¡£ ", |
| + entryno, grub_timeout); |
| + else |
| +#endif |
| + grub_printf ("\r Entry %d will be booted automatically in %d seconds. ", |
| + entryno, grub_timeout); |
| else |
| { |
| int i; |
| char tmp_buf[128]; |
| char ch = ' '; |
| |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_sprintf (tmp_buf, " ¸ßÁÁÑ¡ÖеÄÌõÄ¿½«»á×Ô¶¯ÔËÐÐÓÚ %d ÃëÖ®ºó¡£ ", grub_timeout); |
| + else |
| +#endif |
| grub_sprintf (tmp_buf, " The highlighted entry will be booted automatically in %d seconds.", grub_timeout); |
| gotoxy (MENU_BOX_X - 2, MENU_BOX_H + 7); |
| for (i = 0; i < 79; i++) |
| @@ -762,7 +814,14 @@ |
| since we're comming in here also on GRUB_TIMEOUT == -1 and |
| hang in GETKEY */ |
| if (current_term->flags & TERM_DUMB) |
| - grub_printf ("\r Highlighted entry is %d: ", entryno); |
| + { |
| +#ifdef SUPPORT_GRAPHICS |
| + if (graphics_inited && ushFontReaded) |
| + grub_printf ("\r ¸ßÁÁÑ¡ÖеÄÌõĿΪ %d: ", entryno); |
| + else |
| +#endif |
| + grub_printf ("\r Highlighted entry is %d: ", entryno); |
| + } |
| |
| c = /*ASCII_CHAR*/ (getkey ()); |
| |
| @@ -782,9 +841,6 @@ |
| { |
| int i; |
| |
| - if (current_term->setcolorstate) |
| - current_term->setcolorstate (COLOR_STATE_HELPTEXT); |
| - |
| if (current_term->flags & TERM_DUMB) |
| grub_putchar ('\r'); |
| else |