Commit graph

83 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
007d0695e2 2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/i18n.h (grub_gettext_dummy): Removed.
	* kern/misc.c (grub_gettext_dummy): Make static.
2010-02-07 00:36:18 +01:00
Vladimir 'phcoder' Serbinenko
b6c0d9c201 2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
* kern/misc.c (grub_utf8_to_ucs4): Don't eat valid characters preceeded
	by non-valid ones.
	* kern/term.c (grub_putchar): Likewise.
2010-02-06 23:39:14 +01:00
Vladimir 'phcoder' Serbinenko
1f534b6908 Merge mainline into gfxmenu 2010-02-03 01:24:07 +01:00
Vladimir 'phcoder' Serbinenko
61eb45eee7 Rename asprint into xasprintf and avsprintf into xvasprintf 2010-01-20 09:12:47 +01:00
Vladimir 'phcoder' Serbinenko
2d49abe9e7 merge mainline into asprintf 2010-01-20 07:36:17 +01:00
Vladimir 'phcoder' Serbinenko
e6e86df1de Merge multiterm into gfxmenu+multiterm 2010-01-05 16:34:10 +01:00
Vladimir 'phcoder' Serbinenko
519634516f Merge mainline into multiterm 2010-01-05 16:27:41 +01:00
Yves Blusseau
18f81dfc02 2010-01-01 Yves Blusseau <blusseau@zetam.org>
* kern/misc.c
	(memcmp): add missing memcmp "alias" function for Apple platforms
	(memset): add missing memset "alias" function for Apple platforms
2010-01-01 22:48:52 +01:00
Vladimir 'phcoder' Serbinenko
18277ec1f7 Fix typo 2009-12-31 14:03:45 +01:00
Vladimir 'phcoder' Serbinenko
11c22894af Fix warning in kern/misc.c 2009-12-30 14:24:10 +01:00
Vladimir 'phcoder' Serbinenko
8b442f3f4c asprintf and snprintf support 2009-12-29 10:04:06 +01:00
Vladimir 'phcoder' Serbinenko
bee140683a Initial effort for gfxmenu on multiterm branch 2009-12-26 01:49:57 +01:00
Vladimir 'phcoder' Serbinenko
9f293ab0df merge mainline into gfxmenu 2009-12-25 21:32:46 +01:00
Robert Millan
8eca55a6eb Imported nyu's multi-input 2009-12-24 17:08:14 +01:00
Vladimir 'phcoder' Serbinenko
2e71383172 Core changes hopefully finished 2009-12-24 15:34:33 +01:00
Vladimir 'phcoder' Serbinenko
f4c623e170 Work on multi-out terminal 2009-12-24 00:37:11 +01:00
Vladimir 'phcoder' Serbinenko
7ea73643f5 merge mtrunk into xnu 2009-12-18 03:57:32 +01:00
Carles Pina i Estany
c4a3e41a72 2009-12-13 Carles Pina i Estany <carles@pina.cat>
* include/grub/misc.h (grub_puts): New declaration.
	(grub_puts_): Likewise.
	* kern/mis.c (grub_puts): New definition.
	(grub_puts_): Likewise.
2009-12-13 19:51:08 +00:00
Carles Pina i Estany
e3069ec1a5 2009-12-08 Carles Pina i Estany <carles@pina.cat>
* include/grub/misc.h (grub_printf_): New declaration.
	* kern/misc.c (grub_printf_): New definition.
	* normal/main.c (grub_normal_reader_init): Use `grub_printf_' and `N_'
	instead of `grub_printf' and `_'.
	* normal/menu_entry.c (store_completion): Likewise.
	(run): Likewise.
	(grub_menu_entry_run): Likewise.
	* normal/menu_text.c (grub_wait_after_message): Likewise.
	(notify_booting): Likewise.
	(notify_fallback): Likewise.
	(notify_execution_failure): Likewise.
2009-12-08 00:08:52 +00:00
Robert Millan
e4612999e6 Merge from trunk. 2009-11-25 21:34:53 +00:00
Carles Pina i Estany
4a8572e9d8 2009-11-24 Carles Pina i Estany <carles@pina.cat>
* conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* gettext/gettex.c: Include <grub/i18n.h>.
	* include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from
 	  here ...
	* include/grub/i18n.h: ... to here
	* include/grub/i18n.h: ... to here.
	* kern/misc.c: Include <grub/i18n.h>
	(grub_gettext_dummy): Move above user.
2009-11-24 21:42:14 +00:00
Vladimir 'phcoder' Serbinenko
3dcf83ba7d merged mainstream into gfxmenu 2009-11-24 01:22:41 +01:00
Vladimir 'phcoder' Serbinenko
1f56d83788 Initial reimport of double buffering 2009-11-14 17:00:39 +01:00
Carles Pina i Estany
203ffbfa31 Adds gettext support in Grub. Building system needs to be improved and maybe userland utilites improved.
YYYY-MM-DD  Carles Pina i Estany <carles@pina.cat>

	* Makefile.in: Add uptrans target to help to update .pot file
	* conf/common.rmk: Add grub-gettext_lib target, dependency and SOURCES, CFLAGS, LDFLAGS
	* kern/misc.c: Define grub_gettext symbol and add implement grub_gettext_dummy function
	* po/TODO: Temporary file with instructions of what Makefile.in will do
	* po/ca.po: Catalan translation stub
	* include/grub/misc.h: Define macro _(char *s). Declare grub_gettext_dummy and grub_gettext
	* gettext/gettext.c: New file with gettext implementation
	* normal/menu.c (print_message): add _( ) to some strings
	* util/grub.d/10_linux.in: include grub-gettext_lib file. For the Linux menuentry, call eval_gettext
	* util/grub.d/00_header.in: add locale_prefix and gettext locale detection and setting up the access to the mo directory
	* util/grub-mkconfig_lib.in: add get_locale_lang
	* util/grub-gettext_lib.in: new file
2009-11-13 20:39:33 +00:00
Vladimir 'phcoder' Serbinenko
1d3c6f1de7 Manually reimported XNU branch 2009-11-09 18:43:53 +01:00
robertmh
a50569e135 2009-11-01 Robert Millan <rmh.grub@aybabtu.com>
Based on patch from BVK Chaitanya  <bvk.groups@gmail.com>
        * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
        case.
2009-11-01 23:03:09 +00:00
phcoder
70f1161d13 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Save space by inlining misc.c functions.

	* kern/misc.c (grub_iswordseparator): Made static.
	* kern/misc.c (grub_strcat): Moved from here ...
	* include/grub/misc.h (grub_strcat): ... here. Inlined.
	* kern/misc.c (grub_strncat): Moved from here ...
	* include/grub/misc.h (grub_strncat): ... here. Inlined.
	* kern/misc.c (grub_strcasecmp): Moved from here ...
	* include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
	* kern/misc.c (grub_strncasecmp): Moved from here ...
	* include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
	* kern/misc.c (grub_isalpha): Moved from here ...
	* include/grub/misc.h (grub_isalpha): ... here. Inlined.
	* kern/misc.c (grub_isdigit): Moved from here ...
	* include/grub/misc.h (grub_isdigit): ... here. Inlined.
	* kern/misc.c (grub_isgraph): Moved from here ...
	* include/grub/misc.h (grub_isgraph): ... here. Inlined.
	* kern/misc.c (grub_tolower): Moved from here ...
	* include/grub/misc.h (grub_tolower): ... here. Inlined.
2009-08-24 19:40:40 +00:00
chrfranke
af1f4f55f8 2009-06-11 Christian Franke <franke@computer.org>
* kern/misc.c (__enable_execute_stack): Add missing return type
	to prevent gcc warning.
2009-06-11 21:39:03 +00:00
fzielcke
b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
phcoder
6c68847712 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Avoid aliases when compiling with Apple's CC for PCBIOS machine

	* kern/misc.c [APPLE_CC] (memcpy): new function
	[APPLE_CC] (memmove): likewise
	[APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
	(memcpy): define alias conditionaly on !APPLE_CC
	(memset): likewise
	(abort): likewise
	* include/grub/misc.h (memove): don't define when both GRUB_UTIL and
	APPLE_CC are defined
	* include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
	(grub_assert_fail): make prototype conditional
2009-06-04 21:17:05 +00:00
phcoder
5999d61917 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
	
	* kern/misc.c (grub_itoa): Removed function
	(grub_ltoa): likewise
	(grub_vsprintf): use grub_lltoa
2009-04-15 12:33:46 +00:00
davem
56bc2471ad * kern/misc.c (grub_ltoa): Fix cast when handling negative
values.  Noticed by Pavel Roskin.
2009-04-12 08:06:26 +00:00
davem
ed3d2bc23d * kern/misc.c (grub_ltoa): New function.
(grub_vsprintf): Use it to format 'long' integers.
2009-04-11 11:48:34 +00:00
robertmh
8cc50345f8 2009-02-27 Robert Millan <rmh@aybabtu.com>
* kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
        `0x' qualifier as 0 when base is specified as parameter).
2009-02-27 19:33:38 +00:00
proski
1806b56e2b 2009-01-26 Daniel Mierswa <impulze@impulze.org>
* kern/misc.c (grub_strcasecmp): New function.
	(grub_strcasecmp): Use grub_size_t instead of int for length.
	Fix return value.
	* include/grub/misc.h: Update function prototypes.
2009-01-26 04:22:44 +00:00
chrfranke
d31c24f1e0 2009-01-22 Christian Franke <franke@computer.org>
* kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
	(precision) digit string.  Allow `.format2' without `format1' (width).
	Limit input chars for `%s' output to `format2' if specified.  This is
	compatible with standard printf ().
2009-01-22 20:27:52 +00:00
chaac
1e901a7573 2009-01-02 Colin D Bennett <colin@gibibit.com>
New font engine.
	
	Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
	build system and fixed gfxterm.c to work with different	sized fonts.

	* configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
	
	* configure: Re-generated.
	
	* DISTLIST: Removed font/manager.c.
	Added font/font.c.
	Added font/font_cmd.c.
	
	* Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
	compilation.
	
	* include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
	
	* kern/misc.c (grub_utf8_to_ucs4): Changed prototype. 

	* kern/term.c: Changed users of grub_utf8_to_ucs4.
	
	* normal/menu.c: Likewise.
		
	* conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
	(font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
	
	* include/grub/font.h: Replaced with new file.
	
	* include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
	(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
	(GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
	(GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
	(grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
	(grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, 
	fg_red, fg_green, fg_blue, fg_alpha.
	(grub_video_adapter): Removed blit_glyph.
	(grub_video_blit_glyph): Removed.	
	
	* font/manager.c: Removed file.
	
	* font/font.c: New file. 
	
	* font/font_cmd.c: Likewise.
	
	* video/video.c (grub_video_blit_glyph): Removed.
	
	* video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
	(grub_video_vbe_map_rgba): Likewise.
	(grub_video_vbe_unmap_color_int): Likewise.
	(grub_video_vbe_blit_glyph): Removed.
	(grub_video_vbe_adapter): Removed blit_glyph.
	
	* video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
	(get_pixel): Likewise.
	(set_pixel): Likewise. 
	
	* commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
	
	* term/gfxterm.c: Adapted to new font engine.
	
	* term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
	
	* term/i386/pc/vga.c: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.

	* util/grub.d/00_header.in: Changed to use new loadfont command.
	
	* util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
robertmh
651c29b79e 2008-11-07 Robert Millan <rmh@aybabtu.com>
Modularize at_keyboard.mod:

            * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
            (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
            (at_keyboard_mod_LDFLAGS): New variables.

            Actual terminal split:

            * include/grub/term.h (struct grub_term): Split in ...
            (struct grub_term_input): ... this, and ...
            (struct grub_term_output): ... this.  Update all users.
            (grub_term_set_current): Split in ...
            (grub_term_set_current_input): ... this, and ...
            (grub_term_set_current_output): ... this.
            (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            (grub_term_register): Split in ...
            (grub_term_register_input): ... this, and ...
            (grub_term_register_output): ... this.
            (grub_term_unregister): Split in ...
            (grub_term_unregister_input): ... this, and ...
            (grub_term_unregister_output): ... this.
            (grub_term_iterate): Split in ...
            (grub_term_iterate_input): ... this, and ...
            (grub_term_iterate_output): ... this.

            * kern/term.c (grub_term_list): Split in ...
            (grub_term_list_input): ... this, and ...
            (grub_term_list_output): ... this.  Update all users.
            (grub_cur_term): Split in ...
            (grub_cur_term_input): ... this, and ...
            (grub_cur_term_output): ... this.  Update all users.
            (grub_term_set_current): Split in ...
            (grub_term_set_current_input): ... this, and ...
            (grub_term_set_current_output): ... this.
            (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            (grub_term_register): Split in ...
            (grub_term_register_input): ... this, and ...
            (grub_term_register_output): ... this.
            (grub_term_unregister): Split in ...
            (grub_term_unregister_input): ... this, and ...
            (grub_term_unregister_output): ... this.
            (grub_term_iterate): Split in ...
            (grub_term_iterate_input): ... this, and ...
            (grub_term_iterate_output): ... this.

            * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
            a check for input and one for output (and only attempt to get keys
            from user when input works).

            * util/grub-probe.c (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            * util/grub-fstest.c: Likewise.
            * util/i386/pc/grub-setup.c: Likewise.
            * util/grub-editenv.c: Likewise.

            Portability adjustments:

            * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
            `term/i386/pc/at_keyboard.c'.
            * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
            grub_keyboard_controller_init() (now handled by terminal .init).
            * kern/i386/coreboot/init.c (grub_machine_init): Add call to
            grub_at_keyboard_init().
            * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
            (grub_console_checkkey, grub_console_getkey): Remove (now provided by
            at_keyboard.mod via input terminal interface).
            * include/grub/i386/coreboot/console.h: Convert into a stub for
            `<grub/i386/pc/console.h>'.

            Migrate full terminals to new API:

            * term/efi/console.c (grub_console_term): Split into ...
            (grub_console_term_input): ... this, and ...
            (grub_console_term_output): ... this.  Update all users.
            * term/ieee1275/ofconsole.c: Remove __i386__ hack.
            (grub_ofconsole_init): Split into ...
            (grub_ofconsole_init_input): ... this, and ...
            (grub_ofconsole_init_output): ... this.
            (grub_ofconsole_term): Split into ...
            (grub_ofconsole_term_input): ... this, and ...
            (grub_ofconsole_term_output): ... this.  Update all users.
            * term/i386/pc/serial.c (grub_serial_term): Split into ...
            (grub_serial_term_input): ... this, and ...
            (grub_serial_term_output): ... this.  Update all users.
            * term/i386/pc/console.c (grub_console_term): Split into ...
            (grub_console_term_input): ... this, and ...
            (grub_console_term_output): ... this.  Update all users.
            (grub_console_term_input): Only enable it on PC/BIOS platform.
            (grub_console_init): Remove grub_keyboard_controller_init() call.

            Migrate input terminals to new API:

            * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
            `i386' and `i386/pc' to enable build on x86_64 (this driver is
            i386-specific anyway).
            (grub_console_checkkey): Rename to ...
            (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
            users.
            (grub_keyboard_controller_orig): New variable.
            (grub_console_getkey): Rename to ...
            (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
            users.
            (grub_keyboard_controller_init): Static-ize.  Save original
            controller value so that it can be restored ...
            (grub_keyboard_controller_fini): ... here (new function).
            (grub_at_keyboard_term): New structure.
            (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
            functions.

            Migrate output terminals to new API:

            * term/i386/pc/vga.c (grub_vga_term): Change type to
            `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
            members.  Update all users.
            * term/gfxterm.c (grub_video_term): Change type to
            `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
            members.  Update all users.
            * include/grub/i386/pc/console.h (grub_console_checkkey)
            (grub_console_getkey): Do not export (no longer needed by gfxterm,
            etc).

            Migrate `terminal' command and userland tools to new API:

            * commands/terminal.c (grub_cmd_terminal): Split into ...
            (grub_cmd_terminal_input): ... this, and ...
            (grub_cmd_terminal_output): ... this.
            (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
            `terminal_input' and `terminal_output'.
            * util/grub.d/00_header.in: Adjust `terminal' calls to new
            `terminal_input' / `terminal_output' API.
            * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
            ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
            provided ${GRUB_TERMINAL}, convert it).
2008-11-07 19:11:39 +00:00
chrfranke
9035dce47f 2008-09-19 Christian Franke <franke@computer.org>
* aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
	* configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
	* include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
	Export __enable_execute_stack() to modules.
	* kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
	New function.
2008-09-19 06:55:20 +00:00
fzielcke
b86408f869 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
* include/grub/err.h (grub_err_printf): New function prototype.
        * util/misc.c (grub_err_printf): New function.
        * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
        grub_printf.
        * kern/err.c (grub_print_error): Use grub_err_printf.
2008-08-14 18:46:47 +00:00
marco_g
9c2ff3eefe 2008-08-05 Colin D Bennett <colin@gibibit.com>
High resolution timer support.  Implemented for x86 CPUs using TSC.
	Extracted generic grub_millisleep() so it's linked in only as needed.
	This requires a Pentium compatible CPU; if the RDTSC instruction is
	not supported, then it falls back on the generic grub_get_time_ms()
	implementation that uses the machine's RTC.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
	`kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
	`kern/generic/millisleep.c'.

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
	`kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.

	* conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
	`kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.

	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
	`kern/generic/millisleep.c'.

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.

	* kern/generic/rtc_get_time_ms.c: New file.

	* kern/generic/millisleep.c: New file.
 	
	* kern/misc.c: Don't include
	<kern/time.h> anymore.
	(grub_millisleep_generic): Removed.

	* commands/sleep.c (grub_interruptible_millisleep): Uses
	grub_get_time_ms() instead of grub_get_rtc().

	* include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
	function.
	(grub_cpu_is_cpuid_supported): New inline function.
	(grub_cpu_is_tsc_supported): New inline function.
	(grub_tsc_init): New function prototype.
	(grub_tsc_get_time_ms): New function prototype.

	* kern/i386/tsc.c (grub_get_time_ms): New file.

	* include/grub/time.h: Include <grub/types.h.
	(grub_millisleep_generic): Removed.
	(grub_get_time_ms): New prototype.
	(grub_install_get_time_ms): New prototype.
	(grub_rtc_get_time_ms): New prototype.

	* kern/time.c (grub_get_time_ms): New function.
	(grub_install_get_time_ms): New function.

	* kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
	<grub/time.h> anymore.
	(grub_millisleep): Removed.
	(grub_machine_init): Call grub_tsc_init.

	* kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
	get_time_ms() implementation.

	* kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
	(ieee1275_get_time_ms): New function.
	(grub_machine_init): Install get_time_ms() implementation.

	* kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
	(grub_machine_init): Call grub_tsc_init().
	(grub_millisleep): Removed.
 
	* kern/ieee1275/init.c (grub_millisleep): Removed.
	(grub_machine_init): Install ieee1275_get_time_ms()
	implementation.
	(ieee1275_get_time_ms): New function.
	(grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
	real work.
2008-08-05 11:54:37 +00:00
proski
95614c84f8 2008-06-15 Pavel Roskin <proski@gnu.org>
* commands/ls.c (grub_ls_list_files): Use integer calculations
	for human readable format, avoid floating point use.
	* kern/misc.c (grub_ftoa): Remove.
	(grub_vsprintf): Remove floating point support.
2008-06-16 00:42:48 +00:00
robertmh
bfb1f1a2bc 2008-04-15 Robert Millan <rmh@aybabtu.com>
* disk/lvm.c: Update copyright year.
        * kern/misc.c: Likewise.
2008-04-15 13:28:14 +00:00
robertmh
9fe8603472 2008-04-13 Robert Millan <rmh@aybabtu.com>
* kern/misc.c (grub_strncat): Fix off-by-one error.
        Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>

        * kern/env.c (grub_env_context_close): Clear current context, not
        previous one.
        Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>

        * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2008-04-13 14:58:42 +00:00
robertmh
d1bc1b738c 2008-01-15 Robert Millan <rmh@aybabtu.com>
* kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
        when pointers are 32-bit (but still do set it to one when they are
        64-bit).
2008-01-15 17:22:09 +00:00
proski
cc85c3c340 Typo fixes in comments and variable names. 2007-12-30 08:52:06 +00:00
robertmh
3381d27403 2007-10-22 Robert Millan <rmh@aybabtu.com>
* include/grub/time.h: New file.
	* include/grub/i386/time.h: Likewise.
	* include/grub/powerpc/time.h: Likewise.
	* include/grub/sparc64/time.h: Likewise.

	* include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.

	* kern/i386/efi/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/i386/pc/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.
	* kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.

	* include/grub/misc.h (grub_div_roundup): New function.

	* kern/misc.c: Include `<grub/time.h>'.
	(grub_millisleep_generic): New function.

	* conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
	Add `time.h'.
	* conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
	Add `time.h'.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
	`machine/time.h'.  Add `time.h'.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2007-10-22 19:59:33 +00:00
marco_g
8f096014e4 2007-08-02 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
	(ntfs_mod_SOURCES): New variable.
	(ntfs_mod_CFLAGS): Likewise.
	(ntfs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.

	* fs/ntfs.c: New file.
2007-08-02 19:12:52 +00:00
okuji
5a79f472c7 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
Migrate to GNU General Public License Version 3.

    * COPYING: Replaced with the plain text version of GPLv3.

    * config.guess: Updated from gnulib.
    * config.sub: Likewise.

    * geninit.sh: Output a GPLv3 copyright notice.
    * geninitheader.sh: Likewise.
    * genmodsrc.sh: Likewise.
    * gensymlist.sh.in: Likewise.

    * boot/i386/pc/boot.S: Upgraded to GPLv3.
    * boot/i386/pc/diskboot.S: Likewise.
    * boot/i386/pc/pxeboot.S: Likewise.
    * commands/blocklist.c: Likewise.
    * commands/boot.c: Likewise.
    * commands/cat.c: Likewise.
    * commands/cmp.c: Likewise.
    * commands/configfile.c: Likewise.
    * commands/echo.c: Likewise.
    * commands/help.c: Likewise.
    * commands/ls.c: Likewise.
    * commands/search.c: Likewise.
    * commands/terminal.c: Likewise.
    * commands/test.c: Likewise.
    * commands/videotest.c: Likewise.
    * commands/i386/cpuid.c: Likewise.
    * commands/i386/pc/halt.c: Likewise.
    * commands/i386/pc/play.c: Likewise.
    * commands/i386/pc/reboot.c: Likewise.
    * commands/i386/pc/vbeinfo.c: Likewise.
    * commands/i386/pc/vbetest.c: Likewise.
    * commands/ieee1275/halt.c: Likewise.
    * commands/ieee1275/reboot.c: Likewise.
    * commands/ieee1275/suspend.c: Likewise.
    * disk/loopback.c: Likewise.
    * disk/lvm.c: Likewise.
    * disk/raid.c: Likewise.
    * disk/efi/efidisk.c: Likewise.
    * disk/i386/pc/biosdisk.c: Likewise.
    * disk/ieee1275/ofdisk.c: Likewise.
    * font/manager.c: Likewise.
    * fs/affs.c: Likewise.
    * fs/ext2.c: Likewise.
    * fs/fat.c: Likewise.
    * fs/fshelp.c: Likewise.
    * fs/hfs.c: Likewise.
    * fs/hfsplus.c: Likewise.
    * fs/iso9660.c: Likewise.
    * fs/jfs.c: Likewise.
    * fs/minix.c: Likewise.
    * fs/sfs.c: Likewise.
    * fs/ufs.c: Likewise.
    * fs/xfs.c: Likewise.
    * hello/hello.c: Likewise.
    * include/grub/acorn_filecore.h: Likewise.
    * include/grub/arg.h: Likewise.
    * include/grub/bitmap.h: Likewise.
    * include/grub/boot.h: Likewise.
    * include/grub/cache.h: Likewise.
    * include/grub/device.h: Likewise.
    * include/grub/disk.h: Likewise.
    * include/grub/dl.h: Likewise.
    * include/grub/elfload.h: Likewise.
    * include/grub/env.h: Likewise.
    * include/grub/err.h: Likewise.
    * include/grub/file.h: Likewise.
    * include/grub/font.h: Likewise.
    * include/grub/fs.h: Likewise.
    * include/grub/fshelp.h: Likewise.
    * include/grub/gzio.h: Likewise.
    * include/grub/hfs.h: Likewise.
    * include/grub/kernel.h: Likewise.
    * include/grub/loader.h: Likewise.
    * include/grub/lvm.h: Likewise.
    * include/grub/misc.h: Likewise.
    * include/grub/mm.h: Likewise.
    * include/grub/net.h: Likewise.
    * include/grub/normal.h: Likewise.
    * include/grub/parser.h: Likewise.
    * include/grub/partition.h: Likewise.
    * include/grub/pc_partition.h: Likewise.
    * include/grub/raid.h: Likewise.
    * include/grub/rescue.h: Likewise.
    * include/grub/script.h: Likewise.
    * include/grub/setjmp.h: Likewise.
    * include/grub/symbol.h: Likewise.
    * include/grub/term.h: Likewise.
    * include/grub/terminfo.h: Likewise.
    * include/grub/tparm.h: Likewise.
    * include/grub/types.h: Likewise.
    * include/grub/video.h: Likewise.
    * include/grub/efi/api.h: Likewise.
    * include/grub/efi/chainloader.h: Likewise.
    * include/grub/efi/console.h: Likewise.
    * include/grub/efi/console_control.h: Likewise.
    * include/grub/efi/disk.h: Likewise.
    * include/grub/efi/efi.h: Likewise.
    * include/grub/efi/pe32.h: Likewise.
    * include/grub/efi/time.h: Likewise.
    * include/grub/i386/linux.h: Likewise.
    * include/grub/i386/setjmp.h: Likewise.
    * include/grub/i386/types.h: Likewise.
    * include/grub/i386/efi/kernel.h: Likewise.
    * include/grub/i386/efi/loader.h: Likewise.
    * include/grub/i386/efi/time.h: Likewise.
    * include/grub/i386/pc/biosdisk.h: Likewise.
    * include/grub/i386/pc/boot.h: Likewise.
    * include/grub/i386/pc/chainloader.h: Likewise.
    * include/grub/i386/pc/console.h: Likewise.
    * include/grub/i386/pc/init.h: Likewise.
    * include/grub/i386/pc/kernel.h: Likewise.
    * include/grub/i386/pc/loader.h: Likewise.
    * include/grub/i386/pc/memory.h: Likewise.
    * include/grub/i386/pc/multiboot.h: Likewise.
    * include/grub/i386/pc/serial.h: Likewise.
    * include/grub/i386/pc/time.h: Likewise.
    * include/grub/i386/pc/vbe.h: Likewise.
    * include/grub/i386/pc/vbeblit.h: Likewise.
    * include/grub/i386/pc/vbefill.h: Likewise.
    * include/grub/i386/pc/vbeutil.h: Likewise.
    * include/grub/i386/pc/vga.h: Likewise.
    * include/grub/ieee1275/ieee1275.h: Likewise.
    * include/grub/ieee1275/ofdisk.h: Likewise.
    * include/grub/powerpc/libgcc.h: Likewise.
    * include/grub/powerpc/setjmp.h: Likewise.
    * include/grub/powerpc/types.h: Likewise.
    * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
    * include/grub/powerpc/ieee1275/console.h: Likewise.
    * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
    * include/grub/powerpc/ieee1275/kernel.h: Likewise.
    * include/grub/powerpc/ieee1275/loader.h: Likewise.
    * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
    * include/grub/powerpc/ieee1275/time.h: Likewise.
    * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
    * include/grub/sparc64/libgcc.h: Likewise.
    * include/grub/sparc64/setjmp.h: Likewise.
    * include/grub/sparc64/types.h: Likewise.
    * include/grub/sparc64/ieee1275/console.h: Likewise.
    * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
    * include/grub/sparc64/ieee1275/kernel.h: Likewise.
    * include/grub/sparc64/ieee1275/time.h: Likewise.
    * include/grub/util/biosdisk.h: Likewise.
    * include/grub/util/getroot.h: Likewise.
    * include/grub/util/lvm.h: Likewise.
    * include/grub/util/misc.h: Likewise.
    * include/grub/util/raid.h: Likewise.
    * include/grub/util/resolve.h: Likewise.
    * io/gzio.c: Likewise.
    * kern/device.c: Likewise.
    * kern/disk.c: Likewise.
    * kern/dl.c: Likewise.
    * kern/elf.c: Likewise.
    * kern/env.c: Likewise.
    * kern/err.c: Likewise.
    * kern/file.c: Likewise.
    * kern/fs.c: Likewise.
    * kern/loader.c: Likewise.
    * kern/main.c: Likewise.
    * kern/misc.c: Likewise.
    * kern/mm.c: Likewise.
    * kern/parser.c: Likewise.
    * kern/partition.c: Likewise.
    * kern/rescue.c: Likewise.
    * kern/term.c: Likewise.
    * kern/efi/efi.c: Likewise.
    * kern/efi/init.c: Likewise.
    * kern/efi/mm.c: Likewise.
    * kern/i386/dl.c: Likewise.
    * kern/i386/efi/init.c: Likewise.
    * kern/i386/efi/startup.S: Likewise.
    * kern/i386/pc/init.c: Likewise.
    * kern/i386/pc/lzo1x.S: Likewise.
    * kern/i386/pc/startup.S: Likewise.
    * kern/ieee1275/ieee1275.c: Likewise.
    * kern/powerpc/cache.S: Likewise.
    * kern/powerpc/dl.c: Likewise.
    * kern/powerpc/ieee1275/cmain.c: Likewise.
    * kern/powerpc/ieee1275/crt0.S: Likewise.
    * kern/powerpc/ieee1275/init.c: Likewise.
    * kern/powerpc/ieee1275/openfw.c: Likewise.
    * kern/sparc64/cache.S: Likewise.
    * kern/sparc64/dl.c: Likewise.
    * kern/sparc64/ieee1275/init.c: Likewise.
    * kern/sparc64/ieee1275/openfw.c: Likewise.
    * loader/efi/chainloader.c: Likewise.
    * loader/efi/chainloader_normal.c: Likewise.
    * loader/i386/efi/linux.c: Likewise.
    * loader/i386/efi/linux_normal.c: Likewise.
    * loader/i386/pc/chainloader.c: Likewise.
    * loader/i386/pc/chainloader_normal.c: Likewise.
    * loader/i386/pc/linux.c: Likewise.
    * loader/i386/pc/linux_normal.c: Likewise.
    * loader/i386/pc/multiboot.c: Likewise.
    * loader/i386/pc/multiboot_normal.c: Likewise.
    * loader/powerpc/ieee1275/linux.c: Likewise.
    * loader/powerpc/ieee1275/linux_normal.c: Likewise.
    * normal/arg.c: Likewise.
    * normal/cmdline.c: Likewise.
    * normal/command.c: Likewise.
    * normal/completion.c: Likewise.
    * normal/execute.c: Likewise.
    * normal/function.c: Likewise.
    * normal/lexer.c: Likewise.
    * normal/main.c: Likewise.
    * normal/menu.c: Likewise.
    * normal/menu_entry.c: Likewise.
    * normal/misc.c: Likewise.
    * normal/parser.y: Likewise.
    * normal/script.c: Likewise.
    * normal/i386/setjmp.S: Likewise.
    * normal/powerpc/setjmp.S: Likewise.
    * normal/sparc64/setjmp.S: Likewise.
    * partmap/acorn.c: Likewise.
    * partmap/amiga.c: Likewise.
    * partmap/apple.c: Likewise.
    * partmap/gpt.c: Likewise.
    * partmap/pc.c: Likewise.
    * partmap/sun.c: Likewise.
    * term/gfxterm.c: Likewise.
    * term/terminfo.c: Likewise.
    * term/efi/console.c: Likewise.
    * term/i386/pc/console.c: Likewise.
    * term/i386/pc/serial.c: Likewise.
    * term/i386/pc/vesafb.c: Likewise.
    * term/i386/pc/vga.c: Likewise.
    * term/ieee1275/ofconsole.c: Likewise.
    * util/biosdisk.c: Likewise.
    * util/console.c: Likewise.
    * util/genmoddep.c: Likewise.
    * util/getroot.c: Likewise.
    * util/grub-emu.c: Likewise.
    * util/grub-mkdevicemap.c: Likewise.
    * util/grub-probe.c: Likewise.
    * util/lvm.c: Likewise.
    * util/misc.c: Likewise.
    * util/raid.c: Likewise.
    * util/resolve.c: Likewise.
    * util/update-grub.in: Likewise.
    * util/update-grub_lib.in: Likewise.
    * util/grub.d/00_header.in: Likewise.
    * util/grub.d/10_hurd.in: Likewise.
    * util/grub.d/10_linux.in: Likewise.
    * util/i386/efi/grub-install.in: Likewise.
    * util/i386/efi/grub-mkimage.c: Likewise.
    * util/i386/pc/grub-install.in: Likewise.
    * util/i386/pc/grub-mkimage.c: Likewise.
    * util/i386/pc/grub-mkrescue.in: Likewise.
    * util/i386/pc/grub-setup.c: Likewise.
    * util/i386/pc/misc.c: Likewise.
    * util/powerpc/ieee1275/grub-install.in: Likewise.
    * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
    * util/powerpc/ieee1275/misc.c: Likewise.
    * video/bitmap.c: Likewise.
    * video/video.c: Likewise.
    * video/i386/pc/vbe.c: Likewise.
    * video/i386/pc/vbeblit.c: Likewise.
    * video/i386/pc/vbefill.c: Likewise.
    * video/i386/pc/vbeutil.c: Likewise.
    * video/readers/tga.c: Likewise.
2007-07-21 23:32:33 +00:00
jeroen
21c8cbb1ab 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
* video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
	__attribute_ ((unused)) to mode_type argument.

	* util/getroot.c (grub_guess_root_device): Fix #endif.

	* kern/misc.c (memcmp): Fix prototype.

	* include/grub/partition.h [GRUB_UTIL]
	(grub_gpt_partition_map_init): Add prototype.
	(grub_gpt_partition_map_fini): Likewise.

	* fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
	at the right place.

	* fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
	(grub_fat_read_data): Likewise.
	(grub_fat_find_dir): Likewise.

	* font/manager.c (find_glyph): Make table a const.
	(grub_font_get_glyph): Remove bitmap from if statement.
2007-05-17 15:43:32 +00:00