2009-09-13 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob0ab86b8f8c1a541cefdb6955b30b42209da132b9
1 2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>
3         * configure.ac: Remove --enable-grub-pe2elf.  Only build
4         grub-pe2elf when needed by the build system itself.
5         * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
7 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
9         * configure.ac: Bump version to 1.97~beta3.
10         * docs/version.texi: Likewise.
12 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
14         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
15         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
16         from here ...
17         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
18         (grub_linux_setup_video): ... to here (with some adjustments).
20 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
22         Fix memory corruption issue (spotted by Colin Watson).
24         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
25         causing returned size to be stored in an incorrect memory location.
26         Fix use of uninitialized value when storing the returned size.
28 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
30         Change clean rules to properly remove files
32         * genmk.rb: add new clean rules
33         * Makefile.in (clean): add the new targets
34         (mostlyclean): likewise
36 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
38         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
39         to grub_uint64_t.
40         * fs/ntfs.c (init_file): Understand 64-bit sizes for
41         non-resident files.
43 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
45         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
46         part of bug #27349.
48 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
50         * util/grub-mkconfig.in: Make the created config mode 400 and
51         print a warning if it fails.
53 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
55         * util/grub.d/40_custom.in: Ask user to type custom entries below
56         comment, rather than below 'exec tail' line.
58 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
60         * util/grub.d/40_custom.in: Make sure that the explanatory text is
61         visible in grub.cfg.
63 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
65         * util/grub.d/40_custom.in: Make it a little clearer how to use this
66         file.
68 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
70         * docs/grub.cfg: Add an example menu entry for memtest86+.
72 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
74         * config.guess: Update to latest version from config git.
75         * config.sub: Likewise.
77 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
79         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
80         unknown-command case.  Fixes bug #27320.
82 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
84         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
85         `help' if the command exists.
87 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
89         * INSTALL: Require GCC 4.1.3 or later.
91 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
93         * Makefile.in (RMKFILES): add i386-qemu.rmk
94         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
95         $(srcdir)/stamp-h.in
97 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
99         * util/grub-probe.c (probe): Comment out buggy codepath, which
100         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
101         should be re-enabled after 1.97.
103 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
105         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
106         find searches for.
108 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
110         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
111         unnecessary calls to grub_error.
113 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
115         * NEWS: Mention `keystatus' and Unicode fonts.
117 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
119         * configure.ac: Bump version to 1.97~beta2.
120         * docs/version.texi: Likewise.
122 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
124         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
125         containing unwind information in some cases where it previously did
126         not. Use -fno-dwarf2-cfi-asm if available to restore the old
127         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
128         discussion.
130 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
132         Embedding loadenv module into grub-emu
134         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
135         commands/loadenv.c
136         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
137         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
138         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
139         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
140         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
141         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
143 2009-09-03  Magnus Granberg  <zorry@ume.nu>
145         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
146         include -fPIE in the default specs.
147         * configure.ac: Check if pie_possible is yes and add -fno-PIE
148         to TARGET_CFLAGS.
150 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
152         * INSTALL: Note that GNU Bison 2.3 or later is required.
154 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
156         * kern/i386/pc/startup.S: Fix typo.
158 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
160         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
161         according to GCS.
163 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
165         * docs/grub.texi (Naming convention): Describe one-based partition
166         numbering.
167         (Device syntax): Likewise.
168         (File name syntax): Likewise.
169         (Block list syntax): Likewise.
170         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
171         menu.lst.
172         (File name syntax): Likewise.
173         (Command-line and menu entry commands): Document acpi, blocklist,
174         crc, export, insmod, keystatus, ls, set, and unset commands.
176 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
178         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
179         to avoid implying that only one of --shift, --ctrl, or --alt may be
180         used.
182 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
184         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
185         rather than comparing against S_IFREG, which will almost never work.
187 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
189         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
190         (write_blocklists): Likewise.
192 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
194         * script/lua/grub_lua.h (fputs): Supply a format string as the first
195         argument to grub_printf.
197 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
199         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
200          non GNU test.
202 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
204         * kern/file.c (grub_file_read): Spelling fix
206 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
208         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
209         loading of headers in some cases.
211 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
213         * configure.ac: Bump version to 1.97~beta1.
214         * docs/version.texi: Likewise.
216 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
218         * include/grub/i386/xnu.h: Add license header.
219         include grub/err.h explicitly.
221 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
223         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
224         to `ufs' in the vfs.root.mountfrom kernel parameter.
226 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
228         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
230         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
231         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
233         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
234         `ARRAY_SIZE' macro.
236 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
238         * kern/file.c (grub_file_read): Check offset.
239         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
240         * fs/jfs.c (grub_jfs_read_file): Likewise.
241         * fs/ntfs.c (grub_ntfs_read): Likewise.
242         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
243         * fs/minix.c (grub_minix_read_file): Correct offset check.
244         * fs/ufs.c (grub_ufs_read_file): Likewise.
246 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
248         * term/i386/pc/console.c (bios_data_area): Cast
249         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
251 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
253         1-bit optimised blitters.
255         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
256         prototype.
257         (grub_video_fbblit_replace_24bit_1bit): Likewise.
258         (grub_video_fbblit_replace_16bit_1bit): Likewise.
259         (grub_video_fbblit_replace_8bit_1bit): Likewise.
260         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
261         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
262         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
263         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
264         function.
265         (grub_video_fbblit_replace_24bit_1bit): Likewise.
266         (grub_video_fbblit_replace_16bit_1bit): Likewise.
267         (grub_video_fbblit_replace_8bit_1bit): Likewise.
268         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
269         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
270         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
271         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
272         when possible.
273         * video/video.c (grub_video_get_blit_format): Return
274         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
276 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
278         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
279         the first argument to grub_printf.
281 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
282 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
284         Add `getkeystatus' terminal method.  Add a new `keystatus' command
285         to query it.
287         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
288         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
289         modifier key bitmasks.
290         (struct grub_term_input): Add `getkeystatus' member.
291         (grub_getkeystatus): Add prototype.
292         * kern/term.c (grub_getkeystatus): New function.
294         * include/grub/i386/pc/memory.h
295         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
296         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
297         Data Area layout.
298         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
299         (grub_console_term_input): Set `getkeystatus' member.
300         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
301         constants.
302         (grub_usb_keyboard_getreport): Likewise.
303         (grub_usb_keyboard_checkkey): Likewise.
304         (grub_usb_keyboard_getkeystatus): New function.
305         (grub_usb_keyboard_term): Set `getkeystatus' member.
307         * commands/keystatus.c: New file.
308         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
309         (keystatus_mod_SOURCES): New variable.
310         (keystatus_mod_CFLAGS): Likewise.
311         (keystatus_mod_LDFLAGS): Likewise.
312         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
313         commands/keystatus.c.
314         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
315         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
316         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
317         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
318         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
319         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
321 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
323         Split befs.mod and afs.mod into *_be.mod and *.mod
325         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
326         (grub_fstest_SOURCES): Likewise.
327         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
328         (afs_be_mod_SOURCES): New variable.
329         (afs_be_mod_CFLAGS): Likewise.
330         (afs_be_mod_LDFLAGS): Likewise.
331         (befs_be_mod_SOURCES): Likewise.
332         (befs_be_mod_CFLAGS): Likewise.
333         (befs_be_mod_LDFLAGS): Likewise.
334         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
335         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
336         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
337         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
338         (grub_emu_SOURCES): Likewise.
339         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
340         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
341         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
342         * fs/afs_be.c: New file.
343         * fs/befs_be.c: New file.
344         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
345         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
346         (U16): Replaced with ...
347         (grub_afs_to_cpu16): ...this. All users updated.
348         (U32): Replaced with ...
349         (grub_afs_to_cpu32): ...this. All users updated.
350         (U64): Replaced with ...
351         (grub_afs_to_cpu64): ...this. All users updated.
352         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
353         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
354         (grub_afs_validate_sblock): Check only one endianness.
355         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
356         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
357         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
358         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
359         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
360         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
361         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
362         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
364 2009-08-26  Bean  <bean123ch@gmail.com>
366         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
367         64-bit number.
368         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
369         (grub_xfs_inode_block): Change return type to grub_uint64_t.
370         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
372 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
374         NetBSD memory map support.
376         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
377         (grub_netbsd_btinfo_mmap_header): New structure.
378         (grub_netbsd_btinfo_mmap_entry): Likewise.
379         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
381 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
383         Enable bsd.mod on coreboot.
385         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
386         (bsd_mod_SOURCES): New variable.
387         (bsd_mod_CFLAGS): Likewise.
388         (bsd_mod_LDFLAGS): Likewise.
389         (bsd_mod_ASFLAGS): Likewise.
390         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
391         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
393 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
395         Cleanup NetBSD root support.
397         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
398         grub_bsd_get_device.
399         Fix typo.
401 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
403         * util/grub.d/00_header.in: Move check for the video backend of
404         gfxterm from here ...
405         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
406         a suitable video backend.
408 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
410         Fix breakage in grub-setup.
412         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
413         "msdos_partition_map".
415 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
417         Fix breakage in normal/auth.c.
419         * normal/auth.c (grub_iswordseparator): New function.
421 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
423         Authentication support.
425         * commands/password.c: New file.
426         * conf/common.rmk (pkglib_MODULES): Add password.mod.
427         (password_mod_SOURCES): New variable.
428         (password_mod_CFLAGS): Likewise.
429         (password_mod_LDFLAGS): Likewise.
430         (normal_mod_SOURCES): Add normal/auth.c.
431         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
432         normal/auth.c.
433         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
434         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
435         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
436         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
437         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
438         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
439         * include/grub/auth.h: New file.
440         * include/grub/err.h (grub_err_t): New enum value
441         GRUB_ERR_ACCESS_DENIED.
442         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
443         'users'.
444         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
445         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
446         users updated.
447         * normal/auth.c: New file.
448         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
449         (grub_cmdline_run): Don't allow to go to command line without
450         authentication.
451         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
452         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
453         menuentry without superuser rights.
454         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
455         user isn't a superuser.
457 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
459         Save space by inlining misc.c functions.
461         * kern/misc.c (grub_iswordseparator): Made static.
462         * kern/misc.c (grub_strcat): Moved from here ...
463         * include/grub/misc.h (grub_strcat): ... here. Inlined.
464         * kern/misc.c (grub_strncat): Moved from here ...
465         * include/grub/misc.h (grub_strncat): ... here. Inlined.
466         * kern/misc.c (grub_strcasecmp): Moved from here ...
467         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
468         * kern/misc.c (grub_strncasecmp): Moved from here ...
469         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
470         * kern/misc.c (grub_isalpha): Moved from here ...
471         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
472         * kern/misc.c (grub_isdigit): Moved from here ...
473         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
474         * kern/misc.c (grub_isgraph): Moved from here ...
475         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
476         * kern/misc.c (grub_tolower): Moved from here ...
477         * include/grub/misc.h (grub_tolower): ... here. Inlined.
479 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
481         * script/sh/function.c (grub_script_function_find): Cut error message
482         not to flood terminal.
483         * script/sh/lexer.c (grub_script_yylex): Remove command line length
484         limit.
485         * script/sh/script.c (grub_script_arg_add): Duplicate string.
487 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
489         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
490         `report' grub_uint8_t *.
491         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
492         Use a 50-millisecond timeout rather than just repeating
493         grub_usb_keyboard_getreport 50 times.
494         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
496 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
498         Rename *_partition_map to part_*
500         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
501         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
502         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
503         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
504         All users updated.
505         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
506         All users updated.
507         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
508         * util/grub-probe.c (probe_partmap): Don't transform partition name
509         to get module name.
511 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
513         Fix OpenBSD and NetBSD support.
515         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
516         memory address conflict.
517         (OPENBSD_MMAP_ACPI): New definition.
518         (OPENBSD_MMAP_NVS): Likewise.
519         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
520         and OPENBSD_MMAP_NVS.
521         Add memory map terminator
522         Explicit cast when calling grub_unix_real_boot.
523         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
525 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
527         Let user specify NetBSD root device.
529         * loader/i386/bsd.c (netbsd_root): New variable.
530         (netbsd_opts): New option 'root'.
531         (NETBSD_ROOT_ARG): New macro.
532         (grub_netbsd_boot): Use 'netbsd_root'.
533         (grub_bsd_unload): Free 'netbsd_root'.
534         (grub_cmd_netbsd): Fill 'netbsd_root'.
536 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
538         Support for 64-bit NetBSD.
540         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
541         point when booting non-FreeBSD.
543 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
545         Support --no-smp and --no-acpi for NetBSD.
547         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
548         (NETBSD_AB_NOACPI): Likewise.
549         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
550         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
552 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
554         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
555         errors.
556         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
557         errors. Call grub_error when needed.
559 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
561         * commands/search.c (search_fs): Try searching without autoload first.
562         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
563         filesystem module explicitly for faster booting.
565 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
567         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
569 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
571         * util/grub.d/30_os-prober.in: Disable os-prober if
572         `GRUB_DISABLE_OS_PROBER' was set to true.
574 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
576         * partmap/pc.c: Rename to ...
577         * partmap/msdos.c: ... this.  Update all users.
578         (grub_pc_partition_map): Rename to ...
579         (grub_msdos_partition_map): ... this.  Update all users.
581         * parttool/pcpart.c: Rename to ...
582         * parttool/msdospart.c: ... this.  Update all users.
584         * include/grub/pc_partition.h: Rename to ...
585         * include/grub/msdos_partition.h: ... this.  Update all users.
586         (grub_pc_partition_bsd_entry): Rename to ...
587         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
588         (grub_pc_partition_disk_label): Rename to ...
589         (grub_msdos_partition_disk_label): ... this.  Update all users.
590         (grub_pc_partition_entry): Rename to ...
591         (grub_msdos_partition_entry): ... this.  Update all users.
592         (grub_pc_partition_mbr): Rename to ...
593         (grub_msdos_partition_mbr): ... this.  Update all users.
594         (grub_pc_partition): Rename to ...
595         (grub_msdos_partition): ... this.  Update all users.
596         (grub_pc_partition_is_empty): Rename to ...
597         (grub_msdos_partition_is_empty): ... this.  Update all users.
598         (grub_pc_partition_is_extended): Rename to ...
599         (grub_msdos_partition_is_extended): ... this.  Update all users.
600         (grub_pc_partition_is_bsd): Rename to ...
601         (grub_msdos_partition_is_bsd): ... this.  Update all users.
603         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
604         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
605         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
606         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
607         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
608         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
609         (gpt_mod_LDFLAGS): Rename to ...
610         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
611         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
612         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
613         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
614         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
615         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
616         (part_gpt_mod_LDFLAGS): ... this.
617         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
618         `pcpart.mod' to `msdospart.mod'.
619         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
620         to ...
621         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
622         (msdospart_mod_LDFLAGS): ... this.
624 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
626         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
627         (openbsd_opts): Likewise.
628         (netbsd_opts): Likewise.
629         (freebsd_flags): Added 0 terminator.
630         (openbsd_flags): Likewise.
631         (netbsd_flags): Likewise.
632         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
633         (grub_cmd_freebsd): Transformed into extended command.
634         (grub_cmd_openbsd): Likewise.
635         (grub_cmd_netbsd): Likewise.
636         (cmd_freebsd): Changed type to grub_extcmd_t.
637         (cmd_openbsd): Likewise.
638         (cmd_netbsd): Likewise.
639         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
640         grub_cmd_openbsd as extended commands.
641         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
642         cmd_netbsd and cmd_openbsd
644 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
646         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
648 2009-08-21  Pavel Roskin  <proski@gnu.org>
650         * Makefile.in (install-local): When checking if a file is in the
651         build directory, use "test -e" to detect symlinks.
653         * Makefile.in (install-local): Remove all files in
654         $(DESTDIR)$(pkglibdir) before installing new files there.
656 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
658         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
659         grub-mkelfimage.
661 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
663         * util/grub-mkconfig.in: Don't use gfxterm by default if not
664         explicitly specified by the user.
666 2009-08-18  Pavel Roskin  <proski@gnu.org>
668         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
669         grub_uint8_t pointer for data.
670         * include/grub/fbutil.h (struct grub_video_fbblit_info):
671         Likewise.
672         * video/fb/fbutil.c: Remove unnecessary casts.
674 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
676         VBE cleanup.
678         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
679         (grub_vbe_set_video_mode): Save active mode info
680         only after setting the mode.
681         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
682         second argument.
684 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
686         Rename variables for clarity.
688         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
689         (active_vbe_mode_info): ... this. All users updated.
690         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
691         All users updated.
692         (initial_mode): Rename to ...
693         (initial_vbe_mode): ... this. All users updated.
694         (mode_in_use): Rename to ..
695         (vbe_mode_in_use): ... this. All users updated.
696         (mode_list): Rename to ..
697         (vbe_mode_list): ... this. All users updated.
698         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
699         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
700         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
701         'mode_list_size' to 'vbe_mode_list_size'.
702         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
703         'best_mode_info' to 'best_vbe_mode_info' and
704         'best_mode' to 'best_vbe_mode'
706 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
708         Remove duplicate grub_video_fb_get_video_ptr.
710         * include/grub/fbutil.h (get_data_ptr): Rename to ...
711         (grub_video_fb_get_video_ptr): ... this.
712         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
713         * video/fb/fbutil.c: Add comment about addressing.
714         (get_data_ptr): Rename to ...
715         (grub_video_fb_get_video_ptr): ... this. All users updated.
716         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
718 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
720         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
721         grub_dprintf() that was just added.
723 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
725         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
726         (DEFAULT_VIDEO_MODE): Remove macros.
727         (grub_linux_boot): Remove assumption that Linux has FB support,
728         and use "text" as default video mode.
730 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
732         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
733         grub_dprintf.
734         * fs/fat.c (grub_fat_read_data): Likewise.
736 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
738         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
739         payload.
740         (grub_module): Likewise.
742 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
744         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
745         mbi->cmdline but free playground.
747 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
749         Handle group offset on UFS1.
751         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
752         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
754 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
756         Split ufs.mod into ufs1.mod and ufs2.mod.
758         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
759         (grub_fstest_SOURCES): Likewise.
760         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
761         (ufs_mod_SOURCES): Remove.
762         (ufs_mod_CFLAGS): Likewise.
763         (ufs_mod_LDFLAGS): Likewise.
764         (ufs1_mod_SOURCES): New variable.
765         (ufs1_mod_CFLAGS): Likewise.
766         (ufs1_mod_LDFLAGS): Likewise.
767         (ufs2_mod_SOURCES): New variable.
768         (ufs2_mod_CFLAGS): Likewise.
769         (ufs2_mod_LDFLAGS): Likewise.
770         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
771         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
772         Likewise.
773         (grub_emu_SOURCES): Likewise.
774         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
775         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
776         (grub_setup_SOURCES): Likewise.
777         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
778         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
779         (grub_setup_SOURCES): Likewise.
780         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
781         Likewise.
782         * fs/ufs2.c: New file.
783         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
785 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
787         Framebuffer split.
789         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
790         subsystem at the end.
791         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
792         (video_fb_mod_SOURCES): New variable.
793         (video_fb_mod_CFLAGS): Likewise.
794         (video_fb_mod_LDFLAGS): Likewise.
795         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
796         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
797         * video/i386/pc/vbeblit.c: Moved from here ...
798         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
799         * video/i386/pc/vbefill.c: Moved from here ...
800         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
801         * video/i386/pc/vbeutil.c: Moved from here ...
802         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
803         * include/grub/i386/pc/vbeblit.h: Moved from here ...
804         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
805         * include/grub/i386/pc/vbefill.h: Moved from here ...
806         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
807         * include/grub/i386/pc/vbeutil.h: Moved from here ...
808         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
809         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
810         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
811         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
812         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
813         (grub_video_adapter): Added 'get_info_and_fini'.
814         (grub_video_get_info_and_fini): New prototype.
815         (grub_video_set_mode): make modestring const char *.
816         * loader/i386/linux.c (grub_linux_setup_video): Use
817         grub_video_get_info_and_fini.
818         (grub_linux_boot): Move modesetting just before booting.
819         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
820         grub_video_get_info_and_fini.
821         * video/i386/pc/vbe.c: Moved framebuffer part ...
822         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
823         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
824         grub_video_fbstd_colors and grub_video_fb_set_palette.
825         (grub_video_vbe_init): Clear 'framebuffer' variable and use
826         grub_video_fb_init.
827         (grub_video_vbe_fini): Use grub_video_fb_fini.
828         (grub_video_vbe_setup): Use framebuffer.render_target instead of
829         render_target and use grub_video_fb_set_active_render_target and
830         grub_video_fb_set_palette.
831         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
832         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
833         (grub_video_vbe_adapter): Use framebuffer.
834         * video/video.c (grub_video_get_info_and_fini): New function.
835         (grub_video_set_mode): Make modestring const char *.
836         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
837         values are already initialised.
839 2009-08-14  Pavel Roskin  <proski@gnu.org>
841         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
842         ABS and APPLE_CC.
843         * boot/i386/pc/diskboot.S: Likewise.
844         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
845         sectors allow compilation on MacOSX.
846         * conf/i386-pc.rmk: Enable unconditional compilation of
847         lnxboot.img.
849 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
851         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
852         * util/grub.d/00_header.in: Enter interruptible sleep if
853         GRUB_HIDDEN_TIMEOUT is set.
855 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
857         * include/grub/symbol.h: Add the LOCAL macro.
858         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
859         starting with "L_".
861 2009-08-13  Pavel Roskin  <proski@gnu.org>
863         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
864         any modern compilers we support.
866         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
867         Use local labels starting with "L_" so that Apple assembler
868         knows they are local.
870 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
872         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
873         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
874         (bsd_kernel_types): ... this enum.
876         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
877         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
878         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
880         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
881         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
882         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
883         messages.
885 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
887         * util/grub-dumpdevtree: Moved from here ...
888         * util/i386/efi/grub-dumpdevtree: ... to here.
889         (hexify): New function.  Converts a string to its hex version.
890         Generate hex versions of "efi" and "device-properties" by calling
891         hexify() on the ASCII strings rather than by hardcoding numbers.
893 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
895         * fs/jfs.c: Update copyright year.
897 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
899         * util/grub.d/00_header.in: Fix a comment.
900         * util/grub.d/10_linux.in: Likewise.
901         * util/grub.d/10_windows.in: Likewise.
902         * util/grub.d/10_hurd.in: Likewise.
904 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
906         * util/grub-mkconfig.in: Allow the user to specify the used font
907         with GRUB_FONT.
909 2009-08-08  Pavel Roskin  <proski@gnu.org>
911         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
912         available, xfs.mod needs it now.
914         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
915         the "g" modifier in sed when the intention is to strip something
916         once.  This fixes comparison of kernels with multiple dashes.
918         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
919         on it.  Add missing space before closing bracket.  Fix
920         misleading formatting.
922 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
924         * docs/grub.texi: Major overhaul.  Remove all sections that are
925         specific to GRUB Legacy, or mostly composed of Legacy-specific
926         information.
928 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
930         * docs/version.texi: New file.  Provides version information for
931         grub.texi.
933 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
935         * docs/grub.texi: Update CVS information to SVN.
936         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
938 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
940         * util/grub-mkconfig.in: Remove a wrong `fi'.
942 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
944         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
945         (grub_jfs_uuid): New function.
946         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
948 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
950         * util/grub-mkconfig_lib.in (font_path): Move the functionality
951         of it to ...
952         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
953         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
955 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
957         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
958         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
959         Update all users.
961         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
962         not just "vmlinu[zx]".
963         Moved from here ...
964         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
965         all users.
967         * util/grub.d/10_linux.in (find_latest): Moved from here ...
968         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
969         all users.
971 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
973         * util/grub.d/10_freebsd.in: Use an absolute device path for
974         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
976 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
978         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
979         handling of multiple abstraction modules.
981 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
983         Fix a bug resulting in black screen when loading Linux using a
984         packed video mode.
986         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
987         function.
989         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
990         (grub_vbe_bios_getset_dac_palette_width): New function.
991         (grub_vbe_bios_get_dac_palette_width)
992         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
993         grub_vbe_bios_getset_dac_palette_width()).
995         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
996         check for return status.
997         (grub_vbe_get_video_mode_info): When getting information for a packed
998         mode (<= 8 bpp), obtain DAC palette width using
999         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1000         {red,green,blue}_mark_size.
1002 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
1004         * commands/search.c (options): Fix help output to match actual code.
1006 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1008         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1009         of homegrown code.
1011 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1013         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1014         on XFS or ReiserFS.
1016 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1018         Support Apple partition map with sector size different from 512 bytes.
1020         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1021         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1022         and 'apart.partmap_size'.
1024 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1025 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1027         Fix cpuid command.
1029         * commands/i386/cpuid.c (options): New variable.
1030         (grub_cmd_cpuid): Return real error.
1031         (GRUB_MOD_INIT(cpuid)): Declare options.
1033 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1035         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1036         valid.
1038 2009-07-31  Bean  <bean123ch@gmail.com>
1040         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1041         log2_inode.
1042         (grub_fshelp_node): Move inode field to the end.
1043         (grub_xfs_data): Remove inode field.
1044         (grub_xfs_inode_block): Calculate inode size using sblock.
1045         (grub_xfs_inode_offset): Likewise.
1046         (grub_xfs_read_inode): Calculate inode size using sblock.
1047         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1048         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1049         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1050         to match inode size.
1051         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1052         not accessible when data is null.
1053         (grub_xfs_open): Likewise.
1055 2009-07-31  Bean  <bean123ch@gmail.com>
1057         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1058         Don't change pv->disk if it's already set.
1060         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1061         (grub_raid_register): ... here.
1062         (grub_raid_rescan): Removed.
1064         * include/grub/raid.h (grub_raid_rescan): Removed.
1066         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1067         (fstest): Replace grub_raid_rescan with module fini function followed
1068         by init function.
1070         * util/grub-probe.c: Add include file <grub/raid.h>.
1071         (probe_raid_level): New function.
1072         (probe): Detect abstraction by walking the disk device, support two
1073         level of abstraction (LVM on RAID) when detecting partition map.
1075 2009-07-31  Pavel Roskin  <proski@gnu.org>
1077         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1078         to grub_zalloc(), it was erroneous.
1079         Reported by Bean <bean123ch@gmail.com>
1081 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1083         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1084         embedding zone, not only the first one.
1086 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1088         * term/gfxterm.c (clear_char): New function.
1089         (grub_virtual_screen_setup): Use clear_char.
1090         (scroll_up): Likewise.
1091         (grub_virtual_screen_cls): Likewise.
1093 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1095         * util/deviceiter.c (get_acceleraid_disk_name): New static
1096         function.
1097         (grub_util_iterate_devices): Handle Accelraid devices.
1098         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1100 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1102         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1103         separator for the suggested gfxpayload string (';' collides with the
1104         parser and needs escaping).
1106 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1108         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1109         Clear direction flag before jumping to OS.
1110         (grub_multiboot2_real_boot): Likewise.
1112 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1114         * util/i386/pc/grub-install: Fix parsing of --disk-module
1115         option.
1117 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1119         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1120         when embedding.
1122 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1124         * util/grub-mkconfig.in (package_version): New variable.
1125         Use it do display the version.
1127 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1129         * kern/file.c (grub_file_open): Revert to previous check with
1130         grub_errno.
1132 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1134         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1135         from help line. It's out of sync with code.
1137 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1139         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1140         entries on failed boot.
1142 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1144         * kern/file.c (grub_file_open): Fix an error check.
1146 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1148         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1149         partition map couldn't be identified.
1151 2009-07-23  Pavel Roskin  <proski@gnu.org>
1153         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1154         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1155         case of little endian words becomes just an optimization.
1156         Respect const modifier.
1157         (md5_final): Use code that doesn't depend on endianness.
1159         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1160         to avoid loss of upper bits if align is unsigned and shorter
1161         than addr.
1163 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1165         UUID support for UFS
1167         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1168         (grub_ufs_uuid): New function.
1169         (grub_ufs_fs): add .uuid
1171 2009-07-21  Pavel Roskin  <proski@gnu.org>
1173         * kern/dl.c (grub_dl_check_header): Make static.
1175 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1177         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1178         add drivemap for Vista.  It breaks Windows 7.
1180 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1182         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1183         128 bytes
1185 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1187         Add BFS support
1189         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1190         (grub_fstest_SOURCES): Likewise.
1191         (pkglib_MODULES): Add befs.mod.
1192         (befs_mod_SOURCES): New variable.
1193         (befs_mod_CFLAGS): Likewise.
1194         (befs_mod_LDFLAGS): Likewise.
1195         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1196         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1197         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1198         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1199         (grub_setup_SOURCES): Likewise.
1200         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1201         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1202         (grub_setup_SOURCES): Likewise.
1203         * fs/befs.c: New file.
1204         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1205         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1206         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1207         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1208         (B_KEY_INDEX_ALIGN): New declaration.
1209         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1210         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1211         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1212         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1213         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1214         (grub_afs_mount) [MODE_BFS]: Likewise.
1215         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1216         (grub_afs_fs): Use GRUB_AFS_FSNAME
1217         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1218         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1219         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1220         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1222 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1224         * util/getroot.c (find_root_device): Add support for MacOSX.
1225         * util/hostdisk.c: Likewise.
1227 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1229         * font/font.c (find_glyph): Check whether a font is present to avoid
1230         segmentation fault.
1232 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1234         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1236 2009-07-20  Pavel Roskin  <proski@gnu.org>
1238         * configure.ac: Trim excessively wordy excuses.
1240 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1242         Add symlink, mtime and label support to AtheFS.
1244         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1245         (grub_afs_iterate_dir): Handle symlinks.
1246         (grub_afs_open): Use grub_afs_read_symlink.
1247         (grub_afs_dir): Likewise.
1248         Pass mtime.
1249         (grub_afs_label): New function.
1250         (grub_afs_fs): Add grub_afs_label.
1251         (grub_afs_read_symlink): New function.
1253 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1255         Fix AtheFS support.
1257         * fs/afs.c: Fix comments style.
1258         (grub_afs_blockrun): Declare as packed.
1259         (grub_afs_datastream): Likewise.
1260         (grub_afs_bnode): Likewise.
1261         (grub_afs_btree): Likewise.
1262         (grub_afs_sblock): Likewise.
1263         Declare `name' as char.
1264         (grub_afs_inode): Declare as packed.
1265         Change void *vnode to grub_uint32_t unused.
1266         (grub_afs_iterate_dir): Check that key_size is positive.
1267         (grub_afs_mount): Don't read superblock twice.
1268         (grub_afs_dir): Don't free node in case of error,
1269         grub_fshelp_find_file already handles this.
1270         (grub_afs_open): Likewise.
1272 2009-07-19  Pavel Roskin  <proski@gnu.org>
1274         * Makefile.in: Remove LIBLZO and enable_lzo.
1275         * conf/i386-pc.rmk: Remove lzo support.
1276         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1277         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1278         support.
1279         * kern/i386/pc/lzo1x.S: Remove.
1280         * kern/i386/pc/startup.S: Remove lzo support.
1281         * util/i386/pc/grub-mkimage.c: Likewise.
1283 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1285         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1286         * fs/xfs.c (grub_xfs_dir): Likewise.
1287         * fs/afs.c (grub_afs_dir): Likewise.
1288         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1289         (grub_iso9660_open): Likewise.
1290         * fs/jfs.c (grub_jfs_open): Likewise.
1291         * fs/ext2.c (grub_ext2_dir): Likewise.
1292         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1293         * script/sh/lexer.c (grub_script_yylex): Likewise.
1295 2009-07-16  Pavel Roskin  <proski@gnu.org>
1297         * configure.ac: Never add "-c" to CFLAGS.
1299         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1301         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1302         grub_cv_cc_efiemu should be used.
1304         * configure.ac: Typo fixes.
1306         * kern/mm.c (grub_zalloc): New function.
1307         (grub_debug_zalloc): Likewise.
1308         * include/grub/mm.h: Declare grub_zalloc() and
1309         grub_debug_zalloc().
1310         * util/misc.c (grub_zalloc): New function.
1311         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1312         instead of grub_malloc(), remove unneeded initializations.
1313         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1314         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1315         * commands/parttool.c (grub_cmd_parttool): Likewise.
1316         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1317         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1318         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1319         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1320         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1321         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1322         (grub_cmd_efiemu_pnvram): Likewise.
1323         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1324         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1325         (grub_iso9660_iterate_dir): Likewise.
1326         * fs/jfs.c (grub_jfs_opendir): Likewise.
1327         * fs/ntfs.c (list_file): Likewise.
1328         (grub_ntfs_mount): Likewise.
1329         * kern/disk.c (grub_disk_open): Likewise.
1330         * kern/dl.c (grub_dl_load_core): Likewise.
1331         * kern/elf.c (grub_elf_file): Likewise.
1332         * kern/env.c (grub_env_context_open): Likewise.
1333         (grub_env_set): Likewise.
1334         (grub_env_set_data_slot): Likewise.
1335         * kern/file.c (grub_file_open): Likewise.
1336         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1337         * loader/i386/multiboot.c (grub_module): Likewise.
1338         * loader/xnu.c (grub_xnu_create_key): Likewise.
1339         (grub_xnu_create_value): Likewise.
1340         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1341         (read_config_file): Likewise.
1342         * normal/menu_entry.c (make_screen): Likewise.
1343         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1344         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1345         * script/sh/script.c (grub_script_parse): Likewise.
1346         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1347         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1348         * video/readers/png.c (grub_png_output_byte): Likewise.
1349         (grub_video_reader_png): Likewise.
1351 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1353         Enable all targets that can be built by default
1355         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1356         grub-mkfont and grub-fstest if they can be built
1358 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1360         Fix hang and segmentation fault in grub-emu-usb
1362         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1363         * util/usb.c (grub_libusb_devices): likewise
1364         (grub_libusb_init): rename to ...
1365         (GRUB_MOD_INIT (libusb)):...this
1366         (grub_libusb_fini): rename to ..
1367         (GRUB_MOD_FINI (libusb)):...this
1368         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1369         * include/grub/disk.h (grub_raid_init): removed, it's useless
1370         (grub_raid_fini): likewise
1371         (grub_lvm_init): likewise
1372         (grub_lvm_fini): likewise
1373         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1374         by grub_init_all
1376 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1378         Fix libusb
1380         * Makefile.in (LIBUSB): new macro
1381         * genmk.rb (Utility/print_tail): new method
1382         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1383         (top level): call util.print_tail at the end.
1385 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1387         Make FreeBSD accept zpool.cache
1389         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1390         type is /boot/zfs/zpool.cache
1392 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1394         Fix 64-bit efiemu
1396         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1397         correct wrong typedef
1398         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1400 2009-07-15  Pavel Roskin  <proski@gnu.org>
1402         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1403         * kern/disk.c (struct grub_disk_cache): Likewise.
1405         * commands/probe.c (options): Typo fix.
1407         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1408         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1409         accordingly.
1410         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1412         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1413         the end of "Error" to make the message more readable.
1415         * boot/i386/pc/boot.S (kernel_segment): Remove.
1416         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1417         for destination.
1419         * boot/i386/pc/boot.S (boot_version): Remove.
1420         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1421         Remove.
1423         * include/grub/i386/pc/boot.h: Sort all offsets.
1424         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1425         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1426         * boot/i386/pc/boot.S: Assert location of every offset listed in
1427         include/grub/i386/pc/boot.h.
1429 2009-07-13  Pavel Roskin  <proski@gnu.org>
1431         * include/grub/i386/coreboot/machine.h: Rename
1432         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1433         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1434         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1436         * kern/dl.c: Force native word size to suppress warnings when
1437         compiling grub-emu.
1439         * kern/device.c (grub_device_iterate): Change struct part_ent to
1440         hold the name, not a pointer to it.  Use one grub_malloc() per
1441         partition, not two.  Free partition_name if grub_malloc() fails.
1442         Set ents to NULL only before grub_partition_iterate() is called.
1444 2009-07-11  Bean  <bean123ch@gmail.com>
1446         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1447         childname.
1449 2009-07-10  Bean  <bean123ch@gmail.com>
1450 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1452         * kern/ieee1275/openfw.c (grub_children_iterate)
1453         (grub_devalias_iterate): Fix size evaluation for property or path
1454         strings, which was broken since r2132.
1456 2009-07-07  Pavel Roskin  <proski@gnu.org>
1458         * commands/search.c (search_file): Merge into ...
1459         (search_fs): ... this.  Accept search type as argument.
1460         (grub_cmd_search): Pass search type to search_fs().
1462         * include/grub/util/console.h: New file.
1463         * util/console.c: Use it instead of grub/machine/console.h.
1464         * util/grub-emu.c: Likewise.
1466         * lib/arg.c (find_long_option): Remove.
1467         (find_long): Add `len' argument, make `s' const char *.
1468         (grub_arg_parse): Parse long options in place, not in a
1469         temporary buffer.
1471 2009-07-06  Pavel Roskin  <proski@gnu.org>
1473         * commands/search.c (search_fs): Fix potential NULL pointer
1474         dereference.
1476         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1477         function pointer.
1479 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1481         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1482         comparison.
1484 2009-07-05  Pavel Roskin  <proski@gnu.org>
1486         * include/grub/i386/linux.h (struct linux_kernel_params):
1487         Restore padding3, it's still needed.
1489         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1490         FreeBSD.
1491         * util/osdetect.lua: Likewise.
1493 2009-07-05  Bean  <bean123ch@gmail.com>
1495         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1497         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1498         (grub_lua_getenv): Likewise.
1499         (grub_lua_setenv): Likewise.
1500         (save_errno): New function.
1501         (push_result): Likewise.
1502         (grub_lua_enum_device): Likewise.
1503         (grub_lua_enum_file): Likewise.
1504         (grub_lua_file_open): Likewise.
1505         (grub_lua_file_close): Likewise.
1506         (grub_lua_file_seek): Likewise.
1507         (grub_lua_file_read): Likewise.
1508         (grub_lua_file_getline): Likewise.
1509         (grub_lua_file_getsize): Likewise.
1510         (grub_lua_file_getpos): Likewise.
1511         (grub_lua_file_eof): Likewise.
1512         (grub_lua_file_exist): Likewise.
1513         (grub_lua_add_menu): Likewise.
1515         * script/lua/grub_lua.h (isupper): New inline function.
1516         (islower): Likewise.
1517         (ispunct): Likewise.
1518         (isxdigit): Likewise.
1519         (strcspn): Change to normal function.
1520         (strpbkr): New function declaration.
1521         (memchr): Likewise.
1523         * script/lua/grub_main.c (scan_str): New function.
1524         (strcspn): Likewise.
1525         (strpbrk): Likewise.
1526         (memchr): Likewise.
1528         * script/lua/linit.c (lualibs): Enable the string library.
1530         * util/osdetect.lua: New file.
1532 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1534         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1535         `capabilities' member.
1537 2009-07-02  Pavel Roskin  <proski@gnu.org>
1539         * genparttoollist.sh: Add missing newline at the end.
1541 2009-07-01  Pavel Roskin  <proski@gnu.org>
1543         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1545         * util/hostdisk.c (open_device): Remove `const' from
1546         `sysctl_size', as sysctlbyname() can change it (in this case it
1547         doesn't actually happen).
1549         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1550         using signed long int constants.
1552         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1553         constant to avoid a warning on FreeBSD.
1555         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1556         where it's needed.
1558         * Makefile.in: Install include/grub/machine symlink.
1560         * Makefile.in: When installing symlinks, use "cp -fR", which
1561         works on FreeBSD and MacOSX.
1562         From Yves Blusseau <cl7m42e02@sneakemail.com>
1564         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1565         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1567         * util/misc.c: Move grub_reboot() and grub_halt() ...
1568         * util/grub-emu.c: ... here.  Make main_env static.
1569         * include/grub/util/misc.h: Remove main_env.
1571         * kern/mm.c: Use correct format to print size_t.
1573         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1574         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1575         * kern/powerpc/dl.c: Likewise.
1576         * kern/sparc64/dl.c: Likewise.
1577         * kern/x86_64/dl.c: Likewise.
1579 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1581         Fix grub-emu build on sparc64-ieee1275.
1583         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1584         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1586 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1588         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1589         (grub_reboot, grub_halt): New functions.
1591         * util/i386/pc/misc.c: Delete.  Update all users.
1592         * util/sparc64/ieee1275/misc.c: Likewise.
1593         * util/powerpc/ieee1275/misc.c: Likewise.
1595 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1597         * conf/i386.rmk (setjmp_mod_SOURCES)
1598         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1599         * conf/common.rmk (setjmp_mod_SOURCES)
1600         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1601         to use $(target_cpu).
1602         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1603         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1604         * conf/powerpc-ieee1275.rmk: Likewise.
1605         * conf/sparc64-ieee1275.rmk: Likewise.
1607         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1608         $(target_cpu) for kern/$(target_cpu)/dl.c.
1609         * conf/i386-efi.rmk: Likewise.
1610         * conf/i386-ieee1275.rmk: Likewise.
1611         * conf/x86_64-efi.rmk: Likewise.
1612         * conf/i386-coreboot.rmk: Likewise.
1613         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1614         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1615         kern/$(target_cpu)/cache.S.
1616         * conf/sparc64-ieee1275.rmk: Likewise.
1618 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1620         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1621         type to `grub_uint8_t', and adjust `padding9' accordingly.
1623 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1625         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1627         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1628         assembly in final jump, using register constraints.
1630         (grub_linux_boot): For text mode, initialize `have_vga' using
1631         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1633         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1634         right before the final jump.
1636         Set `video_mode' to 0x3.
1638         Document initialization of `video_page', `video_mode' and
1639         `video_ega_bx'.
1641 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1643         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1644         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1645         and set GRUB_LINUX_FLAG_QUIET appropriately.
1647 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1649         Fix build on Debian / sparc.
1651         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1653 2009-06-28  Pavel Roskin  <proski@gnu.org>
1655         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1656         fix a warning.
1658         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1660 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1662         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1663         `err'.
1665 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1667         Revert r2338.
1669         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1670         file can't be opened.  grub_file_open() is already supposed to set
1671         grub_errno / grub_errmsg appropriately.
1672         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1674 2009-06-27  Pavel Roskin  <proski@gnu.org>
1675 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1677         * include/grub/dl.h: Include grub/elf.h.
1678         (struct grub_dl): Add symtab field.
1679         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1680         GRUB_MODULES_MACHINE_READONLY.
1681         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1682         of the header for read-only modules.
1683         (grub_dl_unload): Free mod->symtab for read-only modules.
1684         * kern/i386/dl.c: Use mod->symtab.
1685         * kern/powerpc/dl.c: Likewise.
1686         * kern/sparc64/dl.c: Likewise.
1687         * kern/x86_64/dl.c: Likewise.
1689         * conf/i386-qemu.rmk: New file.
1690         * kern/i386/qemu/startup.S: Likewise.
1691         * kern/i386/qemu/mmap.c: Likewise.
1692         * boot/i386/qemu/boot.S: Likewise.
1693         * include/grub/i386/qemu/time.h: Likewise.
1694         * include/grub/i386/qemu/serial.h: Likewise.
1695         * include/grub/i386/qemu/kernel.h: Likewise.
1696         * include/grub/i386/qemu/console.h: Likewise.
1697         * include/grub/i386/qemu/boot.h: Likewise.
1698         * include/grub/i386/qemu/init.h: Likewise.
1699         * include/grub/i386/qemu/machine.h: Likewise.
1700         * include/grub/i386/qemu/loader.h: Likewise.
1701         * include/grub/i386/qemu/memory.h: Likewise.
1703         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1704         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1705         [qemu] (pkglib_IMAGES): Add `boot.img'.
1706         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1707         [qemu] (boot_img_FORMAT): New variables.
1708         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1709         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1710         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1711         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1712         [qemu] (kernel_img_FORMAT): New variables.
1714         * configure.ac: Recognise `i386-qemu'.
1716         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1717         (for no compression).
1718         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1719         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1720         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1721         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1722         ifdefs).
1724 2009-06-27  Pavel Roskin  <proski@gnu.org>
1726         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1727         read.
1728         * efiemu/prepare32.c: Likewise.
1729         * efiemu/prepare64.c: Likewise.
1731 2009-06-26  Pavel Roskin  <proski@gnu.org>
1733         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1734         * include/grub/elf.h: Define symbols without "32" or "64" based
1735         on GRUB_TARGET_WORDSIZE.
1736         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1737         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1738         ELF definitions.
1739         * efiemu/loadcore64.c: Likewise.
1740         * loader/i386/bsd32.c: Likewise.
1741         * loader/i386/bsd64.c: Likewise.
1742         * kern/dl.c: Remove own ELF definitions.
1743         * util/i386/efi/grub-mkimage.c: Likewise.
1745 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
1747         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1748         segment 0x0 unconditionally, because the reference generated by
1749         GAS is an absolute address.
1751 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1753         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1754         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1756 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1758         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1759         indexes.  Check for -f explicitly.
1760         (search_file): Improve error message.
1761         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1763 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1765         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1766         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
1768 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1770         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1771         * conf/i386-ieee1275.rmk: Likewise.
1772         * conf/i386-coreboot.rmk: Likewise.
1774         * kern/i386/pc/startup.S (grub_stop): Remove function.
1775         * kern/i386/ieee1275/startup.S: Likewise.
1776         * kern/i386/coreboot/startup.S: Likewise.
1777         * kern/i386/misc.S (grub_stop): New function.
1779 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1781         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1782         * kern/i386/realmode.S (real_to_prot): ... to here.
1784 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1786         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1787         with `kernel.img'.
1788         (kernel_elf_SOURCES): Rename to ...
1789         (kernel_img_SOURCES): ... this.
1790         (kernel_elf_HEADERS): Rename to ...
1791         (kernel_img_HEADERS): ... this.  Update all users.
1792         (kernel_elf_ASFLAGS): Rename to ...
1793         (kernel_img_ASFLAGS): ... this.
1794         (kernel_elf_CFLAGS): Rename to ...
1795         (kernel_img_CFLAGS): ... this.
1796         (kernel_elf_LDFLAGS): Rename to ...
1797         (kernel_img_LDFLAGS): ... this.
1798         * conf/i386-coreboot.rmk: Likewise.
1799         * conf/powerpc-ieee1275.rmk: Likewise.
1801         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1802         with "kernel.img".
1804 2009-06-21  Pavel Roskin  <proski@gnu.org>
1806         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1807         to match nested functions.
1808         * loader/sparc64/ieee1275/linux.c: Likewise.
1810         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1812 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1814         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1815         all i386 platforms.
1817 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1819         Fix asm file handling on ELF, and remove workarounds.
1821         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1822         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1823         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1824         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1826 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
1828         Load BSD ELF modules
1830         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1831         and loader/i386/bsd64.c
1832         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1833         (FREEBSD_MODTYPE_ELF_MODULE): New definition
1834         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1835         (grub_freebsd_load_elfmodule32): New declaration
1836         (grub_freebsd_load_elfmoduleobj64): Likewise
1837         (grub_freebsd_load_elf_meta32): Likewise
1838         (grub_freebsd_load_elf_meta64): Likewise
1839         (grub_freebsd_add_meta): Likewise
1840         (grub_freebsd_add_meta_module): Likewise
1841         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1842         (grub_freebsd_add_meta_module): Likewise and move module-specific
1843         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1844         (grub_cmd_freebsd): Add elf-kernel specific parts
1845         based on grub_freebsd_add_meta_module
1846         (grub_cmd_freebsd_module): Add type parsing moved from
1847         grub_freebsd_add_meta_module
1848         (grub_cmd_freebsd_module_elf): New function
1849         (cmd_freebsd_module_elf): New variable
1850         (GRUB_MOD_INIT): Register freebsd_module_elf
1851         * loader/i386/bsd32.c: New file
1852         * loader/i386/bsd64.c: Likewise
1853         * loader/i386/bsdXX.c: Likewise
1854         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1855         (grub_elf64_load): Likewise
1856         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1857         All users updated
1858         (grub_elf64_load_hook_t): Likewise
1860 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
1862         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1863         variable.
1864         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1865         don't write a menu entry for recovery mode.
1867 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1869         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1870         after it's no longer needed.
1872 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1874         * include/grub/i386/loader.h (grub_linux_prot_size)
1875         (grub_linux_tmp_addr, grub_linux_real_addr)
1876         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1877         GRUB_MACHINE_PCBIOS.
1878         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1879         common grub_util_info() call to ...
1880         (generate_image): ... here.
1881         Fix use of uninitialized memory, comparison of signed with
1882         unsigned integers and memory leak.
1883         Remove bogus module address message.
1885 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
1887         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1888         grub_raid_register
1889         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1891 2009-06-19  Pavel Roskin  <proski@gnu.org>
1893         * configure.ac: Remove stray AC_MSG_CHECKING.
1895 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
1897         * disk/scsi.c (grub_scsi_open): use continue instead of big if
1899 2009-06-18  Pavel Roskin  <proski@gnu.org>
1901         * conf/common.rmk: Add fs_file.mod.
1902         * disk/fs_file.c: New file.
1903         * include/grub/disk.h (enum grub_disk_dev_id): Add
1904         GRUB_DISK_DEVICE_FILE_ID.
1906 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1908         Fix build with Apple's toolchain. Part 2
1910         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1911         a fake start
1913 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1915         Fix build with Apple's toolchain. Part 1
1917         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1918         for long calls
1919         * configure.ac: remove a leftover AC_MSG_RESULT
1920         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1921         Apple's toolchain
1923 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1925         Fix warnings
1927         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1928         (decomp_block): initialize ch
1929         use grub_memcpy instead of memcpy
1931 2009-06-17  Pavel Roskin  <proski@gnu.org>
1933         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1934         version, use declarations needed to use vga_text as the startup
1935         console.
1937         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1938         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1939         the kernel.
1940         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1941         and grub_at_keyboard_fini(), it's done on module load and
1942         unload.
1944 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
1946         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1947         file can't be found.
1948         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1950 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1952         Fix newline handling
1954         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1955         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1956         (grub_script_yylex): don't segfault on unterminated script
1957         newline terminates command and variable
1959 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1961         avoid double grub_adjust_range call. Bug reported by David Simner
1963         * kern/disk.c (grub_disk_write): change to raw disk access before
1964         calling disk_read
1966 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
1968         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1969         spaces, for the benefit of help2man.
1970         * util/i386/efi/grub-mkimage.c (usage): Likewise.
1972 2009-06-16  Pavel Roskin  <proski@gnu.org>
1974         * kern/i386/halt.c: Include grub/machine/init.h.
1975         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1977 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
1979         * util/grub.d/30_os-prober.in: Use ${root} in the generated
1980         drivemap menuentry.
1982 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
1984         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1985         `echo' command.
1987 2009-06-16  Pavel Roskin  <proski@gnu.org>
1989         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
1990         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
1991         save %dx, we only need %dl and we never change it.
1992         * boot/i386/pc/cdboot.S: Don't set the root drive.
1993         * boot/i386/pc/pxeboot.S: Likewise.
1994         * include/grub/i386/pc/boot.h: Remove
1995         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1996         GRUB_BOOT_MACHINE_DRIVE_CHECK.
1997         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1998         * kern/i386/pc/init.c (make_install_device): Remove references
1999         to grub_root_drive.
2000         * kern/i386/pc/startup.S: Likewise.
2001         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2003 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2005         xnu_uuid command
2007         * commands/xnu_uuid.c: new file
2008         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2009         (xnu_uuid_mod_SOURCES): new variable
2010         (xnu_uuid_mod_CFLAGS): likewise
2011         (xnu_uuid_mod_LDFLAGS): likewise
2012         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2013         * conf/i386-ieee1275.rmk: likewise
2014         * conf/i386-pc.rmk: likewise
2015         * conf/powerpc-ieee1275.rmk: likewise
2016         * conf/sparc64-ieee1275.rmk: likewise
2017         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2019 2009-06-16  Pavel Roskin  <proski@gnu.org>
2021         * configure.ac: Avoid '==' in test command, it's not portable.
2023 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2025         Probe command
2027         * commands/probe.c: new file
2028         * conf/common.rmk (pkglib_MODULES): add probe.mod
2029         (probe_mod_SOURCES): new variable
2030         (probe_mod_CFLAGS): likewise
2031         (probe_mod_LDFLAGS): likewise
2032         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2033         * conf/i386-ieee1275.rmk: likewise
2034         * conf/i386-pc.rmk: likewise
2035         * conf/powerpc-ieee1275.rmk: likewise
2036         * conf/sparc64-ieee1275.rmk: likewise
2038 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2040         Fix handling of string like \"hello\" and "a
2041         b"
2043         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2044         (grub_script_yylex): fix parsing of quoting, escaping and newline
2046 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2048         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2049         handling
2051 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2053         * util/grub-mkconfig.in: Fix parsing of --output option.
2055 2009-06-12  Pavel Roskin  <proski@gnu.org>
2057         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2058         genmk.rb don't need to be generated or installed.
2060 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2062         * commands/i386/pc/drivemap_int13h.S: add more comments
2064 2009-06-11  Pavel Roskin  <proski@gnu.org>
2066         * Makefile.in (uninstall): Uninstall manuals.
2068         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2069         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2070         and update-grub_lib in two places.
2071         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2073         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2074         a compiler warning.
2076         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2077         `entry_lo' to fix variable shadowing.
2079 2009-06-11  Christian Franke  <franke@computer.org>
2081         * kern/misc.c (__enable_execute_stack): Add missing return type
2082         to prevent gcc warning.
2084 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2086         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2088 2009-06-11  Pavel Roskin  <proski@gnu.org>
2090         * Makefile.in: Don't rely on any scripts being executable.
2091         Always use $(SHELL) to run shell scripts.
2093         * configure.ac: Always define ___main if using -nostdlib.  This
2094         fixes tests on Cygwin.
2096 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2098         UDF fix
2100         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2101         is in bytes and not in blocks
2103 2009-06-11  Pavel Roskin  <proski@gnu.org>
2105         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2106         warning.
2108 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2110         * util/grub.d/30_os-prober.in: Fix a comment. Source
2111         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2112         to set the root device.  Place drivemap command in the generated
2113         chain entry.
2115 2009-06-11  Pavel Roskin  <proski@gnu.org>
2117         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2118         have long been resolved.
2120 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2122         * util/grub.d/10_linux.in: Capitalise "Linux".
2124         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2126 2009-06-11  Pavel Roskin  <proski@gnu.org>
2128         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2129         fix a gcc warning and ensure that the function won't ever exit.
2131         * kern/i386/ieee1275/init.c: Add missing prototype for
2132         grub_stop_floppy().
2134         * loader/ieee1275/multiboot2.c [__i386__]: Include
2135         grub/cpu/multiboot.h.
2137         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2138         casts to short - they are not portable and cause warnings.  Fix
2139         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2141 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2143         Drivemap fixes
2145         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2146         new function
2147         (grub_get_root_biosnumber_saved): new variable
2148         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2149         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2150         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2151         %dx after the call if necessary
2152         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2153         (boot_mod_SOURCES): remove
2154         (boot_mod_CFLAGS): remove
2155         (boot_mod_LDFLAGS): remove
2156         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2157         (boot_mod_SOURCES): new variable
2158         (boot_mod_CFLAGS): likewise
2159         (boot_mod_LDFLAGS): likewise
2160         * conf/i386-efi.rmk: likewise
2161         * conf/i386-ieee1275.rmk: likewise
2162         * conf/i386-pc.rmk: likewise
2163         * conf/powerpc-ieee1275.rmk: likewise
2164         * conf/sparc64-ieee1275.rmk: likewise
2165         * conf/x86_64-efi.rmk: likewise
2166         * include/grub/i386/pc/biosnum.h: new file
2167         * lib/i386/pc/biosnum.c: likewise
2168         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2169         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2170         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2172 2009-06-10  Pavel Roskin  <proski@gnu.org>
2174         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2175         Use separate variables.  Read only the file size at the end, but
2176         not the checksum that we don't use.
2178         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2179         Adjust all callers.
2181         * kern/ieee1275/openfw.c: Remove libc includes.
2182         * kern/ieee1275/cmain.c: Likewise.
2183         * include/grub/ieee1275/ieee1275.h: Likewise.
2185         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2186         compiler warnings.
2188 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2190         * Makefile.in: Remove all trailing whitespace.
2191         * conf/i386-pc.rmk: Likewise.
2192         * conf/powerpc-ieee1275.rmk: Likewise.
2193         * conf/sparc64-ieee1275.rmk: Likewise.
2194         * docs/grub.texi: Likewise.
2195         * docs/texinfo.tex: Likewise.
2196         * disk/fs_uuid.c: Likewise.
2197         * disk/lvm.c: Likewise.
2198         * disk/scsi.c: Likewise.
2199         * disk/ata.c: Likewise.
2200         * disk/ieee1275/ofdisk.c: Likewise.
2201         * disk/i386/pc/biosdisk.c: Likewise.
2202         * disk/host.c: Likewise.
2203         * disk/raid.c: Likewise.
2204         * disk/efi/efidisk.c: Likewise.
2205         * disk/usbms.c: Likewise.
2206         * disk/memdisk.c: Likewise.
2207         * disk/loopback.c: Likewise.
2208         * kern/powerpc/dl.c: Likewise.
2209         * kern/device.c: Likewise.
2210         * kern/dl.c: Likewise.
2211         * kern/sparc64/dl.c: Likewise.
2212         * kern/ieee1275/ieee1275.c: Likewise.
2213         * kern/term.c: Likewise.
2214         * kern/fs.c: Likewise.
2215         * kern/i386/dl.c: Likewise.
2216         * kern/i386/pc/startup.S: Likewise.
2217         * kern/i386/pc/init.c: Likewise.
2218         * kern/i386/pc/mmap.c: Likewise.
2219         * kern/i386/pc/lzo1x.S: Likewise.
2220         * kern/i386/ieee1275/init.c: Likewise.
2221         * kern/i386/realmode.S: Likewise.
2222         * kern/i386/tsc.c: Likewise.
2223         * kern/partition.c: Likewise.
2224         * kern/corecmd.c: Likewise.
2225         * kern/file.c: Likewise.
2226         * kern/efi/efi.c: Likewise.
2227         * kern/efi/init.c: Likewise.
2228         * kern/efi/mm.c: Likewise.
2229         * kern/main.c: Likewise.
2230         * kern/err.c: Likewise.
2231         * kern/env.c: Likewise.
2232         * kern/disk.c: Likewise.
2233         * kern/generic/millisleep.c: Likewise.
2234         * kern/generic/rtc_get_time_ms.c: Likewise.
2235         * kern/misc.c: Likewise.
2236         * kern/parser.c: Likewise.
2237         * genmk.rb: Likewise.
2238         * configure.ac: Likewise.
2239         * boot/i386/pc/diskboot.S: Likewise.
2240         * boot/i386/pc/pxeboot.S: Likewise.
2241         * boot/i386/pc/boot.S: Likewise.
2242         * boot/i386/pc/lnxboot.S: Likewise.
2243         * boot/i386/pc/cdboot.S: Likewise.
2244         * parttool/pcpart.c: Likewise.
2245         * video/readers/tga.c: Likewise.
2246         * video/video.c: Likewise.
2247         * video/bitmap.c: Likewise.
2248         * lib/envblk.c: Likewise.
2249         * lib/i386/setjmp.S: Likewise.
2250         * fs/xfs.c: Likewise.
2251         * fs/afs.c: Likewise.
2252         * fs/fat.c: Likewise.
2253         * fs/ntfs.c: Likewise.
2254         * fs/udf.c: Likewise.
2255         * fs/affs.c: Likewise.
2256         * fs/iso9660.c: Likewise.
2257         * fs/hfs.c: Likewise.
2258         * fs/fshelp.c: Likewise.
2259         * fs/ext2.c: Likewise.
2260         * fs/jfs.c: Likewise.
2261         * fs/reiserfs.c: Likewise.
2262         * fs/hfsplus.c: Likewise.
2263         * fs/minix.c: Likewise.
2264         * fs/cpio.c: Likewise.
2265         * fs/sfs.c: Likewise.
2266         * fs/ufs.c: Likewise.
2267         * efiemu/prepare.c: Likewise.
2268         * efiemu/loadcore_common.c: Likewise.
2269         * efiemu/runtime/efiemu.sh: Likewise.
2270         * efiemu/runtime/efiemu.S: Likewise.
2271         * efiemu/runtime/efiemu.c: Likewise.
2272         * efiemu/pnvram.c: Likewise.
2273         * efiemu/main.c: Likewise.
2274         * efiemu/i386/pc/cfgtables.c: Likewise.
2275         * efiemu/i386/loadcore64.c: Likewise.
2276         * efiemu/i386/loadcore32.c: Likewise.
2277         * efiemu/loadcore.c: Likewise.
2278         * efiemu/symbols.c: Likewise.
2279         * efiemu/mm.c: Likewise.
2280         * include/grub/autoefi.h: Likewise.
2281         * include/grub/datetime.h: Likewise.
2282         * include/grub/term.h: Likewise.
2283         * include/grub/hfs.h: Likewise.
2284         * include/grub/lvm.h: Likewise.
2285         * include/grub/i386/tsc.h: Likewise.
2286         * include/grub/i386/linux.h: Likewise.
2287         * include/grub/i386/xnu.h: Likewise.
2288         * include/grub/i386/efiemu.h: Likewise.
2289         * include/grub/i386/pc/biosdisk.h: Likewise.
2290         * include/grub/i386/pc/memory.h: Likewise.
2291         * include/grub/i386/pc/vbe.h: Likewise.
2292         * include/grub/parttool.h: Likewise.
2293         * include/grub/video.h: Likewise.
2294         * include/grub/memory.h: Likewise.
2295         * include/grub/fs.h: Likewise.
2296         * include/grub/partition.h: Likewise.
2297         * include/grub/xnu.h: Likewise.
2298         * include/grub/efi/api.h: Likewise.
2299         * include/grub/efi/pe32.h: Likewise.
2300         * include/grub/efi/memory.h: Likewise.
2301         * include/grub/multiboot.h: Likewise.
2302         * include/grub/usbdesc.h: Likewise.
2303         * include/grub/multiboot2.h: Likewise.
2304         * include/grub/acpi.h: Likewise.
2305         * include/grub/efiemu/efiemu.h: Likewise.
2306         * include/grub/disk.h: Likewise.
2307         * include/grub/ieee1275/ieee1275.h: Likewise.
2308         * include/grub/net.h: Likewise.
2309         * include/grub/machoload.h: Likewise.
2310         * include/grub/macho.h: Likewise.
2311         * include/multiboot.h: Likewise.
2312         * genmoddep.awk: Likewise.
2313         * normal/main.c: Likewise.
2314         * normal/menu_entry.c: Likewise.
2315         * normal/menu_viewer.c: Likewise.
2316         * normal/completion.c: Likewise.
2317         * normal/cmdline.c: Likewise.
2318         * normal/misc.c: Likewise.
2319         * normal/datetime.c: Likewise.
2320         * bus/usb/usbtrans.c: Likewise.
2321         * bus/usb/ohci.c: Likewise.
2322         * bus/usb/uhci.c: Likewise.
2323         * bus/usb/usb.c: Likewise.
2324         * mmap/efi/mmap.c: Likewise.
2325         * mmap/i386/pc/mmap_helper.S: Likewise.
2326         * mmap/i386/pc/mmap.c: Likewise.
2327         * mmap/i386/mmap.c: Likewise.
2328         * mmap/i386/uppermem.c: Likewise.
2329         * mmap/mmap.c: Likewise.
2330         * commands/acpi.c: Likewise.
2331         * commands/echo.c: Likewise.
2332         * commands/blocklist.c: Likewise.
2333         * commands/loadenv.c: Likewise.
2334         * commands/usbtest.c: Likewise.
2335         * commands/boot.c: Likewise.
2336         * commands/parttool.c: Likewise.
2337         * commands/search.c: Likewise.
2338         * commands/cat.c: Likewise.
2339         * commands/i386/pc/play.c: Likewise.
2340         * commands/i386/pc/drivemap.c: Likewise.
2341         * commands/i386/pc/vbeinfo.c: Likewise.
2342         * commands/i386/pc/acpi.c: Likewise.
2343         * commands/i386/pc/vbetest.c: Likewise.
2344         * commands/ls.c: Likewise.
2345         * commands/cmp.c: Likewise.
2346         * commands/test.c: Likewise.
2347         * commands/efi/acpi.c: Likewise.
2348         * commands/gptsync.c: Likewise.
2349         * commands/help.c: Likewise.
2350         * partmap/amiga.c: Likewise.
2351         * partmap/apple.c: Likewise.
2352         * partmap/acorn.c: Likewise.
2353         * partmap/pc.c: Likewise.
2354         * partmap/sun.c: Likewise.
2355         * partmap/gpt.c: Likewise.
2356         * script/sh/lexer.c: Likewise.
2357         * script/sh/function.c: Likewise.
2358         * font/font.c: Likewise.
2359         * font/font_cmd.c: Likewise.
2360         * loader/powerpc/ieee1275/linux.c: Likewise.
2361         * loader/efi/chainloader.c: Likewise.
2362         * loader/multiboot_loader.c: Likewise.
2363         * loader/macho.c: Likewise.
2364         * loader/i386/multiboot.c: Likewise.
2365         * loader/i386/linux.c: Likewise.
2366         * loader/i386/pc/linux.c: Likewise.
2367         * loader/i386/pc/multiboot2.c: Likewise.
2368         * loader/i386/pc/chainloader.c: Likewise.
2369         * loader/i386/pc/xnu.c: Likewise.
2370         * loader/i386/bsd_trampoline.S: Likewise.
2371         * loader/i386/efi/linux.c: Likewise.
2372         * loader/i386/multiboot_elfxx.c: Likewise.
2373         * loader/i386/bsd_helper.S: Likewise.
2374         * loader/i386/bsd.c: Likewise.
2375         * loader/i386/linux_trampoline.S: Likewise.
2376         * loader/i386/xnu_helper.S: Likewise.
2377         * loader/i386/xnu.c: Likewise.
2378         * loader/i386/bsd_pagetable.c: Likewise.
2379         * loader/i386/multiboot_helper.S: Likewise.
2380         * loader/xnu.c: Likewise.
2381         * loader/xnu_resume.c: Likewise.
2382         * io/gzio.c: Likewise.
2383         * term/efi/console.c: Likewise.
2384         * term/terminfo.c: Likewise.
2385         * term/ieee1275/ofconsole.c: Likewise.
2386         * term/i386/pc/serial.c: Likewise.
2387         * term/i386/pc/vesafb.c: Likewise.
2388         * term/i386/pc/vga.c: Likewise.
2389         * term/usb_keyboard.c: Likewise.
2390         * term/gfxterm.c: Likewise.
2391         * aclocal.m4: Likewise.
2392         * util/lvm.c: Likewise.
2393         * util/grub.d/30_os-prober.in: Likewise.
2394         * util/grub.d/10_hurd.in: Likewise.
2395         * util/console.c: Likewise.
2396         * util/grub-macho2img.c: Likewise.
2397         * util/grub-probe.c: Likewise.
2398         * util/hostfs.c: Likewise.
2399         * util/i386/pc/grub-mkimage.c: Likewise.
2400         * util/i386/pc/grub-setup.c: Likewise.
2401         * util/i386/efi/grub-mkimage.c: Likewise.
2402         * util/grub-mkconfig.in: Likewise.
2403         * util/raid.c: Likewise.
2404         * util/resolve.c: Likewise.
2405         * util/grub-mkdevicemap.c: Likewise.
2406         * util/grub-emu.c: Likewise.
2407         * util/getroot.c: Likewise.
2408         * util/hostdisk.c: Likewise.
2409         * util/usb.c: Likewise.
2410         * util/grub-editenv.c: Likewise.
2411         * util/misc.c: Likewise.
2413 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2415         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2416         `genparttoollist.sh'.
2417         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2418         Add `*.sh' to the list find searches for and change `mdate.sh'
2419         to `mdate-sh'.
2421 2009-06-10  Pavel Roskin  <proski@gnu.org>
2423         * include/grub/multiboot2.h: Provide compatibility defines for
2424         multiboot2.h.
2425         * include/multiboot2.h: Include stdint.h only if needed, using
2426         angle brackets.
2427         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2428         grub/multiboot2.h.
2429         * loader/ieee1275/multiboot2.c: Likewise.
2430         * loader/multiboot2.c: Likewise.
2431         * loader/multiboot_loader.c: Likewise.
2433         * configure.ac: Use -nostdlib when probing for the target.  It
2434         should not be required to have libc for the target.
2436         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2437         they fail without libc headers for the target.
2438         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2439         exports.
2440         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2441         preprocessor conditionals.
2443         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2444         build system doesn't need to be aware of the tar.c internals.
2446 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2448         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2450 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2452         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2453         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2455 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2457         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2458         aren't available if ata.mod gets used.
2460 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2462         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2463         initialising controller.
2464         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2466 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2468         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2469         to choose between ata and biosdisk module on i386-pc.
2471 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2473         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2474         Subclass and Programming Interface fields in terms of the 3 byte
2475         Class Code register.
2476         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2478         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2479         interface is OHCI.  Add grub_dprintf for symmetry with
2480         bus/usb/uhci.c.
2481         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2482         interface is UHCI.  Add interf variable for programming
2483         interface.  Print interface with class/subclass.
2485         * bus/usb/ohci.c: Set interf with correct field.
2487         * bus/usb/uhci.c: Remove unneeded doubled lines.
2488         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2489         Remove whitespace inside comment.
2491 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2493         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2494         as fallback an equivalent option without depth.
2496 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2498         Not fail if unable to retrieve C/H/S on LBA disks
2500         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2501         if unable to retrieve C/H/S on LBA disks
2503 2009-06-08  Pavel Roskin  <proski@gnu.org>
2505         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2506         about aliasing.
2508 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2510         * Makefile.in (uninstall): Remove all $lib_DATA files.
2512 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2514         Bugfix: install on partitionless device
2516         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2517         is a whole disk
2519 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2521         * Makefile.in (uninstall): Remove all $include_DATA files.
2523 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2525         * commands/true.c: New file.  Implement the true and false commands.
2526         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2527         (true_mod_SOURCES): New variable.
2528         (true_mod_CFLAGS): Likewise.
2529         (true_mod_LDFLAGS): Likewise.
2531 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2533         Optimized font character lookup using binary search instead of linear
2534         search.  Fonts now are required to have the character index ordered by
2535         code point.
2537         * font/font.c (load_font_index): Verify that fonts have ordered
2538         character indices.
2539         (find_glyph): Use binary search instead of linear search to find a
2540         character in a font.
2542 2009-06-05  Michael Scherer  <misc@mandriva.org>
2544         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2545         uses case sensitive btree.
2546         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2547         only for case insensitive filesystems.
2549 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2551         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2552         * conf/common.rmk (search_mod_CFLAGS): likewise
2554 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2556         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2557         compensate a compiler bug
2559 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2561         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2562         instead of '\b'
2564 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2566         Definitions for creating asm symbols with Apple's CC
2568         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2569         [APPLE_CC] (VARIABLE): likewise
2571 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2573         Disable lnxboot.img when compiled
2574         with Apple's CC
2576         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2577         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2578         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2579         [! APPLE_CC] (CODE_LENG): skip
2580         [! APPLE_CC] (setup_sects): likewise
2581         [! APPLE_CC]: skip filling
2583 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2585         Address in trampolines based on 32-bit registers when compiled
2586         with Apple's CC
2588         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2589         for addresses
2590         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2592 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2594         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2596         * kern/misc.c [APPLE_CC] (memcpy): new function
2597         [APPLE_CC] (memmove): likewise
2598         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2599         (memcpy): define alias conditionally on !APPLE_CC
2600         (memset): likewise
2601         (abort): likewise
2602         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2603         APPLE_CC are defined
2604         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2605         (grub_assert_fail): make prototype conditional
2607 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2609         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2611         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2612         grub-macho2img
2613         (CLEANFILES): add grub-macho2img
2614         (grub_macho2img_SOURCES): new variable
2615         * kern/i386/pc/startup.S (bss_start): new variable
2616         (bss_end): likewise
2617         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2618         * util/grub-macho2img.c: new file
2620 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2622         Use objconv when compiling with Apple's CC
2624         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2625         (efiemu64.o): likewise
2626         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2627         when compiling with Apple's CC
2628         (efiemu64_s.o): likewise
2629         * configure.ac: check for objconv when compiling with Apple's CC
2630         * genmk.rb: use objconv for modules when compiled with Apple's CC
2632 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2634         Define segment as well as section when compiling with
2635         Apple's CC
2637         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2638         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2639         (efiemu_convert_pointer): likewise
2640         (efiemu_set_virtual_address_map): likewise
2641         (efiemu_convert_pointer): likewise
2642         (efiemu_getcrc32): likewise
2643         (init_crc32_table): likewise
2644         (reflect): likewise
2645         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2646         (GRUB_MOD_DEP): likewise
2648 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2650         Allow a compilation without -mcmodel=large
2652         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2653         when compiled without -mcmodel=large
2654         (filter_memory_map): remove memory post 4 GiB when compiled
2655         without -mcmodel=large
2656         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2657         TARGET_CFLAGS when -mcmodel=large isn't supported
2659 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2661         Remove nested functions in efiemu core
2663         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2665 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2667         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2669         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2670         temporary storage
2671         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2672         using Apple's CC
2673         (grub_cpu_is_tsc_supported): likewise
2674         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2676 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2678         Absolute addressing through constant with Apple's cc
2680         * kern/i386/pc/startup.S: Define necessary constants
2681         and address through it when using ABS with Apple's CC
2682         * boot/i386/pc/diskboot.S: likewise
2683         * boot/i386/pc/boot.S: likewise
2684         * boot/i386/pc/lnxboot.S: likewise
2685         * boot/i386/pc/cdboot.S: likewise
2686         * mmap/i386/pc/mmap_helper.S: likewise
2687         * commands/i386/pc/drivemap_int13h.S: likewise
2689 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2691         Check if compiler is apple cc
2693         * Makefile.in (ASFLAGS): new variable
2694         (TARGET_ASFLAGS): likewise
2695         (TARGET_MODULE_FORMAT): likewise
2696         (TARGET_APPLE_CC): likewise
2697         (OBJCONV): likewise
2698         (TARGET_IMG_CFLAGS): likewise
2699         (TARGET_CPPFLAGS): add includedir
2700         * configure.ac: call grub_apple_cc and grub_apple_target_cc
2701         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2702         Check for linker script only if compiler isn't Apple's CC
2703         (TARGET_MODULE_FORMAT): set
2704         (TARGET_APPLE_CC): likewise
2705         (TARGET_ASFLAGS): likewise
2706         (ASFLAGS): likewise
2707         Check for objcopy only if compiler isn't Apple's CC
2708         Check for BSS symbol only if compiler isn't Apple's CC
2709         * genmk.rb: adapt nm options if we use Apple's utils
2710         * aclocal.m4 (grub_apple_cc): new test
2711         (grub_apple_target_cc): likewise
2713 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2715         Simplify sed expressions and improve awk
2717         * Makefile.in (install-local): simplify sed expression
2718         * gencmdlist.sh: likewise
2719         * genmoddep.awk: avoid adding module as a dependency of itself
2721 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2723         Add missing start symbols
2725         * boot/i386/pc/boot.S: add start
2726         * boot/i386/pc/pxeboot.S: likewise
2728 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2730         Fix wrong assumptions with grub-mkimage on EFI
2732         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2733         (relocate_addresses): consider both r_addend and value at offset
2734         (make_mods_section): zerofill modinfo and header
2735         (convert_elf): write prefix here
2737 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2739         Use .asciz instead of .string
2741         * i386/pc/diskboot.S: use .asciz instead of .string
2742         * i386/pc/boot.S: likewise
2743         * include/grub/dl.h (GRUB_MOD_DEP): likewise
2744         (GRUB_MOD_NAME): likewise
2746 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2748         gfxpayload support
2750         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2751         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2752         (grub_video_setup): remove
2753         (grub_video_set_mode): new prototype
2754         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2755         (vid_mode): remove
2756         (linux_vesafb_res): compile only on PCBIOS
2757         (grub_linux_boot): support gfxpayload
2758         * loader/i386/pc/xnu.c (video_hook): new function
2759         (grub_xnu_set_video): support gfxpayload
2760         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2761         (DEFAULT_VIDEO_HEIGHT): likewise
2762         (DEFAULT_VIDEO_FLAGS): likewise
2763         (DEFAULT_VIDEO_MODE): new definition
2764         (video_hook): new function
2765         (grub_gfxterm_init): use grub_video_set_mode
2766         * util/grub.d/30_os-prober.in: remove explicit modesetting before
2767         loading xnu
2768         * video/video.c (grub_video_setup): removed
2769         (grub_video_set_mode): new function based on grub_gfxterm_init and
2770         grub_video_setup
2772 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2774         Avoid calling biosdisk in drivemap
2776         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2777         (revparse_biosdisk): likewise
2778         (list_mappings): derive name from id directly
2779         (grub_cmd_drivemap): use tryparse_diskstring
2781 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2783         Script fixes
2785         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2786         (grub_lexer_param): add tokenonhold
2787         (grub_script_create_cmdline): remove cmdline. All callers updated
2788         (grub_script_function_create): make functionname
2789         grub_script_arg. All callers updated
2790         (grub_script_execute_argument_to_string): new prototype
2791         * kern/parser.c (state_transitions): reorder
2792         (grub_parser_cmdline_state): fix a bug and make more compact
2793         * script/sh/execute.c (grub_script_execute_argument_to_string):
2794         make global
2795         (grub_script_execute_cmdline): use new format
2796         * script/sh/function.c (grub_script_function_create): make functionname
2797         grub_script_arg. All callers updated
2798         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2799         (grub_script_yylex): remove
2800         (grub_script_yylex2): renamed to ...
2801         (grub_script_yylex): ...renamed
2802         parse the expressions like a${b}c
2803         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2804         (GRUB_PARSER_TOKEN_VAR): remove
2805         (GRUB_PARSER_TOKEN_NAME): likewise
2806         ("if"): declare as typeless
2807         ("while"): likewise
2808         ("function"): likewise
2809         ("else"): likewise
2810         ("then"): likewise
2811         ("fi"): likewise
2812         (text): remove
2813         (argument): likewise
2814         (script): accept empty scripts and make exit on error
2815         (arguments): use GRUB_PARSER_TOKEN_ARG
2816         (function): likewise
2817         (command): move error handling to script
2818         (menuentry): move grub_script_lexer_ref before
2819         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2820         argument. All callers updated
2822 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2824         Prevent GRUB from probing floppies during boot.
2826         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2827         * commands/search.c (options): Add --no-floppy.
2828         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2829         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2830         --no-floppy when searching for UUIDs.
2832 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2834         Simplify the code duplication in commands/search.c.
2836         * commands/search.c (search_label, search_fs_uuid): Merge into ...
2837         (search_fs): ... this.  Update all users.
2839 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
2841         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2843 2009-05-28  Pavel Roskin  <proski@gnu.org>
2845         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2846         Remove the original symlink explicitly.
2848         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2849         just one slash.  That's how grub_fshelp_find_file() does it.
2851 2009-05-26  Pavel Roskin  <proski@gnu.org>
2853         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2854         to `str'.
2856         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2857         possibly unused.
2859 2009-05-25  Christian Franke  <franke@computer.org>
2861         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2862         register.
2863         (grub_atapi_identify): Add wait after drive select.
2864         (grub_ata_identify): Do more strict status register check before
2865         calling grub_atapi_identify ().  Suppress error message if status
2866         register is 0x00 after command failure.  Add status register
2867         check after PIO read to avoid bogus identify due to stuck DRQ.
2868         Thanks to Pavel Roskin for testing.
2869         (grub_device_initialize): Remove unsafe status register check.
2870         Thanks to 'phcoder' for problem report and patch.
2871         Prevent sign extension in debug message.
2873 2009-05-23  Colin D Bennett  <colin@gibibit.com>
2875         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
2876         definition file, and functions defined in `normal/menu.c' have had
2877         their prototypes moved to `include/grub/menu.h' for consistency.
2879         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2880         from normal.h.
2881         (grub_menu_get_entry): Likewise.
2882         (grub_menu_get_timeout): Likewise.
2883         (grub_menu_set_timeout): Likewise.
2884         (grub_menu_execute_entry): Likewise.
2885         (grub_menu_execute_with_fallback): Likewise.
2886         (grub_menu_entry_run): Likewise.
2888         * include/grub/normal.h: Re-ordered and grouped function
2889         prototypes by file that the function is defined in.
2890         (grub_menu_execute_callback): Removed; moved to menu.h.
2891         (grub_menu_get_entry): Likewise.
2892         (grub_menu_get_timeout): Likewise.
2893         (grub_menu_set_timeout): Likewise.
2894         (grub_menu_execute_entry): Likewise.
2895         (grub_menu_execute_with_fallback): Likewise.
2896         (grub_menu_entry_run): Likewise.
2897         (grub_menu_addentry): Renamed from this ...
2898         (grub_normal_add_menu_entry): ... to this.
2900         * normal/main.c (grub_menu_addentry): Renamed from this ...
2901         (grub_normal_add_menu_entry): ... to this.
2903         * script/sh/execute.c (grub_script_execute_menuentry): Update
2904         reference to renamed grub_menu_addentry function.
2906 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
2908         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2910 2009-05-22  Pavel Roskin  <proski@gnu.org>
2912         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2913         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
2914         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
2915         compiling for the i386 targets, but not for the utilities.
2917         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2918         to grub_uint8_t.
2919         (grub_root_drive): Likewise.
2920         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2921         remove alignment.
2922         (grub_root_drive): Change size to byte.
2923         (grub_start_addr): Remove.
2924         (grub_end_addr): Likewise.
2925         (grub_apm_bios_info): Likewise.
2927 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
2929         * normal/i386: Remove.
2930         * normal/powerpc: Likewise.
2931         * normal/sparc64: Likewise.
2932         * normal/x86_64: Likewise.
2934 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
2936         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2937         * loader/i386/linux_trampoline.S: Fix indentation
2938         * loader/i386/xnu_helper.S: Likewise
2940 2009-05-18  Colin D Bennett  <colin@gibibit.com>
2942         Display error messages when parsing a Lua statement fails.
2943         Previously, executing a syntactically invalid statement like
2944         ")foo" or "bar;" would silently fail.
2946         * script/lua/grub_main.c (handle_lua_error): New function.
2947         (grub_lua_parse_line): Improved reporting of Lua parser and
2948         execution errors.
2950 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2952         Remove -Werror which causes build to fail on some systems
2954         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2955         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2956         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2958 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2960         trampoline for linux on 64-bit platform
2962         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2963         loader/i386/efi/linux_trampoline.S
2964         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2965         declaration
2966         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2967         here
2968         * loader/i386/linux_trampoline.S: moved here
2969         * loader/i386/efi/linux.c (allocate_pages): reserve space for
2970         trampoline
2971         (jumpvector): removed
2972         (grub_linux_trampoline_start): new declaration
2973         (grub_linux_trampoline_end): likewise
2974         (grub_linux_boot): use trampoline when on 64-bit platform
2975         * loader/i386/linux.c: likewise
2977 2009-05-16  Pavel Roskin  <proski@gnu.org>
2979         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2980         const to avoid a warning.
2981         (grub_lua_setenv): Likewise.
2982         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2983         lmsg to fix a warning.
2985 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2987         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2988         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2989         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2990         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2991         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2992         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2993         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2994         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2996 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2998         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3000 2009-05-16  Bean  <bean123ch@gmail.com>
3002         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3003         (lua_mod_SOURCES): New variable.
3004         (lua_mod_CFLAGS): Likewise.
3005         (lua_mod_LDFLAGS): Likewise.
3007         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3008         (setjmp_mod_SOURCES): New variable.
3009         (setjmp_mod_CFLAGS): Likewise.
3010         (setjmp_LDFLAGS): Likewise.
3012         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3013         (setjmp_mod_SOURCES): New variable.
3014         (setjmp_mod_CFLAGS): Likewise.
3015         (setjmp_LDFLAGS): Likewise.
3017         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3018         (setjmp_mod_SOURCES): New variable.
3019         (setjmp_mod_CFLAGS): Likewise.
3020         (setjmp_LDFLAGS): Likewise.
3022         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3023         (setjmp_mod_SOURCES): New variable.
3024         (setjmp_mod_CFLAGS): Likewise.
3025         (setjmp_LDFLAGS): Likewise.
3027         * normal/i386/setjmp.S: Moved from here ...
3028         * lib/i386/setjmp.S: ... Moved here
3029         * normal/x86_64/setjmp.S: Moved from here ...
3030         * lib/x86_64/setjmp.S: ... Moved here
3031         * normal/powerpc/setjmp.S: Moved from here ...
3032         * lib/powerpc/setjmp.S: ... Moved here
3033         * normal/sparc64/setjmp.S: Moved from here ...
3034         * lib/sparc64/setjmp.S: ... Moved here
3036         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3037         returns_twice in mingw.
3039         * script/lua/grub_lib.c: New file.
3040         * script/lua/grub_lib.h: Likewise.
3041         * script/lua/grub_lua.h: Likewise.
3042         * script/lua/grub_main.c: Likewise.
3043         * script/lua/lapi.c: Likewise.
3044         * script/lua/lapi.h: Likewise.
3045         * script/lua/lauxlib.c: Likewise.
3046         * script/lua/lauxlib.h: Likewise.
3047         * script/lua/lbaselib.c: Likewise.
3048         * script/lua/lcode.c: Likewise.
3049         * script/lua/lcode.h: Likewise.
3050         * script/lua/ldblib.c: Likewise.
3051         * script/lua/ldebug.c: Likewise.
3052         * script/lua/ldebug.h: Likewise.
3053         * script/lua/ldo.c: Likewise.
3054         * script/lua/ldo.h: Likewise.
3055         * script/lua/ldump.c: Likewise.
3056         * script/lua/lfunc.c: Likewise.
3057         * script/lua/lfunc.h: Likewise.
3058         * script/lua/lgc.c: Likewise.
3059         * script/lua/lgc.h: Likewise.
3060         * script/lua/linit.c: Likewise.
3061         * script/lua/liolib.c: Likewise.
3062         * script/lua/llex.c: Likewise.
3063         * script/lua/llex.h: Likewise.
3064         * script/lua/llimits.h: Likewise.
3065         * script/lua/lmathlib.c: Likewise.
3066         * script/lua/lmem.c: Likewise.
3067         * script/lua/lmem.h: Likewise.
3068         * script/lua/loadlib.c: Likewise.
3069         * script/lua/lobject.c: Likewise.
3070         * script/lua/lobject.h: Likewise.
3071         * script/lua/lopcodes.c: Likewise.
3072         * script/lua/lopcodes.h: Likewise.
3073         * script/lua/loslib.c: Likewise.
3074         * script/lua/lparser.c: Likewise.
3075         * script/lua/lparser.h: Likewise.
3076         * script/lua/lstate.c: Likewise.
3077         * script/lua/lstate.h: Likewise.
3078         * script/lua/lstring.c: Likewise.
3079         * script/lua/lstring.h: Likewise.
3080         * script/lua/lstrlib.c: Likewise.
3081         * script/lua/ltable.c: Likewise.
3082         * script/lua/ltable.h: Likewise.
3083         * script/lua/ltablib.c: Likewise.
3084         * script/lua/ltm.c: Likewise.
3085         * script/lua/ltm.h: Likewise.
3086         * script/lua/lua.h: Likewise.
3087         * script/lua/luaconf.h: Likewise.
3088         * script/lua/lualib.h: Likewise.
3089         * script/lua/lundump.c: Likewise.
3090         * script/lua/lundump.h: Likewise.
3091         * script/lua/lvm.c: Likewise.
3092         * script/lua/lvm.h: Likewise.
3093         * script/lua/lzio.c: Likewise.
3094         * script/lua/lzio.h: Likewise.
3096 2009-05-16  Bean  <bean123ch@gmail.com>
3098         * include/grub/kernel.h (grub_module_header_types): Add type
3099         OBJ_TYPE_CONFIG.
3101         * kern/main.c (grub_load_config): New function.
3102         (grub_main): Call grub_load_config to read boot config.
3104         * grub-mkimage (generate_image): New parameter config_path.
3105         (options): New option --config.
3106         (main): Parse --config option, and pass it to generate_image.
3108 2009-05-14  Christian Franke  <franke@computer.org>
3110         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3111         This fixes build on Cygwin.
3113 2009-05-14  Pavel Roskin  <proski@gnu.org>
3115         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3116         jump.  This saves two bytes, so the typical case of 2 swapped
3117         drives would fit 32 bytes.
3119 2009-05-13  Pavel Roskin  <proski@gnu.org>
3121         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3122         grub_uint32_t to avoid a warning.
3124         * loader/i386/linux.c (allocate_pages): When assigning
3125         real_mode_mem, cast through grub_size_t to fix a warning.  The
3126         code already makes sure that the value would fit a pointer.
3127         (grub_linux_setup_video): Cast render_target->data to
3128         grub_size_t to fix a warning.
3130 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3132         * commands/i386/pc/drivemap.c: New file - implement drivemap
3133         command.
3134         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3135         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3137 2009-05-13  Pavel Roskin  <proski@gnu.org>
3139         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3140         embedding_area_exists.
3142 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3144         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3145         it easier to understand / work with.
3146         Improve warning messages for cases where there's no embedding area,
3147         or when it is too small (or core.img too large).
3149 2009-05-13  Pavel Roskin  <proski@gnu.org>
3151         * loader/i386/pc/multiboot2.c: Add necessary includes for
3152         grub_multiboot2_real_boot().
3154         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3155         PX record is always little-endian.  We only need the lower 2
3156         bytes of the mode.
3158         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3159         facilitate code reuse.
3160         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3161         fixes a warning reported by gcc 4.4.
3163         * kernel/disk.c (grub_disk_read): Use void pointer for the
3164         buffer.
3165         (grub_disk_write): Use const void pointer for the buffer.
3166         Adjust all callers.  Remove unnecessary casts.
3168 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3170         * util/i386/pc/grub-install.in: Update copyright year.
3172 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3174         gptsync
3176         * commands/gptsync.c: new file
3177         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3178         (gptsync_mod_SOURCES): new variable
3179         (gptsync_mod_CFLAGS): likewise
3180         (gptsync_mod_LDFLAGS): likewise
3181         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3182         new definition
3183         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3184         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3185         * conf/i386-ieee1275.rmk: likewise
3186         * conf/i386-pc.rmk: likewise
3187         * conf/powerpc-ieee1275.rmk: likewise
3189 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3191         Fixed grub-emu
3193         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3194         (grub_dl_ref): likewise
3196 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3198         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3199         split in two functions (one for msdos and one for gpt).
3201 2009-05-08  Pavel Roskin  <proski@gnu.org>
3203         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3204         not modified.
3206         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3207         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3208         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3209         nerr variable.
3211 2009-05-08  David S. Miller  <davem@davemloft.net>
3213         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3215 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3217         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3218         existence.
3220 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3222         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3223         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3225 2009-05-05  David S. Miller  <davem@davemloft.net>
3227         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3229 2009-05-05  Pavel Roskin  <proski@gnu.org>
3231         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3232         of grub_dl_ref() and grub_dl_unref().
3233         * commands/parttool.c: Remove preprocessor conditionals around
3234         grub_dl_ref() and grub_dl_unref().
3235         * fs/affs.c: Likewise.
3236         * fs/afs.c: Likewise.
3237         * fs/cpio.c: Likewise.
3238         * fs/ext2.c: Likewise.
3239         * fs/fat.c: Likewise.
3240         * fs/hfs.c: Likewise.
3241         * fs/hfsplus.c: Likewise.
3242         * fs/iso9660.c: Likewise.
3243         * fs/jfs.c: Likewise.
3244         * fs/minix.c: Likewise.
3245         * fs/ntfs.c: Likewise.
3246         * fs/reiserfs.c: Likewise.
3247         * fs/sfs.c: Likewise.
3248         * fs/udf.c: Likewise.
3249         * fs/ufs.c: Likewise.
3250         * fs/xfs.c: Likewise.
3251         * include/grub/dl.h: Likewise.
3252         * loader/xnu.c: Likewise.
3254 2009-05-04  Pavel Roskin  <proski@gnu.org>
3256         * commands/acpi.c: Remove unused variable my_mod.
3257         * partmap/amiga.c: Likewise.
3258         * partmap/apple.c: Likewise.
3259         * partmap/gpt.c: Likewise.
3260         * partmap/pc.c: Likewise.
3261         * partmap/sun.c: Likewise.
3262         * term/gfxterm.c: Likewise.
3263         * term/i386/pc/vesafb.c: Likewise.
3264         * term/i386/pc/vga.c: Likewise.
3266 2009-05-04  David S. Miller  <davem@davemloft.net>
3268         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3269         pointer args to grub_ieee1275_get_property().
3271         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3273         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3274         devices, and do not traverse down under controller nodes.
3276         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3277         (grub_ofdisk_open): Use it to un-escape "," characters.
3278         * kern/disk.c (find_part_sep): New.
3279         (grub_disk_open): Use it to find the first non-escaped ','
3280         character in the disk name.
3281         * util/ieee1275/devicemap.c (escape_of_path): New.
3282         (grub_util_emit_devicemap_entry): Use it.
3283         * util/sparc64/ieee1275/grub-install.in: Update script to
3284         strip partition specifiers properly by not triggering on
3285         '\' escaped ',' characters.
3287 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3289         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3290         to 0x300.
3291         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3292         resolutions.
3293         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3294         on documentation from Wikipedia).
3296 2009-05-04  Pavel Roskin  <proski@gnu.org>
3298         * disk/ata.c: Spelling fixes.
3299         * disk/raid.c: Likewise.
3300         * disk/usbms.c: Likewise.
3301         * disk/dmraid_nvidia.c: Likewise.
3302         * kern/ieee1275/openfw.c: Likewise.
3303         * kern/ieee1275/init.c: Likewise.
3304         * kern/ieee1275/cmain.c: Likewise.
3305         * boot/i386/pc/cdboot.S: Likewise.
3306         * video/readers/png.c: Likewise.
3307         * video/i386/pc/vbe.c: Likewise.
3308         * fs/udf.c: Likewise.
3309         * fs/hfs.c: Likewise.
3310         * fs/reiserfs.c: Likewise.
3311         * efiemu/runtime/efiemu.c: Likewise.
3312         * efiemu/main.c: Likewise.
3313         * efiemu/mm.c: Likewise.
3314         * include/grub/elf.h: Likewise.
3315         * include/grub/xnu.h: Likewise.
3316         * include/grub/usbdesc.h: Likewise.
3317         * include/grub/usb.h: Likewise.
3318         * include/grub/script_sh.h: Likewise.
3319         * include/grub/lib/LzmaEnc.h: Likewise.
3320         * include/grub/efiemu/efiemu.h: Likewise.
3321         * include/grub/command.h: Likewise.
3322         * normal/menu.c: Likewise.
3323         * normal/main.c: Likewise.
3324         * normal/datetime.c: Likewise.
3325         * bus/usb/uhci.c: Likewise.
3326         * mmap/i386/uppermem.c: Likewise.
3327         * mmap/mmap.c: Likewise.
3328         * commands/acpi.c: Likewise.
3329         * commands/test.c: Likewise.
3330         * partmap/apple.c: Likewise.
3331         * font/font.c: Likewise.
3332         * loader/sparc64/ieee1275/linux.c: Likewise.
3333         * loader/macho.c: Likewise.
3334         * loader/i386/bsd_trampoline.S: Likewise.
3335         * loader/i386/bsd.c: Likewise.
3336         * loader/xnu.c: Likewise.
3337         * term/i386/pc/vesafb.c: Likewise.
3338         * term/usb_keyboard.c: Likewise.
3339         * util/resolve.c: Likewise.
3340         * util/getroot.c: Likewise.
3342 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3344         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3346 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3348         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3349         build error.
3351 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3353         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3354         parameter only available on BIOS.
3356 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3358         Removed wrong semicolon in declaration
3360         * grub/misc.h (grub_dprintf): remove semicolon
3362 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3364         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3365         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3366         is done by grub_cmd_linux() now).
3367         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3368         restore video to text mode.
3369         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3370         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3371         `GRUB_LINUX_VID_MODE_NORMAL'.
3373 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3375         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3376         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3377         and `normal/script.c'.  Add `kern/rescue_reader.c',
3378         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3379         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3380         `grub_script.tab.c'.
3382         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3383         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3384         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3385         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3386         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3388         * Makefile.in: Remove duplicated 2008 in Copyright line.
3390 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3392         * util/misc.c (grub_util_warn): New function.  Emits a warning
3393         unconditionally.
3394         * include/grub/util/misc.h (grub_util_warn): New declaration.
3396         * util/i386/pc/grub-install.in: Understand --force and pass it down
3397         to grub-setup.
3399         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3400         down to setup().
3401         (setup): Improve error messages and add warnings when requested to
3402         install in odd layouts.  Refuse to install using blocklists unless
3403         --force was set.
3405 2009-05-04  martin f. krafft  <madduck@madduck.net>
3407         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3409 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3411         Updated copyright year
3413         * fs/hfsplus.c: updated copyright year
3415 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3417         HFS+ UUID
3419         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3420         in the space previously used by unused3
3421         (grub_hfsplus_uuid): new function
3422         (grub_hfsplus_fs): added uuid field
3424 2009-05-03  Pavel Roskin  <proski@gnu.org>
3426         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3427         suppress warnings.  It's no longer needed.
3428         * disk/host.c: Likewise.
3429         * disk/ata_pthru.c: Likewise.
3430         * disk/loopback.c: Likewise.
3431         * hook/datehook.c: Likewise.
3432         * parttool/pcpart.c: Likewise.
3433         * fs/i386/pc/pxe.c: Likewise.
3434         * fs/ntfscomp.c: Likewise.
3435         * efiemu/main.c: Likewise.
3436         * mmap/mmap.c: Likewise.
3437         * commands/crc.c: Likewise.
3438         * commands/hexdump.c: Likewise.
3439         * commands/hdparm.c: Likewise.
3440         * commands/acpi.c: Likewise.
3441         * commands/echo.c: Likewise.
3442         * commands/minicmd.c: Likewise.
3443         * commands/blocklist.c: Likewise.
3444         * commands/memrw.c: Likewise.
3445         * commands/loadenv.c: Likewise.
3446         * commands/usbtest.c: Likewise.
3447         * commands/lsmmap.c: Likewise.
3448         * commands/boot.c: Likewise.
3449         * commands/parttool.c: Likewise.
3450         * commands/configfile.c: Likewise.
3451         * commands/search.c: Likewise.
3452         * commands/ieee1275/suspend.c: Likewise.
3453         * commands/cat.c: Likewise.
3454         * commands/i386/pc/pxecmd.c: Likewise.
3455         * commands/i386/pc/play.c: Likewise.
3456         * commands/i386/pc/halt.c: Likewise.
3457         * commands/i386/pc/vbeinfo.c: Likewise.
3458         * commands/i386/pc/vbetest.c: Likewise.
3459         * commands/lspci.c: Likewise.
3460         * commands/date.c: Likewise.
3461         * commands/handler.c: Likewise.
3462         * commands/ls.c: Likewise.
3463         * commands/test.c: Likewise.
3464         * commands/cmp.c: Likewise.
3465         * commands/efi/loadbios.c: Likewise.
3466         * commands/efi/fixvideo.c: Likewise.
3467         * commands/halt.c: Likewise.
3468         * commands/help.c: Likewise.
3469         * commands/reboot.c: Likewise.
3470         * hello/hello.c: Likewise.
3471         * script/sh/main.c: Likewise.
3472         * loader/xnu.c: Likewise.
3473         * term/terminfo.c: Likewise.
3474         * term/i386/pc/serial.c: Likewise.
3475         * term/usb_keyboard.c: Likewise.
3477 2009-05-03  David S. Miller  <davem@davemloft.net>
3479         * normal/menu.c: Include grub/parser.h
3481 2009-05-03  Pavel Roskin  <proski@gnu.org>
3483         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3484         not char*.
3485         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3486         Suggested by Javier Martín <lordhabbit@gmail.com>
3488         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3489         efiemu??.o doesn't exist.
3490         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3491         copying.
3493 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3495         FreeBSD 64-bit support
3497         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3498         and loader/i386/bsd_trampoline.S
3499         (bsd_mod_ASFLAGS): new variable
3500         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3501         (FREEBSD_MODTYPE_KERNEL64): likewise
3502         (grub_bsd64_trampoline_start): likewise
3503         (grub_bsd64_trampoline_end): likewise
3504         (grub_bsd64_trampoline_selfjump): likewise
3505         (grub_bsd64_trampoline_gdt): likewise
3506         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3507         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3508         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3509         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3510         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3511         of "attrib" member
3512         * loader/i386/bsd_pagetable.c: new file
3513         * loader/i386/bsd_trampoline.S: likewise
3514         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3515         (ALIGN_VAR): likewise
3516         (entry_hi): new variable
3517         (kern_end_mdofs): likewise
3518         (is_64bit): likewise
3519         (grub_freebsd_add_meta): use ALIGN_VAR
3520         (grub_e820_mmap): new declaration
3521         (grub_freebsd_add_mmap): new function
3522         (grub_freebsd_add_meta_module): support 64 bit kernels
3523         (grub_freebsd_list_modules): use ALIGN_VAR
3524         (gdt_descriptor): new declaration
3525         (grub_freebsd_boot): support 64 bit kernels
3526         (grub_bsd_elf64_hook): new function
3527         (grub_bsd_load_elf): support elf64
3529 2009-05-03  Bean  <bean123ch@gmail.com>
3531         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3532         after we get the result of if statement.
3534 2009-05-03  Bean  <bean123ch@gmail.com>
3536         * Makefile.in (enable_efiemu): New variable.
3538         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3539         set.
3540         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3541         path.
3542         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3543         path, add -mno-red-zone option.
3544         (efiemu64_s.o): Likewise.
3545         (efiemu64.o): Use macro $^ for source file.
3547         * configure.ac (--enable-efiemu): New option.
3549 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3551         xnu support
3553         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3554         (pkglib_MODULES): add xnu.mod
3555         (xnu_mod_SOURCES): new variable
3556         (xnu_mod_CFLAGS): likewise
3557         (xnu_mod_LDFLAGS): likewise
3558         (xnu_mod_ASFLAGS): likewise
3559         * conf/i386-pc.rmk: likewise
3560         * conf/x86_64-efi.rmk: likewise
3561         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3562         new declaration
3563         * include/grub/i386/macho.h: new file
3564         * include/grub/i386/xnu.h: likewise
3565         * include/grub/macho.h: likewise
3566         * include/grub/machoload.h: likewise
3567         * include/grub/x86_64/macho.h: likewise
3568         * include/grub/x86_64/xnu.h: likewise
3569         * include/grub/xnu.h: likewise
3570         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3571         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3572         * loader/i386/efi/xnu.c: new file
3573         * loader/i386/pc/xnu.c: likewise
3574         * loader/i386/xnu.c: likewise
3575         * loader/i386/xnu_helper.S: likewise
3576         * loader/macho.c: likewise
3577         * loader/xnu.c: likewise
3578         * loader/xnu_resume.c: likewise
3579         * util/grub-dumpdevtree: likewise
3580         * include/grub/i386/pit.h: include grub/err.h
3581         (grub_pit_wait): export
3582         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3584 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3586         Efiemu
3588         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3589         _linux_efi, linux_efi.
3590         new files in grub-emu
3591         new targets efiemu32.o and efiemu64.o
3592         * loader/linux_normal_efiemu.c: likewise
3593         * loader/i386/efi/linux.c: added preliminary efiemu support
3594         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3595         files to copy
3596         * include/grub/autoefi.h: new file
3597         * include/grub/i386/efiemu.h: likewise
3598         * include/grub/i386/pc/efiemu.h: likewise
3599         * include/grub/efi/api.h: add LL suffix when necessary
3600         new definitions relating to tables
3601         * include/grub/efiemu/efiemu.h: new file
3602         * include/grub/efiemu/runtime.h: likewise
3603         * efiemu/prepare.c: likewise
3604         * efiemu/loadcore_common.c: likewise
3605         * efiemu/loadcore64.c: likewise
3606         * efiemu/runtime/efiemu.sh: likewise
3607         * efiemu/runtime/efiemu.S: likewise
3608         * efiemu/runtime/efiemu.c: likewise
3609         * efiemu/runtime/config.h: likewise
3610         * efiemu/prepare32.c: likewise
3611         * efiemu/main.c: likewise
3612         * efiemu/modules/pnvram.c: likewise
3613         * efiemu/modules/i386: likewise
3614         * efiemu/modules/i386/pc: likewise
3615         * efiemu/modules/acpi.c: likewise
3616         * efiemu/i386/pc/cfgtables.c: likewise
3617         * efiemu/i386/loadcore64.c: likewise
3618         * efiemu/i386/loadcore32.c: likewise
3619         * efiemu/prepare64.c: likewise
3620         * efiemu/loadcore.c: likewise
3621         * efiemu/symbols.c: likewise
3622         * efiemu/mm.c: likewise
3623         * efiemu/loadcore32.c: likewise
3625 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3627         ACPI spoofing
3629         * commands/acpi.c: new file
3630         * commands/i386/pc/acpi.c: likewise
3631         * commands/efi/acpi.c: likewise
3632         * include/grub/acpi.h: likewise
3633         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3634         (acpi_mod_SOURCES): new variable
3635         (acpi_mod_CFLAGS): likewise
3636         (acpi_mod_LDFLAGS): likewise
3637         * conf/i386-efi.rmk: likewise
3638         * conf/x86_64-efi.rmk: likewise
3640 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3642         Missing part from mmap patch
3644         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3645         (grub_mmap_unregister)
3646         (grub_mmap_free_and_unregister): use grub_mmap_register
3648 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3650         Mmap services
3652         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3653         * loader/i386/linux.c (find_mmap_size): likewise
3654         (allocate_pages): likewise
3655         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3656         (grub_fill_multiboot_mmap): likewise
3657         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3658         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3659         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3660         (OPENBSD_MMAP_RESERVED): likewise
3661         * include/grub/i386/pc/memory.h: include grub/memory.h
3662         (grub_lower_mem): removed
3663         (grub_upper_mem): likewise
3664         (GRUB_MACHINE_MEMORY_ACPI): new definition
3665         (GRUB_MACHINE_MEMORY_NVS): likewise
3666         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3667         (GRUB_MACHINE_MEMORY_HOLE): likewise
3668         (grub_machine_mmap_register): likewise
3669         (grub_machine_mmap_unregister): likewise
3670         (grub_machine_get_upper): likewise
3671         (grub_machine_get_lower): likewise
3672         (grub_machine_get_post64): likewise
3673         * include/grub/i386/efi/memory.h: new file
3674         * include/grub/x86_64/efi/memory.h: likewise
3675         * include/grub/efi/memory.h: likewise
3676         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3677         (mmap_mod_SOURCES): new variable
3678         (mmap_mod_LDFLAGS): likewise
3679         (mmap_mod_ASFLAGS): likewise
3680         * conf/i386-coreboot.rmk: likewise
3681         * conf/i386-ieee1275.rmk: likewise
3682         * conf/i386-efi.rmk: likewise
3683         * conf/x86_64-efi.rmk: likewise
3684         * include/grub/types.h (UINT_TO_PTR): new macro
3685         (PTR_TO_UINT32): likewise
3686         (PTR_TO_UINT64): likewise
3687         * include/grub/memory.h: new file
3688         * mmap/i386/pc/mmap.c: likewise
3689         * mmap/i386/pc/mmap_helper.S: likewise
3690         * mmap/i386/uppermem.c: likewise
3691         * mmap/mmap.c: likewise
3692         * mmap/efi/mmap.c: likewise
3693         * kern/i386/coreboot/init.c (grub_machine_init): don't use
3694         grub_upper_mem
3695         * kern/i386/pc/init.c (grub_lower_mem): removed variable
3696         (grub_upper_mem): likewise
3697         (grub_machine_init): don't use grub_upper_mem,
3698         make grub_lower_mem local
3699         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3700         grub_mmap_iterate and grub_mmap_get_upper
3701         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3703 2009-05-02  Bean  <bean123ch@gmail.com>
3705         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3706         script/sh/parser.y.
3707         (pkglib_MODULES): Add normal.mod and sh.mod.
3708         (normal_SOURCES): New variable.
3709         (normal_mod_CFLAGS): Likewise.
3710         (normal_mod_LDFLAGS): Likewise.
3711         (sh_mod_SOURCES): Likewise.
3712         (sh_mod_CFLAGS): Likewise.
3713         (sh_mod_LDFLAGS): Likewise.
3715         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3716         script/sh/lexer.c_DEPENDENCIES.
3717         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3718         kern/rescue_reader.c and kern/rescue_parser.c.
3719         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3720         (grub_emu_SOURCES): Change source files.
3721         (pkglib_MODULES): Remove normal.mod.
3722         (normal_SOURCES): Removed.
3723         (normal_mod_CFLAGS): Likewise.
3724         (normal_mod_LDFLAGS): Likewise.
3725         * conf/i386-coreboot.rmk: Likewise.
3726         * conf/i386-efi.rmk: Likewise.
3727         * conf/i386-ieee1276.rmk: Likewise.
3728         * conf/powerpc-ieee1275.rmk: Likewise.
3729         * conf/sparc64-ieee1275.rmk: Likewise.
3730         * conf/x86_64-efi.rmk: Likewise.
3732         * include/grub/command.h (grub_command_execute): New inline function.
3734         * include/grub/menu.h (grub_menu_entry): Removed commands field.
3736         * include/grub/normal.h: Remove <grub/setjmp.h>.
3737         (grub_fs_module_list): Moved to normal/autofs.c.
3738         (grub_exit_env): Removed.
3739         (grub_command_execute): Likewise.
3740         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3741         parameter script.
3742         (read_command_list): New function declaration.
3743         (read_fs_list): Likewise.
3745         * include/parser.h: Include <grub/reader.h>.
3746         (grub_parser_split_cmdline): Change type of getline parameter.
3747         (grub_parser): New structure.
3748         (grub_parser_class): New variable.
3749         (grub_parser_execute): New function declaration.
3750         (grub_register_rescue_parser): Likewise.
3751         (grub_parser_register): New inline function.
3752         (grub_parser_unregister): Likewise.
3753         (grub_parser_get_current): Likewise.
3754         (grub_parser_set_current): Likewise.
3756         * include/grub/reader.h: New file.
3757         * kern/reader.c: Likewise.
3758         * kern/rescue_parser.c: Likewise.
3759         * kern/rescue_reader.c: Likewise.
3760         * normal/autofs.c: Likewise.
3761         * normal/dyncmd.c: Likewise.
3763         * include/grub/rescue.h: Removed.
3764         * normal/command.h: Likewise.
3766         * include/grub/script.h: Moved to ...
3767         * include/grub/script_sh.h: ... Moved here.
3768         * normal/execute.c: Moved to ...
3769         * script/sh/execute.c: ... Moved here.
3770         * normal/function.c: Moved to ...
3771         * script/sh/function.c: ... Moved here.
3772         * normal/lexer.c: Moved to ...
3773         * script/sh/lexer.c: ... Moved here.
3774         * normal/parser.y: Moved to ...
3775         * script/sh/parser.y: ... Moved here.
3776         * normal/script.c: Moved to ...
3777         * script/sh/script.c: ... Moved here.
3779         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3780         <grub/reader.h>.
3781         (grub_exit_env): Removed.
3782         (fs_module_list): Moved to normal/autofs.c.
3783         (grub_file_getline): Don't handle comment here.
3784         (free_menu): Skip removed field entry->commands.
3785         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3786         script parameter.
3787         (read_config_file): Removed nested parameter, change getline function.
3788         (grub_enter_normal_mode): Removed.
3789         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3790         (read_command_list): Likewise.
3791         (autoload_fs_module): Moved to normal/autofs.c.
3792         (read_fs_list): Likewise.
3793         (reader_nested): New variable.
3794         (grub_normal_execute): Run parser.sh to switch to sh parser.
3795         (grub_cmd_rescue): Removed.
3796         (cmd_normal): Removed.
3797         (grub_cmd_normal): Unregister itself at the beginning. Don't register
3798         rescue command.
3799         (grub_cmdline_run): New function.
3800         (grub_normal_reader_init): Likewise.
3801         (grub_normal_read_line): Likewise.
3802         (grub_env_write_pager): Likewise.
3803         (cmdline): New variable.
3804         (grub_normal_reader): Likewise.
3805         (GRUB_MOD_INIT): Register normal reader and set as current, register
3806         pager hook, register normal command with grub_register_command_prio,
3807         so that it won't show up in command.lst.
3808         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3809         grub_fs_autoload_hook.
3811         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3812         (grub_menu_execute_entry): Replace grub_script_execute with
3813         grub_parser_execute, change parameter to grub_command_execute.
3815         * normal/menu_text.c: Remove <grub/script.h>.
3817         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3818         and <grub/parser.h>.
3819         (run): Change editor_getline to use new parser interface. Change
3820         parameter to grub_command_execute.
3822         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3823         <grub/reader.h> and <grub/parser.h>.
3824         (grub_load_normal_mode): Execute normal command.
3825         (grub_main): Call grub_register_core_commands,
3826         grub_register_rescue_parser and grub_register_rescue_reader, use
3827         grub_reader_loop to enter input loop.
3829         * kern/parser.c (grub_parser_split_cmdline): Change type of
3830         getline parameter.
3831         (grub_parser_class): New variable.
3832         (grub_parser_execute): New function.
3834         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3835         * loader/multiboot2.c: Likewise.
3836         * loader/sparc64/ieee1275/linux.c: Likewise.
3838         * util/grub-emu.c (read_command_list): New dummy function.
3840 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3842         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3843         count to 16 for CCISS and IDA.
3845 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3847         * normal/menu_text.c  (grub_wait_after_message): Print a newline
3848         after waiting for user input.
3850         * loader/i386/linux.c: Include `<grub/normal.h>'.
3851         (grub_cmd_linux): Improve the error message about `ask' mode, by
3852         waiting for user input so it's not missed (we can do this, since
3853         user requested interaction).
3855 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3857         Added missing lst to grub-mkrescue
3859         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3860         and ${input_dir}/parttool.lst
3862 2009-04-30  David S. Miller  <davem@davemloft.net>
3864         * util/hostdisk.c (device_is_wholedisk): New function.
3865         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3866         zero only if device_is_wholedisk() returns true.
3868         * util/hostdisk.c (convert_system_partition_to_system_disk):
3869         Handle virtual disk devices named /dev/vdiskX as found on sparc
3870         and powerpc.
3872         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3873         lettered partition specifier is found, convert to numbered.
3875 2009-04-29  David S. Miller  <davem@davemloft.net>
3877         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3878         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3880         * normal/command.c: Add missing newline at end of file.
3882         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3883         warnings.
3884         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3885         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3886         grub_ofdisk_read): Likewise, and deal similarly with the fact that
3887         ihandles have a 32-bit type but need to be stored in a "void *".
3889 2009-04-28  Pavel Roskin  <proski@gnu.org>
3891         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3892         not disk.  Adjust all dependencies.
3893         (grub_fs_uuid_close): Use grub_device_close(), not
3894         grub_disk_close().
3896         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3897         parent's partition, don't copy it by reference, as it gets freed
3898         on close.
3900 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3902         Preboot hooks support
3904         * commands/boot.c (struct grub_preboot_t): new declaration
3905         (preboots_head): new variable
3906         (preboots_tail): likewise
3907         (grub_loader_register_preboot_hook): new function
3908         (grub_loader_unregister_preboot_hook): likewise
3909         (grub_loader_set): launch preboot hooks
3910         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3911         (grub_loader_register_preboot_hook): new declaration
3912         (grub_loader_unregister_preboot_hook): likewise
3914 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3916         Warning fix
3918         * disk/scsi.c (grub_scsi_open): added missing cast when
3919         calling grub_dprintf
3921 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
3923         Bug and warning fixes
3925         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3926         declaration
3927         * commands/test.c (test_parse): fixed bug with file tests and corrected
3928         declaration of find_file
3930 2009-04-26  Pavel Roskin  <proski@gnu.org>
3932         * Makefile.in: Don't install empty manual pages if help2man is
3933         missing.  Use help2man option for output, not shell redirection.
3935 2009-04-26  David S. Miller  <davem@davemloft.net>
3937         * util/grub-mkdevicemap.c (make_device_map): Add missing
3938         NESTED_FUNC_ATTR to process_device().
3940 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3942         Test command
3944         * commands/test.c: rewritten to use bash-like test
3946 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3948         Parttool autoloading and improvements
3950         * Makefile.in (pkglib_DATA): add parttool.lst
3951         (parttool.lst): new target
3952         * genmk.rb: generate parttool-*
3953         (CLEANFILES): add #{parttool}
3954         (PARTTOOLFILES): new variable
3955         * genparttoollist.sh: new file
3956         * parttool/pcpart.c (grub_pcpart_boot): more feedback
3957         (grub_pcpart_type): likewise
3958         * commands/parttool.c (helpmsg): new variable
3959         (grub_cmd_parttool): output help if not enough arguments are supplied
3960         autoload modules
3961         (GRUB_MOD_INIT(parttool)): use helpmsg
3963 2009-04-24  David S. Miller  <davem@davemloft.net>
3965         Avoiding opening same device multiple times in device iterator.
3967         * kern/device.c: (grub_device_iterate): Define struct part_ent,
3968         and use it to build a list of partitions in iterate_disk() and
3969         iterate_partition().
3971         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3972         on disk->data.
3974         * disk/ieee1275/nand.c (grub_nand_iterate): Return
3975         grub_devalias_iterate() result instead of unconditional 0.
3976         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3977         Also, capture hook return value, either directly or via
3978         grub_children_iterate(), and propagate to caller.
3979         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3980         grub_children_iterate): Return value is now 'int' instead of
3981         'grub_err_t'.
3982         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3983         like a proper iterator, stopping when hooks return non-zero.
3984         (grub_devalias_iterate): Likewise.
3986 2009-04-23  David S. Miller  <davem@davemloft.net>
3988         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3990 2009-04-22  David S. Miller  <davem@davemloft.net>
3992         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3993         is larger than address_cells, use that value for address_cells too.
3995         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3996         IEEE1275_MAX_PATH_LEN): Define.
3997         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3998         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3999         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4000         'devtype'.  Explicitly NULL terminate devalias expansion.
4002         * util/sparc64/ieee1275/misc.c: New file.
4003         * util/sparc64/ieee1275/grub-setup.c: New file.
4004         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4005         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4006         * util/sparc64/ieee1275/grub-install.in: New file.
4007         * util/ieee1275/ofpath.c: New file.
4008         * util/ieee1275/devicemap.c: New file.
4009         * util/devicemap.c: New file.
4010         * util/deviceiter.c: New file.
4011         * kern/sparc64/ieee1275/init.c: New file.
4012         * include/grub/util/ofpath.h: New file.
4013         * include/grub/util/deviceiter.h: New file.
4014         * util/grub-mkdevicemap.c: Include deviceiter.h.
4015         Implement using grub_util_emit_devicemap_entry and
4016         grub_util_iterate_devices.
4017         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4018         util/devicemap.c into grub-mkdevicemap
4019         * conf/i386-efi.rmk: Likewise.
4020         * conf/i386-ieee1275.rmk: Likewise.
4021         * conf/i386-pc.rmk: Likewise.
4022         * conf/powerpc-ieee1275.rmk: Likewise.
4023         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4024         images and installation utilities.  Build kernel as image
4025         instead of as elf binary.  Use common rules as much as possible.
4027 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4029         Correct GPT definition
4031         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4032         of "attrib" member
4034 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4036         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4038 2009-04-19  David S. Miller  <davem@davemloft.net>
4040         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4041         (grub_rescue_cmd_linux): Rename to...
4042         (grub_cmd_linux): and fix prototype.
4043         (grub_rescue_cmd_initrd): Rename to...
4044         (grub_cmd_initrd): and fix prototype.
4045         (cmd_linux, cmd_initrd): New.
4046         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4047         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4049 2009-04-17  Pavel Roskin  <proski@gnu.org>
4051         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4052         format.
4053         (grub_ohci_transfer): Likewise.
4055         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4057         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4058         return without a value.  Fix inconsistent indentation.
4060         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4061         match struct grub_fs.
4063         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4064         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4065         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4066         * commands/lspci.c (grub_lspci_iter): Likewise.
4068 2009-04-16  Bean  <bean123ch@gmail.com>
4070         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4071         value.
4073 2009-04-15  Pavel Roskin  <proski@gnu.org>
4075         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4076         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4077         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4078         definitions.
4080 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4082         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4083         that no multiple data or metadata areas are supported and `Unknown
4084         metadata header'.
4086 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4088         Move loader out of the kernel
4090         * kern/loader.c: moved to ...
4091         * commands/boot.c: ... moved here
4092         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4093         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4094         * include/grub/kernel.h (grub_machine_fini): export
4095         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4096         (grub_loader_set): likewise
4097         (grub_loader_unset): likewise
4098         (grub_loader_boot): likewise
4099         * conf/common.rmk: new module boot.mod
4100         (pkglib_MODULES): add boot.mod
4101         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4102         (grub_emu_SOURCES): likewise
4103         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4104         (grub_emu_SOURCES): likewise
4105         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4106         (grub_emu_SOURCES): likewise
4107         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4108         (grub_emu_SOURCES): likewise
4109         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4110         (grub_emu_SOURCES): likewise
4111         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4112         (grub_emu_SOURCES): likewise
4113         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4114         (grub_emu_SOURCES): likewise
4116 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4118         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4120         * kern/misc.c (grub_itoa): Removed function
4121         (grub_ltoa): likewise
4122         (grub_vsprintf): use grub_lltoa
4124 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4126         Restore grub-emu
4128         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4129         * conf/i386-coreboot.rmk: likewise
4130         * conf/i386-ieee1275.rmk: likewise
4131         * conf/powerpc-ieee1275.rmk: likewise
4133 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4135         * INSTALL: Add that `./autogen.sh' needs to be run before
4136         `./configure.'.
4138 2009-04-14  Bean  <bean123ch@gmail.com>
4140         * Makefile.in (pkglib_DATA): Add handler.lst.
4141         (handler.lst): New rule.
4143         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4144         * conf/i386-coreboot.rmk: Likewise.
4145         * conf/i386-ieee1275.rmk: Likewise.
4146         * conf/i386-efi.rmk: Likewise.
4147         * conf/x86_64-efi.rmk: Likewise.
4148         * conf/powerpc-ieee1275.rmk: Likewise.
4149         * conf/sparc64-ieee1275.rmk: Likewise.
4151         * genhandlerlist.sh: New file.
4153         * genmk.rb: Add rules to generate handler.lst.
4155         * include/grub/normal.h (grub_file_getline): New function definition.
4156         (read_handler_list): Likewise.
4157         (free_handler_list): Likewise.
4159         * include/grub/term.h (grub_term_register_input): Add name parameter
4160         for auto generation of handler.lst.
4161         (grub_term_register_output): Likewise.
4163         * normal/handler.c: New file.
4165         * normal/main.c (get_line): Renamed to grub_file_getline.
4166         (read_config_file): Use the newly renamed grub_file_getline.
4167         (read_command_list): Likewise.
4168         (read_fs_list): Likewise.
4169         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4170         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4172         * term/efi/console.c (grub_console_init): Add name parameter for auto
4173         generation of handler.lst.
4174         * term/gfxterm.c: Likewise.
4175         * term/i386/pc/at_keyboard.c: Likewise.
4176         * term/i386/pc/console.c: Likewise.
4177         * term/i386/pc/serial.c: Likewise.
4178         * term/i386/pc/vesafb.c: Likewise.
4179         * term/i386/pc/vga.c: Likewise.
4180         * term/i386/pc/vga_text.c: Likewise.
4181         * term/ieee1275/ofconsole.c: Likewise.
4182         * term/usb_keyboard.c: Likewise.
4184 2009-04-14  Bean  <bean123ch@gmail.com>
4186         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4187         properly with null character.
4189 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4191         * configure: Remove.
4192         * config.h.in: Likewise.
4193         * stamp-h.in: Likewise.
4194         * DISTLIST: Likewise.
4195         * conf/common.mk: Likewise.
4196         * conf/i386-coreboot.mk: Likewise.
4197         * conf/i386-efi.mk: Likewise.
4198         * conf/i386-ieee1275.mk: Likewise.
4199         * conf/i386.mk: Likewise.
4200         * conf/i386-pc.mk: Likewise.
4201         * conf/powerpc-ieee1275.mk: Likewise.
4202         * conf/sparc64-ieee1275.mk: Likewise.
4203         * conf/x86_64-efi.mk: Likewise.
4205         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4206         develop on GRUB.
4208 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4209             David S. Miller  <davem@davemloft.net>
4211         * util/hostdisk.c (make_device_name): Fix buffer length
4212         calculations.
4214 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4216         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4217         <sys/param.h> and <sys/sysctl.h>.
4218         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4219         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4220         opening the device and reset them afterwards.
4222 2009-04-13  Pavel Roskin  <proski@gnu.org>
4224         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4225         Reported by John Stanley <jpsinthemix@verizon.net>
4227 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4229         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4230         that name for menuentries when appropriate.
4232 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4234         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4236 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4238         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4239         to Linux, simply abort telling the user it's no longer supported.
4241 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4243         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4244         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4245         `freebsd_loadenv' only when devices.hints exist.
4247 2009-04-13  Pavel Roskin  <proski@gnu.org>
4249         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4251 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4253         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4254         partition number.
4255         (grub_drive): Likewise.
4257 2009-04-13  David S. Miller  <davem@davemloft.net>
4259         * kern/sparc64/ieee1275/ieee1275.c: New file.
4260         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4261         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4262         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4263         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4264         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4265         grub_ieee1275_alloc_physmem): Declare new exported functions.
4267         * include/grub/sparc64/ieee1275/loader.h: New file.
4268         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4269         * include/grub/sparc64/kernel.h: Likewise.
4270         * loader/sparc64/ieee1275/linux.c: Likewise.
4272         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4273         (grub_fstest_SOURCES): Likewise.
4275         * util/hostdisk.c (make_device_name): Do not make any assumptions
4276         about the length of drive names.
4278         * kern/dl.c (grub_dl_load_file): Close file immediately when
4279         we are done using it.
4281 2009-04-12  David S. Miller  <davem@davemloft.net>
4283         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4284         values.  Noticed by Pavel Roskin.
4286         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4287         target compiler.
4289         * genmk.rb: Add more flexible image type specification, also
4290         pass --strip-unneeded to objcopy.
4291         * conf/i386-pc.rmk: Use *_FORMAT.
4292         * conf/i386-pc.mk: Rebuilt.
4294         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4295         (OFDISK_HASH_SZ): Define.
4296         (ofdisk_hash): New hash table.
4297         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4298         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4299         instead of device phandle which is not unique.
4301         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4302         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4303         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4304         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4305         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4306         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4307         GRUB_KERNEL_MACHINE_DATA_END): Define.
4308         (grub_kernel_image_size, grub_total_module_size): Declare.
4310 2009-04-12  Pavel Roskin  <proski@gnu.org>
4312          * configure.ac: Change the logic when we check for target tools.
4313          Do it when the target is specified and it's different from the
4314          specified value of the host.
4316 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4318         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4319         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4320         GNU/kFreeBSD. Check if a device is a character device. Use
4321         DIOCGMEDIASIZE to get the size.
4322         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4323         support for GNU/kFreeBSD.
4324         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4325         is a character device instead of a block device. Add support for
4326         FreeBSD device names.
4328         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4329         is a character device instead of a block device.
4331         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4332         is a character device instead of a block device.
4334 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4336         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4337         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4338         FreeBSD. Check if a device is a character device. Use
4339         DIOCGMEDIASIZE to get the size.
4340         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4341         support for FreeBSD.
4342         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4343         is a character device instead of a block device. Add support for
4344         FreeBSD device names.
4346         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4347         a character device instead of a block device.
4348         (grub_util_check_char_device): New function.
4350         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4351         a character device instead of a block device.
4353         * include/grub/util/getroot.h (grub_util_check_char_device): New
4354         prototype.
4356 2009-04-11  David S. Miller  <davem@davemloft.net>
4358         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4359         static libgcc.
4360         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4361         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4362         function, if present.
4363         (__bswapdi2): Likewise.
4365         * include/grub/sparc64/ieee1275/boot.h: New file.
4366         * boot/sparc64/ieee1275/boot.S: Likewise.
4367         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4369         * kern/misc.c (grub_ltoa): New function.
4370         (grub_vsprintf): Use it to format 'long' integers.
4372 2009-04-10  David S. Miller  <davem@davemloft.net>
4374         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4375         slots are of type grub_ieee1275_cell_t.
4376         (grub_nand_read): Likewise.
4377         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4378         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4379         macros are used to compare values in arg/ret block of the call.
4380         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4381         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4382         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4383         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4384         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4385         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4386         grub_ieee1275_close, grub_ieee1275_set_property,
4387         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4388         grub_ieee1275_cell_t.
4389         * kern/ieee1275/openfw.c (grub_map): Likewise.
4390         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4391         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4393         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4394         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4395         (grub_devalias_iterate): Likewise.
4397 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4399         UFS improvements
4401         * fs/ufs.c (INODE_NBLOCKS): new definition
4402         (struct grub_ufs_dirent): added fields for non-BSD dirents
4403         (grub_ufs_get_file_block): fixed double indirect handling
4404         (grub_ufs_lookup_symlink): use more robust way to determine whether
4405         symlink is inline
4406         (grub_ufs_find_file): support for non-BSD dirents
4407         (grub_ufs_dir): support for non-BSD dirents
4409 2009-04-10  Bean  <bean123ch@gnail.com>
4411         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4412         attribute, otherwise the size would be wrong for i386 platform.
4414         * include/grub/pci.h (grub_pci_read_word): New inline function.
4415         (grub_pci_read_byte): Likewise.
4416         (grub_pci_write): Likewise.
4417         (grub_pci_write_word): Likewise.
4418         (grub_pci_write_byte): Likewise.
4420         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4422         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4423         (find_framebuf): Scan pci to locate the frame buffer address.
4425         * commands/efi/fixvideo.c: New file.
4427         * commands/efi/loadbios.c: Likewise.
4429         * commands/memrw.c: Likewise.
4431         * util/grub-dumpbios.in: Likewise.
4433         * conf/common.rmk (grub-dumpbios): New utility.
4434         (pkglib_MODULES): New module memrw.mod.
4435         (memrw_mod_SOURCE): New macro.
4436         (memrw_mod_CFLAGS): Likewise.
4437         (memrw_mod_LDFLAGS): Likewise.
4439         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4440         fixvideo.mod.
4441         (loadbios_mod_SOURCE): New macro.
4442         (loadbios_mod_CFLAGS): Likewise.
4443         (loadbios_mod_LDFLAGS): Likewise.
4444         (fixvideo_mod_SOURCE): Likewise.
4445         (fixvideo_mod_CFLAGS): Likewise.
4446         (fixvideo_mod_LDFLAGS): Likewise.
4448         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4449         fixvideo.mod.
4450         (loadbios_mod_SOURCE): New macro.
4451         (loadbios_mod_CFLAGS): Likewise.
4452         (loadbios_mod_LDFLAGS): Likewise.
4453         (fixvideo_mod_SOURCE): Likewise.
4454         (fixvideo_mod_CFLAGS): Likewise.
4455         (fixvideo_mod_LDFLAGS): Likewise.
4457 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4459         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4461 2009-04-07  David S. Miller  <davem@davemloft.net>
4463         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4464         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4465         R_SPARC_WDISP30 case.
4466         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4468 2009-04-06  Pavel Roskin  <proski@gnu.org>
4470         * include/grub/misc.h (ARRAY_SIZE): New macro.
4471         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4472         New macro.
4473         * loader/i386/linux.c (allocate_pages): Use free_pages().
4474         (grub_linux_unload): Don't use free_pages().
4475         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4476         wrong index.  Treat all other modes as text modes.
4477         (grub_cmd_linux): Initialize vid_mode unconditionally to
4478         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4480         * commands/help.c (print_command_help): Use cmd->prio, not
4481         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4483 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4485         Parttool
4487         * parttool/pcpart.c: new file
4488         * commands/parttool.c: likewise
4489         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4490         (parttool_mod_SOURCES): new variable
4491         (parttool_mod_CFLAGS): likewise
4492         (parttool_mod_LDFLAGS): likewise
4493         (pcpart_mod_SOURCES): likewise
4494         (pcpart_mod_CFLAGS): likewise
4495         (pcpart_mod_LDFLAGS): likewise
4496         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4497         and parttool/pcpart.c
4498         * conf/i386-efi.rmk: likewise
4499         * conf/i386-ieee1275.rmk: likewise
4500         * conf/i386-pc.rmk: likewise
4501         * conf/powerpc-ieee1275.rmk: likewise
4502         * conf/sparc64-ieee1275.rmk: likewise
4503         * conf/x86_64-ieee1275.rmk: likewise
4505 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4507         Support for mtime and further expandability of dir command
4509         * include/grub/lib/datetime.h: moved to ...
4510         * include/grub/datetime.h: ... moved here and added
4511         declaration of grub_unixtime2datetime. All users updated
4512         * include/grub/fs.h: new syntax for dir and mtime functions in
4513         struct grub_fs
4514         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4515         and GRUB_FSHELP_FLAGS_MASK
4516         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4517         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4518         (grub_ext2_mtime): new function
4519         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4520         (grub_hfsplus_mtime): new function
4521         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4522         (GRUB_UFS_ATTR_FILE): likewise
4523         (GRUB_UFS_ATTR_LNK): likewise
4524         (struct grub_ufs_sblock): new fields mtime
4525         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4526         all users updated
4527         (grub_ufs_dir): mtime support
4528         (grub_ufs_mtime): new function
4529         * fs/affs.c (grub_affs_dir): use new dir syntax
4530         * fs/afs.c (grub_afs_dir): likewise
4531         * fs/cpio.c (grub_cpio_dir): likewise
4532         * fs/fat.c (grub_fat_find_dir): likewise
4533         * fs/hfs.c (grub_hfs_dir): likewise
4534         * fs/iso9660.c (grub_iso9660_dir): likewise
4535         * fs/jfs.c (grub_jfs_dir): likewise
4536         * fs/minix.c (grub_minix_dir): likewise
4537         * fs/ntfs.c (grub_ntfs_dir): likewise
4538         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4539         * fs/sfs.c (grub_sfs_dir): likewise
4540         * fs/xfs.c (grub_xfs_dir): likewise
4541         * util/hostfs.c (grub_hostfs_dir): likewise
4542         * lib/datetime.c: moved to ...
4543         * normal/datetime.c: ... moved here
4544         (grub_unixtime2datetime): new function
4545         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4546         * normal/completion.c (iterate_dir): use new dir syntax
4547         * normal/misc.c (grub_normal_print_device_info): tell the
4548         last modification time of a volume
4549         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4550         * conf/common.rmk: added lib/datetime.c to ls.mod
4551         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4552         (normal_mod_SOURCES): likewise
4553         (datetime_mod_SOURCES): Removed lib/datetime.c
4554         * conf/i386-efi.rmk: likewise
4555         * conf/i386-ieee1275.rmk: likewise
4556         * conf/i386-pc.rmk: likewise
4557         * conf/powerpc-ieee1275.rmk: likewise
4558         * conf/sparc64-ieee1275.rmk: likewise
4559         * conf/x86_64-efi.rmk: likewise
4561 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4563         Trim trailing spaces in FAT label and support mtools-like labels
4565         * fs/fat.c (grub_fat_iterate_dir): New function based
4566         on grub_fat_find_dir
4567         (grub_fat_find_dir): use grub_fat_iterate_dir
4568         (grub_fat_label): likewise
4570 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4572         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4573         and command.h
4574         remove extraneous kernel_elf_HEADERS
4576 2009-04-04  Bean  <bean123ch@gnail.com>
4578         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4580         * util/misc.c: Likewise.
4582 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4584         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4585         instead of grub_printf.
4587 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4589         * loader/i386/linux.c (grub_linux_setup_video): Fill
4590         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4591         values from `mode info' structure instead of hardcoded
4592         values.
4594 2009-04-01  Pavel Roskin  <proski@gnu.org>
4596         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4597         unused now.
4598         * genmk.rb: Likewise.
4599         * configure.ac: Likewise.
4601 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4603         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4604         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4606 2009-04-01  David S. Miller  <davem@davemloft.net>
4608         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4609         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4610         (grub_setjmp): Mark with 'returns_twice' attribute.
4611         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4612         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4613         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4615 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4617         Reapply fix from 2008-07-28 which was accidentally reverted; also
4618         perform the same fix to a similar check in same function.
4620         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4621         with the same number are found, just use issue a warning with
4622         grub_dprintf(), as this error has been reported to be non-fatal.
4624 2009-03-31  Pavel Roskin  <proski@gnu.org>
4626         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4627         for cross-compilation.
4629 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4631         Fix i386-ieee1275 build.
4633         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4634         Remove declaration.
4636 2009-03-30  Pavel Roskin  <proski@gnu.org>
4638         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4639         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4640         zero-terminated, rely only on the strlen value.  Fix comparison
4641         of strings differing in length.
4643 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4645         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4646         checking for abi version.  Improve error messages on BIOS to notify
4647         user about `linux16' command.
4649 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4651         Leak fixes
4653         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4654         in case of collision
4655         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4657 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4659         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4660         set `vid_mode' accordingly.
4661         (grub_linux_boot): Process `vid_mode' and set video mode.
4663 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4665         * util/grub.d/10_linux.in (linux_entry): New function.
4666         Factorize generation of Linux boot entries.
4668 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4670         Make the format of Environment Block plain text. The boot loader
4671         part is not tested well yet.
4673         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4674         (buffer): Removed.
4675         (envblk): Likewise.
4676         (usage): Remove "info" and "clear". Add "unset". Update the
4677         description of "set", as this does not delete variables any
4678         longer.
4679         (create_envblk_file): Complete rewrite.
4680         (open_envblk_file): Likewise.
4681         (cmd_info): Removed.
4682         (cmd_list): Likewise.
4683         (cmd_set): Likewise.
4684         (cmd_clear): Likewise.
4685         (list_variables): New function.
4686         (write_envblk): Likewise.
4687         (set_variables): Likewise.
4688         (unset_variables): Likewise.
4689         (main): Complete rewrite.
4691         * commands/loadenv.c (buffer): Removed.
4692         (envblk): Likewise.
4693         (open_envblk_file): New function.
4694         (read_envblk_file): Complete rewrite.
4695         (grub_cmd_load_env): Likewise.
4696         (grub_cmd_list_env): Likewise.
4697         (struct blocklist): New struct.
4698         (free_blocklists): New function.
4699         (check_blocklists): Likewise.
4700         (write_blocklists): Likewise.
4701         (grub_cmd_save_env): Complete rewrite.
4703         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4704         a plain text signature.
4705         (GRUB_ENVBLK_MAXLEN): Removed.
4706         (struct grub_envblk): Complete rewrite.
4707         (grub_envblk_find): Removed.
4708         (grub_envblk_insert): Likewise.
4709         (grub_envblk_open): New prototype.
4710         (grub_envblk_set): Likewise.
4711         (grub_envblk_delete): Put const to VALUE.
4712         (grub_envblk_iterate): Put const to NAME and VALUE.
4713         (grub_envblk_close): New prototype.
4714         (grub_envblk_buffer): New inline function.
4715         (grub_envblk_size): Likewise.
4717         * lib/envblk.c: Include grub/mm.h.
4718         (grub_env_find): Removed.
4719         (grub_envblk_open): New function.
4720         (grub_envblk_close): Likewise.
4721         (escaped_value_len): Likewise.
4722         (find_next_line): Likewise.
4723         (grub_envblk_insert): Removed.
4724         (grub_envblk_set): New function.
4725         (grub_envblk_delete): Complete rewrite.
4726         (grub_envblk_iterate): Likewise.
4728 2009-03-28  Robert Millan  <rmh@aybabtu.com>
4730         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4731         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4732         variables.  Use 16-bit loader.
4733         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4734         loader.
4735         * kern/i386/loader.S (grub_linux_boot): Rename to ...
4736         (grub_linux16_boot): ... this.  Update all users.
4737         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4738         (grub_linux_boot): ... this.  Update all users.
4740         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4741         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
4742         commands to `linux16' and `initrd16'.
4743         (GRUB_MOD_FINI(linux)): Rename to ...
4744         (GRUB_MOD_FINI(linux16)): ... this.
4746 2009-03-24  Pavel Roskin  <proski@gnu.org>
4748         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4749         not just for compilation.
4751 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
4753         Move multiboot helper out of kernel
4755         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4756         `loader/i386/multiboot_helper.S'.
4757         * conf/i386-coreboot.rmk: Likewise
4758         * conf/i386-ieee1275.rmk: Likewise
4760         * kern/i386/loader.S: Move multiboot helpers from here...
4761         * loader/i386/multiboot_helper.S: ...moved here
4762         * include/grub/i386/loader.h: Move declarations of multiboot
4763         helpers from here...
4764         * include/grub/i386/multiboot.h: ...moved here
4765         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4767 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4769         * kern/env.c (grub_env_context_open): Added an argument to specify
4770         whether a new context inherits exported variables from current
4771         one. This is useful when making a sandbox to interpret a config
4772         file.
4773         All callers updated.
4775         * include/grub/env.h (grub_env_context_open): Updated the prototype.
4777 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4779         * kern/env.c (grub_env_context_close): Fix memory leaks.
4781 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4783         * normal/main.c (grub_normal_execute): Added an argument
4784         BATCH to specify if an interactive interface should be provided
4785         after reading a config file.
4786         All callers updated.
4787         (read_command_list): Prevent being executed twice.
4788         (read_fs_list): Likewise.
4790         * include/grub/normal.h (grub_normal_execute): Updated the
4791         prototype.
4793 2009-03-22  Pavel Roskin  <proski@gno.org>
4795         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4796         _start.
4797         * kern/i386/pc/startup.S: Likewise.
4798         * kern/i386/efi/startup.S: Likewise.
4799         * kern/i386/ieee1275/startup.S: Likewise.
4800         * kern/i386/coreboot/startup.S: Likewise.
4801         * kern/x86_64/efi/startup.S: Likewise.
4803         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4804         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4805         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4807 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
4809         Bugfixes in multiboot for bugs uncovered by solaris kernel.
4811         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4812         limit detection.
4813         Use vaddr of correct segment for entry_point.
4815 2009-03-21  Bean  <bean123ch@gmail.com>
4817         * commands/blocklist.c: Add include file <grub/command.h>, remove
4818         <grub/normal.h> and <grub/arg.h>.
4819         (grub_cmd_blocklist): Use the new command interface.
4820         (GRUB_MOD_INIT): Likewise.
4821         (GRUB_MOD_FINI): Likewise.
4822         * commands/boot.c: Likewise.
4823         * commands/cat.c: Likewise.
4824         * commands/cmp.c: Likewise.
4825         * commands/configfile.c: Likewise.
4826         * commands/crc.c: Likewise.
4827         * commands/echo.c: Likewise.
4828         * commands/halt.c: Likewise.
4829         * commands/handler.c: Likewise.
4830         * commands/hdparm.c: Likewise.
4831         * commands/help.c: Likewise.
4832         * commands/hexdump.c: Likewise.
4833         * commands/loadenv.c: Likewise.
4834         * commands/ls.c: Likewise.
4835         * commands/lsmmap.c: Likewise.
4836         * commands/lspci.c: Likewise.
4837         * commands/loadenv.c: Likewise.
4838         * commands/read.c: Likewise.
4839         * commands/reboot.c: Likewise.
4840         * commands/search.c: Likewise.
4841         * commands/sleep.c: Likewise.
4842         * commands/test.c: Likewise.
4843         * commands/usbtest.c: Likewise.
4844         * commands/videotest.c: Likewise.
4845         * commands/i386/cpuid.c: Likewise.
4846         * commands/i386/pc/halt.c: Likewise.
4847         * commands/i386/pc/play.c: Likewise.
4848         * commands/i386/pc/pxecmd.c: Likewise.
4849         * commands/i386/pc/vbeinfo.c: Likewise.
4850         * commands/i386/pc/vbetest.c: Likewise.
4851         * commands/ieee1275/suspend.c: Likewise.
4852         * disk/loopback.c: Likewise.
4853         * font/font_cmd.c: Likewise.
4854         * hello/hello.c: Likewise.
4855         * loader/efi/appleloader.c: Likewise.
4856         * loader/efi/chainloader.c: Likewise.
4857         * loader/i386/bsd.c: Likewise.
4858         * loader/i386/efi/linux.c: Likewise.
4859         * loader/i386/ieee1275/linux.c: Likewise.
4860         * loader/i386/linux.c: Likewise.
4861         * loader/i386/pc/chainloader.c: Likewise.
4862         * loader/i386/pc/linux.c: Likewise.
4863         * loader/powerpc/ieee1275/linux.c: Likewise.
4864         * loader/multiboot_loader.c: Likewise.
4865         * term/gfxterm.c: Likewise.
4866         * term/i386/pc/serial.c: Likewise.
4867         * term/terminfo.c: Likewise.
4869         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4870         * term/i386/pc/vga.c: Likewise.
4871         * video/readers/jpeg.c: Likewise.
4872         * video/readers/png.c: Likewise.
4873         * video/readers/tga.c: Likewise.
4875         * util/grub-fstest (cmd_loopback): Removed.
4876         (cmd_blocklist): Likewise.
4877         (cmd_ls): Likewise.
4878         (grub_register_command): Likewise.
4879         (grub_unregister_command): Likewise.
4880         (execute_command): Use grub_command_find to locate command and execute
4881         it.
4883         * include/grub/efi/chainloader.h: Removed.
4884         * loader/efi/chainloader_normal.c: Likewise.
4885         * loader/i386/bsd_normal.c: Likewise.
4886         * loader/i386/pc/chainloader_normal.c: Likewise.
4887         * loader/i386/pc/multiboot_normal.c: Likewise.
4888         * loader/linux_normal.c: Likewise.
4889         * loader/multiboot_loader_normal.c: Likewise.
4890         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4892         * gencmdlist.sh: Scan new registration command grub_register_extcmd
4893         and grub_register_command_p1.
4895         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4896         kern/command.c, lib/arg.c and commands/extcmd.c.
4897         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4898         (minicmd_mod_SOURCES): New variable.
4899         (minicmd_mod_CFLAGS): Likewise.
4900         (minicmd_mod_LDFLAGS): Likewise.
4901         (extcmd_mod_SOURCES): Likewise.
4902         (extcmd_mod_CFLAGS): Likewise.
4903         (extcmd_mod_LDFLAGS): Likewise.
4904         (boot_mod_SOURCES): Removed.
4905         (boot_mod_CFLAGS): Likewise.
4906         (boot_mod_LDFLAGS): Likewise.
4908         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4909         kern/corecmd.c.
4910         (kernel_img_HEADERS): Add command.h.
4911         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4912         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4913         and lib/arg.c.
4914         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4915         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4916         remove the corresponding normal mode command.
4917         (normal_mod_SOURCES): Remove normal/arg.c.
4918         * conf/i386-coreboot.rmk: Likewise.
4919         * conf/i386-efi.rmk: Likewise.
4920         * conf/i386-ieee1275.rmk: Likewise.
4921         * conf/powerpc-ieee1275.rmk: Likewise.
4922         * conf/x86_64-efi.rmk: Likewise.
4924         * include/grub/arg.h: Move from here ...
4925         * include/grub/lib/arg.h: ... to here.
4927         * normal/arg.c: Move from here ...
4928         * lib/arg.c: ... to here.
4930         * commands/extcmd.c: New file.
4931         * commands/minicmd.c: Likewise.
4932         * include/grub/command.h: Likewise.
4933         * include/grub/extcmd.h: Likewise.
4934         * kern/command.c: Likewise.
4935         * kern/corecmd.c: Likewise.
4937         * kern/list.c (grub_list_iterate): Return int instead of void.
4938         (grub_list_insert): New function.
4939         (grub_prio_list_insert): Likewise.
4941         * kern/rescue.c (grub_rescue_command): Removed.
4942         (grub_rescue_command_list): Likewise.
4943         (grub_rescue_register_command): Likewise.
4944         (grub_rescue_unregister_command): Likewise.
4945         (grub_rescue_cmd_boot): Move to minicmd.c
4946         (grub_rescue_cmd_help): Likewise.
4947         (grub_rescue_cmd_info): Likewise.
4948         (grub_rescue_cmd_boot): Likewise.
4949         (grub_rescue_cmd_testload): Likewise.
4950         (grub_rescue_cmd_dump): Likewise.
4951         (grub_rescue_cmd_rmmod): Likewise.
4952         (grub_rescue_cmd_lsmod): Likewise.
4953         (grub_rescue_cmd_exit): Likewise.
4954         (grub_rescue_print_devices): Moved to corecmd.c.
4955         (grub_rescue_print_files): Likewise.
4956         (grub_rescue_cmd_ls): Likewise.
4957         (grub_rescue_cmd_insmod): Likewise.
4958         (grub_rescue_cmd_set): Likewise.
4959         (grub_rescue_cmd_unset): Likewise.
4960         (attempt_normal_mode): Use grub_command_find to get normal module.
4961         (grub_enter_rescue_mode): Use grub_register_core_commands to register
4962         commands, remove grub_rescue_register_command calls.
4964         * normal/command.c (grub_register_command): Removed.
4965         (grub_unregister_command): Likewise.
4966         (grub_command_find): Likewise.
4967         (grub_iterate_commands): Likewise.
4968         (rescue_command): Likewise.
4969         (export_command): Moved to corecmd.c.
4970         (set_command): Removed.
4971         (unset_command): Likewise.
4972         (insmod_command): Likewise.
4973         (rmmod_command): Likewise.
4974         (lsmod_command): Likewise.
4975         (grub_command_init): Likewise.
4977         * normal/completion.c (iterate_command): Use cmd->prio to check for
4978         active command.
4979         (complete_arguments): Use grub_extcmd_t structure to find options.
4980         (grub_normal_do_completion): Change function grub_iterate_commands to
4981         grub_command_iterate.
4983         * normal/execute.c (grub_script_execute_cmd): No need to parse
4984         argument here.
4986         * normal/main.c (grub_dyncmd_dispatcher): New function.
4987         (read_command_list): Register unload commands as dyncmd.
4988         (grub_cmd_normal): Use new command interface, register rescue,
4989         unregister normal at entry, register normal, unregister rescue at exit.
4991         * include/grub/list.h (grub_list_test_t): New type.
4992         (grub_list_iterate): Return int instead of void.
4993         (grub_list_insert): New function.
4994         (GRUB_AS_NAMED_LIST_P): New macro.
4995         (GRUB_AS_PRIO_LIST): Likewise.
4996         (GRUB_AS_PRIO_LIST_P): Likewise.
4997         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4998         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4999         (grub_prio_list): New structure.
5000         (grub_prio_list_insert): New function.
5001         (grub_prio_list_remove): New inline function.
5003         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5004         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5005         (GRUB_COMMAND_FLAG_MENU): Likewise.
5006         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5007         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5008         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5009         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5010         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5011         (grub_command): Likewise.
5012         (grub_register_command): Likewise.
5013         (grub_command_find): Likewise.
5014         (grub_iterate_commands): Likewise.
5015         (grub_command_init): Likewise.
5016         (grub_arg_parse): Likewise.
5017         (grub_arg_show_help): Likewise.
5019         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5020         (grub_rescue_unregister_command): Likewise.
5022         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5023         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5024         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5026         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5027         grub_rescue_cmd_initrd.
5028         * include/grub/i386/loader.h: Likewise.
5029         * include/grub/x86_64/loader.h: Likewise.
5031         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5033 2009-03-21  Bean  <bean123ch@gmail.com>
5035         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5036         instead of stat in mingw environment.
5038         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5040         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5042         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5043         AC_CONFIG_LINKS.
5045 2009-03-21  Bean  <bean123ch@gmail.com>
5047         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5048         out of range error.
5050 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5052         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5053         checking inode flags for EXT4_EXTENTS_FLAG.
5055 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5057         * loader/i386/linux.c: Include `<grub/video.h>' and
5058         `<grub/i386/pc/vbe.h>'..
5059         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5060         (grub_linux32_boot): Attempt to configure video settings with
5061         grub_linux_setup_video().
5062         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5063         to avoid grub_console_fini() which would step out of graphical mode
5064         unconditionally.
5066 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5068         Fix build on powerpc.
5069         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5071 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5073         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5074         background image command.
5076 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5078         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5079         (grub_gfxterm_putchar): Extract pairs of identical calls to
5080         draw_cursor out of conditional blocks.
5082 2009-03-11  Pavel Roskin  <proski@gnu.org>
5084         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5085         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5087 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5089         * loader/i386/multiboot_elfxx.c
5090         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5092 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5094         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5095         `kern/handler.c'.
5097 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5099         * loader/i386/multiboot.c (code_size): New variable.
5100         (grub_multiboot): Define offsets by adding to `code_size' rather
5101         than subtracting from `grub_multiboot_payload_size'.  Provide
5102         4-byte alignment to MBI and others by increasing
5103         `boot_loader_name_length' appropriately.
5105         * loader/i386/multiboot_elfxx.c
5106         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5108 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5110         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5111         `fs/ext2.c'.
5113 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5115         Make loader/i386/linux.c usable on i386-pc again.
5117         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5118         memory to heap.
5119         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5120         `#error' stanza.
5122 2009-03-07  Bean  <bean123ch@gmail.com>
5124         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5125         allocation.
5127 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5129         Fix display issue on terminals with screen size other than 80x25
5130         (e.g. gfxterm with resolution higher than 640x480).
5132         * normal/main.c (grub_normal_init_page): Display title text in a
5133         position relative to the center of the terminal instead of relying
5134         on a hardcoded offset.
5136 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5138         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5139         installed.
5141         * Makefile.in (host_kernel): New variable.
5142         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5143         scripts instead of just the windows one.
5144         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5146 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5148         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5149         `kern/handler.c'.
5150         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5151         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5152         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5153         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5154         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5155         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5157 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5159         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5160         or if there's no space for the disk label and print the partition number on a
5161         invalid magic.
5163 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5165         * util/misc.c: Include <time.h>.
5166         (grub_millisleep): New function.
5168 2009-03-04  Bean  <bean123ch@gmail.com>
5170         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5171         another option -mno-red-zone.
5173         * commands/handler.c: Change module description.
5175         * kern/handler.c: Add missing space at the end of description line.
5177         * kern/list.c: Likewise.
5179 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5181         Move more components to the relocation area, and fix mbi pointer
5182         handling to use the destination rather than the origin (thanks to
5183         Vladimir Serbinenko for spotting).
5185         * loader/i386/multiboot.c (mbi_dest): New variable.
5186         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5187         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5188         relocation area.
5190 2009-03-01  Bean  <bean123ch@gmail.com>
5192         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5193         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5194         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5195         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5197         * loader/i386/efi/linux.c (acpi_guid): New variable.
5198         (acpi_guid): Likewise.
5199         (EBDA_SEG_ADDR): New constant.
5200         (LOW_MEM_ADDR): Likewise.
5201         (FAKE_EBDA_SEG): Likewise.
5202         (fake_bios_data): New function.
5203         (grub_linux_boot): Call fake_bios_data.
5205 2009-03-01  Bean  <bean123ch@gmail.com>
5207         * commands/terminal.c: Removed.
5209         * commands/handler.c: New file.
5211         * include/grub/list.h: Likewise.
5213         * include/grub/handler.h: Likewise.
5215         * kern/list.c: Likewise.
5217         * kern/handler.c: Likewise.
5219         * kern/term.h: Include header file <grub/handler.h>.
5220         (grub_term_input): Move next field to the beginning.
5221         (grub_term_output): Likewise.
5222         (grub_term_input_class): New variable.
5223         (grub_term_output_class): Likewise.
5224         (grub_term_register_input): Changed to inline function.
5225         (grub_term_register_output): Likewise.
5226         (grub_term_unregister_input): Likewise.
5227         (grub_term_unregister_output): Likewise.
5228         (grub_term_set_current_input): Likewise.
5229         (grub_term_set_current_output): Likewise.
5230         (grub_term_get_current_input): Likewise.
5231         (grub_term_get_current_output): Likewise.
5232         (grub_term_iterate_input): Removed.
5233         (grub_term_iterate_output): Likewise.
5235         * kern/term.c (grub_term_list_input): Removed.
5236         (grub_term_list_output): Likewise.
5237         (grub_term_input_class): New variable.
5238         (grub_term_output_class): Likewise.
5239         (grub_cur_term_input): Change variable as macro.
5240         (grub_cur_term_output): Likewise.
5241         (grub_term_register_input): Removed.
5242         (grub_term_register_output): Likewise.
5243         (grub_term_unregister_input): Likewise.
5244         (grub_term_unregister_output): Likewise.
5245         (grub_term_set_current_input): Likewise.
5246         (grub_term_set_current_output): Likewise.
5247         (grub_term_iterate_input): Likewise.
5248         (grub_term_iterate_output): Likewise.
5249         (grub_term_get_current_input): Likewise.
5250         (grub_term_get_current_output): Likewise.
5252         * util/grub-editenv.c: Include header file <grub/handler.h>.
5253         (grub_term_get_current_input): Removed.
5254         (grub_term_get_current_output): Likewise.
5255         (grub_term_input_class): New variable.
5256         (grub_term_output_class): Likewise.
5258         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5259         (grub_term_get_current_output): Likewise.
5260         (grub_term_input_class): New variable.
5261         (grub_term_output_class): Likewise.
5263         * util/grub-probe.c (grub_term_get_current_input): Removed.
5264         (grub_term_get_current_output): Likewise.
5265         (grub_term_input_class): New variable.
5266         (grub_term_output_class): Likewise.
5268         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5269         (grub_term_get_current_output): Likewise.
5270         (grub_term_input_class): New variable.
5271         (grub_term_output_class): Likewise.
5273         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5274         (terminal_mod_SOURCES): Likewise.
5275         (terminal_mod_CFLAGS): Likewise.
5276         (terminal_mod_LDFLAGS): Likewise.
5278         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5279         handler.c.
5280         (kernel_img_SOURCES): Add list.c and handler.c.
5281         (kernel_img_HEADERS): Add list.h and handler.h.
5283         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5284         handler.c.
5285         (kernel_mod_SOURCES): Add list.c and handler.c.
5286         (kernel_mod_HEADERS): Add list.h and handler.h.
5288         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5289         handler.c.
5290         (kernel_elf_SOURCES): Add list.c and handler.c.
5291         (kernel_elf_HEADERS): Add list.h and handler.h.
5293         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5294         handler.c.
5295         (kernel_elf_SOURCES): Add list.c and handler.c.
5296         (kernel_elf_HEADERS): Add list.h and handler.h.
5298         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5299         handler.c.
5300         (kernel_mod_SOURCES): Add list.c and handler.c.
5301         (kernel_mod_HEADERS): Add list.h and handler.h.
5303         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5304         handler.c.
5305         (kernel_elf_SOURCES): Add list.c and handler.c.
5306         (kernel_elf_HEADERS): Add list.h and handler.h.
5308 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5310         Factorize elf32 / elf64 code in Multiboot loader.  This will
5311         prevent it from getting out of sync again.
5313         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5314         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5315         grub_multiboot_load_elf64): Move from here ...
5316         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5317         grub_multiboot_load_elf): ... to here (new file).
5319 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5321         * util/grub.d/10_linux.in: Rename "single-user mode" to
5322         "recovery mode".
5324 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5326         Don't leak in SCSI code.
5327         * disk/scsi.c (grub_scsi_close): free `scsi'.
5329 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5331         * loader/i386/pc/multiboot.c: Move from here ...
5332         * loader/i386/multiboot.c: ... to here.  Update all users.
5334 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5336         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5337         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5339 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5341         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5342         b-tree.
5344 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5346         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5347         `0x' qualifier as 0 when base is specified as parameter).
5349 2009-02-24  Bean  <bean123ch@gmail.com>
5351         * configure.ac: Check for -mcmodel=large in x86_64 target.
5353         * include/grub/efi/api.h (efi_call_10): New macro.
5354         (efi_wrap_10): New function.
5356         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5357         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5358         (GRUB_PE32_REL_BASED_LOW): Likewise.
5359         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5360         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5361         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5362         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5363         (GRUB_PE32_REL_BASED_REL): Likewise.
5364         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5365         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5366         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5368         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5369         issue.
5371         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5372         (efi_wrap_10): New function.
5374         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5376         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5377         MB/MBP model (NV chipset).
5378         (devdata_devs): Add devpath_5 to the list.
5380         * load/i386/efi/linux.c (video_base): Remove variable.
5381         (RGB_MASK): New macro.
5382         (RGB_MAGIC): Likewise.
5383         (LINE_MIN): Likewise.
5384         (LINE_MAX): Likewise.
5385         (FBTEST_STEP): Likewise.
5386         (FBTEST_COUNT): Likewise.
5387         (fb_list): New variable.
5388         (grub_find_video_card): Remove function.
5389         (find_framebuf): New function.
5390         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5391         line length.
5393         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5394         problem for x86_64.
5396 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5398         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5400         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5401         coding tool name.
5403 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5405         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5406         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5407         in our relocation, instead of using it directly from heap.  Also
5408         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5410 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5412         Implement USB keyboard support (based on patch by Marco Gerards)
5414         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5415         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5416         (usb_keyboard_mod_LDFLAGS): New variables.
5418         * term/usb_keyboard.c: New file.
5420 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5422         Corrected wrong declaration
5424         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5426 2009-02-14  Christian Franke  <franke@computer.org>
5428         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5429         (grub_lspci_iter): Print class code and programming interface byte.
5431 2009-02-14  Christian Franke  <franke@computer.org>
5433         * gendistlist.sh: Ignore `.svn' directories.
5435 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5437         * fs/fat.c: Add 2009 to Copyright line.
5439 2009-02-14  Christian Franke  <franke@computer.org>
5441         * commands/hdparm.c: New file.  Provides `hdparm' command
5442         which sends ATA commands via grub_disk_ata_pass_through ().
5444         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5446         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5447         and <grub/cpu/io.h> to include/grub/ata.h.
5448         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5449         (GRUB_CDROM_SECTOR_SIZE): Remove.
5450         (GRUB_ATA_*): Move to include/grub/ata.h.
5451         (GRUB_ATAPI_*): Likewise.
5452         (enum grub_ata_commands): Likewise.
5453         (enum grub_ata_timeout_milliseconds): Likewise.
5454         (struct grub_ata_device): Likewise.
5455         (grub_ata_regset): Likewise.
5456         (grub_ata_regget): Likewise.
5457         (grub_ata_regset2): Likewise.
5458         (grub_ata_regget2): Likewise.
5459         (grub_ata_check_ready): Likewise.
5460         (grub_ata_wait_not_busy): Remove static, exported in
5461         include/grub/ata.h.
5462         (grub_ata_wait_drq): Likewise.
5463         (grub_ata_pio_read): Likewise.
5465         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5466         function for hdparm.mod.
5468         * include/grub/ata.h: New file, contains declarations from
5469         disk/ata.c.
5470         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5472         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5473         (grub_disk_ata_pass_through): New exported variable.
5475         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5477 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5479         Support multiple fallback entries, and provide an API to support
5480         executing default+fallback menu entries.  Renamed the `terminal' menu
5481         viewer to `text'.
5483         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5484         variable declaration.
5485         (grub_menu_execute_callback): New structure declaration.
5486         (grub_menu_execute_callback_t): New typedef.
5487         (grub_menu_execute_with_fallback): New function declaration.
5488         (grub_menu_get_entry): Likewise.
5489         (grub_menu_get_timeout): Likewise.
5490         (grub_menu_set_timeout): Likewise.
5492         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5494         * normal/menu.c (grub_wait_after_message): Moved to
5495         `normal/menu_text.c'.
5496         (draw_border): Likewise.
5497         (print_message): Likewise.
5498         (print_entry): Likewise.
5499         (print_entries): Likewise.
5500         (grub_menu_init_page): Likewise.
5501         (get_entry_number): Likewise.
5502         (print_timeout): Likewise.
5503         (run_menu): Likewise.
5504         (grub_menu_execute_entry): Likewise.
5505         (show_text_menu): Likewise.
5506         (get_and_remove_first_entry_number): New function.
5507         (grub_menu_execute_with_fallback): Likewise.
5508         (get_entry): Renamed to ...
5509         (grub_menu_get_entry): .. this and made it global.
5510         (get_timeout): Renamed to ...
5511         (grub_menu_get_timeout): ... this and made it global.
5512         (set_timeout): Renamed to ...
5513         (grub_menu_set_timeout): ... this and made it global.
5514         (grub_normal_terminal_menu_viewer): Renamed to ...
5515         (grub_normal_text_menu_viewer): ... this.
5517         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5518         from normal/menu.c.
5520         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5521         (normal_mod_SOURCES): Likewise.
5523         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5524         (normal_mod_SOURCES): Likewise.
5526         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5527         (normal_mod_SOURCES): Likewise.
5529         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5530         (normal_mod_SOURCES): Likewise.
5532         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5533         (normal_mod_SOURCES): Likewise.
5535         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5536         (normal_mod_SOURCES): Likewise.
5538         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5539         (normal_mod_SOURCES): Likewise.
5541 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5543         * util/grub.d/00_header.in: Update old reference to `font' command.
5545 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5547         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5549         Based on patch from Javier Martín.
5551 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5553         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5554         to avoid false positives with FAT.
5555         (grub_fstest_SOURCES): Likewise.
5556         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5557         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5558         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5559         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5560         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5561         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5563 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5565         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5566         bpb.version_specific.fat12_or_fat16.fstype and
5567         bpb.version_specific.fat32.fstype.
5569 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5571         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5573 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5575         * Makefile.in (host_os, host_cpu): New variables.
5576         (target_os): Remove.  Update all users.
5578 2009-02-08  Marco Gerards  <marco@gnu.org>
5580         * Makefile.in (enable_grub_emu_usb): New variable.
5581         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5582         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5583         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5584         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5585         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5586         `usbtest.mod' and `usbms.mod'.
5587         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5588         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5589         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5590         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5591         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5592         variables.
5594         * disk/usbms.c: New file.
5596         * include/grub/usb.h: Likewise.
5598         * include/grub/usbtrans.h: Likewise.
5600         * include/grub/usbdesc.h: Likewise.
5602         * bus/usb/usbtrans.c: Likewise.
5604         * bus/usb/ohci.c: Likewise.
5606         * bus/usb/uhci.c: Likewise.
5608         * bus/usb/usbhub.c: Likewise.
5610         * bus/usb/usb.c: Likewise.
5612         * commands/usbtest.c: Likewise.
5614         * util/usb.c: Likewise.
5616         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5618         * configure.ac: Test for libusb presence.
5620         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5622 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5624         * kern/mm.c: Add more comments.
5626 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5628         Patch from Javier Martín.
5629         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5630         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5632 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5634         * fs/cpio.c: Split tar functionality to ...
5635         * fs/tar.c: ... here (new file).  Update all users.
5637 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5639         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5640         backward-incompatible features.
5642         Based on patch from Javier Martín, with some adjustments.
5644 2009-02-07  Michael Scherer  <misc@mandriva.org>
5646         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5648 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5650         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5651         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5652         after the RAID stuff.
5654 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5656         Fixes problem when running vbetest command as reported by
5657         Vladimir Serbinenko <phcoder@gmail.com>.
5659         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5661 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5663         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5664         /dev/md/NpN style mdraid devices.
5666 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5668         * util/unifont2pff.rb: Remove.
5670 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5672         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5673         `#'.
5675 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5677         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5678         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5679         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5680         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5681         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5682         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5683         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5685 2009-02-02  Christian Franke  <franke@computer.org>
5687         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5689 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
5691         * INSTALL: Note that we now require at least autoconf 2.59 and
5692         that LZO is optional.
5694 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5696         Base on patch on bug #24154 created by Tomas Tintera
5697         <trosos@seznam.cz>.
5699         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5701 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5703         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5704         <bero@arklinux.org>.
5706         * normal/parser.y (script_init): Add missing semicolon.
5708 2009-01-31  Colin D Bennett  <colin@gibibit.com>
5710         * normal/main.c: Add include to grub/menu_viewer.h.
5711         (free_menu_entry_classes): Added.
5712         (grub_normal_menu_addentry): Added class property handling.
5713         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5714         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5716         * normal/menu_viewer.c: New file.
5718         * normal/menu.c (run_menu_entry): Renamed to ...
5719         (grub_menu_execute_entry): ... this and made it as global.
5720         (grub_menu_run): Renamed to ...
5721         (show_text_menu): ... this and made it local.
5722         (show_text_menu): Adapt to new function names.
5723         (grub_normal_terminal_menu_viewer): New global variable.
5725         * include/grub/menu.h: New file.
5727         * include/grub/menu_viewer.h: New file.
5729         * include/grub/normal.h: Added include to grub/menu.h.
5730         (grub_menu_entry): Moved to include/grub/menu.h.
5731         (grub_menu_entry_t): Likewise.
5732         (grub_menu): Likewise.
5733         (grub_menu_t): Likewise.
5734         (grub_normal_terminal_menu_viewer): Added.
5735         (grub_menu_execute_entry): Likewise.
5736         (grub_menu_run): Removed.
5738         * DISTLIST: Added include/grub/menu.h.
5739         Added include/grub/menu_viewer.h.
5740         Added normal/menu_viewer.c.
5742 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
5744         * normal/execute.c (grub_script_execute_menuentry): Changed to use
5745         arglist for menutitle arguments.
5747         * normal/main.c (grub_normal_menu_addentry): Likewise.
5749         * normal/parser.y (menuentry): Likewise.
5751         * normal/script.c (grub_script_create_cmdmenu): Likewise.
5753         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5754         (grub_script_create_cmdmenu): Likewise.
5756         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5758         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5759         changes.
5761         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5763         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5765         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5767         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5769         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5771         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5773 2009-01-30  Christian Franke  <franke@computer.org>
5775         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5776         in option help text.
5778 2009-01-27  Pavel Roskin  <proski@gnu.org>
5780         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5782 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5784         * commands/lsmmap.c: Add include to grub/machine/memory.h.
5786         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5788         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5789         unregister function.
5791 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5793         * disk/scsi.c (grub_scsi_read): Fix sign problem.
5795         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5797         * util/grub-mkfont.c (usage): Fix typo.
5799         * util/elf/grub-mkimage.c (load_modules): Fix warning.
5801 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
5803         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5805         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5807         * kern/misc.c (grub_strcasecmp): New function.
5808         (grub_strcasecmp): Use grub_size_t instead of int for length.
5809         Fix return value.
5810         * include/grub/misc.h: Update function prototypes.
5812 2009-01-26  Robert Millan  <rmh@aybabtu.com>
5814         * configure.ac: Fix cross-compilation check.
5816 2009-01-22  Christian Franke  <franke@computer.org>
5818         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5819         (precision) digit string.  Allow `.format2' without `format1' (width).
5820         Limit input chars for `%s' output to `format2' if specified.  This is
5821         compatible with standard printf ().
5823 2009-01-22  Christian Franke  <franke@computer.org>
5825         * disk/ata.c (grub_ata_wait_status): Replace by ...
5826         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
5827         other status bits may be invalid while BSY is asserted.
5828         (grub_ata_check_ready): New function.
5829         (grub_ata_cmd): Removed.
5830         (grub_ata_wait_drq): New function.
5831         (grub_ata_strncpy): Remove inline.
5832         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
5833         and error check now done by grub_ata_wait_drq ().
5834         (grub_ata_pio_write): Likewise.
5835         (grub_atapi_identify): Set DEV before check for !BSY.  Use
5836         grub_ata_wait_drq () to wait for data.
5837         (grub_ata_device_initialize): Add status register check to
5838         detect missing SATA slave devices.  Add debug messages.
5839         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5840         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
5841         transfer loop by grub_ata_pio_write ().
5842         (grub_ata_identify): Set DEV before check for !BSY. Use
5843         grub_ata_wait_drq () to wait for data.
5844         (grub_ata_setaddress): Set DEV before check for !BSY.
5845         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5846         read/write in one loop.  Fix invalid command on write.  Fix incomplete
5847         command on (size % batch) == 0.  Add missing error check after write of
5848         last block.  Add debug messages.
5849         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
5851 2009-01-19  Christian Franke  <franke@computer.org>
5853         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5854         (GRUB_ATAPI_IREASON_*): Likewise.
5855         (grub_ata_pio_write): Fix timeout error return.
5856         (grub_atapi_identify): Add grub_ata_wait () after cmd.
5857         (grub_atapi_wait_drq): New function.
5858         (grub_atapi_packet): New parameter `size'.
5859         Use grub_atapi_wait_drq () and direct write instead of
5860         grub_ata_pio_write ().
5861         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5862         reads the number of bytes requested by the device for each DRQ
5863         assertion.
5864         (grub_atapi_write): Remove old implementation, return not
5865         implemented instead.
5867 2009-01-19  Christian Franke  <franke@computer.org>
5869         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5870         of 512 to calculate data size.
5871         (grub_scsi_read12): Likewise.
5872         (grub_scsi_write10): Likewise.
5873         (grub_scsi_write12): Likewise.
5874         (grub_scsi_read): Adjust size according to blocksize.
5875         Add checks for invalid blocksize and unaligned transfer.
5877 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
5879         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5881         * term/gfxterm.c (write_char): Fix background rendering for wide
5882         width glyphs.
5884 2009-01-19  Robert Millan  <rmh@aybabtu.com>
5886         * config.guess: Update to latest version from config git.
5887         * config.sub: Likewise.
5889 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
5891         * Makefile.in: Change font compilation to use new grub-mkfont instead
5892         of java version.
5894         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5895         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5896         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5897         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5898         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5899         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5900         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5901         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5902         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5904 2009-01-16  Christian Franke  <franke@computer.org>
5906         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5907         (enum grub_ata_timeout_milliseconds): New enum.
5908         (grub_ata_wait_status): Add parameter milliseconds.
5909         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
5910         recovery from timed-out commands.
5911         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
5912         return grub_errno instead of REG_ERROR.
5913         (grub_ata_pio_write): Add parameter milliseconds.
5914         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5915         Pass milliseconds to grub_ata_wait_status () and
5916         grub_ata_pio_read ().
5917         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5918         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
5919         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
5920         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5921         It is not suitable for device detection, because DEV bit is ignored,
5922         the command may run too long, and not all devices set the signature
5923         properly.
5924         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5925         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5926         Fix device selection, DEV bit must be set first to address the registers
5927         of the correct device.
5928         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5929         grub_ata_pio_read/write ().
5930         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5931         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5933 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
5935         * util/grub-editenv.c (main): Use fseeko(), not fseek().
5937 2009-01-13  Bean  <bean123ch@gmail.com>
5939         * util/grub-mkfont.c (write_font): forget to remove some debug code.
5941 2009-01-13  Bean  <bean123ch@gmail.com>
5943         * Makefile.in: (enable_grub_mkfont): New variable.
5944         (freetype_cflags): Likewise.
5945         (freetype_libs): Likewise.
5947         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5948         (grub_mkfont_SOURCES): New variable.
5949         (grub_mkfont_CFLAGS): Likewise.
5950         (grub_mkfont_LDFLAGS): Likewise.
5952         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5953         library if `--enable-grub-mkfont' is requested.
5954         (enable_grub_mkfont): New variable.
5955         (freetype_cflags): Likewise.
5956         (freetype_libs): Likewise.
5958         * util/grub-mkfont.c: New file.
5960 2009-01-12  Christian Franke  <franke@computer.org>
5962         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5963         mode check.  Fix setting of compat_use[].
5965 2009-01-10  Robert Millan  <rmh@aybabtu.com>
5967         Update a few copyright years which we forgot to do in 2008 (only for
5968         files whose changes made in 2008 were copyright-significant)
5970         * Makefile.in: Add 2008 to Copyright line.
5971         * disk/ieee1275/ofdisk.c: Likewise.
5972         * disk/efi/efidisk.c: Likewise.
5973         * kern/dl.c: Likewise.
5974         * kern/sparc64/ieee1275/init.c: Likewise.
5975         * kern/mm.c: Likewise.
5976         * kern/efi/mm.c: Likewise.
5977         * boot/i386/pc/boot.S: Likewise.
5978         * genfslist.sh: Likewise.
5979         * fs/iso9660.c: Likewise.
5980         * fs/hfs.c: Likewise.
5981         * fs/jfs.c: Likewise.
5982         * fs/minix.c: Likewise.
5983         * fs/ufs.c: Likewise.
5984         * gensymlist.sh.in: Likewise.
5985         * genkernsyms.sh.in: Likewise.
5986         * include/grub/misc.h: Likewise.
5987         * include/grub/types.h: Likewise.
5988         * include/grub/symbol.h: Likewise.
5989         * include/grub/elf.h: Likewise.
5990         * include/grub/kernel.h: Likewise.
5991         * include/grub/disk.h: Likewise.
5992         * include/grub/dl.h: Likewise.
5993         * include/grub/i386/linux.h: Likewise.
5994         * include/grub/i386/pc/biosdisk.h: Likewise.
5995         * include/grub/efi/api.h: Likewise.
5996         * include/grub/efi/pe32.h: Likewise.
5997         * include/grub/util/misc.h: Likewise.
5998         * normal/execute.c: Likewise.
5999         * normal/arg.c: Likewise.
6000         * normal/completion.c: Likewise.
6001         * normal/lexer.c: Likewise.
6002         * normal/parser.y: Likewise.
6003         * normal/misc.c: Likewise.
6004         * commands/i386/pc/vbeinfo.c: Likewise.
6005         * commands/hexdump.c: Likewise.
6006         * commands/terminal.c: Likewise.
6007         * commands/ls.c: Likewise.
6008         * commands/help.c: Likewise.
6009         * partmap/pc.c: Likewise.
6010         * loader/efi/chainloader.c: Likewise.
6011         * loader/multiboot_loader.c: Likewise.
6012         * loader/i386/pc/multiboot2.c: Likewise.
6013         * term/efi/console.c: Likewise.
6014         * term/i386/pc/serial.c: Likewise.
6015         * util/lvm.c: Likewise.
6016         * util/console.c: Likewise.
6017         * util/i386/efi/grub-mkimage.c: Likewise.
6018         * util/raid.c: Likewise.
6020 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6022         * commands/videotest.c: Removed include to grub/machine/memory.h.
6024         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6025         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6026         (video_mod_SOURCES): Removed.
6027         (video_mod_CFLAGS): Likewise.
6028         (video_mod_LDFLAGS): Likewise.
6029         (gfxterm_mod_SOURCES): Likewise.
6030         (gfxterm_mod_CFLAGS): Likewise.
6031         (gfxterm_mod_LDFLAGS): Likewise.
6032         (videotest_mod_SOURCES): Likewise.
6033         (videotest_mod_CFLAGS): Likewise.
6034         (videotest_mod_LDFLAGS): Likewise.
6035         (bitmap_mod_SOURCES): Likewise.
6036         (bitmap_mod_CFLAGS): Likewise.
6037         (bitmap_mod_LDFLAGS): Likewise.
6038         (tga_mod_SOURCES): Likewise.
6039         (tga_mod_CFLAGS): Likewise.
6040         (tga_mod_LDFLAGS): Likewise.
6041         (jpeg_mod_SOURCES): Likewise.
6042         (jpeg_mod_CFLAGS): Likewise.
6043         (jpeg_mod_LDFLAGS): Likewise.
6044         (png_mod_SOURCES): Likewise.
6045         (png_mod_CFLAGS): Likewise.
6046         (png_mod_LDFLAGS): Likewise.
6048         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6049         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6050         (video_mod_SOURCES): Added.
6051         (video_mod_CFLAGS): Likewise.
6052         (video_mod_LDFLAGS): Likewise.
6053         (videotest_mod_SOURCES): Likewise.
6054         (videotest_mod_CFLAGS): Likewise.
6055         (videotest_mod_LDFLAGS): Likewise.
6056         (bitmap_mod_SOURCES): Likewise.
6057         (bitmap_mod_CFLAGS): Likewise.
6058         (bitmap_mod_LDFLAGS): Likewise.
6059         (tga_mod_SOURCES): Likewise.
6060         (tga_mod_CFLAGS): Likewise.
6061         (tga_mod_LDFLAGS): Likewise.
6062         (jpeg_mod_SOURCES): Likewise.
6063         (jpeg_mod_CFLAGS): Likewise.
6064         (jpeg_mod_LDFLAGS): Likewise.
6065         (png_mod_SOURCES): Likewise.
6066         (png_mod_CFLAGS): Likewise.
6067         (png_mod_LDFLAGS): Likewise.
6068         (gfxterm_mod_SOURCES): Likewise.
6069         (gfxterm_mod_CFLAGS): Likewise.
6070         (gfxterm_mod_LDFLAGS): Likewise.
6072         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6073         grub/machine/console.h.
6075 2009-01-04  Jerone Young  <jerone@gmail.com>
6077         Make on screen instructions clearer
6079         Based on patch created by Jidanni <jidanni@jidanni.org>
6081         * normal/menu.c: print clearer instructions on the screen
6083 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6085         New font engine.
6087         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6088         build system and fixed gfxterm.c to work with different sized fonts.
6090         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6092         * configure: Re-generated.
6094         * DISTLIST: Removed font/manager.c.
6095         Added font/font.c.
6096         Added font/font_cmd.c.
6098         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6099         compilation.
6101         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6103         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6105         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6107         * normal/menu.c: Likewise.
6109         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6110         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6112         * include/grub/font.h: Replaced with new file.
6114         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6115         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6116         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6117         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6118         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6119         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6120         fg_red, fg_green, fg_blue, fg_alpha.
6121         (grub_video_adapter): Removed blit_glyph.
6122         (grub_video_blit_glyph): Removed.
6124         * font/manager.c: Removed file.
6126         * font/font.c: New file.
6128         * font/font_cmd.c: Likewise.
6130         * video/video.c (grub_video_blit_glyph): Removed.
6132         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6133         (grub_video_vbe_map_rgba): Likewise.
6134         (grub_video_vbe_unmap_color_int): Likewise.
6135         (grub_video_vbe_blit_glyph): Removed.
6136         (grub_video_vbe_adapter): Removed blit_glyph.
6138         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6139         (get_pixel): Likewise.
6140         (set_pixel): Likewise.
6142         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6144         * term/gfxterm.c: Adapted to new font engine.
6146         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6148         * term/i386/pc/vga.c: Likewise.
6150         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6152         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6154         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6156         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6158         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6160         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6162         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6164         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6166         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6168         * util/grub.d/00_header.in: Changed to use new loadfont command.
6170         * util/grub-mkconfig_lib.in: Changed font extension.
6172 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6174         * util/getroot.c (grub_util_get_grub_dev): Add support for
6175         /dev/md/dNNpNN style partitionable mdraid devices.
6177 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6179         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6180         at a time limit of the PXE TFTP API correctly.
6181         (grub_pxefs_close): Likewise.
6183 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6185         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6186         grub_ata_device_initialize() calls.
6188 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6190         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6191         iteration failed.
6192         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6194 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6196         Fix build on powerpc-ieee1275.  Based on patch created by
6197         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6198         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6199         `kern/ieee1275/mmap.c'.
6200         * include/grub/powerpc/ieee1275/memory.h: New file.
6202         Provide grub-install on coreboot.
6203         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6204         (grub_install_SOURCES): New variable.
6205         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6206         usable on coreboot.
6208 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6210         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6211         to `grub_term_input_t'.
6212         (grub_term_get_current_output): Change return type to
6213         `grub_term_output_t'.
6215 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6217         Fix breakage on coreboot due to declaration mismatch.
6218         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6219         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6220         grub_vga_text_cls().
6222         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6223         comments.  Avoid copying one more byte than necessary (just in case).
6225         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6226         to 0x200000 (avoids trouble with some OFW implementations, and matches
6227         with the one in Yaboot).
6228         Reported by Manoel Abranches
6230 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6232         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6233         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6235         * util/grub-mkconfig_lib.in (grub_warn): New function.
6236         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6237         warnings, to obtain consistent formatting.
6238         * util/grub.d/00_header.in: Likewise.
6239         * util/update-grub_lib.in: Likewise.
6241         * loader/i386/linux.c (allocate_pages): Fix a warning.
6242         Move comment text to `#error' stanza.
6244         Harmonize ieee1275's grub_available_iterate() with the generic
6245         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6246         build problem on i386-ieee1275):
6247         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6248         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6249         parameter `type'.  Update all users of this function.
6250         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6251         `kern/ieee1275/mmap.c'.
6252         * kern/ieee1275/init.c
6253         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6254         with ...
6255         (grub_machine_mmap_iterate): ... this.
6256         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6257         return type to `grub_err_t'.  Update all implementations of this
6258         function prototype.
6259         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6260         Likewise.
6262         Add `lsmmap' command (lists firmware-provided memory map):
6263         * commands/lsmmap.c: New file.
6264         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6265         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6266         variables.
6267         * conf/powerpc-ieee1275.rmk: Likewise.
6268         * conf/i386-coreboot.rmk: Likewise.
6269         * conf/i386-ieee1275.rmk: Likewise.
6271 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6273         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6274         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6275         constraints to initrd allocation (based on code from
6276         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6277         for Linux to find it.
6279 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6281         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6282         order to cope with duplicate slashes.
6284 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6286         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6287         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6288         don't want to mess with lower memory, because it is used in the Linux
6289         loader.
6291         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6292         an appropriate place in lower memory, between 0x10000 and 0x90000,
6293         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6294         is in our heap (probably as a result of it being corrupted during
6295         decompression).  Add #error instance with comment to explain why this
6296         loader isn't currently usable on PC/BIOS.
6298 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6300         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6301         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6303 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6305         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6307         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6308         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6309         from here ...
6310         * include/grub/i386/pc/memory.h: ... to here.
6312 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6314         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6315         split).
6317         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6318         (grub_console_cur_color, grub_console_real_putchar)
6319         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6320         (grub_console_setcolorstate, grub_console_setcolor)
6321         (grub_console_getcolor): Move from here ...
6322         * include/grub/i386/vga_common.h: ... to here (new file).
6324         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6325         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6326         `<grub/i386/io.h>'.
6327         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6328         `<grub/i386/vga_common.h>'.
6330 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6332         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6333         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6334         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6335         variables.
6336         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6337         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6339         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6340         grub_console_init() with call to grub_vga_text_init().
6341         (grub_machine_fini): Replace call to
6342         grub_console_fini() with call to grub_vga_text_fini() and
6343         grub_at_keyboard_fini().
6345         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6346         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6347         (grub_console_setcolorstate, grub_console_setcolor)
6348         (grub_console_getcolor): New function prototypes.
6350         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6351         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6352         (grub_vga_text_setcursor): Static-ize.
6353         (grub_vga_text_term): New structure.
6354         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6356         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6357         (grub_console_cur_color, grub_console_standard_color)
6358         (grub_console_normal_color, grub_console_highlight_color)
6359         (map_char, grub_console_putchar, grub_console_getcharwidth)
6360         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6361         (grub_console_getcolor): Move from here ...
6362         * term/i386/vga_common.c: ... to here (same function names).
6364 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6366         Use newly-added Multiboot support in coreboot.
6368         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6369         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6371         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6372         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6373         (codestart): Store the MBI in `startup_multiboot_info' when we're
6374         being loaded using Multiboot.
6376         * kern/i386/coreboot/init.c (grub_machine_init): Move
6377         grub_at_keyboard_init() call to beginning of function (useful for
6378         debugging).  Call grub_machine_mmap_init() before attempting to use
6379         grub_machine_mmap_iterate().
6380         (grub_lower_mem, grub_upper_mem): Move from here ...
6381         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6382         here (new file).
6384         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6385         function prototype.
6387 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6389         Fix a regression introduced by the at_keyboard.mod split.  Because
6390         some terminals are default on some platforms and non-default on
6391         others, the first terminal being registered determines which is
6392         going to be default.
6394         * kern/term.c (grub_term_register_input): If this is the first
6395         terminal being registered, set it as the current one.
6396         (grub_term_register_output): Likewise.
6398         * term/efi/console.c (grub_console_init): Do not call
6399         grub_term_set_current_output() or grub_term_set_current_input().
6400         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6401         * term/i386/pc/console.c (grub_console_init): Likewise.
6402         (grub_console_fini): Do not call grub_term_set_current_input()
6403         (but leave grub_term_set_current_output() to restore text mode).
6405 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6407         * util/grub.d/00_header.in: Add backward compatibility check for
6408         versions of terminal.mod that don't understand `terminal_input' or
6409         `terminal_output'.
6411 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6413         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6414         `terminal_input' / `terminal_output', not `terminal'.
6416 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6418         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6419         (DISTCLEANFILES): Add `build_env.mk'.
6421 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6423         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6424         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6425         members.  Update all users.
6426         * util/console.c (grub_ncurses_term): Split in ...
6427         (grub_ncurses_term_input): ... this, and ...
6428         (grub_ncurses_term_output): ... this.  Update all users.
6429         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6431 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6433         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6434         (PKGDATA): Add $(pkgdata_SRCDIR).
6435         (pkglib_BUILDDIR): New variable.
6436         (pkgdata_SRCDIR): New variable.
6437         (build_env.mk): New target.
6438         (include_DATA): New variable.
6439         (install-local): Install $(include_DATA) files in $(includedir).
6441 2008-11-07  Pavel Roskin  <proski@gnu.org>
6443         * gendistlist.sh: Use C locale for sorting to ensure consistent
6444         output on all systems.
6446         * util/grub.d/00_header.in: Remove incorrect space before
6447         "serial".
6449 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6451         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6452         per specification.
6453         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6454         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6455         (based on find_multi_boot1_header).
6456         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6457         using find_multi_boot2_header(), and abort if neither Multiboot or
6458         Multiboot headers were found.
6460 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6462         Modularize at_keyboard.mod:
6464         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6465         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6466         (at_keyboard_mod_LDFLAGS): New variables.
6468         Actual terminal split:
6470         * include/grub/term.h (struct grub_term): Split in ...
6471         (struct grub_term_input): ... this, and ...
6472         (struct grub_term_output): ... this.  Update all users.
6473         (grub_term_set_current): Split in ...
6474         (grub_term_set_current_input): ... this, and ...
6475         (grub_term_set_current_output): ... this.
6476         (grub_term_get_current): Split in ...
6477         (grub_term_get_current_input): ... this, and ...
6478         (grub_term_get_current_output): ... this.
6479         (grub_term_register): Split in ...
6480         (grub_term_register_input): ... this, and ...
6481         (grub_term_register_output): ... this.
6482         (grub_term_unregister): Split in ...
6483         (grub_term_unregister_input): ... this, and ...
6484         (grub_term_unregister_output): ... this.
6485         (grub_term_iterate): Split in ...
6486         (grub_term_iterate_input): ... this, and ...
6487         (grub_term_iterate_output): ... this.
6489         * kern/term.c (grub_term_list): Split in ...
6490         (grub_term_list_input): ... this, and ...
6491         (grub_term_list_output): ... this.  Update all users.
6492         (grub_cur_term): Split in ...
6493         (grub_cur_term_input): ... this, and ...
6494         (grub_cur_term_output): ... this.  Update all users.
6495         (grub_term_set_current): Split in ...
6496         (grub_term_set_current_input): ... this, and ...
6497         (grub_term_set_current_output): ... this.
6498         (grub_term_get_current): Split in ...
6499         (grub_term_get_current_input): ... this, and ...
6500         (grub_term_get_current_output): ... this.
6501         (grub_term_register): Split in ...
6502         (grub_term_register_input): ... this, and ...
6503         (grub_term_register_output): ... this.
6504         (grub_term_unregister): Split in ...
6505         (grub_term_unregister_input): ... this, and ...
6506         (grub_term_unregister_output): ... this.
6507         (grub_term_iterate): Split in ...
6508         (grub_term_iterate_input): ... this, and ...
6509         (grub_term_iterate_output): ... this.
6511         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6512         a check for input and one for output (and only attempt to get keys
6513         from user when input works).
6515         * util/grub-probe.c (grub_term_get_current): Split in ...
6516         (grub_term_get_current_input): ... this, and ...
6517         (grub_term_get_current_output): ... this.
6518         * util/grub-fstest.c: Likewise.
6519         * util/i386/pc/grub-setup.c: Likewise.
6520         * util/grub-editenv.c: Likewise.
6522         Portability adjustments:
6524         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6525         `term/i386/pc/at_keyboard.c'.
6526         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6527         grub_keyboard_controller_init() (now handled by terminal .init).
6528         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6529         grub_at_keyboard_init().
6530         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6531         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6532         at_keyboard.mod via input terminal interface).
6533         * include/grub/i386/coreboot/console.h: Convert into a stub for
6534         `<grub/i386/pc/console.h>'.
6536         Migrate full terminals to new API:
6538         * term/efi/console.c (grub_console_term): Split into ...
6539         (grub_console_term_input): ... this, and ...
6540         (grub_console_term_output): ... this.  Update all users.
6541         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6542         (grub_ofconsole_init): Split into ...
6543         (grub_ofconsole_init_input): ... this, and ...
6544         (grub_ofconsole_init_output): ... this.
6545         (grub_ofconsole_term): Split into ...
6546         (grub_ofconsole_term_input): ... this, and ...
6547         (grub_ofconsole_term_output): ... this.  Update all users.
6548         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6549         (grub_serial_term_input): ... this, and ...
6550         (grub_serial_term_output): ... this.  Update all users.
6551         * term/i386/pc/console.c (grub_console_term): Split into ...
6552         (grub_console_term_input): ... this, and ...
6553         (grub_console_term_output): ... this.  Update all users.
6554         (grub_console_term_input): Only enable it on PC/BIOS platform.
6555         (grub_console_init): Remove grub_keyboard_controller_init() call.
6557         Migrate input terminals to new API:
6559         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6560         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6561         i386-specific anyway).
6562         (grub_console_checkkey): Rename to ...
6563         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6564         users.
6565         (grub_keyboard_controller_orig): New variable.
6566         (grub_console_getkey): Rename to ...
6567         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6568         users.
6569         (grub_keyboard_controller_init): Static-ize.  Save original
6570         controller value so that it can be restored ...
6571         (grub_keyboard_controller_fini): ... here (new function).
6572         (grub_at_keyboard_term): New structure.
6573         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6574         functions.
6576         Migrate output terminals to new API:
6578         * term/i386/pc/vga.c (grub_vga_term): Change type to
6579         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6580         members.  Update all users.
6581         * term/gfxterm.c (grub_video_term): Change type to
6582         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6583         members.  Update all users.
6584         * include/grub/i386/pc/console.h (grub_console_checkkey)
6585         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6586         etc).
6588         Migrate `terminal' command and userland tools to new API:
6590         * commands/terminal.c (grub_cmd_terminal): Split into ...
6591         (grub_cmd_terminal_input): ... this, and ...
6592         (grub_cmd_terminal_output): ... this.
6593         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6594         `terminal_input' and `terminal_output'.
6595         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6596         `terminal_input' / `terminal_output' API.
6597         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6598         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6599         provided ${GRUB_TERMINAL}, convert it).
6601 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6603         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6604         for FreeBSD.
6605         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6607 2008-11-03  Bean  <bean123ch@gmail.com>
6609         * kern/elf.c (grub_elf32_load): Revert to previous code.
6610         (grub_elf64_load): Likewise.
6612         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6614 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6616         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6617         (TARGET_CPPFLAGS): Likewise.
6618         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6620 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6622         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6624 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6626         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6627         addition of objects until the code is not going to be able to fail.
6629 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6631         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6632         (add a missing NULL check, and correct them by moving the pointer
6633         operations after the actual check).
6635 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6637         * util/i386/pc/grub-install.in: Handle empty string as output from
6638         make_system_path_relative_to_its_root().
6640 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6642         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6643         circular metadata worst case scenario. If the metadata is circular
6644         then copy the wrap in place.
6645         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6646         project lib/format_text/layout.h
6647         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6649 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6651         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6653 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6655         * util/update-grub_lib.in: Mention filename in warning message.
6657 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6659         * NEWS: Update for rename of update-grub to grub-mkconfig.
6661 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6663         * util/update-grub_lib.in: Copy to ...
6664         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6665         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6666         * util/update-grub.in: Rename to ...
6667         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6668         option. Add `--output' option to allow users to specify the generated
6669         configuration file.  Default to stdout.
6670         (update_grub_dir): Rename to ...
6671         (grub_mkconfig_dir): ... this.
6672         (grub_cfg): Default to an empty string.
6673         * conf/common.rmk (update-grub): Rename to ...
6674         (grub-mkconfig): ... this.
6675         (update-grub_lib): Copy to ...
6676         (grub-mkconfig_lib): ... this.
6677         (update-grub_SCRIPTS): Copy to ...
6678         (grub-mkconfig_SCRIPTS): ... this. Update all users.
6679         (update-grub_DATA): Rename to ...
6680         (grub-mkconfig_DATA): ... this.
6682 2008-09-28  Robert Millan  <rmh@aybabtu.com>
6684         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6685         to `modified'.  Add the real `created' field.
6686         (grub_iso9660_uuid): Use `modified' rather than `created' for
6687         constructing the UUID.
6689 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
6691         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6692         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6694 2008-09-28  Bean  <bean123ch@gmail.com>
6696         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6697         Thanks to Christian Franke for finding this bug.
6699 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6701         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6702         instances of grub_util_get_disk_name() (see previous commit).
6704 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6706         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6707         `util/i386/get_disk_name.c'.
6708         * conf/i386-efi.rmk: Likewise.
6709         * conf/x86_64-efi.rmk: Likewise.
6710         * conf/i386-coreboot.rmk: Likewise.
6711         * conf/i386-ieee1275.rmk: Likewise.
6712         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6713         `util/ieee1275/get_disk_name.c'.
6714         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6715         * util/ieee1275/get_disk_name.c: Remove file.
6716         * util/i386/get_disk_name.c: Remove file.
6717         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6718         "hd%d" for device.map entries, rather than using
6719         grub_util_get_disk_name().
6721 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6723         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6724         warning.
6725         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6727 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6729         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6730         Changed to 0x5100.
6731         (GRUB_TERM_PPAGE): Changed to 0x4900.
6733 2008-09-24  Robert Millan  <rmh@aybabtu.com>
6735         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6736         macros (they were i386-pc specific).
6737         * include/grub/sparc64/ieee1275/console.h: Likewise.
6738         * include/grub/efi/console.h: Likewise.
6740 2008-09-22  Bean  <bean123ch@gmail.com>
6742         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6743         resident and in attribute list.
6745         * include/grub/ntfs.h (BMP_LEN): Removed.
6747 2008-09-22  Bean  <bean123ch@gmail.com>
6749         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6750         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6752         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6753         error occurs, as grub_disk_open will call grub_disk_close, which will
6754         call p->close (scsi).
6756 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6758         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6759         (AC_PREREQ): Bumped to 2.59.
6760         (AC_TRY_COMPILE): Replace obsolete macro with ...
6761         (AC_COMPILE_IFELSE): ... this.
6762         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6763         (AC_LINK_IFELSE): ... this.
6765 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6767         * autogen.sh: Add a call to `gendistlist.sh'.
6769 2008-09-19  Christian Franke  <franke@computer.org>
6771         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6772         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6773         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6774         Export __enable_execute_stack() to modules.
6775         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6776         New function.
6778 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6780         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6781         Sort the list.
6783 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6785         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6786         #include <grub/util/hostdisk.h>.
6788 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6790         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6791         segments when their filesz is zero (grub_file_read() interprets
6792         zero-size as "read until EOF", which results in memory corruption).
6793         Use `lowest_segment' rather than 0 for calculating the current
6794         segment load address.
6796 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6798         * util/hostdisk.c (open_device): Replace a grub_util_info() call
6799         with grub_dprintf("hostdisk", ...), as it was so verbose that it
6800         clobbered useful information.
6802 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6804         * include/grub/util/biosdisk.h: Move to ...
6805         * include/grub/util/hostdisk.h: ... here.  Update all users.
6806         * util/biosdisk.c: Move to ...
6807         * util/hostdisk.c: ... here.  Update all users.
6809 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6811         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6812         variables.
6813         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6814         and length can be stored directly in the `mbi->mmap_addr' and
6815         `mbi->mmap_length' struct fields.
6817 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6819         * conf/i386.rmk: New file.  Provides declaration for building
6820         `cpuid.mod'.
6821         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6822         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6823         variables.
6824         Include `conf/i386.mk'.
6825         * conf/i386-efi.rmk: Likewise.
6826         * conf/x86_64-efi.rmk: Likewise.
6827         * conf/i386-coreboot.rmk: Likewise.
6828         * conf/i386-ieee1275.rmk: Likewise.
6830 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
6832         Based on patch created by Colin D Bennett <colin@gibibit.com>.
6833         Adds optimization support for BGR based modes.
6835         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6836         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6837         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6838         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6839         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6840         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6841         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6842         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6843         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6844         (grub_video_i386_vbeblit_index_index): Likewise.
6845         (grub_video_i386_vbeblit_replace_directN): Added.
6846         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6847         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6848         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6849         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6850         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6851         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6852         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6853         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6854         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6855         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6856         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6857         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6858         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6860         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6861         (grub_video_i386_vbefill_R8G8B8): Likewise.
6862         (grub_video_i386_vbefill_index): Likewise.
6863         (grub_video_i386_vbefill_direct32): Added.
6864         (grub_video_i386_vbefill_direct24): Likewise.
6865         (grub_video_i386_vbefill_direct16): Likewise.
6866         (grub_video_i386_vbefill_direct8): Likewise.
6868         * include/grub/video.h (grub_video_blit_format): Removed
6869         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6870         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6871         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6872         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6873         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6875         * video/video.c (grub_video_get_blit_format): Updated to use new
6876         blit formats.  Added handling for 16 bit color modes.
6878         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6879         fillers.
6880         (common_blitter): Updated to use new blitters.
6882         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6883         Removed.
6884         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6885         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6886         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6887         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6888         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6889         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6890         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6891         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6892         (grub_video_i386_vbeblit_index_index): Likewise.
6893         (grub_video_i386_vbeblit_replace_directN): Added.
6894         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6895         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6896         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6897         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6898         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6899         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6900         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6901         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6902         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6903         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6904         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6905         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6906         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6908         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6909         (grub_video_i386_vbefill_R8G8B8): Likewise.
6910         (grub_video_i386_vbefill_index): Likewise.
6911         (grub_video_i386_vbefill_direct32): Added.
6912         (grub_video_i386_vbefill_direct24): Likewise.
6913         (grub_video_i386_vbefill_direct16): Likewise.
6914         (grub_video_i386_vbefill_direct8): Likewise.
6916         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6917         types.
6919         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6920         types.
6922         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6923         blitter types.
6925         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6926         types.
6928 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6930         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6931         RAID level 1.
6933 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6935         * fs/iso9660.c (grub_iso9660_date): New structure.
6936         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6937         (grub_iso9660_uuid): New function.
6939 2008-09-05  Bean  <bean123ch@gmail.com>
6941         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6943         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6944         insensitive bit for names in Win32 and Win32 & DOS namespace.
6946         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6948         * include/grub/types.h (LONG_MAX): Likewise.
6950 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6952         * util/getroot.c: Include <config.h>.
6953         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6954         add support for /dev/md/N devices and handle LVM double dash escaping.
6956 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6958         * config.guess: Update to latest version from config git.
6959         * config.sub: Likewise.
6961 2008-09-03  Robert Millan  <rmh@aybabtu.com>
6963         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6964         `disk->total_sectors'.
6966 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6968         * include/grub/normal.h: Fixed incorrect comment for
6969         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6971 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6973         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6974         values with defines.
6976         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6977         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6978         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6979         (GRUB_VBE_MODEATTR_COLOR): Likewise.
6980         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6981         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6982         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6983         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6984         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6985         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6986         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6987         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6988         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6989         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6990         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6991         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6992         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6993         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6994         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6996 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6998         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6999         declaration.
7000         (grub_multiboot): Fix a few warnings.
7002 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7004         * loader/i386/pc/multiboot.c: Update comment not to say that
7005         boot_device support is unimplemented.
7007 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7009         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7010         or memory map support are unimplemented.
7012 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7014         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7016 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7018         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7019         total video memory in 'vbeinfo' output; show color format details for
7020         each video mode.
7022 2008-08-30  Pavel Roskin  <proski@gnu.org>
7024         * util/genmoddep.c: Remove for real this time.
7025         * DISTLIST: Remove util/genmoddep.c.
7027 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7029         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7030         as required by Multiboot spec (it was already 4-byte aligned, but
7031         only by chance).
7033 2008-08-29  Pavel Roskin  <proski@gnu.org>
7035         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7036         * kern/powerpc/ieee1275/startup.S: ... this.
7037         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7038         * DISTLIST: Likewise.
7040         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7041         grub/cpu/kernel.h.  Add start label for consistency with other
7042         platforms.  Add grub_prefix immediately after start.  Add jump
7043         to the code after grub_prefix.
7044         * include/grub/powerpc/kernel.h: Provide valid values for
7045         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7047 2008-08-29  Bean  <bean123ch@gmail.com>
7049         * configure.ac: Change host_os to cygwin for mingw.
7050         (asprintf): New check for function.
7052         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7053         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7055         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7056         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7057         sync, sleep and grub_util_get_disk_size for mingw.
7059         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7060         to get size in mingw.
7061         (open_device): Use flag O_BINARY if it's defined.
7062         (find_root_device): Add dummy code for mingw.
7064         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7065         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7066         (get_scsi_disk_name): Return 0 for mingw.
7068         * util/hostfs.c: #include <grub/util/misc.h>.
7069         (grub_hostfs_open): Use "rb" flag to open file, use
7070         grub_util_get_disk_size to get disk size for mingw.
7072         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7073         (asprintf): New function if HAVE_ASPRINTF is not set.
7074         (sync): New function for mingw.
7075         (sleep): Likewise.
7076         (grub_util_get_disk_size): Likewise.
7078 2008-08-28  Pavel Roskin  <proski@gnu.org>
7080         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7081         kern/time.c.
7083 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7085         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7087 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7089         Change find_grub_drive() syntax so it doesn't prevent it from
7090         detecting NULL names as errors.
7092         * util/biosdisk.c (find_grub_drive): Move free slot search code
7093         from here ...
7094         (find_free_slot): ... to here.
7095         (read_device_map): Use find_free_slot() to search for free slots.
7097 2008-08-27  Marco Gerards  <marco@gnu.org>
7099         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7100         (scsi_mod_SOURCES): New variable.
7101         (scsi_mod_CFLAGS): Likewise
7102         (scsi_mod_LDFLAGS): Likewise.
7104         * disk/scsi.c: New file.
7106         * include/grub/scsi.h: Likewise.
7108         * include/grub/scsicmd.h: Likewise.
7110         * disk/ata.c: Include <grub/scsi.h>.
7111         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7112         instead.
7113         (grub_ata_iterate): Skip ATAPI devices.
7114         (grub_ata_open): Only handle ATAPI devices.
7115         (struct grub_atapi_read): Removed.
7116         (grub_atapi_readsector): Likewise.
7117         (grub_ata_read): No longer handle ATAPI devices.
7118         (grub_ata_write): Likewise.
7119         (grub_atapi_iterate): New function.
7120         (grub_atapi_read): Likewise.
7121         (grub_atapi_write): Likewise.
7122         (grub_atapi_open): Likewise.
7123         (grub_atapi_close): Likewise.
7124         (grub_atapi_dev): New variable.
7125         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7126         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7128         * include/grub/disk.h (enum grub_disk_dev_id): Add
7129         `GRUB_DISK_DEVICE_SCSI_ID'.
7131 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7133         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7134         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7135         descriptive.
7137 2008-08-23  Bean  <bean123ch@gmail.com>
7139         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7140         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7141         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7142         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7143         dm_nv.mod.
7144         (raid5rec_mod_SOURCES): New macro.
7145         (raid5rec_mod_CFLAGS): Likewise.
7146         (raid5rec_mod_LDFLAGS): Likewise.
7147         (raid6rec_mod_SOURCES): Likewise.
7148         (raid6rec_mod_CFLAGS): Likewise.
7149         (raid6rec_mod_LDFLAGS): Likewise.
7150         (mdraid_mod_SOURCES): Likewise.
7151         (mdraid_mod_CFLAGS): Likewise.
7152         (mdraid_mod_LDFLAGS): Likewise.
7153         (dm_nv_mod_SOURCES): Likewise.
7154         (dm_nv_mod_CFLAGS): Likewise.
7155         (dm_nv_mod_LDFLAGS): Likewise.
7157         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7158         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7159         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7161         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7162         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7164         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7166         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7168         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7170         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7172         * disk/raid5_recover.c: New file.
7174         * disk/raid6_recover.c: Likewise.
7176         * disk/mdraid_linux.c: Likewise.
7178         * disk/dmraid_nvidia.c: Likewise.
7180         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7181         ULONG_MAX.
7183         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7184         calculate the size of raid device.
7185         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7186         different layout of raid5.
7187         (grub_raid_scan_device): Remove code specific to mdraid.
7188         (grub_raid_list): New variable.
7189         (free_array): New function.
7190         (grub_raid_register): Likewise.
7191         (grub_raid_unregister): Likewise.
7192         (grub_raid_rescan): Likewise.
7193         (GRUB_MOD_INIT): Don't iterate device here.
7194         (GRUB_MOD_FINI): Use free_array to release resource.
7196         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7197         (grub_raid5_recover_func_t): New function variable type.
7198         (grub_raid6_recover_func_t): Likewise.
7199         (grub_raid5_recover_func): New variable.
7200         (grub_raid6_recover_func): Likewise.
7201         (grub_raid_register): New function.
7202         (grub_raid_unregister): Likewise.
7203         (grub_raid_rescan): Likewise.
7204         (grub_raid_block_xor): Likewise.
7206         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7207         (CMD_CRC): New macro.
7208         (part): Removed.
7209         (read_file): Handle device as well as file.
7210         (cmd_crc): New function.
7211         (fstest): Handle multiple disks.
7212         (options): Remove part, raw and long, add root and diskcount.
7213         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7214         (main): Find the first non option entry and ignore subsequent options,
7215         add handling for the new options, support multiple disks.
7217         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7219 2008-08-23  Bean  <bean123ch@gmail.com>
7221         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7223         * genfslist.sh: Ignore kernel.mod.
7225         * genpartmaplist.sh: Likewise.
7227 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7229         * util/getroot.c (find_root_device): Skip anything that starts with
7230         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7232 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7234         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7235         * util/grub.d/00_header.in: Allow the administrator to change default
7236         gfxmode via ${GRUB_GFXMODE}.
7238 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7240         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7242 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7244         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7245         loader.
7246         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7247         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7249 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7251         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7252         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7254 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7256         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7257         (struct grub_virtual_screen): Remove `cursor_color'.
7258         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7259         initialization.
7260         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7262 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7264         Unify (identical) linux_normal.c files.
7265         * loader/i386/efi/linux_normal.c: Move from here ...
7266         * loader/linux_normal.c: ... to here.  Update all users.
7267         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7268         * loader/i386/ieee1275/linux_normal.c: Likewise.
7270 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7272         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7273         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7274         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7275         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7276         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7277         New macros.
7278         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7279         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7280         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7281         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7282         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7283         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7284         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7285         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7286         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7287         portably using grub_getxy().
7288         Replace `-EFI' with `-bzImage' in boot message.
7290 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7292         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7294 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7296         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7298         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7299         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7300         (grub_machine_mmap_iterate): New function declaration.
7301         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7302         structure.
7303         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7304         macros.
7306         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7307         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7308         Move e820 parsing from here ...
7309         * kern/i386/pc/mmap.c: New file.
7310         (grub_machine_mmap_iterate): ... to here.
7312         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7313         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7314         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7315         (grub_available_iterate): Redeclare to return `void', and redeclare
7316         its hook to use grub_uint64_t as addr and size parameters, and rename
7317         to ...
7318         (grub_machine_mmap_iterate): ... this.  Update all users.
7320         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7321         to make it more readable.  Rename to ...
7322         (grub_machine_mmap_iterate): ... this.
7324         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7325         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7326         (grub_multiboot): Allocate an extra region after the payload, and fill
7327         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7328         with the extra space.
7329         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7330         with the extra space.
7332 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7334         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7336 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7338         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7339         mdate-sh to the list `find' searches for.
7340         * DISTLIST: Regenerated.
7342 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7344         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7345         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7346         genmoddep.awk, gensymlist.sh.in.
7347         (DISTDIRS): Add bus, docs, hook, lib.
7348         * DISTLIST: Regenerated.
7349         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7351 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7353         * disk/raid.c (grub_raid_init): Handle/report errors set by
7354         grub_device_iterate().
7355         * disk/lvm.c (grub_lvm_init): Likewise.
7357 2008-08-15  Bean  <bean123ch@gmail.com>
7359         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7360         and datehook.mod.
7361         (datetime_mod_SOURCES): New macro.
7362         (datetime_mod_CFLAGS): Likewise.
7363         (datetime_mod_LDFLAGS): Likewise.
7364         (date_mod_SOURCES): Likewise.
7365         (date_mod_CFLAGS): Likewise.
7366         (date_mod_LDFLAGS): Likewise.
7367         (datehook_mod_SOURCES): Likewise.
7368         (datehook_mod_CFLAGS): Likewise.
7369         (datehook_mod_LDFLAGS): Likewise.
7371         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7372         and datehook.mod.
7373         (datetime_mod_SOURCES): New macro.
7374         (datetime_mod_CFLAGS): Likewise.
7375         (datetime_mod_LDFLAGS): Likewise.
7376         (date_mod_SOURCES): Likewise.
7377         (date_mod_CFLAGS): Likewise.
7378         (date_mod_LDFLAGS): Likewise.
7379         (datehook_mod_SOURCES): Likewise.
7380         (datehook_mod_CFLAGS): Likewise.
7381         (datehook_mod_LDFLAGS): Likewise.
7383         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7384         and datehook.mod.
7385         (datetime_mod_SOURCES): New macro.
7386         (datetime_mod_CFLAGS): Likewise.
7387         (datetime_mod_LDFLAGS): Likewise.
7388         (date_mod_SOURCES): Likewise.
7389         (date_mod_CFLAGS): Likewise.
7390         (date_mod_LDFLAGS): Likewise.
7391         (datehook_mod_SOURCES): Likewise.
7392         (datehook_mod_CFLAGS): Likewise.
7393         (datehook_mod_LDFLAGS): Likewise.
7395         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7396         and datehook.mod.
7397         (datetime_mod_SOURCES): New macro.
7398         (datetime_mod_CFLAGS): Likewise.
7399         (datetime_mod_LDFLAGS): Likewise.
7400         (date_mod_SOURCES): Likewise.
7401         (date_mod_CFLAGS): Likewise.
7402         (date_mod_LDFLAGS): Likewise.
7403         (datehook_mod_SOURCES): Likewise.
7404         (datehook_mod_CFLAGS): Likewise.
7405         (datehook_mod_LDFLAGS): Likewise.
7407         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7408         and datehook.mod.
7409         (datetime_mod_SOURCES): New macro.
7410         (datetime_mod_CFLAGS): Likewise.
7411         (datetime_mod_LDFLAGS): Likewise.
7412         (date_mod_SOURCES): Likewise.
7413         (date_mod_CFLAGS): Likewise.
7414         (date_mod_LDFLAGS): Likewise.
7415         (datehook_mod_SOURCES): Likewise.
7416         (datehook_mod_CFLAGS): Likewise.
7417         (datehook_mod_LDFLAGS): Likewise.
7419         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7421         * commands/date.c: New file.
7423         * hook/datehook.c: Likewise.
7425         * include/grub/lib/datetime.h: Likewise.
7427         * include/grub/i386/cmos.h: Likewise.
7429         * lib/datetime.c: Likewise.
7431         * lib/i386/datetime.c: Likewise.
7433         * lib/efi/datetime.c: Likewise.
7435 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7437         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7438         (grub_mkelfimage_SOURCES): New variable.
7439         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7441         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7442         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7443         * conf/powerpc-ieee1275.rmk: Likewise.
7444         * conf/i386-ieee1275.rmk: Likewise.
7446         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7447         * kern/i386/coreboot/init.c: Likewise.
7449         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7450         with `<grub/cpu/kernel.h>'.
7451         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7452         to ...
7453         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7454         * kern/i386/coreboot/startup.S: Likewise.
7456         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7457         (GRUB_MOD_GAP): Remove.
7458         * include/grub/powerpc/kernel.h: New file.
7459         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7460         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7461         * include/grub/i386/kernel.h: New file.
7462         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7463         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7464         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7466         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7467         `grub-mkelfimage'.
7468         Use --directory when invoking grub_mkimage.
7470         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7471         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7472         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7473         and GRUB_KERNEL_CPU_PREFIX.
7475 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7477         * include/grub/err.h (grub_err_printf): New function prototype.
7478         * util/misc.c (grub_err_printf): New function.
7479         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7480         grub_printf.
7481         * kern/err.c (grub_print_error): Use grub_err_printf.
7483 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7485         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7487 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7489         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7490         boot entry.
7492 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7494         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7495         of the relocation code from here ...
7496         (grub_multiboot): ... to here.
7497         (forward_relocator, backward_relocator): Move from here ...
7498         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7499         (grub_multiboot_backward_relocator): ... to here.
7500         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7501         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7502         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7503         (grub_multiboot_forward_relocator_end)
7504         (grub_multiboot_backward_relocator)
7505         (grub_multiboot_backward_relocator_end): New variables.
7507 2008-08-12  Bean  <bean123ch@gmail.com>
7509         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7511 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7513         * kern/i386/linuxbios/startup.S: Move from here ...
7514         * kern/i386/coreboot/startup.S: ... to here.
7516         * kern/i386/linuxbios/init.c: Move from here ...
7517         * kern/i386/coreboot/init.c: ... to here.
7519         * kern/i386/linuxbios/table.c: Move from here ...
7520         * kern/i386/coreboot/mmap.c: ... to here.
7522         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7524 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7526         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7527         errors.  Leave it to the upper layer to handle them.
7529 2008-08-09  Christian Franke  <franke@computer.org>
7531         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7532         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7533         Install `grub.d/10_windows' only on Cygwin.
7534         * configure.ac: Add subst of `target_os'.
7535         Check `target_os' also before setting TARGET_OBJ2ELF.
7536         Add `--enable-grub-pe2elf'.
7538 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7540         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7541         (grub_last_time): Change type to grub_uint64_t.
7542         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7543         (grub_disk_close): Likewise.
7545         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7546         (run_menu): Migrate code from to using grub_get_time_ms().
7548         * util/misc.c (grub_get_time_ms): New function.
7550 2008-08-08  Marco Gerards  <marco@gnu.org>
7552         * disk/ata.c (grub_ata_regget): Change return type to
7553         `grub_uint8_t'.
7554         (grub_ata_regget2): Likewise.
7555         (grub_ata_wait_status): New function.
7556         (grub_ata_wait_busy): Removed function, updated all users to use
7557         `grub_ata_wait_status'.
7558         (grub_ata_wait_drq): Likewise.
7559         (grub_ata_cmd): New function.
7560         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7561         error handling.
7562         (grub_ata_pio_write): Add error handling.
7563         (grub_atapi_identify): Likewise.
7564         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7565         handling.
7566         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7567         handling.  Actually use the detected registers.  Reorder the
7568         detection logic such that it is easier to read.
7569         (grub_ata_pciinit): Do not assign the same ID to each controller.
7570         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7571         handling.
7572         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7574         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7576 2008-08-08  Marco Gerards  <marco@gnu.org>
7578         * NEWS: Update.
7580 2008-08-07  Bean  <bean123ch@gmail.com>
7582         * include/grub/x86_64/pci.h: New file.
7584 2008-08-07  Christian Franke  <franke@computer.org>
7586         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7587         (TIMER2_GATE): Likewise.
7588         (grub_pit_wait): Add enable/disable of the timer2 gate
7589         bit of port 0x61.  This fixes a possible infinite loop.
7591 2008-08-07  Bean  <bean123ch@gmail.com>
7593         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7594         kern/i386/tsc.c and kern/i386/pit.c.
7596         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7597         x86_64 platform.
7599         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7600         <grub/i386/tsc.h>.
7602         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7604 2008-08-07  Bean  <bean123ch@gmail.com>
7606         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7608         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7610         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7611         multiple inclusion. Add #include <grub/types.h>.
7613 2008-08-06  Christian Franke  <franke@computer.org>
7615         * conf/common.rmk: Build and install `10_windows'.
7616         * util/grub.d/10_windows.in: New script.
7618 2008-08-06  Pavel Roskin  <proski@gnu.org>
7620         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7622 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7624         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7625         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7627 2008-08-06  Bean  <bean123ch@gmail.com>
7629         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7630         (grub_pxefs_fs_int): Remove dummy definition.
7631         (grub_pxefs_open): Use data->block_size to store the current block
7632         size setting.
7633         (grub_pxefs_read): Use block size stored in data->block_size. As the
7634         value of grub_pxe_blksize can be changed after the file is opened.
7636 2008-08-06  Bean  <bean123ch@gmail.com>
7638         * fs/i386/pc/pxe.c (curr_file): new variable.
7639         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7640         require the dummy internal file system anymore.
7641         (grub_pxefs_read): Removed.
7642         (grub_pxefs_close): Likewise.
7643         (grub_pxefs_fs_int): Likewise.
7644         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7645         connection when we switch file.
7646         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7648 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7650         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7651         `halt.mod'.
7652         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7653         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7655         * kern/i386/halt.c: New file.
7656         * kern/i386/reboot.c: Likewise.
7657         * include/grub/i386/reboot.h: Likewise.
7658         * include/grub/i386/halt.h: Likewise.
7660         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7661         Include `<grub/cpu/halt.h>'.
7662         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7663         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7665         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7666         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7667         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7668         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7669         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7670         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7671         from here ...
7672         * include/grub/i386/at_keyboard.h: ... to here.
7674 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7676         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7677         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7678         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7679         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7680         `kern/generic/millisleep.c'.
7682         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7683         instead of grub_get_rtc().
7684         (grub_tsc_init): Initialize `tsc_boot_time'.
7686         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7687         (grub_machine_init): Use grub_tsc_init() rather than
7688         installing an RTC-based handler via grub_install_get_time_ms().
7690         * kern/i386/pit.c: New file.
7691         * include/grub/i386/pit.h: Likewise.
7693 2008-08-05  Bean  <bean123ch@gmail.com>
7695         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7697         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7698         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7699         (pxe_mod_SOURCES): New macro.
7700         (pxe_mod_CFLAGS): Likewise.
7701         (pxe_mod_LDFLAGS): Likewise.
7702         (pxecmd_mod_SOURCES): Likewise.
7703         (pxecmd_mod_CFLAGS): Likewise.
7704         (pxecmd_mod_LDFLAGS): Likewise.
7706         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7707         (grub_pxe_call): Likewise.
7709         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7711         * commands/i386/pc/pxecmd.c: New file.
7713         * fs/i386/pc/pxe.c: Likewise.
7715         * include/grub/i386/pc/pxe.h: Likewise.
7717 2008-08-05  Bean  <bean123ch@gmail.com>
7719         * util/console.c (grub_console_cur_color): New variable.
7720         (grub_console_standard_color): Likewise.
7721         (grub_console_normal_color): Likewise.
7722         (grub_console_highlight_color): Likewise.
7723         (color_map): Likewise.
7724         (use_color): Likewise.
7725         (NUM_COLORS): New macro.
7726         (grub_ncurses_setcolorstate): Handle color properly.
7727         (grub_ncurses_setcolor): Don't change color here, just remember the
7728         settings, color will be set in grub_ncurses_setcolorstate.
7729         (grub_ncurses_getcolor): New function.
7730         (grub_ncurses_init): Initialize color pairs.
7731         (grub_ncurses_term): New member grub_ncurses_getcolor.
7733 2008-08-05  Colin D Bennett  <colin@gibibit.com>
7735         High resolution timer support.  Implemented for x86 CPUs using TSC.
7736         Extracted generic grub_millisleep() so it's linked in only as needed.
7737         This requires a Pentium compatible CPU; if the RDTSC instruction is
7738         not supported, then it falls back on the generic grub_get_time_ms()
7739         implementation that uses the machine's RTC.
7741         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7742         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7743         `kern/generic/millisleep.c'.
7745         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7746         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7748         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7749         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7751         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7753         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7754         `kern/generic/millisleep.c'.
7756         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7758         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7760         * kern/generic/rtc_get_time_ms.c: New file.
7762         * kern/generic/millisleep.c: New file.
7764         * kern/misc.c: Don't include
7765         <kern/time.h> anymore.
7766         (grub_millisleep_generic): Removed.
7768         * commands/sleep.c (grub_interruptible_millisleep): Uses
7769         grub_get_time_ms() instead of grub_get_rtc().
7771         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
7772         function.
7773         (grub_cpu_is_cpuid_supported): New inline function.
7774         (grub_cpu_is_tsc_supported): New inline function.
7775         (grub_tsc_init): New function prototype.
7776         (grub_tsc_get_time_ms): New function prototype.
7778         * kern/i386/tsc.c (grub_get_time_ms): New file.
7780         * include/grub/time.h: Include <grub/types.h.
7781         (grub_millisleep_generic): Removed.
7782         (grub_get_time_ms): New prototype.
7783         (grub_install_get_time_ms): New prototype.
7784         (grub_rtc_get_time_ms): New prototype.
7786         * kern/time.c (grub_get_time_ms): New function.
7787         (grub_install_get_time_ms): New function.
7789         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
7790         <grub/time.h> anymore.
7791         (grub_millisleep): Removed.
7792         (grub_machine_init): Call grub_tsc_init.
7794         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7795         get_time_ms() implementation.
7797         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7798         (ieee1275_get_time_ms): New function.
7799         (grub_machine_init): Install get_time_ms() implementation.
7801         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7802         (grub_machine_init): Call grub_tsc_init().
7803         (grub_millisleep): Removed.
7805         * kern/ieee1275/init.c (grub_millisleep): Removed.
7806         (grub_machine_init): Install ieee1275_get_time_ms()
7807         implementation.
7808         (ieee1275_get_time_ms): New function.
7809         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7810         real work.
7812 2008-08-05  Marco Gerards  <marco@gnu.org>
7814         * disk/ata.c: Include <grub/pci.h>.
7815         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7816         (grub_ata_initialize): Rewritten.
7817         (grub_ata_device_initialize): New function.
7819 2008-08-04  Pavel Roskin  <proski@gnu.org>
7821         * kern/main.c: Include grub/mm.h.
7823 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7825         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7826         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7827         corruption problem).
7829 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7831         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7832         warnings introduced in my last commit.
7834 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7836         Make PCI available on all i386 architectures.
7838         * include/grub/i386/pc/pci.h: Move from here ...
7839         * include/grub/i386/pci.h: ... to here.
7841         * include/grub/i386/pc/pci.h: Remove.
7842         * include/grub/i386/efi/pci.h: Remove.
7843         * include/grub/x86_64/efi/pci.h: Remove.
7845         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7846         `<grub/cpu/pci.h>'.
7848         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7849         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7850         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7852         * conf/i386-ieee1275.rmk: Likewise.
7854 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7856         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7857         (grub_console_setcursor): Make it possible to set cursor off.
7859 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7861         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
7862         of modules instead of assuming which platform provides what.
7863         * util/update-grub.in: Likewise.
7865 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7867         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7868         instead of `grub_install_dos_part' to determine whether a drive needs
7869         to be prepended to prefix (`grub_install_dos_part' is not reliable,
7870         because it can be overridden when loading GRUB via Multiboot).
7872 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7874         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7876 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7878         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7879         of informational grub_dprintf() calls.
7881 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7883         * disk/memdisk.c (memdisk_size): Don't initialize.
7884         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7886         * include/grub/i386/pc/kernel.h
7887         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7888         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7889         (grub_memdisk_image_size, grub_arch_memdisk_addr)
7890         (grub_arch_memdisk_size): Remove.
7892         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7893         field (was only used to transfer a constant).  Add `type' field to
7894         support multiple module types.
7895         (grub_module_iterate): New function.
7897         * kern/device.c (grub_device_open): Do not hide error messages
7898         when grub_disk_open() fails.  Use grub_print_error() instead.
7900         * kern/i386/pc/init.c (grub_arch_modules_addr)
7901         (grub_arch_memdisk_size): Remove functions.
7902         (grub_arch_modules_addr): Return the module address in high memory
7903         (now that it isn't copied anymore).
7905         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7906         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7907         decompression routine (grub_total_module_size already includes that
7908         now).  Don't copy modules back to low memory.
7910         * kern/main.c: Include `<grub/mm.h>'.
7911         (grub_load_modules): Split out (and use) ...
7912         (grub_module_iterate): ... this function, which iterates through
7913         module objects and runs a hook.
7914         Comment out grub_mm_init_region() call, as it would cause non-ELF
7915         modules to be overwritten.
7917         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7918         the memdisk image in its own region, make it part of the module list.
7919         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7920         (main): Parse --memdisk|-m option, and pass user-provided path as
7921         parameter to generate_image().
7922         (add_segments): Pass `memdisk_path' down to load_modules().
7923         (load_modules): Embed memdisk image in module section when requested.
7924         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7925         `header.type' instead of `header.offset'.
7927         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7928         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7929         (memdisk_mod_LDFLAGS): New variables.
7930         * conf/i386-coreboot.rmk: Likewise.
7931         * conf/i386-ieee1275.rmk: Likewise.
7933 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7935         * loader/i386/pc/multiboot.c (playground, forward_relocator)
7936         (backward_relocator): New variables.  Used to allocate and relocate
7937         the payload, respectively.
7938         (grub_multiboot_load_elf32): Load into heap instead of requested
7939         address, install the appropriate relocator code in each bound of
7940         the payload, and set the entry point such that
7941         grub_multiboot_real_boot() will jump to one of them.
7943         * kern/i386/loader.S (grub_multiboot_payload_size)
7944         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7945         (grub_multiboot_payload_entry_offset): New variables.
7946         (grub_multiboot_real_boot): Set cpu context to what the relocator
7947         expects, and jump to the relocator instead of the payload.
7949         * include/grub/i386/loader.h (grub_multiboot_payload_size)
7950         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7951         (grub_multiboot_payload_entry_offset): Export.
7953 2008-08-01  Bean  <bean123ch@gmail.com>
7955         * normal/menu_entry.c (editor_getline): Don't return the original
7956         string as result, as it will be released by lexer once it has done
7957         using it.
7959 2008-08-01  Robert Millan  <rmh@aybabtu.com>
7961         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7962         within menuentries, not before them.
7963         util/grub.d/10_hurd.in: Likewise.
7965 2008-08-01  Bean  <bean123ch@gmail.com>
7967         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7968         (bufio_mod_SOURCES): New macro.
7969         (bufio_mod_CFLAGS): Likewise.
7970         (bufio_mod_LDFLAGS): Likewise.
7972         * include/grub/bufio.h: New file.
7974         * io/bufio.c: Likewise.
7976         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7977         (grub_video_reader_png): Use grub_buffile_open to open file.
7979         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7980         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7982         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7983         (grub_video_reader_tga): Use grub_buffile_open to open file.
7985         * font/manager.c: Include <grub/bufio.h>.
7986         (add_font): Use grub_buffile_open to open file.
7988 2008-07-31  Robert Millan  <rmh@aybabtu.com>
7990         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7991         ELF segments, use a macro for arbitrarily accessing any of them instead
7992         of preparing a pointer that allows access to one at a time.
7993         (grub_multiboot_load_elf64): Likewise.
7995 2008-07-31  Bean  <bean123ch@gmail.com>
7997         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7998         GRUB_KERNEL_MACHINE_DATA_END.
8000 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8002         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8003         Increase from 0x50 to 0x60.
8004         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8005         use UUIDs to identify the root drive for them.  If that's not
8006         possible, abort.
8007         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8008         check, for cross-disk installs.
8010 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8012         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8013         is non-empty, use it to set the `prefix' environment variable instead
8014         of the usual approach.
8015         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8016         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8017         environment variable instead of dummy make_install_device().
8019         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8020         (start): Insert a data section, with `grub_prefix' variable.
8021         * kern/i386/linuxbios/startup.S: Likewise.
8023         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8024         New variable reference.
8025         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8026         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8027         to `start').
8028         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8029         section within startup.S (relative to `start').
8030         * include/grub/i386/coreboot/kernel.h: Likewise.
8032         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8033         Overwrite grub_prefix with its contents, at the beginning of the
8034         first segment.
8035         (main): Understand -p|--prefix.
8037 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8039         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8041 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8043         * term/i386/pc/vga_text.c (grub_console_cls): Use
8044         grub_console_gotoxy() to go back to beginning of the screen.
8045         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8047 2008-07-29  Christian Franke  <franke@computer.org>
8049         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8050         Add conversion of emulated mount points on Cygwin.
8052 2008-07-29  Christian Franke  <franke@computer.org>
8054         * util/update-grub.in: Add a check for admin
8055         group on Cygwin.
8056         Remove old `grub.cfg.new' before creation.
8057         Add `-f' to `mv' to handle the different filesystem
8058         semantics of Windows.
8060 2008-07-29  Bean  <bean123ch@gmail.com>
8062         * normal/main.c (get_line): Fix buffer overflow bug.
8064 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8066         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8067         (struct grub_apple_header): New struct.  Describes the layout of
8068         the partmap header.
8069         (apple_partition_map_iterate): Check the header magic as well as the
8070         partition magic (which was already being checked).
8072 2008-07-28  Pavel Roskin  <proski@gnu.org>
8074         * genmk.rb: Add a warning to the beginning of the output that
8075         it's a generated file and should not be edited.
8077 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8079         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8080         with the same number are found, just use issue a warning with
8081         grub_dprintf(), as this error has been reported to be non-fatal.
8083 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8085         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8086         information.
8088 2008-07-27  Bean  <bean123ch@gmail.com>
8090         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8091         (grub_fat_find_dir): Ignore case when comparing filename.
8093 2008-07-27  Bean  <bean123ch@gmail.com>
8095         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8096         smallino, as it's more descriptive, and i8count can be confused with
8097         the other field count.
8098         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8099         inode type.
8101 2008-07-27  Bean  <bean123ch@gmail.com>
8103         * commands/crc.c: New file.
8105         * lib/crc.c: Likewise.
8107         * include/grub/lib/crc.h: Likewise.
8109         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8111         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8112         (hexdump): Move this function to ...
8114         * lib/hexdump.c: ... here.
8116         * include/grub/hexdump.h: Renamed to ...
8118         * include/grub/lib/hexdump.h: ... this.
8120         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8122         * util/grub-editenv.c: Likewise.
8124         * include/envblk.h: Renamed to ...
8126         * include/lib/envblk.h: ... this.
8128         * util/envblk.c: Renamed to ...
8130         * lib/envblk.c: ... this.
8132         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8133         lib/hexdump.c.
8134         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8135         (pkglib_MODULES): Add crc.mod.
8136         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8137         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8138         (crc_mod_SOURCES): New macro.
8139         (crc_mod_CFLAGS): Likewise.
8140         (crc_mod_LDFLAGS): Likewise.
8142         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8144         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8146         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8148         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8150         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8152 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8154         * commands/help.c: Include <grub/term.h>.
8155         (TERM_WIDTH): Removed.  Updated all users.
8157 2008-07-27  Pavel Roskin  <proski@gnu.org>
8159         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8160         spurious warnings about a comment within a comment.
8162 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8164         * util/getroot.c (find_root_device): Skip devices that match
8165         /dev/dm-[0-9].  This lets the real device be found for any type of
8166         abstraction (LVM, EVMS, RAID..).
8167         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8168         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8169         device is found first, find_root_device() will now skip it.
8171 2008-07-24  Pavel Roskin  <proski@gnu.org>
8173         * include/grub/types.h: Use __builtin_bswap32() and
8174         __builtin_bswap64() with gcc 4.3 and newer.
8176 2008-07-24  Christian Franke  <franke@computer.org>
8178         * util/i386/pc/grub-install.in: If `--debug' is specified,
8179         pass `--verbose' to grub-setup.
8180         Abort script if make_system_path_relative_to_its_root() fails.
8182 2008-07-24  Bean  <bean123ch@gmail.com>
8184         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8185         variable `target_platform' should be `platform'.
8187 2008-07-24  Bean  <bean123ch@gmail.com>
8189         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8190         (grub_png_init_fixed_block): New function.
8191         (grub_png_decode_image_data): Handle fixed huffman code compression.
8193 2008-07-24  Bean  <bean123ch@gmail.com>
8195         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8196         (grub_pe2elf_SOURCES): New macro.
8197         (CLEANFILES): Add grub-pe2elf.
8199         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8200         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8201         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8202         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8203         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8204         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8205         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8206         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8207         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8208         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8209         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8210         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8211         (GRUB_PE32_DT_FUNCTION): Likewise.
8212         (GRUB_PE32_REL_I386_DIR32): Likewise.
8213         (GRUB_PE32_REL_I386_REL32): Likewise.
8214         (grub_pe32_symbol): New structure.
8215         (grub_pe32_reloc): Likewise.
8217         * util/grub-pe2elf.c: New file.
8219         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8220         start symbol in non pc platform.
8222         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8224         The following patches are from Christian Franke.
8226         * include/grub/dl.h: Remove .previous, gas supports this only
8227         for ELF format.
8229         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8230         Remove .type, gas supports this only for ELF format.
8232         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8233         nullbytes in symbol table. This fixes an infinite loop if table is
8234         zero filled.
8236         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8237         TARGET_IMG_LDFLAGS and EXEEXT.
8239         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8240         TARGET_IMG_LDFLAGS_AC.
8241         (grub_CHECK_STACK_ARG_PROBE): New function.
8243         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8245         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8247         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8248         to set TARGET_IMG_LD* accordingly.
8249         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8250         Add call to grub_CHECK_STACK_ARG_PROBE.
8251         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8253         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8255         * genmk.rb: Add EXEEXT to CLEANFILES.
8257 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8259         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8260         define the codes for arrows and lines used for the menu).
8261         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8262         as well.
8264         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8265         fonts, because the latter are too slow.
8267 2008-07-21  Bean  <bean123ch@gmail.com>
8269         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8270         a20. Run keyboard test last, as it will cause macbook to halt.
8272 2008-07-18  Pavel Roskin  <proski@gnu.org>
8274         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8275         load foreign architecture modules correctly anyway.  Keep
8276         support for loading host architecture modules, whether we
8277         compile them or not.
8279 2008-07-17  Pavel Roskin  <proski@gnu.org>
8281         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8282         change target_cpu.  The compiler default can mismatch target_cpu
8283         in any case.
8285         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8286         * kern/efi/efi.c: Likewise.
8288         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8289         target compiler is functional.
8290         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8291         are set up.
8293         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8294         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8295         adjustments from the rest, only do them if target is not
8296         explicitly given.  Merge other adjustments with the final sanity
8297         check.  Remove an extraneous check for supported CPU.  Be
8298         specific which CPU and which platform is not supported.
8300         * configure.ac: Default to pc platform for x86_64.
8302 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8304         Partial LinuxBIOS -> Coreboot rename.
8306         * conf/i386-linuxbios.rmk: Renamed to ...
8307         * conf/i386-coreboot.rmk: ... this.
8308         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8309         * configure.ac: Accept "coreboot" as input platform (but maintain
8310         compatibility with "linuxbios").
8311         * include/grub/i386/linuxbios: Renamed to ...
8312         * include/grub/i386/coreboot: ... this.
8314 2008-07-17  Bean  <bean123ch@gmail.com>
8316         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8317         (appleldr_mod_SOURCE): New variable.
8318         (appleldr_mod_CFLAGS): Likewise.
8319         (appleldr_mod_LDFLAGS): Likewise.
8320         (pci_mod_SOURCES): Likewise.
8321         (pci_mod_CFLAGS): Likewise.
8322         (pci_mod_LDFLAGS): Likewise.
8323         (lspci_mod_SOURCES): Likewise.
8324         (lspci_mod_CFLAGS): Likewise.
8325         (lspci_mod_LDFLAGS): Likewise.
8327         * conf/x86_64-efi.rmk: New file.
8329         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8330         macro.
8331         (grub_efidisk_write): Likewise.
8333         * include/efi/api.h (efi_call_0): New macro.
8334         (efi_call_1): Likewise.
8335         (efi_call_2): Likewise.
8336         (efi_call_3): Likewise.
8337         (efi_call_4): Likewise.
8338         (efi_call_5): Likewise.
8339         (efi_call_6): Likewise.
8341         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8342         grub_rescue_cmd_chainloader.
8344         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8345         (grub_pe32_optional_header): Change some fields based on i386 or
8346         x86_64 platform.
8347         (GRUB_PE32_PE32_MAGIC): Likewise.
8349         * include/grub/efi/uga_draw.h: New file.
8351         * include/grub/elf.h (STN_ABS): New constant.
8352         (R_X86_64_NONE): Relocation constant for x86_64.
8353         (R_X86_64_64): Likewise.
8354         (R_X86_64_PC32): Likewise.
8355         (R_X86_64_GOT32): Likewise.
8356         (R_X86_64_PLT32): Likewise.
8357         (R_X86_64_COPY): Likewise.
8358         (R_X86_64_GLOB_DAT): Likewise.
8359         (R_X86_64_JUMP_SLOT): Likewise.
8360         (R_X86_64_RELATIVE): Likewise.
8361         (R_X86_64_GOTPCREL): Likewise.
8362         (R_X86_64_32): Likewise.
8363         (R_X86_64_32S): Likewise.
8364         (R_X86_64_16): Likewise.
8365         (R_X86_64_PC16): Likewise.
8366         (R_X86_64_8): Likewise.
8367         (R_X86_64_PC8): Likewise.
8369         * include/grub/i386/efi/pci.h: New file.
8371         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8372         Change it value based on platform.
8373         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8374         (GRUB_E820_RAM): Likewise.
8375         (GRUB_E820_RESERVED): Likewise.
8376         (GRUB_E820_ACPI): Likewise.
8377         (GRUB_E820_NVS): Likewise.
8378         (GRUB_E820_EXEC_CODE): Likewise.
8379         (GRUB_E820_MAX_ENTRY): Likewise.
8380         (grub_e820_mmap): New structure.
8381         (linux_kernel_header): Change the efi field according to different
8382         kernel version, also field from linux_kernel_header.
8384         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8386         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8387         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8388         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8389         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8390         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8391         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8392         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8393         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8394         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8395         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8397         * include/grub/x86_64/efi/kernel.h: New file.
8399         * include/grub/x86_64/efi/loader.h: Likewise.
8401         * include/grub/x86_64/efi/machine.h: Likewise.
8403         * include/grub/x86_64/efi/pci.h: Likewise.
8405         * include/grub/x86_64/efi/time.h: Likewise.
8407         * include/grub/x86_64/linux.h: Likewise.
8409         * include/grub/x86_64/setjmp.h: Likewise.
8411         * include/grub/x86_64/time.h: Likewise.
8413         * include/grub/x86_64/types.h: Likewise.
8415         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8416          GRUB_TARGET_SIZEOF_VOID_P.
8418         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8419         (grub_efi_locate_handle): Likewise.
8420         (grub_efi_open_protocol): Likewise.
8421         (grub_efi_set_text_mode): Likewise.
8422         (grub_efi_stall): Likewise.
8423         (grub_exit): Likewise.
8424         (grub_reboot): Likewise.
8425         (grub_halt): Likewise.
8426         (grub_efi_exit_boot_services): Likewise.
8427         (grub_get_rtc): Likewise.
8429         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8430         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8431         (grub_efi_allocate_pages): Wrap efi calls.
8432         (grub_efi_free_pages): Wrap efi calls.
8433         (grub_efi_get_memory_map): Wrap efi calls.
8435         * kern/x86_64/dl.c: New file.
8437         * kern/x86_64/efi/callwrap.S: Likewise.
8439         * kern/x86_64/efi/startup.S: Likewise.
8441         * loader/efi/appleloader.c: Likewise.
8443         * loader/efi/chainloader.c (cmdline): New variable.
8444         (grub_chainloader_unload): Wrap efi calls.
8445         (grub_chainloader_boot): Likewise.
8446         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8447         command line.
8449         * loader/efi/chainloader_normal.c (chainloader_command):
8450         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8451         command line.
8453         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8454         method.
8455         (grub_e820_add_region): New function.
8456         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8457         booting.
8458         (grub_find_video_card): New function.
8459         (grub_linux_setup_video): New function.
8460         (grub_rescue_cmd_linux): Probe for video information.
8462         * normal/x86_64/setjmp.S: New file.
8464         * term/efi/console.c (map_char): New function.
8465         (grub_console_putchar): Map unicode char.
8466         (grub_console_checkkey): Wrap efi calls.
8467         (grub_console_getkey): Likewise.
8468         (grub_console_getwh): Likewise.
8469         (grub_console_gotoxy): Likewise.
8470         (grub_console_cls): Likewise.
8471         (grub_console_setcolorstate): Likewise.
8472         (grub_console_setcursor): Likewise.
8474         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8476 2008-07-16  Pavel Roskin  <proski@gnu.org>
8478         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8479         format strings.
8481         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8482         pointer, not an integer.  This fixes a warning and prevents
8483         precision loss on 64-bit systems.
8484         (relocate_addresses): Remove unneeded cast.
8486 2008-07-15  Pavel Roskin  <proski@gnu.org>
8488         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8490         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8492         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8493         Fix comparison between signed and unsigned.
8495         * include/grub/i386/ieee1275/console.h: Declare
8496         grub_console_init() and grub_console_fini().
8498         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8499         It's empty and unused.
8501         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8502         beginning to avoid warnings with some compilers.
8504         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8505         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8507 2008-07-14  Pavel Roskin  <proski@gnu.org>
8509         * kern/env.c (grub_register_variable_hook): Don't copy empty
8510         string, it leaks memory.  Pass "" to grub_env_set(), it should
8511         handle constant strings.
8513         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8514         * commands/cmp.c (grub_cmd_cmp): Likewise.
8515         * kern/dl.c (grub_dl_flush_cache): Likewise.
8516         (grub_dl_load_core): Likewise.
8517         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8518         (grub_elf64_load_phdrs): Likewise.
8520 2008-07-13  Pavel Roskin  <proski@gnu.org>
8522         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8523         between signed and unsigned.
8524         (LzmaEnc_Finish): Fix warning about an unused parameter.
8526 2008-07-13  Bean  <bean123ch@gmail.com>
8528         * Makefile.in (enable_lzo): New rule.
8530         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8532         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8534         * boot/i386/pc/lnxboot.S: #include <config.h>.
8536         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8537         its value according to the compression algorithm used, lzo or lzma.
8539         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8540         compression algorithm according to configure macro.
8542         * kern/i386/pc/startup.S (codestart): Likewise.
8544         * kern/i386/pc/lzma_decode.S: New file.
8546         * include/grub/lib/LzFind.h: Likewise.
8548         * include/grub/lib/LzHash.h: Likewise.
8550         * include/grub/lib/LzmaDec.h: Likewise.
8552         * include/grub/lib/LzmaEnc.h: Likewise.
8554         * include/grub/lib/LzmaTypes.h: Likewise.
8556         * lib/LzFind.c: Likewise.
8558         * lib/LzmaDec.c: Likewise.
8560         * lib/LzmaEnc.c: Likewise.
8562 2008-07-13  Bean  <bean123ch@gmail.com>
8564         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8565         (grub_ext4_extent_header): New structure.
8566         (grub_ext4_extent): Likewise.
8567         (grub_ext4_extent_idx): Likewise.
8568         (grub_ext4_find_leaf): New function.
8569         (grub_ext2_read_block): Handle extents.
8571 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8573         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8575 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8577         * util/grub.d/40_custom.in: New file. Example on how to add custom
8578         entries to /etc/grub.d.
8579         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8580         40_custom (implicitly, by merging all the grub.d rules).
8582 2008-07-11  Pavel Roskin  <proski@gnu.org>
8584         * commands/read.c (grub_getline): Fix invalid memory access.
8585         Don't add newline to the variable value.
8587         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8588         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8589         (serial_hw_get_port): Check validity of the port number.
8590         (grub_cmd_serial): Check return value of serial_hw_get_port().
8592 2008-07-07  Pavel Roskin  <proski@gnu.org>
8594         * boot/i386/pc/diskboot.S (notification_string): Replace
8595         "Loading kernel" with just "loading".  This is shorter, less
8596         confusing and saves a few bytes for possible future changes.
8598 2008-07-05  Pavel Roskin  <proski@gnu.org>
8600         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8601         size for ATAPI devices, they are undefined.  Output sector
8602         number in decimal form.
8604         * disk/ata.c: Use named constants for status bits.
8606 2008-07-04  Pavel Roskin  <proski@gnu.org>
8608         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8609         grub_addr_t before casting it to the void pointer to fix a
8610         warning.  Non-addressable regions are discarded earlier.
8611         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8612         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8613         (check_signature): Don't shadow table_header.
8614         (grub_linuxbios_table_iterate): Cast numeric constants to
8615         grub_linuxbios_table_header_t.
8616         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8617         grub_stop().
8619         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8620         prevent warnings.
8622         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8623         pointer, which can cause warnings.  Support 64-bit addresses.
8625         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8626         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8628 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8630         This fixes a performance issue when pc & gpt partmap iterators
8631         didn't abort iteration even after our hook found what it was
8632         looking for (often causing expensive probes of non-existent drives).
8634         Some callers relied on previous buggy behaviour, since they would
8635         raise an error when their own hooks caused early abortion of its
8636         iteration.
8638         * kern/device.c (grub_device_open): Improve error message.
8639         * disk/lvm.c (grub_lvm_open): Likewise.
8640         * disk/raid.c (grub_raid_open): Likewise.
8642         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8643         when hook requests it, independently of grub_errno.
8644         (pc_partition_map_probe): Do not fail when find_func() caused
8645         early abortion of pc_partition_map_iterate().
8647         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8648         when hook requests it, independently of grub_errno.
8649         (gpt_partition_map_probe): Do not fail when find_func() caused
8650         early abortion of gpt_partition_map_iterate().
8652         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8653         when hook requests it, independently of grub_errno.  Do not fail when
8654         part_map_iterate_hook() caused early abortion of p->iterate().
8656         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8657         when grub_partition_iterate() returned with non-zero.
8659 2008-07-03  Pavel Roskin  <proski@gnu.org>
8661         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8662         like we do in grub_ata_pio_read().
8663         (grub_ata_readwrite): Always write individual sectors.  Fix the
8664         sector count for the remainder.
8665         (grub_ata_write): Enable writing to ATA devices.  Correctly
8666         report error for ATAPI devices.
8668 2008-07-02  Pavel Roskin  <proski@gnu.org>
8670         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8671         warning.
8673         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8674         for every read sector, we already increment it for the whole
8675         batch.  This fixes reading more than 256 sectors at once.
8677         * util/grub-editenv.c (cmd_info): Cast argument to long
8678         explicitly.  ptrdiff_t reduces to int on i386.
8680         * util/grub-editenv.c (main): Be specific which parameter is
8681         missing.
8683         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8684         (memdisk): Make memdisk_orig_addr a pointer.
8686         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8687         for file offsets, use grub_off_t instead.  Fix printf format
8688         warnings.
8690         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8691         there.  Real unexpected warnings should not drown in the noise
8692         about known problems.
8694         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8695         grub_disk_addr_t for memory addresses.
8697         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8698         explicitly to fix a warning.
8700         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8702         * Makefile.in (MODULE_LDFLAGS): New variable.
8703         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
8704         the linker accepts --build-id=none.
8705         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
8706         MODULE_LDFLAGS.
8707         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8709         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8710         those in Linux XFS code.  Provide a way to access 64-bit parent
8711         inode.
8712         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
8713         the end of struct grub_xfs_dir_header.
8715 2008-07-02  Bean  <bean123ch@gmail.com>
8717         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8718         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8719         and GRUB_IEEE1275_FLAG_NO_ANSI.
8721         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8722         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8723         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8725         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8726         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8728         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8729         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8731         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8732         esc sequence on non ANSI terminal.
8733         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8735         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8736         beginning of file.
8738 2008-07-02  Bean  <bean123ch@gmail.com>
8740         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8741         (grub_editenv_SOURCES): New variable.
8742         (pkglib_MODULES): Add loadenv.mod.
8743         (loadenv_mod_SOURCES): New variable.
8744         (loadenv_mod_CFLAGS): Likewise.
8745         (loadenv_mod_LDFLAGS): Likewise.
8747         * include/grub/envblk.h: New file.
8749         * util/envblk.c: New file.
8751         * util/grub-editenv.c: New file.
8753         * commands/loadenv.c: New file.
8755 2008-07-01  Pavel Roskin  <proski@gnu.org>
8757         * include/multiboot2.h (struct multiboot_tag_module): Use char,
8758         not unsigned char.  This fixes warnings and is consistent with
8759         other tags.
8761         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8763         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8765         * term/tparm.c (analyze): Always set *popcount.
8767         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8768         cast to fix a warning.
8770         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8771         cast to suppress a warning.
8773         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8774         grub_fshelp_read_file() expects.
8776         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
8777         write uuid as a 32-bit value in CPU byte order, so declare and
8778         use it as such.
8780         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8781         long if the format specifier expects it.
8782         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8783         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8784         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8785         long to fix a warning.
8786         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8787         grub_dprintf() arguments to fix warnings.
8789 2008-06-30  Pavel Roskin  <proski@gnu.org>
8791         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8792         install_bsd_part immediately before core.img is embedded or
8793         modified on disk.  This fixes core.img verification if core.img
8794         cannot be embedded.
8796         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8797         core_path to calculate the blocklist.
8798         Patch from Javier Martín <lordhabbit@gmail.com>
8800 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8802         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
8803         block to disk block.
8804         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8805         Patch from Niels Böhm <bitbucket@arcor.de>
8807 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8809         * util/update-grub_lib.in (font_path): Search for fonts in
8810         /boot/grub first, which is more likely to be readable (we aren't
8811         deciding where fonts live, just looking for them).
8813 2008-06-26  Pavel Roskin  <proski@gnu.org>
8815         * util/biosdisk.c (read_device_map): Don't leave dead map
8816         entries for devices failing stat() check.
8818         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8819         core_path_dev for the core.img path on the target device.
8821 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8823         * disk/fs_uuid.c: New file.
8824         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8825         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8826         (fs_uuid_mod_LDFLAGS): New variables.
8827         * include/grub/disk.h (grub_disk_dev_id): Add
8828         `GRUB_DISK_DEVICE_UUID_ID'.
8829         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8830         implement iterate().
8832 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8834         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8835         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8836         Linux image includes no initrd.
8838 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
8840         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8841         call to resolve the core image location that effectively appended the
8842         name twice.
8844 2008-06-21  Robert Millan  <rmh@aybabtu.com>
8846         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8847         call from here ...
8849         * util/grub.d/10_hurd.in: ... to here ...
8850         * util/grub.d/10_linux.in: ... and here.
8852 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8854         * kern/main.c (grub_main): Export `prefix' variable immediately
8855         after it has been set by grub_machine_set_prefix().
8857 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8859         * commands/search.c (search_label, search_fs_uuid, search_file): Print
8860         search result when not saving to variable, not the other way around.
8861         When saving to variable, abort iteration as soon as a match is found.
8863 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8865         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8866         check for partition that provides /boot/grub.  Its logic is flawed,
8867         as it prevents prepare_grub_to_access_device() from being called
8868         multiple times.
8870 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8872         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8873         "insmod" command directly when abstraction modules are needed,
8874         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8875         since it had already been processed).
8877 2008-06-19  Pavel Roskin  <proski@gnu.org>
8879         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8880         changed.  This is needed in case GRUB_LIBDIR changes.
8881         * conf/i386-ieee1275.rmk: Likewise.
8882         * conf/i386-linuxbios.rmk: Likewise.
8883         * conf/i386-pc.rmk: Likewise.
8884         * conf/powerpc-ieee1275.rmk: Likewise.
8886 2008-06-18  Pavel Roskin  <proski@gnu.org>
8888         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8889         kernel_elf_symlist.c to symlist.c for consistency with other
8890         architectures.  Update all users.
8891         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8893 2008-06-18  Robert Millan  <rmh@aybabtu.com>
8895         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8896         it in prefix.
8898         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
8899         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
8900         a RAID device, run setup() for all members independently on whether
8901         LVM abstraction is being used.
8902         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8903         If grub-mkimage has set `*install_dos_part == -2', don't override this
8904         value.
8905         Perform *install_dos_part adjustments independently on whether
8906         we're embedding or not.
8907         Clarify error message when image is too big for embedding.
8908         Remove duplicate *install_dos_part stanza.
8910 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8912         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8913         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8914         variables.
8915         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8916         values in grub_ofconsole_normal_color and
8917         grub_ofconsole_highlight_color (they're not directly related to
8918         background and foreground).
8919         (grub_ofconsole_setcolorstate): Extract background and foreground
8920         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8922 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8924         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8925         /boot/grub for the check in last commit, not /boot (they could be
8926         different partitions).
8928 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8930         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8931         asked to setup access for the same partition that provides /boot,
8932         don't bother using UUIDs since our root already has the value we
8933         want.
8935 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8937         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8938         I2O devices.
8939         Patch from Sven Mueller <sven@debian.org>.
8941 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8943         * util/update-grub.in: Check for $EUID instead of $UID.
8944         Reported by Vincent Zweije.
8946 2008-06-16  Bean  <bean123ch@gmail.com>
8948         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8949         (grub_ext2_read_block): Likewise.
8950         (grub_ext2_read_inode): Likewise.
8951         (grub_ext2_mount): Likewise.
8952         (grub_ext2_close): Likewise.
8953         (grub_ext3_get_journal): Removed.
8955         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8956         (grub_reiserfs_read_symlink): Likewise.
8957         (grub_reiserfs_mount): Likewise.
8958         (grub_reiserfs_open): Likewise.
8959         (grub_reiserfs_read): Likewise.
8960         (grub_reiserfs_close): Likewise.
8961         (grub_reiserfs_get_journal): Removed.
8963         * fs/fshelp.c (grub_fshelp_read): Removed.
8964         (grub_fshelp_map_block): Likewise.
8966         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8967         (grub_fshelp_journal): Likewise.
8968         (grub_fshelp_read): Likewise.
8969         (grub_fshelp_map_block): Likewise.
8971 2008-06-16  Pavel Roskin  <proski@gnu.org>
8973         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8974         floating point anymore.
8975         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8977 2008-06-15  Pavel Roskin  <proski@gnu.org>
8979         * commands/ls.c (grub_ls_list_files): Use integer calculations
8980         for human readable format, avoid floating point use.
8981         * kern/misc.c (grub_ftoa): Remove.
8982         (grub_vsprintf): Remove floating point support.
8984 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8986         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8987         devices.
8988         Reported by Max Vozeler.
8990 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8992         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8993         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8994         skipped later.
8995         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8996         the beginning of the prefix.
8998         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8999         It is assumed that if we have a memdisk, grub-mkimage has set
9000         grub_prefix to include the "(memdisk)" drive in it.
9002 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9004         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9005         Initialize keyboard controller after registering the terminal, so that
9006         grub_printf() can be called from grub_keyboard_controller_init().
9008 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9010         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9011         extent-btree which is written as big endian on disk.
9012         Reported by Alain Greppin  <al@chilibi.org>.
9014 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9016         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9017         * util/i386/pc/grub-install.in (modules): Likewise.
9019 2008-06-13  Pavel Roskin  <proski@gnu.org>
9021         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9023 2008-06-13  Bean  <bean123ch@gmail.com>
9025         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9027         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9029         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9030         to indicate sparse block.
9032 2008-06-12  Pavel Roskin  <proski@gnu.org>
9034         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9035         number, grub_fshelp_read() does it for us.
9037         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9038         linear disk read with journal translation.
9039         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9040         * include/grub/fshelp.h: Declare grub_fshelp_read().
9042 2008-06-09  Pavel Roskin  <proski@gnu.org>
9044         * fs/minix.c (grub_minix_mount): Handle error reading
9045         superblock.
9047 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9049         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9050         don't append the RAID prefix afterwards.
9051         Reported by Clint Adams.
9053 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9055         Based on description from Pavel:
9056         * kern/disk.c (grub_disk_check_range): Rename to ...
9057         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9058         tasks performed by this function.
9060 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9062         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9063         `num_serial' (for consistency with other variables).
9064         (struct grub_ntfs_data): Add `uuid' member.
9065         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9066         (grub_ntfs_uuid): New function.
9067         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9069 2008-06-07  Pavel Roskin  <proski@gnu.org>
9071         * util/biosdisk.c (open_device): Revert last change to the
9072         function, it broke installation.  The sector needs to be
9073         different dependent on which device is opened.
9075 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9077         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9078         rest of GRUB, and breakage doesn't happen if its value were modified.
9080         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9081         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9082         a constant (same value).
9083         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9084         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9086 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9088         * util/biosdisk.c (open_device): Do not modify sector offset when
9089         accessing a partition.  kern/disk.c already handles this for us.
9091 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9093         * util/grub-emu.c (grub_machine_init): Move code in this function from
9094         here ...
9095         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9096         segfault in case grub_printf() is called).
9098         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9099         grub_probe.  Update all users not to explicitly add it again.
9100         (grub_device): New variable; contains corresponding device for grubdir.
9101         (fs_module, partmap_module, devabstraction_module): Pass
9102         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9103         every time.
9105 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9107         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9108         is found, print it (same layout as with labels).
9110 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9112         * util/biosdisk.c (get_drive): Rename to ...
9113         (find_grub_drive): ... this.  Update all users.
9115         (get_os_disk): Rename to ...
9116         (convert_system_partition_to_system_disk): ... this.  Update all users.
9118         (find_drive): Rename to ...
9119         (find_system_device): ... this.  Update all users.
9121 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9123         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9124         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9125         (make_device_map): Likewise.
9127 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9129         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9130         before dereferencing it.
9132         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9133         union with fat12/fat16-specific ones.  Add some new fields, including
9134         `num_serial' for both versions.
9135         (struct grub_fat_data): Add `uuid' member.
9136         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9137         names.  Initialize `data->uuid' using `num_serial'.
9138         (grub_fat_uuid): New function.
9139         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9141         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9142         (grub_reiserfs_uuid): New function.
9143         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9144         member.
9146         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9147         (grub_xfs_uuid): New function.
9148         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9150 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9152         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9153         code that is backward compatible with pre-uuid search command.
9155 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9157         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9158         floppies after everything else, to ensure floppy drive isn't accessed
9159         unnecessarily (patch from Bean).
9161 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9163         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9164         not print device names when we were asked to set a variable.
9166 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9168         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9169         using "cursor-on" and "cursor-off" commands (understood at least by
9170         the Open Firmware flavour on OLPC).
9172 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9174         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9175         on and off sequences.
9177 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9179         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9180         * util/update-grub.in: Likewise.
9182 2008-05-30  Pavel Roskin  <proski@gnu.org>
9184         * util/biosdisk.c (linux_find_partition): Simplify logic and
9185         make the code more universal.  Keep special processing for
9186         devfs, but use a simple rule for all other devices.  If the
9187         device ends with a number, append 'p' and the partition number.
9188         Otherwise, append only the partition number.
9190 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9192         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9193         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9194         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9195         the `root' parameter to Linux.
9197 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9199         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9200         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9201         --fs_uuid with --fs-uuid.
9202         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9203         all filesystems support them).
9205 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9207         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9208         grub_printf() flags, since we're printing in units of 2 bytes.
9210 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9212         * util/grub.d/00_header.in: Remove obsolete comment referencing
9213         convert_system_path_to_grub_path().
9214         * util/update-grub.in: Likewise.
9215         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9216         (convert_system_path_to_grub_path): Add a warning message explaining
9217         that this function is deprecated.  Rely on is_path_readable_by_grub()
9218         for the readability checks.
9219         (font_path): Use is_path_readable_by_grub() for the readability
9220         check rather than convert_system_path_to_grub_path().
9222 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9224         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9225         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9226         converting it first.
9227         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9228         grub.cfg for access to font file, and afterwards call it again to set
9229         the root device.
9231 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9233         * commands/search.c (options): Add --fs_uuid option.
9234         (search_fs_uuid): New function.
9235         (grub_cmd_search): Fix --set argument passing.
9236         Use search_fs_uuid() when requested via --fs_uuid.
9237         (grub_search_init): Update help message.
9238         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9239         and redeclare it as an array of 16-bit words.
9240         (grub_ext2_uuid): New function.
9241         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9242         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9243         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9244         (GRUB_DEVICE_BOOT_UUID): New variables.
9245         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9246         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9247         whenever possible.
9248         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9249         just assume `root' variable has the right value.
9250         * util/grub.d/10_linux.in: Likewise.
9251         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9252         via PRINT_FS_UUID.
9253         (main): Recognise `-t fs_uuid' argument.
9255 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9257         * util/biosdisk.c (map): Redefine structure to hold information
9258         about GRUB drive name.
9259         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9260         drive names.
9261         (call_hook): Remove.
9262         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9263         member.  Assume drive has partitions.
9264         (grub_util_biosdisk_open): Access device names via `.device' struct
9265         member.
9266         (open_device): Likewise.
9267         (find_drive): Likewise.
9268         (read_device_map): Adjust map[] usage to match the new struct
9269         definition.  Don't check for duplicates (still possible, but not cheap
9270         anymore).
9271         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9272         (make_device_name): Remove assumption of BIOS-like drive names.
9274 2008-05-30  Pavel Roskin  <proski@gnu.org>
9276         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9277         compiling execute.c doesn't need grub_script.tab.h anymore.
9278         (normal/command.c_DEPENDENCIES): Likewise.
9279         (normal/function.c_DEPENDENCIES): Likewise.
9280         * conf/i386-ieee1275.rmk: Likewise.
9281         * conf/i386-linuxbios.rmk: Likewise.
9282         * conf/i386-pc.rmk: Likewise.
9283         * conf/powerpc-ieee1275.rmk: Likewise.
9284         * conf/sparc64-ieee1275.rmk: Likewise.
9286 2008-05-29  Pavel Roskin  <proski@gnu.org>
9288         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9289         when scanning metadata for volume group name.
9291         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9292         a generated file, which may only be included from the files with
9293         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9294         use union YYSTYPE, as the later allows forward declaration.
9295         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9297 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9299         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9300         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9301         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9302         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9303         scan codes.
9305 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9307         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9308         control key combinations.
9310 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9312         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9313         * util/ieee1275/grub-install.in: ... to here.
9314         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9315         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9316         (grub_install_SOURCES): Likewise.
9318 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9320         * fs/affs.c: Update copyright year.
9321         * fs/ext2.c: Likewise.
9322         * fs/fshelp.c: Likewise.
9323         * fs/hfsplus.c: Likewise.
9324         * fs/ntfs.c: Likewise.
9325         * fs/xfs.c: Likewise.
9326         * include/grub/fshelp.h: Likewise.
9327         * util/grub-mkdevicemap.c: Likewise.
9329 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9331         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9332         might need to be fatfs to support some firmware implementations
9333         (e.g. OFW or EFI).
9335 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9337         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9338         devices.
9339         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9340         (make_device_map): Likewise.
9342 2008-05-20  Bean  <bean123ch@gmail.com>
9344         * fs/fshelp.c (grub_fshelp_map_block): New function.
9345         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9346         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9348         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9349         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9350         (grub_fshelp_journal): New structure.
9351         (grub_fshelp_map_block): New function prototype.
9352         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9353         (grub_fshelp_map_block): Likewise.
9355         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9356         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9357         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9358         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9359         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9360         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9361         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9362         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9363         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9364         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9365         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9366         (grub_ext2_sblock): New members for journal support.
9367         (grub_ext3_journal_header): New structure.
9368         (grub_ext3_journal_revoke_header): Likewise.
9369         (grub_ext3_journal_block_tag): Likewise.
9370         (grub_ext3_journal_sblock): Likewise.
9371         (grub_fshelp_node): New members logfile and journal.
9372         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9373         grub_fshelp_map_block to get real block number.
9374         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9375         number.
9376         (grub_ext2_read_inode): Likewise.
9377         (grub_ext3_get_journal): New function.
9378         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9379         (grub_ext2_close): Release memory used by journal.
9381         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9382         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9383         (grub_reiserfs_transaction_header): Renamed to
9384         grub_reiserfs_description_block, replace field data with real_blocks.
9385         (grub_reiserfs_commit_block): New structure.
9386         (grub_reiserfs_data): New member journal.
9387         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9388         number.
9389         (grub_reiserfs_read_symlink): Likewise.
9390         (grub_reiserfs_iterate_dir): Likewise.
9391         (grub_reiserfs_open): Likewise.
9392         (grub_reiserfs_read): Likewise.
9393         (grub_reiserfs_get_journal): New function.
9394         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9395         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9396         using grub_reiserfs_get_journal.
9397         (grub_reiserfs_close): Release memory used by journal.
9399         * fs/affs.c (grub_affs_read_block): Change block type to
9400         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9402         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9404         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9406         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9408         * fs/udf.c (grub_udf_read_block): Change block type to
9409         grub_disk_addr_t. Use type cast to avoid warning.
9411         * fs/xfs.c (grub_xfs_read_block): Likewise.
9413 2008-05-16  Christian Franke  <franke@computer.org>
9415         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9416         to ensure that break with ESC will always work.
9417         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9418         Remove ESC from keyboard queue.
9420 2008-05-16  Christian Franke  <franke@computer.org>
9422         * util/biosdisk.c: [__CYGWIN__] Add includes.
9423         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9424         (get_os_disk): Move variable declarations to OS specific
9425         parts to avoid warning.
9426         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9427         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9428         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9429         Cygwin.
9430         * util/getroot.c: [__CYGWIN__] Add includes.
9431         (strip_extra_slashes): Fix "/" case.
9432         [__CYGWIN__] (get_win32_path): New function.
9433         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9434         [__CYGWIN__] (find_root_device): Disable.
9435         [__CYGWIN__] (get_bootsec_serial): New function.
9436         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9437         [__linux__] (grub_guess_root_device): Add early returns to simplify
9438         structure.
9439         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9440         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9441         check for Linux only.
9443 2008-05-15  Bean  <bean123ch@gmail.com>
9445         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9446         keyboard hang problem in apple's intel mac.
9448 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9450         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9451         devices.
9452         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9453         (make_device_map): Likewise.
9454         Reported by Aurelien Jarno <aurel32@debian.org>
9456 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9458         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9459         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9460         (make_device_map): Output entries for xvd type disks.
9462 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9464         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9465         devices.
9466         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9467         (make_device_map): Likewise.
9468         Reported by Roland Dreier <rdreier@cisco.com>
9470 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9472         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9473         grub_strstr() call.  Correct a few mistakes in failure path handling.
9475 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9477         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9478         Do not print a trailing slash (therefore, the root directory is an
9479         empty string).
9480         (convert_system_path_to_grub_path): Do not remove trailing slash
9481         from make_system_path_relative_to_its_root() output.
9483         * util/i386/pc/grub-install.in: Add trailing slash to output from
9484         make_system_path_relative_to_its_root().
9486 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9488         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9489         ensures that output lines aren't intermangled with those sent to
9490         stderr (via grub_util_info()).
9491         * util/grub-probe.c (grub_refresh): Likewise.
9492         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9494 2008-05-05  Christian Franke  <franke@computer.org>
9496         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9497         Add Cygwin device names.
9498         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9499         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9500         (check_device): Return error instead of success on empty name.
9501         (make_device_map): Move label inside linux specific code to
9502         prevent compiler warning.
9504 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9506         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9507         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9508         first boot option.
9509         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9511 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9513         * docs/grub.cfg: New file (example GRUB configuration).
9515 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9517         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9518         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9519         and `disk/ieee1275/nand.c'.
9521 2008-04-25  Bean  <bean123ch@gmail.com>
9523         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9524         i386-linuxbios.
9526         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9527         change the buffer size to 4096 for cdrom device.
9529         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9530         and nand.mod.
9531         (_linux_mod_SOURCES): New variable.
9532         (_linux_mod_CFLAGS): Likewise.
9533         (_linux_mod_LDFLAGS): Likewise.
9534         (linux_mod_SOURCES): Likewise.
9535         (linux_mod_CFLAGS): Likewise.
9536         (linux_mod_LDFLAGS): Likewise.
9537         (nand_mod_SOURCES): Likewise.
9538         (nand_mod_CFLAGS): Likewise.
9539         (nand_mod_LDFLAGS): Likewise.
9541         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9542         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9543         type property. (nand device in olpc don't have this property)
9545         * include/grub/disk.h (grub_disk_dev_id): New macro
9546         GRUB_DISK_DEVICE_NAND_ID.
9548         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9549         function prototype.
9550         (grub_rescue_cmd_initrd): Likewise.
9552         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9553         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9554         ofw_cif_handler and ofw_idt, adjust padding number.
9556         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9557         GRUB_MACHINE_IEEE1275 is defined.
9559         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9560         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9562         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9563         on nested function heap_init.
9564         (grub_upper_mem): New variable for i386-ieee1275.
9565         (grub_get_extended_memory): New function for i386-ieee1275.
9566         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9568         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9569         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9570         property.
9572         * loader/i386/ieee1275/linux.c: New file.
9574         * loader/i386/ieee1275/linux_normal.c: New file.
9576         * disk/ieee1275/nand.c: New file.
9578 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9580         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9581         value.
9582         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9584 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9586         Restructures early code path on ieee1275 to unify grub_main() as
9587         the first C function that is executed in every platform.
9589         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9590         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9591         cmain().
9592         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9593         * kern/ieee1275/cmain.c (cmain): Rename to ...
9594         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9595         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9596         at the beginning.
9598 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9600         * util/update-grub.in: Fix syntax error when setting
9601         `GRUB_PRELOAD_MODULES'.
9602         Reported by Stephane Chazelas <stephane@artesyncp.com>
9604 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9606         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9607         section into account, newer toolchains generate unique build ids
9608         * configure.ac: remove the test for --build-id=none acceptance,
9609         we want build ids to be preserved
9610         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9611         far from other sections don't cause the raw binary images grow
9612         size
9614 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9616         * disk/lvm.c: Update copyright year.
9617         * kern/misc.c: Likewise.
9619 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9621         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9622         there is no memory left for physical volume name.
9624 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9626         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9627         volume name mapping to support bigger than 9 character names properly.
9629 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9631         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9632         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9634 2008-04-13  Christian Franke  <franke@computer.org>
9636         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9637         to create a floppy emulation boot CD when non emulation mode
9638         does not work.
9639         Enable Joliet CD filesystem extension.
9641 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9643         * kern/misc.c (grub_strncat): Fix off-by-one error.
9644         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9646         * kern/env.c (grub_env_context_close): Clear current context, not
9647         previous one.
9648         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9650         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9652 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9654         Improve robustness when handling LVM.
9656         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9657         (and leave `*p' unmodified).
9658         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9659         through it.
9660         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9661         iterating through it.
9662         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9663         through it.
9664         (grub_lvm_scan_device): Check the return value (and fail gracefully
9665         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9666         Don't assume `vg->pvs != NULL' when iterating through it.
9668 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9670         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9671         * genmk.rb (partmap): New variable.
9672         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9673         (#{partmap}): New target rule.
9674         * genpartmaplist.sh: New file.
9675         * Makefile.in (pkglib_DATA): Add partmap.lst.
9676         (partmap.lst): New target rule.
9677         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9678         modules (including all partition maps), instead of preloading them.
9680 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
9682         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9683         `linux-boot-prober' (if installed) to detect other operating
9684         systems which are installed on the computer and add them to
9685         the boot menu.
9686         * conf/common.rmk: Build and install 30_os-prober.
9688 2008-04-12  Robert Millan  <rmh@aybabtu.com>
9690         * kern/powerpc/ieee1275/init.c: Move from here ...
9691         * kern/ieee1275/init.c: ... to here.  Update all users.
9693         * kern/powerpc/ieee1275/cmain.c: Move from here ...
9694         * kern/ieee1275/cmain.c: ... to here.  Update all users.
9696         * kern/powerpc/ieee1275/openfw.c: Move from here ...
9697         * kern/ieee1275/openfw.c: ... to here.  Update all users.
9699         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9700         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
9702 2008-04-10  Pavel Roskin  <proski@gnu.org>
9704         * configure.ac: Always use "_cv_" in cache variables for
9705         compatibility with Autoconf 2.62.
9707 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9709         Revert grub/machine/init.h addition by Pavel (since it breaks on
9710         i386-ieee1275 and others):
9711         * util/i386/pc/misc.c: Remove grub/machine/init.h.
9712         * util/powerpc/ieee1275/misc.c: Likewise.
9714 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9716         * util/grub-probe.c (probe): Improve error message.
9718 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9720         * util/biosdisk.c (read_device_map): Skip devices that don't exist
9721         (this prevents the presence of a bogus entry from ruining the whole
9722         thing).
9724 2008-04-06  Pavel Roskin  <proski@gnu.org>
9726         * util/biosdisk.c: Include grub/util/biosdisk.h.
9727         * util/grub-fstest.c (execute_command): Make static.
9728         * util/grub-mkdevicemap.c (check_device): Likewise.
9729         * util/i386/pc/misc.c: Include grub/machine/init.h.
9730         * util/powerpc/ieee1275/misc.c: Likewise.
9731         * util/lvm.c: Include grub/util/lvm.h.
9732         * util/misc.c: Include grub/kernel.h, grub/misc.h and
9733         grub/cache.h.
9734         * util/raid.c: Include grub/util/raid.h.
9735         (grub_util_getdiskname): Make static.
9737         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9738         grub_hostfs_fini(), as they are called from grub_init_all() and
9739         grub_fini_all() respectively.  This fixes an infinite loop in
9740         grub-fstest due to double registration of hostfs.
9741         Reported by Christian Franke <Christian.Franke@t-online.de>
9743 2008-04-05  Pavel Roskin  <proski@gnu.org>
9745         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9746         all 8 functions.  Otherwise, probe function 0 only.
9748 2008-04-04  Pavel Roskin  <proski@gnu.org>
9750         * commands/lspci.c (grub_lspci_iter): Print the bus number
9751         correctly.
9753         * commands/lspci.c (grub_pci_classes): Fix typos.
9754         (grub_lspci_iter): Don't print func twice.  Print vendor ID
9755         before device ID, as it's normally done.
9757         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9758         Fix signedness warnings.
9759         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9760         Likewise.
9761         * util/ieee1275/get_disk_name.c: Include config.h so that
9762         _GNU_SOURCE is defined and getline() is declared.  Mark an
9763         unused argument as such.  Fix a signedness warning.
9765 2008-04-02  Pavel Roskin  <proski@gnu.org>
9767         * genkernsyms.sh.in: Use more robust assignments for CC and
9768         srcdir.  Quote srcdir.
9769         * gensymlist.sh.in: Likewise.  Assert at the compile time that
9770         the symbol table is not empty.
9772         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9773         * fs/cpio.c (grub_cpio_read): Likewise.
9775 2008-04-01  Pavel Roskin  <proski@gnu.org>
9777         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9778         * disk/host.c (grub_host_open): Likewise.
9779         * disk/loopback.c (grub_loopback_open): Likewise.
9780         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9781         disk->id as in disk/host.c, not a multi-character constant.
9783         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
9784         later is obsolete, potentially dangerous and sets a bad example.
9785         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9786         * util/misc.c (grub_util_get_image_size): Likewise.
9788         * disk/loopback.c (options): Improve help for "--partitions".
9790         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9791         options to align them with the short options, e.g. "echo -e".
9793 2008-03-31  Bean  <bean123ch@gmail.com>
9795         * video/reader/png.c (grub_png_data): New member is_16bit and
9796         image_data.
9797         (grub_png_decode_image_header): Detect 16 bit png image.
9798         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9799         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9800         (grub_video_reader_png): Release memory occupied by image_data.
9802         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9803         4096 bytes.
9804         (grub_nfs_mount): Skip the test for sector per cluster.
9806         * include/grub/ntfs.h (MAX_SPC): Removed.
9808 2008-03-31  Bean  <bean123ch@gmail.com>
9810         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9811         (grub_probe_SOURCES): Add fs/afs.c.
9812         (grub_fstest_SOURCES): Likewise.
9813         (afs_mod_SOURCES): New variable.
9814         (afs_mod_CFLAGS): Likewise.
9815         (afs_mod_LDFLAGS): Likewise.
9817         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9818         (grub_emu_SOURCES): Likewise.
9820         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9822         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9824         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9826         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9828         * fs/afs.c: New file.
9830 2008-03-30  Pavel Roskin  <proski@gnu.org>
9832         * disk/host.c: Include grub/misc.h to fix a warning.
9833         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9834         warnings about implicit declarations.
9836         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9837         variable.
9838         * include/grub/i386/loader.h: Change declaration of
9839         grub_linux_boot() to match what grub_loader_set() expects.
9840         * util/getroot.c (grub_guess_root_device): Return const char* to
9841         fix a warning.
9842         * util/grub-probe.c (probe): Fix a warning about uninitialized
9843         abstraction_name variable.
9844         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9845         second argument as unused to fix a warning.
9847         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9848         missing grub_error() call.
9850         * util/update-grub_lib.in: Define datarootdir, since Autoconf
9851         2.60 and newer uses it to define datadir.
9853         * commands/sleep.c: Fix warning about implicit declaration.
9854         * disk/memdisk.c: Likewise.
9855         * loader/aout.c: Likewise.
9856         * loader/i386/bsd_normal.c: Likewise.
9857         * util/grub-probe.c: Likewise.
9859         * commands/i386/cpuid.c (has_longmode): Make static.
9860         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9861         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9863         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9864         GDT.  This is more robust, as %ds can change.
9865         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9866         calling real_to_prot().
9867         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9869 2008-03-28  Pavel Roskin  <proski@gnu.org>
9871         * kern/i386/pc/startup.S: Assert that uncompressed functions
9872         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9873         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9874         code, as they push parts of the code (error handlers) beyond
9875         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
9876         code as correctness and size.
9878 2008-03-28  Pavel Roskin  <proski@gnu.org>
9880         * kern/i386/pc/startup.S
9881         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9882         data block address to the real mode, keep offset minimal.  This
9883         works around a bug in AWARD BIOS on old Athlon systems, which
9884         makes CD detection hang.
9886 2008-03-26  Pavel Roskin  <proski@gnu.org>
9888         * normal/color.c (grub_parse_color_name_pair): Make `name' a
9889         const.
9890         * include/grub/normal.h: Add grub_parse_color_name_pair()
9891         declaration.
9893 2008-03-24  Bean  <bean123ch@gmail.com>
9895         * disk/i386/pc/biosdisk.c (cd_start): Removed.
9896         (cd_count): Removed.
9897         (cd_drive): New variable.
9898         (grub_biosdisk_get_drive): Don't check for (cdN) device.
9899         (grub_biosdisk_call_hook): Likewise.
9900         (grub_biosdisk_iterate): Change cdrom detection method.
9901         (grub_biosdisk_open): Replace cd_start with cd_drive.
9902         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9903         detect cdrom device.
9905         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9906         Removed.
9907         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9908         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9909         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9910         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9911         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9912         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9913         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9914         (grub_biosdisk_cdrp): New structure.
9915         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9917         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9919         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9920         device.
9922         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9923         New function.
9925 2008-03-20  Robert Millan  <rmh@aybabtu.com>
9927         Remove 2 TiB limit in ata.mod.
9928         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9929         (grub_ata_dumpinfo): Print sector count with 0x%llx.
9930         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9931         grub_uint64_t instead of grub_uint32_t.
9933 2008-03-05  Bean  <bean123ch@gmail.com>
9935         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9936         (grub_multiboot): Set boot device.
9938         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9940 2008-03-02  Bean  <bean123ch@gmail.com>
9942         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9943         symlink_buffer.
9945 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
9947         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9948         texinfo.tex.
9950         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9951         modified.
9953         * docs/fdl.texi: New file.
9955         * docs/mdate-sh: New file. Copied from gnulib.
9956         * docs/texinfo.tex: Likewise.
9958         * config.guess: Updated from gnulib.
9959         * install-sh: Likewise.
9961 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9963         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9964         (aout_mod_SOURCES): New variable.
9965         (aout_mod_CFLAGS): Likewise.
9966         (aout_mod_LDFLAGS): Likewise.
9968         * conf/i386-ieee1275.rmk: Likewise.
9970 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9972         * util/update-grub.in: Reorganise terminal validity check.  Accept
9973         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9974         Based on suggestion by Franklin PIAT.
9976 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
9978         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9979         function.
9980         * util/getroot.c (grub_util_check_block_device): New function that
9981         returns the given argument if it is a block device and returns NULL else.
9982         * util/grub-probe.c (argument_is_device): New variable.
9983         (probe): Promote device_name from a variable to an argument. Receive
9984         device_name from grub_util_check_block_device() if path is NULL and from
9985         grub_guess_root_device() else. Do not free() device_name anymore.
9986         (options): Introduce new parameter '-d, --device'.
9987         (main): Add description of the new parameter to the help screen.
9988         Rename path variable to argument. Set argument_is_device if the '-d'
9989         option is given. Pass argument to probe() depending on
9990         argument_is_device.
9992 2008-02-24  Bean  <bean123ch@gmail.com>
9994         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9995         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9996         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9997         (GRUB_ISO9660_VOLDESC_PART): Likewise.
9998         (GRUB_ISO9660_VOLDESC_END): Likewise.
9999         (grub_iso9660_primary_voldesc): New member escape.
10000         (grub_iso9660_data): New member joliet.
10001         (grub_iso9660_convert_string): New function.
10002         (grub_iso9660_mount): Detect joliet extension.
10003         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10004         (grub_iso9660_iso9660_label): Likewise.
10006         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10007         (grub_setup_SOURCES): Add fs/udf.c.
10008         (grub_fstest_SOURCES): Likewise.
10009         (udf_mod_SOURCES): New variable.
10010         (udf_mod_CFLAGS): Likewise.
10011         (udf_mod_LDFLAGS): Likewise.
10013         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10014         (grub_emu_SOURCES): Likewise.
10016         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10018         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10020         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10022         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10024         * fs/udf.c: New file.
10026 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10028         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10029         (normal/lexer.c_DEPENDENCIES): New variables.
10030         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10031         (normal/lexer.c_DEPENDENCIES): Likewise.
10032         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10033         (normal/lexer.c_DEPENDENCIES): Likewise.
10034         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10035         (normal/lexer.c_DEPENDENCIES): Likewise.
10036         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10037         (normal/lexer.c_DEPENDENCIES): Likewise.
10038         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10039         (normal/lexer.c_DEPENDENCIES): Likewise.
10041 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10043         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10044         since they were intended to be in hex.  This didn't break previously
10045         because of a bug in gpt_partition_map_iterate() (see below).
10047         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10048         when checking the validity of GPT header.
10049         Remove `partno', since it always provides the same information as `i'.
10051 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10053         * include/grub/efi/time.h: Fix a wrong comment.
10055 2008-02-19  Pavel Roskin  <proski@gnu.org>
10057         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10058         message.
10060 2008-02-19  Bean  <bean123ch@gmail.com>
10062         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10063         (aout_mod_SOURCES): New variable.
10064         (aout_mod_CFLAGS): Likewise.
10065         (aout_mod_LDFLAGS): Likewise.
10066         (_bsd_mod_SOURCES): New variable.
10067         (_bsd_mod_CFLAGS): Likewise.
10068         (_bsd_mod_LDFLAGS): Likewise.
10069         (bsd_mod_SOURCES): New variable.
10070         (bsd_mod_CFLAGS): Likewise.
10071         (bsd_mod_LDFLAGS): Likewise.
10073         * include/grub/aout.h: New file.
10075         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10077         * include/grub/i386/bsd.h: New file.
10079         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10080         to make it public.
10082         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10083         function is called, so that it's possible to change it inside the hook.
10084         (grub_elf64_load): Likewise.
10085         (grub_elf_file): Don't close the file if elf header is not found.
10086         (grub_elf_close): Close the file if grub_elf_file fails (The new
10087         grub_elf_file won't close it).
10088         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10089         (grub_elf64_size): Likewise.
10091         * kern/i386/loader.S (grub_unix_real_boot): New function.
10093         * loader/aout.c: New file.
10095         * loader/i386/bsd.c: New file.
10097         * loader/i386/bsd_normal.c: New file.
10099         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10101         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10102         can test other formats.
10104 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10106         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10107         (grub_gpt_partition_type_empty): Redefine with macro from
10108         `<grub/gpt_partition.h>'.
10109         (gpt_partition_map_iterate): Adjust partition type comparison.
10111         Export `entry' as partmap-specific `part.data' struct.
10112         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10114         * include/grub/gpt_partition.h (grub_gpt_header)
10115         (grub_gpt_partentry): ... to here (new file).
10117         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10119         (grub_gpt_partition_type_bios_boot): New const variable, defined
10120         with macro from `<grub/gpt_partition.h>'.
10122         (setup): Replace `first_start' with `embed_region', which keeps
10123         track of the embed region (and is partmap-agnostic).
10125         Replace find_first_partition_start() with find_usable_region(),
10126         which finds a usable region for embedding using partmap-specific
10127         knowledge (supports PC/MSDOS and GPT).
10129         Fix all assumptions that the embed region start at sector 1, using
10130         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10131         rather than `first_start' to calculate available size.
10133         In grub_util_info() message, replace "into after the MBR" with an
10134         indication of the specific sector our embed region starts at.
10136 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10138         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10139         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10140         `commands/reboot.c'.
10141         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10142         (halt_mod_SOURCES): Likewise.
10143         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10144         (halt_mod_SOURCES): Likewise.
10146 2008-02-17  Christian Franke  <franke@computer.org>
10148         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10150 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10152         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10153         set `first_start' to 0 for non-PC/MSDOS partition maps.
10155 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10157         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10158         do not assume partition map is PC/MSDOS before performing checks that
10159         are specific to that layout.
10161 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10163         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10164         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10165         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10167 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10169         * configure.ac: Only a cosmetic change on the handling of
10170         -fno-stack-protector.
10172 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10174         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10175         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10176         reboot.c.
10177         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10178         (halt_mod_SOURCES): New variable.
10179         (halt_mod_CFLAGS): Likewise.
10180         (halt_mod_LDFLAGS): Likewise.
10181         (reboot_mod_SOURCES): Likewise.
10182         (reboot_mod_CFLAGS): Likewise.
10183         (reboot_mod_LDFLAGS): Likewise.
10185         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10186         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10187         reboot.c.
10188         (halt_mod_SOURCES): Likewise.
10189         (reboot_mod_SOURCES): Likewise.
10191         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10192         commands/i386/pc/reboot.c by commands/reboot.c.
10193         (reboot_mod_SOURCES): Likewise.
10195         * commands/i386/pc/reboot.c: merge this file ...
10197         * commands/ieee1275/reboot.c: ... and this file ...
10199         * commands/reboot.c: ... to this file.
10200         Add some precompiler directive to include the correct header for
10201         each machine.
10203         * commands/ieee1275/halt.c: move this file ...
10205         * commands/halt.c: ... to here.
10206         Add some precompiler directive to include the correct header for
10207         each machine.
10209         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10210         (grub_halt): Likewise.
10212         * kern/efi/efi.c (grub_reboot): New function.
10213         (grub_halt): Likewise.
10215 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10217         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10218         /dev (like it is done for /dev/mapper).  This doesn't provide support
10219         for EVMS, but at least it is now easy to identify the problem when it
10220         arises.
10222 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10224         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10225         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10226         comparing it with -1, not 0.
10228 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10230         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10231         `disk/lvm.c'.
10232         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10233         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10235         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10236         `disk/lvm.c' to the end of the list.
10237         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10238         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10240 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10242         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10243         grub_print_error() instead.  This will let user know why we're entering
10244         rescue mode.
10245         Based on suggestions from Sam Morris.
10247 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10249         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10250         on remaining N args, instead of "--" arg N times.
10252 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10254         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10255         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10256         pattern for unknown glyphs.
10258 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10260         * configure.ac: Probe for `help2man'.
10261         * Makefile.in (builddir): New variable.
10262         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10263         or otherwise add a few flags/options to it.
10264         (install-local): For every executable utility or script that is
10265         installed, invoke $(HELP2MAN) to install a manpage based on --help
10266         output.
10268         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10269         that it doesn't prevent --help from working in build tree.
10271         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10272         with `bug-grub@gnu.org'.
10273         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10274         * util/update-grub.in (usage): New function.
10275         Implement proper argument check, with support for --help and --version
10276         (as well as existing -y).
10278 2008-02-09  Christian Franke  <franke@computer.org>
10280         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10281         avoid overwriting previous output.
10282         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10284 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10286         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10287         drawing the menu.
10289 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10291         * commands/sleep.c: New file.
10292         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10293         (sleep_mod_SOURCES): New variable.
10294         (sleep_mod_CFLAGS): Likewise.
10295         (sleep_mod_LDFLAGS): Likewise.
10297 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10299         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10300         situations in which we can deduce the RAID size and the superblock
10301         doesn't match it.
10303 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10305         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10306         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10307         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10309         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10310         and return a grub_diskmemberlist_t composed of physical array members.
10311         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10313         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10314         prototype.
10315         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10316         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10317         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10319         * util/grub-probe.c (probe): Move partmap probing code from here ...
10320         (probe_partmap): ... to here.
10321         (probe): Use probe_partmap() once for the disk we're probing, and
10322         additionally, when such disk contains a memberlist() struct member,
10323         once for each disk that is contained in the structure returned by
10324         memberlist().
10326 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10328         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10329         environment variable to 'all' in order to obtain debug output from
10330         non-util/ code.
10331         * util/i386/pc/grub-setup.c (main): Likewise.
10333 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10335         * disk/raid.c (grub_raid_scan_device): Check for
10336         `array->device[sb.this_disk.number]' rather than for
10337         `array->device[sb.this_disk.number]->name', since the latter is not
10338         guaranteed to be accessible.
10340 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10342         * disk/raid.c: Update copyright.
10343         * fs/cpio.c: Likewise.
10344         * include/grub/raid.h: Likewise.
10345         * loader/i386/pc/multiboot.c: Likewise.
10346         * util/hostfs.c: Likewise.
10348 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10350         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10351         to a grub_disk_t array.
10352         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10353         `device[x]'.
10354         (grub_raid_scan_device): Replace `device[x].name' accesses with
10355         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10357 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10359         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10360         grub_dprintf() calls.
10361         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10362         error message.
10364 2008-02-07  Christian Franke  <franke@computer.org>
10366         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10367         instead of fseek and ftell to support large files.
10368         (grub_hostfs_read): Likewise.
10370 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10372         Patch from Jeroen Dekkers.
10373         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10374         failure, since successfully reading all array members might not be
10375         required.
10377 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10379         * util/grub-probe.c (probe): Simplify partmap probing (with the
10380         assumption that the first word up to the underscore equals to
10381         the module name).
10383 2008-02-06  Christian Franke  <franke@computer.org>
10385         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10386         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10387         last block of a cpio or tar stream.
10388         Check for "TRAILER!!!" instead of any empty data
10389         block to detect last block of a cpio stream.
10390         (grub_cpio_dir): Fix constness of variable np.
10391         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10392         cpio or tar trailer is detected.  This fixes a crash
10393         on open of a non existing file.
10395 2008-02-05  Bean  <bean123ch@gmail.com>
10397         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10398         address of entry.
10399         (grub_multiboot_load_elf64): Likewise.
10400         (grub_multiboot): Initialize mbi structure.
10402         * util/grub-fstest.c: Don't include unused header file script.h.
10404         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10405         of file.
10406         (grub_fstest_SOURCES): Likewise.
10408 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10410         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10411         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10412         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10413         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10415         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10416         (translation_table): Replace hardcoded values with macros
10417         provided by `<grub/term.h>'.
10419         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10420         (keyboard_map): Correct/add a few values, with macros provided
10421         by `<grub/term.h>'.
10422         (keyboard_map_shift): Zero values that don't differ from their
10423         `keyboard_map' equivalents.
10424         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10425         Discard the second scan code that is always sent by Caps lock.
10426         Only use `keyboard_map_shift' when it provides a non-zero value,
10427         otherwise fallback to `keyboard_map'.
10429 2008-02-04  Bean  <bean123ch@gmail.com>
10431         * Makefile.in (enable_grub_fstest): New variable.
10433         * conf/common.rmk (grub_fstest_init.lst): New rule.
10434         (grub_fstest_init.h): Likewise.
10435         (grub_fstest_init.c): Likewise.
10436         (util/grub-fstest.c_DEPENDENCIES): New variable.
10437         (grub_fstest_SOURCES): Likewise.
10439         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10441         * util/grub-fstest.c: New file.
10443 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10445         Make grub-setup handle a separate root device.
10447         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10448         so that the root device can be compared with the destination
10449         device.
10450         When embedding the core image, if the root and destination devices
10451         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10452         0xFF.
10453         When not embedding, set ROOT_DRIVE to 0xFF.
10455 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10457         Add support for having a grub directory in a different drive. This
10458         is still only the data handling part.
10460         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10461         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10462         (grub_root_drive): New variable.
10464         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10465         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10466         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10467         as it was.
10469         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10471         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10472         macro.
10473         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10475         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10476         is bogus, because PXE booting does not specify any drive
10477         correctly.
10479         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10480         am not sure if this is really correct.
10482         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10483         is always identical to the boot drive when booting from a CD.
10485         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10486         longer.
10487         (root_drive): New variable.
10488         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10489         (setup_sectors): Push %dx right after popping it, because %dh will
10490         be modified later.
10491         (copy_buffer): Restore %dx.
10493 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10495         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10496         use `cdboot.img' for cdrom images.
10498 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10500         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10501         only setup gfxterm when `font' command has succeeded.
10503 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10505         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10506         (grub_rescue_cmd_multiboot_loader)
10507         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10509 2008-02-03  Pavel Roskin  <proski@gnu.org>
10511         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10512         %edx and %esi from stack only after grub_gate_a20() is called.
10513         grub_gate_a20() clobbers %edx.
10515 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10517         * configure.ac (AC_INIT): Bumped to 1.96.
10519         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10520         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10521         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10522         video/readers/png.c.
10524 2008-02-03  Bean  <bean123ch@gmail.com>
10526         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10527         (cdboot_img_SOURCES): New variable.
10528         (cdboot_img_ASFLAGS): New variable.
10529         (cdboot_img_LDFLAGS): New variable.
10531         * boot/i386/pc/cdboot.S: New file.
10533         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10534         (cd_count): Likewise.
10535         (grub_biosdisk_get_drive): Add support for cd device.
10536         (grub_biosdisk_call_hook): Likewise.
10537         (grub_biosdisk_iterate): Likewise.
10538         (grub_biosdisk_open): Likewise.
10539         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10540         (grub_biosdisk_rw): Support reading from cd device.
10541         (GRUB_MOD_INIT): Iterate cd devices.
10543         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10544         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10545         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10547         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10549 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10551         * commands/read.c: New file.
10552         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10553         (read_mod_SOURCES): New variable.
10554         (read_mod_CFLAGS): Likewise.
10555         (read_mod_LDFLAGS): Likewise.
10557 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10559         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10560         determining whether menu has to be displayed.
10562 2008-02-02  Marco Gerards  <marco@gnu.org>
10564         * bus/pci.c: New file.
10566         * include/grub/pci.h: Likewise.
10568         * include/grub/i386/pc/pci.h: Likewise.
10570         * commands/lspci.c: Likewise.
10572         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10573         `lspci.mod'.
10574         (pci_mod_SOURCES): New variable.
10575         (pci_mod_CFLAGS): Likewise.
10576         (pci_mod_LDFLAGS): Likewise.
10577         (lspci_mod_SOURCES): Likewise.
10578         (lspci_mod_CFLAGS): Likewise.
10579         (lspci_mod_LDFLAGS): Likewise.
10581 2008-02-02  Bean  <bean123ch@gmail.com>
10583         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10584         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10586         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10587         (grub_xfs_btree_node): New structure.
10588         (grub_xfs_btree_root): New structure.
10589         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10590         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10591         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10592         (GRUB_XFS_EXTENT_SIZE): Likewise.
10593         (grub_xfs_read_block): Support btree format type.
10594         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10595         Use directory block as basic unit.
10597         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10599         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10600         __attribute__ ((__regparm__ (1))).
10602 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10604         Correct a mistake in previous commit.
10606         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10607         top.
10608         (normal/command.c_DEPENDENCIES): New variable.
10610 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10612         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10613         top.
10614         (normal/command.c_DEPENDENCIES): New variable.
10615         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10616         * conf/i386-ieee1275.rmk: Likewise.
10617         * conf/i386-linuxbios.rmk: Likewise.
10618         * conf/i386-pc.rmk: Likewise.
10619         * conf/sparc64-ieee1275.rmk: Likewise.
10620         * conf/powerpc-ieee1275.rmk: Likewise.
10621         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10623         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10625 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10627         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10628         call at beginning of function.
10630 2008-01-31  Pavel Roskin  <proski@gnu.org>
10632         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10633         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10634         (grub_mkrescue_SOURCES): Likewise.
10635         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10637 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10639         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10640         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10641         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10642         (grub_probe_SOURCES): ... to here.
10644         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10645         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10646         * conf/i386-ieee1275.rmk: Likewise.
10647         * conf/i386-linuxbios.rmk: Likewise.
10648         * conf/powerpc-ieee1275.rmk: Likewise.
10650 2008-01-30  Tristan Gingold  <gingold@free.fr>
10652         * kern/rescue.c: Silently accept empty lines.
10654 2008-01-29  Bean  <bean123ch@gmail.com>
10656         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10657         (real_code_2): Code cleanup and change comment style.
10658         (move_memory): Avoid using 32-bit address mode.
10660 2008-01-29  Bean  <bean123ch@gmail.com>
10662         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10663         (png_mod_SOURCES): New variable.
10664         (png_mod_CFLAGS): Likewise.
10665         (png_mod_LDFLAGS): Likewise.
10667         * video/readers/png.c: New file.
10669 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10671         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10672         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10673         `ifndef GRUB_MOD_GAP' hack.
10674         * util/elf/grub-mkimage.c (add_segments): Likewise.
10676 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10678         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10679         `GRUB_MOD_GAP' for platforms in which it's not defined.
10680         * util/elf/grub-mkimage.c (add_segments): Likewise.
10682 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10684         Get grub-emu to build again (including parallel builds).
10686         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10687         Split into ...
10688         (util/grub-emu.c_DEPENDENCIES): ... this, ...
10689         (normal/execute.c_DEPENDENCIES): ... this, ...
10690         (grub-emu_DEPENDENCIES): ... and this.
10692         * conf/i386-efi.rmk: Likewise.
10693         * conf/i386-linuxbios.rmk: Likewise.
10694         * conf/i386-ieee1275.rmk: Likewise.
10695         * conf/powerpc-ieee1275.rmk: Likewise.
10696         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10698 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10700         * NEWS: Add a few items.
10702 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10704         Fix parallel builds with grub-emu.  Based on earlier commit for
10705         grub-probe and grub-setup.
10707         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10708         (util/grub-emu.c_DEPENDENCIES): ... this.
10709         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10710         (util/grub-emu.c_DEPENDENCIES): ... this.
10711         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10712         (util/grub-emu.c_DEPENDENCIES): ... this.
10713         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10714         (util/grub-emu.c_DEPENDENCIES): ... this.
10715         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10716         (util/grub-emu.c_DEPENDENCIES): ... this.
10718 2008-01-27  Pavel Roskin  <proski@gnu.org>
10720         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10721         to create a gap between _end and the modules added to the image
10722         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
10723         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10724         * util/elf/grub-mkimage.c (add_segments): Likewise.
10726 2008-01-26  Pavel Roskin  <proski@gnu.org>
10728         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10729         just return an error.
10731 2008-01-26  Bean  <bean123ch@gmail.com>
10733         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10734         (grub_reiserfs_get_item): Save offset of the next item.
10735         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10737 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10739         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10740         make all filesystem sources appear together (possibly fixing omissions
10741         while at it).
10742         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10743         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10744         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10745         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10747         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
10748         add `kern/file.c'.
10749         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10750         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10751         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10752         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10754         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10755         (probe): Add a sanity check to make sure of our ability to read
10756         requested files when probing for filesystem type.
10758         * genmk.rb: Update copyright year (2007).
10760         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10761         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10762         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10763         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10764         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10765         : Remove function prototypes.
10767 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10769         Revert my previous commits (based on wrong assumption of how grub_errno
10770         works).
10772         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10773         * kern/file.c (grub_file_open): Likewise.
10775 2008-01-24  Pavel Roskin  <proski@gnu.org>
10777         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10778         that hang if GRUB tries to setup colors.
10779         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10780         colors for firmwares that don't support it.
10781         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10782         Recognize Open Hack'Ware, set flags to work around its
10783         limitations.
10785 2008-01-24  Robert Millan  <rmh@aybabtu.com>
10787         * kern/file.c (grub_file_open): Do not account previous failures of
10788         unrelated functions when grub_errno is checked for.
10789         Reported by Oleg Strikov.
10791 2008-01-24  Bean  <bean123ch@gmail.com>
10793         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10794         (grub_ufs_sblock): New member volume name.
10795         (grub_ufs_find_file): Fix string copy bug.
10796         (grub_ufs_label): Implement this function properly.
10798         * fs/hfs.c (grub_hfs_cnid_type): New enum.
10799         (grub_hfs_iterate_records): Use the correct file number for extents
10800         and catalog file. Fix problem in next index calculation.
10801         (grub_hfs_find_node): Replace recursive function call with loop.
10802         (grub_hfs_iterate_dir): Replace recursive function call with loop.
10804 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10806         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10807         `<grub/symbol.h>' and `<grub/multiboot.h>'.
10808         (grub_multiboot2_real_boot): New function prototype.
10810         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10811         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10813         * kern/i386/ieee1275/init.c (grub_os_area_addr)
10814         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10816 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10818         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10819         #ifdef'ed out grub_printf().
10821 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10823         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10824         grub_dprintf calls, since they make "debug=all" mode unusable.
10825         (grub_console_checkkey): Likewise.
10827 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10829         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10830         `term/i386/pc/at_keyboard.c'.
10831         (pkglib_MODULES): Add `serial.mod'.
10832         (serial_mod_SOURCES): New variable.
10833         (serial_mod_CFLAGS): Likewise.
10834         (serial_mod_LDFLAGS): Likewise.
10836         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
10837         `<grub/powerpc/ieee1275/console.h>'.
10838         (grub_keyboard_controller_init): New function prototype.
10839         (grub_console_checkkey): Likewise.
10840         (grub_console_getkey): Likewise.
10842         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10843         keyboard on i386.
10845         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10846         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10848 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10850         * kern/i386/pc/init.c (make_install_device): When memdisk image is
10851         present, "(memdisk)/boot/grub" becomes the default prefix.
10853         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10854         a memdisk tarball with all the modules.  Add --overlay=DIR option that
10855         allows users to overlay additional files into the image.
10857 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10859         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10860         and `machine/memory.h'.
10861         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10862         (_multiboot_mod_SOURCES): New variable.
10863         (_multiboot_mod_CFLAGS): Likewise.
10864         (_multiboot_mod_LDFLAGS): Likewise.
10865         (multiboot_mod_SOURCES): Likewise.
10866         (multiboot_mod_CFLAGS): Likewise.
10867         (multiboot_mod_LDFLAGS): Likewise.
10869         * include/grub/i386/ieee1275/loader.h: New file.
10871         * include/grub/i386/ieee1275/machine.h: Likewise.
10873         * include/grub/i386/ieee1275/memory.h: Likewise.
10875         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10876         variable declaration.
10877         (grub_os_area_size): Likewise.
10879         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10880         (grub_lower_mem, grub_upper_mem): New variables.
10881         (grub_stop_floppy): New function (just to make
10882         grub_multiboot2_real_boot() happy).
10884         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10885         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10886         (grub_stop): New function.
10887         Include `"../realmode.S"' and `"../loader.S"'.
10889         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10890         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10892         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10893         rely on grub_multiboot2_real_boot() for final boot.
10895 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10897         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10898         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10899         device that doesn't look like an SD card.
10900         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10901         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10902         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10903         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10904         found.
10906 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10908         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10909         avoid claiming over our own code.
10911 2008-01-22  Bean  <bean123ch@gmail.com>
10913         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10914         (jpeg_mod_SOURCES): New variable.
10915         (jpeg_mod_CFLAGS): Likewise.
10916         (jpeg_mod_LDFLAGS): Likewise.
10918         * video/readers/jpeg.c : New file.
10920 2008-01-22  Bean  <bean123ch@gmail.com>
10922         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10923         there are no more items.
10925 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10927         * kern/mm.c (grub_mm_init_region): Improve debug message.
10929 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10931         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10932         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10933         address.
10934         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10935         a C macro.
10936         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10937         Indicates start of upper memory.
10938         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10939         (generate_image): Abort when image size is big enough to corrupt
10940         upper memory.
10942         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10943         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10944         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10945         instead of hardcoding 0xA0000.
10946         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10947         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10948         instead of hardcoding 0xA0000.
10950 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10952         * disk/memdisk.c (memdisk_size): New variable.
10953         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10954         `memdisk_size'.
10955         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
10956         image to dynamic memory.
10957         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10958         `memdisk_size'.  Free memdisk block.
10960 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10962         Fix detection of very small filesystems (like tar).
10964         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10965         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10966         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10967         a problem with this disk).
10969 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10971         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10972         on grub_biosdisk_rw_standard() error.
10974 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10976         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10977         recent changes.
10978         * kern/elf.c: Likewise.
10979         * kern/ieee1275/ieee1275.c: Likewise.
10980         * kern/powerpc/ieee1275/openfw.c: Likewise.
10981         * term/ieee1275/ofconsole.c: Likewise.
10983 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10985         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10987         * include/grub/kernel.h (grub_arch_memdisk_addr)
10988         (grub_arch_memdisk_size): Moved from here ...
10990         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10991         (grub_arch_memdisk_size): ... to here.
10993 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10995         Mostly based on bugfix from Bean.
10997         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10998         attribute with hook() parameter.
10999         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11000         declaration.
11001         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11002         attribute with hook() parameter.
11003         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11004         declaration.
11006 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11008         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11009         (pkglib_MODULES): Add `memdisk.mod'.
11010         (memdisk_mod_SOURCES): New variable.
11011         (memdisk_mod_CFLAGS): Likewise.
11012         (memdisk_mod_LDFLAGS): Likewise.
11014         * disk/memdisk.c: New file.
11016         * include/grub/disk.h (grub_disk_dev_id): Add
11017         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11019         * include/grub/i386/pc/kernel.h
11020         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11021         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11022         (grub_kernel_image_size): New variable declaration.
11023         (grub_total_module_size): Likewise.
11024         (grub_memdisk_image_size): Likewise.
11026         * include/grub/i386/pc/memory.h
11027         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11029         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11030         (grub_arch_memdisk_addr): New variable declaration.
11031         (grub_arch_memdisk_size): Likewise.
11033         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11034         (grub_arch_memdisk_size): Likewise.
11036         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11037         (codestart): Replace hardcoded `0x100000' with
11038         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11040         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11041         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11042         not NULL, append the contents of the file it refers to, at the end of
11043         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11044         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11045         (options): Add "memdisk"|'m' option.
11046         (main): Parse --memdisk|-m option, and pass user-provided path as
11047         parameter to generate_image().
11049 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11051         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11052         grub_dprintf() calls from here ...
11053         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11055 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11057         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11059         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11060         declaration.
11061         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11062         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11063         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11064         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11065         property).
11066         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11067         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11069 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11071         Get rid of confusing function (superseded by
11072         `grub_ieee1275_get_integer_property')
11073         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11074         prototype.
11075         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11076         function.
11077         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11078         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11079         in native endianness from grub_ieee1275_get_integer_property().
11081 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11083         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11084         command after "shut-down", since implementations differ on which
11085         the command for halt is.
11087 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11089         * include/grub/i386/linuxbios/console.h: Add header protection.
11090         (grub_keyboard_controller_init): New function prototype.
11091         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11092         (KEYBOARD_COMMAND_READ): Likewise.
11093         (KEYBOARD_COMMAND_WRITE): Likewise.
11094         (KEYBOARD_SCANCODE_SET1): Likewise.
11095         (grub_keyboard_controller_write): New function.
11096         (grub_keyboard_controller_read): Likewise.
11097         (grub_keyboard_controller_init): Likewise.
11099         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11100         (grub_console_init): On coreboot/LinuxBIOS, call
11101         grub_keyboard_controller_init().
11103 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11105         PowerPC changes provided by Pavel Roskin.
11107         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11108         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11109         don't rely on cmain() doing it.
11110         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11111         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11113 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11115         * include/grub/i386/linuxbios/memory.h
11116         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11117         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11118         receive `table_header' as argument.  Instead, probe for it in the
11119         known memory ranges where it can be present.
11120         (grub_available_iterate): Do not pass a fixed `table_header' address
11121         to grub_linuxbios_table_iterate().
11123 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11125         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11126         * conf/i386-ieee1275.rmk: New file.
11127         * include/grub/i386/ieee1275/console.h: Likewise.
11128         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11129         * include/grub/i386/ieee1275/kernel.h: Likewise.
11130         * include/grub/i386/ieee1275/time.h: Likewise.
11131         * kern/i386/ieee1275/init.c: Likewise.
11132         * kern/i386/ieee1275/startup.S: Likewise.
11134 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11136         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11137         when pointers are 32-bit (but still do set it to one when they are
11138         64-bit).
11140 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11142         * include/grub/ieee1275/ieee1275.h
11143         (grub_ieee1275_get_integer_property): New function prototype.
11145         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11146         (grub_ieee1275_get_integer_property): New function.  Wraps around
11147         grub_ieee1275_get_property() to handle endianness.
11149         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11150         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11151         where appropriate.
11152         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11153         (grub_map): Likewise.
11154         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11156 2008-01-15  Bean  <bean123ch@gmail.com>
11158         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11159         (grub_script_execute_cmdline): Reset grub_errno.
11161         * normal/main.c (read_config_file): Reset grub_errno.
11163         * normal/parse.y (script_init): New.
11164         (script): Move function and menuentry here.
11165         (delimiter): New.
11166         (command): Add delimiter at the end of command.
11167         (commands): Adjust to match the new command.
11168         (commandblock): Remove grub_script_lexer_record_start.
11169         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11170         (if): Use the new commands.
11172         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11174 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11176         * normal/menu.c (run_menu): Move timeout message from here ...
11177         (print_timeout): ... to here.
11178         (run_menu): Use print_timeout() once during initial draw to print
11179         the whole message, and again in every clock tick to update only
11180         the number of seconds.
11182 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11184         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11185         actual size of `available' from grub_ieee1275_get_property(), and
11186         restrict parsing to that bound.
11188 2008-01-15  Christian Franke  <franke@computer.org>
11190         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11191         (argp_program_version): Remove variable.
11192         (argp_program_bug_address): Likewise.
11193         (options): Convert from struct argp_option to struct option.
11194         (struct arguments): Remove.
11195         (parse_opt): Remove.
11196         (usage): New function.
11197         (main): Replace struct args members by simple variables.
11198         Replace argp_parse() by getopt_long().
11199         Add switch to evaluate options.
11200         Add missing "(...)" around root_dev in prefix string.
11202 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11204         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11205         for grub_ieee1275_exit(), in order to improve portability.
11207 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11209         * util/grub.d/10_linux.in (prefix): Define.
11210         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11212 2008-01-13  Pavel Roskin  <proski@gnu.org>
11214         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11215         grub_errno if no errors have been detected.
11217 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11219         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11220         (grub_util_get_dev_abstraction): New function prototype.
11222         * util/getroot.c: Include `<grub/util/getroot.h>'
11223         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11224         (grub_util_get_dev_abstraction): ... here (new function).
11226         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11227         `PRINT_ABSTRACTION'.
11228         (probe): Probe for abstraction type when requested.
11229         (main): Understand `--target=abstraction'.
11231         * util/i386/efi/grub-install.in: Add abstraction module to core
11232         image when it is found to be necessary.
11233         * util/i386/pc/grub-install.in: Likewise.
11234         * util/powerpc/ieee1275/grub-install.in: Likewise.
11236         * util/update-grub_lib.in (font_path): Return system path without
11237         converting to GRUB path.
11238         * util/update-grub.in: Convert system path returned by font_path()
11239         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11240         abstraction module is needed for loading fonts (if any).  Export
11241         that as `GRUB_PRELOAD_MODULES'.
11242         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11243         insmod commands).
11245 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11247         Remove some unused code from reiserfs.
11249         * fs/reiserfs.c (struct grub_reiserfs_key)
11250         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11251         (struct grub_reiserfs_node_body): Removed.
11252         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11253         Likewise.
11254         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11255         Likewise.
11256         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11257         Likewise.
11258         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11259         Likewise.
11260         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11261         Likewise.
11262         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11263         Likewise.
11264         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11265         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11266         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11268 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11270         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11271         Determines if a file is garbage left by packaging systems, etc.
11272         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11273         for processing /etc/grub.d scripts.
11274         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11275         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11276         as a condition for processing Linux images.
11278 2008-01-10  Pavel Roskin  <proski@gnu.org>
11280         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11281         to compile reiserfs.c on PowerPC.
11283 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11285         * kern/device.c (grub_device_iterate): Do not abort device iteration
11286         when one of the devices cannot be opened.
11287         * kern/disk.c (grub_disk_open): Do not account previous failures of
11288         unrelated functions when grub_errno is checked for.
11290 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11292         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11293         `! grub_linux_is_bzimage', change order of address comparison to make
11294         it more intuitive, and improve "too big zImage" error message.
11296 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11298         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11299         `$(update-grub_DATA)'.
11300         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11301         targets.
11303 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11305         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11306         which instruction is modified by grub-setup during installation
11307         (since it wasn't obvious by only looking at this file).
11309 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11311         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11312         listing actual TODO items.
11314 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11316         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11317         correctly.
11318         (grub_reiserfs_get_key_offset): Likewise.
11319         (grub_reiserfs_set_key_offset): Likewise.
11320         (grub_reiserfs_set_key_type): Likewise.
11321         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11323         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11324         better to remove the bitfield version completely.
11326 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11328         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11329         allocated from the heap, due to the fshelp implementation.
11330         (grub_reiserfs_dir): Free NODE, due to the same reason.
11332 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11334         Mostly from Vincent Pelletier:
11336         * fs/reiserfs.c: New file.
11338         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11339         (reiserfs_mod_SOURCES): New variable.
11340         (reiserfs_mod_CFLAGS): Likewise.
11341         (reiserfs_mod_LDFLAGS): Likewise.
11343         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11344         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11345         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11346         normal/color.c.
11348 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11350         * normal/color.c: Remove `<grub/env.h>'.
11352 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11354         * include/grub/normal.h: Include <grub/env.h>.
11356 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11358         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11359         usage example with `(hd0,1)'.
11360         Reported by Samuel Thibault.
11362 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11364         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11365         (grub_linux_boot_zimage): Rename to ...
11366         (grub_linux_boot): ... this.
11367         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11368         (grub_linux_boot_zimage): Conditionalize zImage copy.
11370         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11371         (grub_linux_boot_bzimage): Remove prototype.
11372         (grub_linux_boot_zimage): Rename to ...
11373         (grub_linux_boot): ... this.
11375         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11376         (grub_linux_boot): Remove function.
11378 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11380         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11381         (grub_env_write_color_highlight): Likewise.
11382         (grub_wait_after_message): Likewise.
11384         * normal/color.c: New file.
11386         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11387         (normal_mod_DEPENDENCIES): Likewise.
11389         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11390         (normal_mod_DEPENDENCIES): Likewise.
11392         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11393         (normal_mod_DEPENDENCIES): Likewise.
11395         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11396         (normal_mod_DEPENDENCIES): Likewise.
11398         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11399         for waiting after a message is printed.
11400         * normal/main.c (read_config_file): Likewise.
11401         (grub_normal_init): Register grub_env_write_color_normal() and
11402         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11403         `color_highlight' variables as global.
11405         * normal/menu.c (grub_wait_after_message): New function.
11406         (grub_color_menu_normal): New variable.  Replaces ...
11407         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11408         (grub_color_menu_highlight): New variable.  Replaces ...
11409         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11410         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11411         `GRUB_TERM_COLOR_STANDARD'.
11412         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11413         `normal_code' and `highlight_code' to `old_color_normal' and
11414         `old_color_highlight', respectively.
11415         (grub_menu_init_page): Update colors when drawing the menu, based on
11416         `menu_color_normal' and `menu_color_highlight' variables.
11417         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11418         a message is printed.
11420 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11422         * kern/env.c (grub_env_context_open): Propagate hooks for global
11423         variables to new context.
11425         * kern/main.c (grub_set_root_dev): Export `root' variable.
11427 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11429         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11430         discs unconditionally, since udev and others have options to provide
11431         them.
11433 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11435         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11437 2008-01-04  Christian Franke  <franke@computer.org>
11439         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11440         of eisa_mmap.
11442 2008-01-03  Pavel Roskin  <proski@gnu.org>
11444         * kern/i386/linuxbios/init.c: Put "void" to all function
11445         declarations with no arguments.
11446         * kern/powerpc/ieee1275/init.c: Likewise.
11447         * term/i386/pc/at_keyboard.c: Likewise.
11448         * term/i386/pc/vga_text.c: Likewise.
11449         * util/grub-mkdevicemap.c: Likewise.
11451 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11453         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11454         message when loaded image is out of bounds.
11455         (grub_multiboot_load_elf64): Likewise.
11457 2008-01-02  Pavel Roskin  <proski@gnu.org>
11459         * util/grub.d/10_linux.in: Try version without ".old" when
11460         looking for initrd.  It's better to use initrd from the newer
11461         kernel of the same version than no initrd at all.
11463 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11465         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11467 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11469         * include/grub/video.h: Added grub_video_unmap_color and
11470         grub_video_get_active_render_target.
11471         (grub_video_adapter): Added unmap_color and get_active_render_target.
11473         * video/video.c: Added grub_video_unmap_color and
11474         grub_video_get_active_render_target.
11475         (grub_video_get_info): Changed method to accept NULL pointer as an
11476         argument to allow detection of active video adapter.
11478         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11479         grub_video_vbe_unmap_color_int.
11480         Added grub_video_vbe_unmap_color and
11481         grub_video_vbe_get_active_render_target.
11482         (grub_video_vbe_adapter): Added unmap_color and
11483         get_active_render_target.
11485         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11486         with grub_video_vbe_unmap_color_int.
11488         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11489         (DEFAULT_NORMAL_COLOR): Likewise.
11490         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11491         (DEFAULT_FG_COLOR): Removed.
11492         (DEFAULT_BG_COLOR): Likewise.
11493         (DEFAULT_CURSOR_COLOR): Changed value.
11494         (grub_virtual_screen): Added standard_color_setting,
11495         normal_color_setting, highlight_color_setting and term_color.
11496         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11497         (bitmap_width): Added.
11498         (bitmap_height): Likewise.
11499         (bitmap): Likewise.
11500         (set_term_color): Likewise.
11501         (grub_virtual_screen_setup): Changed to use new terminal coloring
11502         settings.
11503         (grub_gfxterm_init): Added init for bitmap.
11504         (grub_gfxterm_fini): Added destroy for bitmap.
11505         (redraw_screen_rect): Updated to use background bitmap and new
11506         terminal coloring.
11507         (scroll_up): Added optimization for case when there is no bitmap.
11508         (grub_gfxterm_cls): Fixed to use correct background color.
11509         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11510         coloring.
11511         (grub_virtual_screen_setcolor): Likewise.
11512         (grub_virtual_screen_getcolor): Added.
11513         (grub_gfxterm_background_image_cmd): Likewise.
11514         (grub_video_term): Added setcolor and getcolor.
11515         (MOD_INIT): Added registration of background_image command.
11516         (MOD_TERM): Added unregistration for background_image command.
11518 2007-12-30  Pavel Roskin  <proski@gnu.org>
11520         * loader/multiboot_loader.c: Fix multiboot command
11521         unregistration.  Fix all typos in the word "multiboot".
11523 2007-12-29  Pavel Roskin  <proski@gnu.org>
11525         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11526         support for initrd names used in Fedora.
11528 2007-12-26  Bean  <bean123ch@gmail.com>
11530         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11531         (cpio_mod_SOURCES): New variable.
11532         (cpio_mod_CFLAGS): Likewise.
11533         (cpio_mod_LDFLAGS): Likewise.
11535         * fs/cpio.c: New file.
11537         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11539         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11541         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11543         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11545 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11547         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11548         (grub_getcolor): New function.
11550         * kern/term.c (grub_getcolor): New function.
11551         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11552         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11553         (print_entry): Set normal and highlight colors to
11554         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11555         respectively, before printing and restore them to old
11556         values afterwards.
11557         (grub_menu_init_page): Likewise.  Fill an additional colored space
11558         that would otherwise be left blank.
11560         * term/efi/console.c (grub_console_getcolor): New function.
11561         (struct grub_console_term.getcolor): New variable.
11562         * term/i386/pc/console.c (grub_console_getcolor): New function.
11563         (struct grub_console_term.getcolor): New variable.
11564         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11565         (struct grub_console_term.getcolor): New variable.
11567         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11568         (struct grub_console_term.setcolor): Remove variable.
11569         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11570         (struct grub_console_term.setcolor): Remove variable.
11571         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11572         (struct grub_console_term.setcolor): Remove variable.
11573         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11574         (struct grub_console_term.setcolor): Remove variable.
11576 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11578         * configure.ac: Search for possible unifont.hex locations, and
11579         define UNIFONT_HEX if found.
11581         * Makefile.in (UNIFONT_HEX): Define variable.
11582         (DATA): Rename to ...
11583         (PKGLIB): ... this.  Update all users.
11584         (PKGDATA): New variable.
11585         (pkgdata_IMAGES): Rename to ...
11586         (pkglib_IMAGES): ... this. Update all users.
11587         (pkgdata_MODULES): Rename to ...
11588         (pkglib_MODULES): ... this. Update all users.
11589         (pkgdata_PROGRAMS): Rename to ...
11590         (pkglib_PROGRAMS): ... this. Update all users.
11591         (pkgdata_DATA): Rename to ...
11592         (pkglib_DATA): ... this. Update all users.
11593         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11594         (unicode.pff, ascii.pff): New rules.
11595         (all-local): Add `$(PKGDATA)' dependency.
11596         (install-local): Process `$(PKGDATA)'.
11598         * util/update-grub_lib.in (font_path): Search for *.pff files in
11599         a few more locations, including `${pkgdata}'.
11601 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11603         Patch from Bean  <bean123ch@gmail.com>:
11604         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11605         `size'.
11607 2007-12-21  Bean  <bean123ch@gmail.com>
11609         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11610         (ntfscomp_mod_SOURCES): New variable.
11611         (ntfscomp_mod_CFLAGS): Likewise.
11612         (ntfscomp_mod_LDFLAGS): Likewise.
11614         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11615         (grub_probe_SOURCES): Likewise.
11616         (grub_emu_SOURCES): Likewise.
11618         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11619         (grub_emu_SOURCES): Likewise.
11621         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11622         (grub_emu_SOURCES): Likewise.
11624         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11625         (grub_emu_SOURCES): Likewise.
11627         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11628         (read_run_list): Renamed to grub_ntfs_read_run_list.
11629         (decomp_nextvcn): Moved to ntfscomp.c.
11630         (decomp_getch): Likewise.
11631         (decomp_get16): Likewise.
11632         (decomp_block): Likewise.
11633         (read_block): Likewise.
11634         (read_data): Partially moved to ntfscomp.c.
11635         (fixup): Change unsigned to grub_uint16_t.
11636         (read_mft): Change unsigned long to grub_uint32_t.
11637         (read_attr): Likewise.
11638         (read_data): Likewise.
11639         (read_run_data): Likewise.
11640         (read_run_list): Likewise.
11641         (read_mft): Likewise.
11643         * fs/ntfscomp.c: New file.
11645         * include/grub/ntfs.h: New file.
11647 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11649         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11650         IDE disk check, since Linux is known to support 20 IDE disks.
11651         Reported by Colin Watson.
11653 2007-12-15  Bean  <bean123ch@gmail.com>
11655         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11656         (lnxboot_img_SOURCES): New variable.
11657         (lnxboot_img_ASFLAGS): Likewise.
11658         (lnxboot_img_LDFLAGS): Likewise.
11660         * boot/i386/pc/lnxboot.S: New file.
11662 2007-11-24  Pavel Roskin  <proski@gnu.org>
11664         * configure.ac: Test if '--build-id=none' is supported by the
11665         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11666         objcopy to generate incorrect binary files (binutils
11667         2.17.50.0.18-1 as shipped by Fedora 8).
11668         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11669         linking, so that build ID doesn't break the test.
11671 2007-11-24  Pavel Roskin  <proski@gnu.org>
11673         * include/grub/i386/time.h: use "void" in the argument list
11674         of grub_cpu_idle().
11675         * include/grub/powerpc/time.h: Likewise.
11676         * include/grub/sparc64/time.h: Likewise.
11678 2007-11-18  Christian Franke  <franke@computer.org>
11680         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11681         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11682         This fixes the problem that function keys did not work in grub-emu.
11684 2007-11-18  Christian Franke  <franke@computer.org>
11686         * disk/host.c (grub_host_open): Remove attribute unused from
11687         name parameter. Add check for "host". This fixes the problem
11688         that grub-emu does not find partitions.
11690 2007-11-18  Christian Franke  <franke@computer.org>
11692         * util/hostfs.c (is_dir): New function.
11693         (grub_hostfs_dir):  Handle missing dirent.d_type case.
11694         (grub_hostfs_read): Add missing fseek().
11695         (grub_hostfs_label): Clear label pointer.  This fixes a crash
11696         of grub-emu on "ls (host)".
11698 2007-11-18  Christian Franke  <franke@computer.org>
11700         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11701         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11702         to 64 bit boundary by default.
11704 2007-11-18  Bean  <bean123ch@gmail.com>
11706         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11707         (hexdump_mod_SOURCES): New variable.
11708         (hexdump_mod_CFLAGS): Likewise.
11709         (hexdump_mod_LDFLAGS): Likewise.
11711         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11713         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11715         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11717         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11719         * include/grub/hexdump.h: New file.
11721         * commands/hexdump.c: New file.
11723 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11725         * commands/i386/pc/play.c (beep_off): Switch order of arguments
11726         in grub_outb() calls.
11727         (beep_on): Likewise.
11729 2007-11-10  Christian Franke  <franke@computer.org>
11731         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11732         (grub_menu_run): Likewise.
11734 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11736         * include/grub/i386/efi/machine.h: New file.
11737         * include/grub/i386/linuxbios/machine.h: Likewise.
11738         * include/grub/i386/pc/machine.h: Likewise.
11739         * include/grub/powerpc/ieee1275/machine.h: Likewise.
11740         * include/grub/sparc64/ieee1275/machine.h: Likewise.
11742         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11743         (serial_hw_io_addr): New variable.
11744         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11745         instead of `(unsigned short *) 0x400'.
11747 2007-11-10  Bean  <bean123ch@gmail.com>
11749         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11751 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11753         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11754         (vga_mod_SOURCES): Added.
11755         (vga_mod_CFLAGS): Likewise.
11756         (vga_mod_LDFLAGS): Likewise.
11758         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11759         grub_outb() calls.
11760         (set_map_mask): Likewise.
11761         (set_read_map): Likewise.
11762         (set_read_address): Likewise.
11763         (vga_font): Removed variable.
11764         (get_vga_glyph): Removed function.
11765         (invalidate_char): Likewise.
11766         (write_char): Changed to use grub_font_get_glyph() for font
11767         information.
11768         (grub_vga_putchar): Likewise.
11769         (grub_vga_getcharwidth): Likewise.
11771 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11773         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11774         flags.
11775         (pxeboot_img_LDFLAGS): Likewise.
11776         (diskboot_img_LDFLAGS): Likewise.
11777         (kernel_img_LDFLAGS): Likewise.
11779 2007-11-06  Robert Millan  <rmh@aybabtu.com>
11781         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11782         in grub_outb() calls.
11783         (serial_hw_init): Likewise.
11785 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11787         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11788         spaces.  Skip non-regular files.
11790 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11792         * kern/disk.c (grub_disk_firmware_fini)
11793         (grub_disk_firmware_is_tainted): New variables.
11795         * include/grub/disk.h (grub_disk_firmware_fini)
11796         (grub_disk_firmware_is_tainted): Likewise.
11798         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11799         (grub_disk_biosdisk_fini): ... to here.
11800         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11801         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11802         is set.  Register grub_disk_biosdisk_fini() in
11803         `grub_disk_firmware_fini'.
11805         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11806         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11807         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11808         to finish existing firmware disk interface.
11810         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11811         (ata_mod_SOURCES): New variable.
11812         (ata_mod_CFLAGS): Likewise.
11813         (ata_mod_LDFLAGS): Likewise.
11815 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11817         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
11818         (grub_ata_wait): Reimplement using grub_millisleep().
11820         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11821         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11823 2007-11-03  Marco Gerards  <marco@gnu.org>
11825         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11826         (CRTC_ADDR_PORT): New macro.
11827         (CRTC_DATA_PORT): Likewise.
11828         (CRTC_CURSOR): Likewise.
11829         (CRTC_CURSOR_ADDR_HIGH): Likewise.
11830         (CRTC_CURSOR_ADDR_LOW): Likewise.
11831         (update_cursor): New function.
11832         (grub_console_real_putchar): Call `update_cursor'.
11833         (grub_console_gotoxy): Likewise.
11834         (grub_console_cls): Set the default color when clearing the
11835         screen.
11836         (grub_console_setcursor): Implemented.
11838 2007-11-03  Marco Gerards  <marco@gnu.org>
11840         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11841         become activate.
11842         (grub_ata_pio_write): Likewise.
11844         (grub_atapi_identify): Wait after issuing an ATA command.
11845         (grub_atapi_packet): Likewise.
11846         (grub_ata_identify): Likewise.
11847         (grub_ata_readwrite): Likewise.
11849 2007-11-03  Marco Gerards  <marco@gnu.org>
11851         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11852         (grub_ata_pio_write): Likewise.
11853         (grub_ata_readwrite): Use `grub_error', instead of
11854         returning `grub_errno'.
11856 2007-11-03  Marco Gerards  <marco@gnu.org>
11858         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11859         grub_ata_pio_write once for every single sector, instead of for
11860         multiple sectors.
11862 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11864         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11866         * conf/i386-linuxbios.rmk: New file.
11868         * kern/i386/pc/hardware.c: Likewise.
11869         * term/i386/pc/at_keyboard.c: Likewise.
11870         * term/i386/pc/vga_text.c: Likewise.
11872         * include/grub/i386/linuxbios/boot.h: Likewise.
11873         * include/grub/i386/linuxbios/console.h: Likewise.
11874         * include/grub/i386/linuxbios/init.h: Likewise.
11875         * include/grub/i386/linuxbios/kernel.h: Likewise.
11876         * include/grub/i386/linuxbios/loader.h: Likewise.
11877         * include/grub/i386/linuxbios/memory.h: Likewise.
11878         * include/grub/i386/linuxbios/serial.h: Likewise.
11879         * include/grub/i386/linuxbios/time.h: Likewise.
11881         * kern/i386/linuxbios/init.c: Likewise.
11882         * kern/i386/linuxbios/startup.S: Likewise.
11883         * kern/i386/linuxbios/table.c: Likewise.
11885 2007-10-31  Marco Gerards  <marco@gnu.org>
11887         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11888         (ata_mod_SOURCES): New variable.
11889         (ata_mod_CFLAGS): Likewise.
11890         (ata_mod_LDFLAGS): Likewise.
11892         * disk/ata.c: New file.
11894         * include/grub/disk.h (grub_disk_dev_id): Add
11895         `GRUB_DISK_DEV_ATA_ID'.
11897 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11899         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11900         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11902         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11903         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11905         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11906         `<grub/types.h>'.
11908         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11910 2007-10-27  Robert Millan  <rmh@aybabtu.com>
11912         * include/grub/types.h (ULONG_MAX): Define macro.
11914 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11916         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
11917         `"../realmode.S"'.
11918         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
11920 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11922         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11923         (pkgdata_MODULES): Add `biosdisk.mod'.
11924         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11925         variables.
11927         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11928         (grub_biosdisk_init): Replace with ...
11929         (GRUB_MOD_INIT(biosdisk)): ... this.
11930         (grub_biosdisk_fini): Replace with ...
11931         (GRUB_MOD_FINI(biosdisk)): ... this.
11933         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11934         (grub_machine_init): Remove call to grub_biosdisk_init().
11935         (grub_machine_fini): Remove call to grub_machine_fini().
11937         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11939 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11941         * include/grub/time.h: New file.
11942         * include/grub/i386/time.h: Likewise.
11943         * include/grub/powerpc/time.h: Likewise.
11944         * include/grub/sparc64/time.h: Likewise.
11946         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11947         instances to ...
11948         (KERNEL_MACHINE_TIME_HEADER): ... this.
11949         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11950         instances to ...
11951         (KERNEL_MACHINE_TIME_HEADER): ... this.
11952         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11953         instances to ...
11954         (KERNEL_MACHINE_TIME_HEADER): ... this.
11956         * kern/i386/efi/init.c: Include `<grub/time.h>'.
11957         (grub_millisleep): New function.
11958         * kern/i386/pc/init.c: Include `<grub/time.h>'.
11959         (grub_millisleep): New function.
11960         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11961         Remove `grub/machine/time.h' include.
11962         (grub_millisleep): New function.
11963         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11964         Remove `grub/machine/time.h' include.
11965         (grub_millisleep): New function.
11967         * include/grub/misc.h (grub_div_roundup): New function.
11969         * kern/misc.c: Include `<grub/time.h>'.
11970         (grub_millisleep_generic): New function.
11972         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11973         Add `time.h'.
11974         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11975         Add `time.h'.
11976         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11977         `machine/time.h'.  Add `time.h'.
11978         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11980 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11982         * include/grub/misc.h (grub_max): New function.
11984 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11986         * util/misc.c (grub_util_info): Call fflush() before returning.
11988 2007-10-20  Robert Millan  <rmh@aybabtu.com>
11990         * genmk.rb (Image): Copy `extra_flags' from here ...
11991         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
11993         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11994         to `argc' and `args' arguments.
11996 2007-10-17  Robert Millan  <rmh@aybabtu.com>
11998         * kern/i386/loader.S: New file.
12000         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12001         * kern/i386/loader.S (grub_linux_prot_size)... to here.
12002         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12003         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12004         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12005         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12006         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12007         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12008         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12009         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12010         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12011         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12012         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12013         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12015         * kern/i386/realmode.S: New file.
12017         * kern/i386/pc/startup.S (protstack): Moved from here ...
12018         * kern/i386/realmode.S (protstack)... to here.
12019         * kern/i386/pc/startup.S (gdt): Moved from here ...
12020         * kern/i386/realmode.S (gdt)... to here.
12021         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12022         * kern/i386/realmode.S (prot_to_real)... to here.
12024         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12025         `kern/i386/realmode.S'.
12027 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12029         * include/grub/i386/loader.h: New file.
12031         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12032         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12033         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12034         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12035         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12036         * include/grub/i386/loader.h (grub_linux_prot_size)
12037         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12038         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12039         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12040         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12042         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12044 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12046         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12047         filesystem when dev->disk is unset.
12048         Do probe for filesystem even when dev->disk->has_partitions is set.
12049         In case a filesystem is found, always report it.
12050         In case it isn't, if dev->disk->has_partitions is set, report that
12051         a partition table was found instead of reporting that no filesystem
12052         could be identified.
12054 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12056         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12057         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12059         * include/grub/types.h (grub_host_to_target16): New macro.
12060         (grub_host_to_target32): Likewise.
12061         (grub_host_to_target64): Likewise.
12062         (grub_target_to_host16): Likewise.
12063         (grub_target_to_host32): Likewise.
12064         (grub_target_to_host64): Likewise.
12066         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12067         Renamed from to ...
12068         (GRUB_MOD_ALIGN): ...this.  Update all users.
12070         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12071         grub_host_to_target32.
12072         Replace grub_be_to_cpu32 with grub_target_to_host32.
12073         (load_modules): Likewise.
12074         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12075         Replace grub_be_to_cpu32 with grub_target_to_host32.
12076         Replace grub_cpu_to_be16 with grub_host_to_target16.
12077         Replace grub_cpu_to_be32 grub_host_to_target32.
12079 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12081         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12082         * util/elf/grub-mkimage.c: ... here.
12084         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12085         `util/powerpc/ieee1275/grub-mkimage.c'.
12087 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12089         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12090         and make it easier to figure out.
12091         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12092         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12093         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12094         leave us with less than HEAP_MIN_SIZE total heap.
12095         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12097 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12099         * include/grub/i386/io.h: New file.
12100         * commands/i386/pc/play.c (inb): Removed.
12101         (outb): Removed.
12102         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12103         with grub_outb().
12104         * term/i386/pc/serial.c  (inb): Removed.
12105         (outb): Removed.
12106         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12107         with grub_outb().
12108         * term/i386/pc/vga.c  (inb): Removed.
12109         (outb): Removed.
12110         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12111         with grub_outb().
12113 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12115         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12116         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12117         Reported by Marcin Kurek.
12119 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12121         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12122         SmartFirmware version updates (as released by Sven Luther), and avoid
12123         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12124         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12125         known broken.
12127 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12129         From Hitoshi Ozeki:
12130         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12131         when merging two regions.
12133 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12135         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12136         * normal/completion.c (grub_normal_do_completion): Likewise.
12137         Reported by Hitoshi Ozeki.
12139 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12141         Do not use devices at boot in chainloading.
12143         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12144         (boot_part_addr): Likewise.
12145         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12146         with BOOT_DRIVE and BOOT_PART_ADDR.
12147         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12148         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12150 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12152         Patch from Simon Peter <dn.tlp@gmx.net>:
12153         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12154         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12155         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12156         util/i386/pc/grub-setup.c_DEPENDENCIES.
12157         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12158         util/grub-probe.c_DEPENDENCIES.
12159         * conf/powerpc-ieee1275.rmk: Likewise.
12161 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12163         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12164         to tell grub-mkdevicemap how to name devices.
12165         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12166         feature).
12168         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12169         util/i386/get_disk_name.c.
12170         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12171         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12172         util/ieee1275/get_disk_name.c.
12174         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12176         * DISTLIST: Add util/i386/get_disk_name.c and
12177         util/ieee1275/get_disk_name.c.
12179         * util/grub-mkdevicemap.c: Replace device naming logic with
12180         grub_util_get_disk_name() calls.
12182 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12184         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12185         (so that it works for both plural and singular quantities).
12187 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12189         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12190         so that [xz] isn't taken into account when determining order.
12192 2007-08-02  Marco Gerards  <marco@gnu.org>
12194         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12195         `include/multiboot2.h', `include/grub/elfload.h',
12196         `include/multiboot.h', `include/grub/multiboot.h',
12197         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12198         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12199         `kern/elf.c', `loader/multiboot_loader.c',
12200         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12201         `loader/i386/pc/multiboot2.c',
12202         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12203         `util/i386/pc/grub-mkrescue.in'.  Remove
12204         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12205         `include/grub/i386/pc/util/biosdisk.h' and
12206         `include/grub/powerpc/ieee1275/multiboot.h'.
12208 2007-08-02  Bean  <bean123ch@gmail.com>
12210         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12211         (ntfs_mod_SOURCES): New variable.
12212         (ntfs_mod_CFLAGS): Likewise.
12213         (ntfs_mod_LDFLAGS): Likewise.
12215         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12216         (grub_probe_SOURCES): Likewise.
12217         (grub_emu_SOURCES): Likewise.
12219         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12220         (grub_emu_SOURCES): Likewise.
12222         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12223         (grub_emu_SOURCES): Likewise.
12225         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12227         * fs/ntfs.c: New file.
12229 2007-08-02  Bean  <bean123ch@gmail.com>
12231         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12233         * file.h (grub_file): Likewise.
12235         * fshelp.h (grub_fshelp_read_file): Likewise.
12237         * util/i386/pc/grub-setup.c (setup): Likewise.
12238         (save_first_sector): Likewise.
12239         (save_blocklists): Likewise.
12241         * fs/affs.c (grub_affs_read_file): Likewise.
12243         * fs/ext2.c (grub_ext2_read_file): Likewise.
12245         * fs/fat.c (grub_fat_read_data): Likewise.
12247         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12249         * fs/hfs.c (grub_hfs_read_file): Likewise.
12251         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12253         * fs/jfs.c (grub_jfs_read_file): Likewise.
12255         * fs/minix.c (grub_minix_read_file): Likewise.
12257         * fs/sfs.c (grub_sfs_read_file): Likewise.
12259         * fs/ufs.c (grub_ufs_read_file): Likewise.
12261         * fs/xfs.c (grub_xfs_read_file): Likewise.
12263         * command/blocklist.c (read_blocklist): Likewise.
12264         (print_blocklist): Likewise.
12266 2007-08-02  Marco Gerards  <marco@gnu.org>
12268         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12269         `util/hostfs.c'.
12271         * disk/host.c: New file.
12273         * util/hostfs.c: Likewise.
12275         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12276         return `GRUB_ERR_BAD_FS'.
12277         * fs/sfs.c (grub_sfs_mount): Likewise.
12278         * fs/xfs.c (grub_xfs_mount): Likewise.
12280         * include/grub/disk.h (enum grub_disk_dev_id): Add
12281         `GRUB_DISK_DEVICE_HOST_ID'.
12283         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12285 2007-07-24  Jerone Young  <jerone@gmail.com>
12287         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12288         modules for compilation.
12289         * conf/powerpc-ieee1275.rmk: Likewise.
12291         * include/multiboot.h: Move multiboot definitions to one file. Rename
12292         many definitions to not get grub specific.
12293         * include/multiboot2.h: Create header with multiboot 2 definitions.
12294         * include/grub/multiboot.h: Header for grub specific function
12295         prototypes and definitions.
12296         * include/grub/multiboot2.h: Likewise.
12297         * include/grub/multiboot_loader.h: Likewise.
12298         * include/grub/i386/pc/multiboot.h: Removed.
12299         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12301         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12302         and 2 to allow for one multiboot and module commands.
12303         * loader/multiboot2.c: Add multiboot2 functionality.
12304         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12305         and definition names.
12306         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12307         2 functions.
12308         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12309         ieee1275 specific multiboot2 code.
12311         * kern/i386/pc/startup.S: Change headers and definition names for
12312         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12314 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12316         * geninitheader.sh: Process file specified in first parameter rather
12317         than hardcoding grub_modules_init.lst.
12318         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12319         than hardcoding grub_modules_init.h.
12321         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12322         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12323         grub_probe_init.[ch] and grub_setup_init.[ch].
12325         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12326         grub_modules_init.h with grub_emu_init.h.
12327         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12328         grub_probe_init.[ch] files.
12329         * conf/i386-efi.rmk: Likewise.
12330         * conf/i386-pc.rmk: Likewise.
12331         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12332         grub_setup_init.[ch] files.
12334         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12335         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12336         to initialize modules rather than a list of hardcoded functions.
12337         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12338         grub_init_all() to initialize modules rather than a list of hardcoded
12339         functions.
12341 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12343         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12344         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12346 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12348         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12349         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12350         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12351         flag when running on SmartFirmware.
12352         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12353         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12354         was set.
12356         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12357         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12358         rather than decreasing it.
12360         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12361         there's not enough space to do it, fail in the same way as when it
12362         can't be done because there are no partitions.
12364         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12365         when nvsetenv failed.
12367 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12369         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12370         because this rule is automatically generated.
12371         (grub-mkrescue): Removed for the same reason as above.
12373 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12375         Migrate to GNU General Public License Version 3.
12377         * COPYING: Replaced with the plain text version of GPLv3.
12379         * config.guess: Updated from gnulib.
12380         * config.sub: Likewise.
12382         * geninit.sh: Output a GPLv3 copyright notice.
12383         * geninitheader.sh: Likewise.
12384         * genmodsrc.sh: Likewise.
12385         * gensymlist.sh.in: Likewise.
12387         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12388         * boot/i386/pc/diskboot.S: Likewise.
12389         * boot/i386/pc/pxeboot.S: Likewise.
12390         * commands/blocklist.c: Likewise.
12391         * commands/boot.c: Likewise.
12392         * commands/cat.c: Likewise.
12393         * commands/cmp.c: Likewise.
12394         * commands/configfile.c: Likewise.
12395         * commands/echo.c: Likewise.
12396         * commands/help.c: Likewise.
12397         * commands/ls.c: Likewise.
12398         * commands/search.c: Likewise.
12399         * commands/terminal.c: Likewise.
12400         * commands/test.c: Likewise.
12401         * commands/videotest.c: Likewise.
12402         * commands/i386/cpuid.c: Likewise.
12403         * commands/i386/pc/halt.c: Likewise.
12404         * commands/i386/pc/play.c: Likewise.
12405         * commands/i386/pc/reboot.c: Likewise.
12406         * commands/i386/pc/vbeinfo.c: Likewise.
12407         * commands/i386/pc/vbetest.c: Likewise.
12408         * commands/ieee1275/halt.c: Likewise.
12409         * commands/ieee1275/reboot.c: Likewise.
12410         * commands/ieee1275/suspend.c: Likewise.
12411         * disk/loopback.c: Likewise.
12412         * disk/lvm.c: Likewise.
12413         * disk/raid.c: Likewise.
12414         * disk/efi/efidisk.c: Likewise.
12415         * disk/i386/pc/biosdisk.c: Likewise.
12416         * disk/ieee1275/ofdisk.c: Likewise.
12417         * font/manager.c: Likewise.
12418         * fs/affs.c: Likewise.
12419         * fs/ext2.c: Likewise.
12420         * fs/fat.c: Likewise.
12421         * fs/fshelp.c: Likewise.
12422         * fs/hfs.c: Likewise.
12423         * fs/hfsplus.c: Likewise.
12424         * fs/iso9660.c: Likewise.
12425         * fs/jfs.c: Likewise.
12426         * fs/minix.c: Likewise.
12427         * fs/sfs.c: Likewise.
12428         * fs/ufs.c: Likewise.
12429         * fs/xfs.c: Likewise.
12430         * hello/hello.c: Likewise.
12431         * include/grub/acorn_filecore.h: Likewise.
12432         * include/grub/arg.h: Likewise.
12433         * include/grub/bitmap.h: Likewise.
12434         * include/grub/boot.h: Likewise.
12435         * include/grub/cache.h: Likewise.
12436         * include/grub/device.h: Likewise.
12437         * include/grub/disk.h: Likewise.
12438         * include/grub/dl.h: Likewise.
12439         * include/grub/elfload.h: Likewise.
12440         * include/grub/env.h: Likewise.
12441         * include/grub/err.h: Likewise.
12442         * include/grub/file.h: Likewise.
12443         * include/grub/font.h: Likewise.
12444         * include/grub/fs.h: Likewise.
12445         * include/grub/fshelp.h: Likewise.
12446         * include/grub/gzio.h: Likewise.
12447         * include/grub/hfs.h: Likewise.
12448         * include/grub/kernel.h: Likewise.
12449         * include/grub/loader.h: Likewise.
12450         * include/grub/lvm.h: Likewise.
12451         * include/grub/misc.h: Likewise.
12452         * include/grub/mm.h: Likewise.
12453         * include/grub/net.h: Likewise.
12454         * include/grub/normal.h: Likewise.
12455         * include/grub/parser.h: Likewise.
12456         * include/grub/partition.h: Likewise.
12457         * include/grub/pc_partition.h: Likewise.
12458         * include/grub/raid.h: Likewise.
12459         * include/grub/rescue.h: Likewise.
12460         * include/grub/script.h: Likewise.
12461         * include/grub/setjmp.h: Likewise.
12462         * include/grub/symbol.h: Likewise.
12463         * include/grub/term.h: Likewise.
12464         * include/grub/terminfo.h: Likewise.
12465         * include/grub/tparm.h: Likewise.
12466         * include/grub/types.h: Likewise.
12467         * include/grub/video.h: Likewise.
12468         * include/grub/efi/api.h: Likewise.
12469         * include/grub/efi/chainloader.h: Likewise.
12470         * include/grub/efi/console.h: Likewise.
12471         * include/grub/efi/console_control.h: Likewise.
12472         * include/grub/efi/disk.h: Likewise.
12473         * include/grub/efi/efi.h: Likewise.
12474         * include/grub/efi/pe32.h: Likewise.
12475         * include/grub/efi/time.h: Likewise.
12476         * include/grub/i386/linux.h: Likewise.
12477         * include/grub/i386/setjmp.h: Likewise.
12478         * include/grub/i386/types.h: Likewise.
12479         * include/grub/i386/efi/kernel.h: Likewise.
12480         * include/grub/i386/efi/loader.h: Likewise.
12481         * include/grub/i386/efi/time.h: Likewise.
12482         * include/grub/i386/pc/biosdisk.h: Likewise.
12483         * include/grub/i386/pc/boot.h: Likewise.
12484         * include/grub/i386/pc/chainloader.h: Likewise.
12485         * include/grub/i386/pc/console.h: Likewise.
12486         * include/grub/i386/pc/init.h: Likewise.
12487         * include/grub/i386/pc/kernel.h: Likewise.
12488         * include/grub/i386/pc/loader.h: Likewise.
12489         * include/grub/i386/pc/memory.h: Likewise.
12490         * include/grub/i386/pc/multiboot.h: Likewise.
12491         * include/grub/i386/pc/serial.h: Likewise.
12492         * include/grub/i386/pc/time.h: Likewise.
12493         * include/grub/i386/pc/vbe.h: Likewise.
12494         * include/grub/i386/pc/vbeblit.h: Likewise.
12495         * include/grub/i386/pc/vbefill.h: Likewise.
12496         * include/grub/i386/pc/vbeutil.h: Likewise.
12497         * include/grub/i386/pc/vga.h: Likewise.
12498         * include/grub/ieee1275/ieee1275.h: Likewise.
12499         * include/grub/ieee1275/ofdisk.h: Likewise.
12500         * include/grub/powerpc/libgcc.h: Likewise.
12501         * include/grub/powerpc/setjmp.h: Likewise.
12502         * include/grub/powerpc/types.h: Likewise.
12503         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12504         * include/grub/powerpc/ieee1275/console.h: Likewise.
12505         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12506         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12507         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12508         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12509         * include/grub/powerpc/ieee1275/time.h: Likewise.
12510         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12511         * include/grub/sparc64/libgcc.h: Likewise.
12512         * include/grub/sparc64/setjmp.h: Likewise.
12513         * include/grub/sparc64/types.h: Likewise.
12514         * include/grub/sparc64/ieee1275/console.h: Likewise.
12515         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12516         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12517         * include/grub/sparc64/ieee1275/time.h: Likewise.
12518         * include/grub/util/biosdisk.h: Likewise.
12519         * include/grub/util/getroot.h: Likewise.
12520         * include/grub/util/lvm.h: Likewise.
12521         * include/grub/util/misc.h: Likewise.
12522         * include/grub/util/raid.h: Likewise.
12523         * include/grub/util/resolve.h: Likewise.
12524         * io/gzio.c: Likewise.
12525         * kern/device.c: Likewise.
12526         * kern/disk.c: Likewise.
12527         * kern/dl.c: Likewise.
12528         * kern/elf.c: Likewise.
12529         * kern/env.c: Likewise.
12530         * kern/err.c: Likewise.
12531         * kern/file.c: Likewise.
12532         * kern/fs.c: Likewise.
12533         * kern/loader.c: Likewise.
12534         * kern/main.c: Likewise.
12535         * kern/misc.c: Likewise.
12536         * kern/mm.c: Likewise.
12537         * kern/parser.c: Likewise.
12538         * kern/partition.c: Likewise.
12539         * kern/rescue.c: Likewise.
12540         * kern/term.c: Likewise.
12541         * kern/efi/efi.c: Likewise.
12542         * kern/efi/init.c: Likewise.
12543         * kern/efi/mm.c: Likewise.
12544         * kern/i386/dl.c: Likewise.
12545         * kern/i386/efi/init.c: Likewise.
12546         * kern/i386/efi/startup.S: Likewise.
12547         * kern/i386/pc/init.c: Likewise.
12548         * kern/i386/pc/lzo1x.S: Likewise.
12549         * kern/i386/pc/startup.S: Likewise.
12550         * kern/ieee1275/ieee1275.c: Likewise.
12551         * kern/powerpc/cache.S: Likewise.
12552         * kern/powerpc/dl.c: Likewise.
12553         * kern/powerpc/ieee1275/cmain.c: Likewise.
12554         * kern/powerpc/ieee1275/crt0.S: Likewise.
12555         * kern/powerpc/ieee1275/init.c: Likewise.
12556         * kern/powerpc/ieee1275/openfw.c: Likewise.
12557         * kern/sparc64/cache.S: Likewise.
12558         * kern/sparc64/dl.c: Likewise.
12559         * kern/sparc64/ieee1275/init.c: Likewise.
12560         * kern/sparc64/ieee1275/openfw.c: Likewise.
12561         * loader/efi/chainloader.c: Likewise.
12562         * loader/efi/chainloader_normal.c: Likewise.
12563         * loader/i386/efi/linux.c: Likewise.
12564         * loader/i386/efi/linux_normal.c: Likewise.
12565         * loader/i386/pc/chainloader.c: Likewise.
12566         * loader/i386/pc/chainloader_normal.c: Likewise.
12567         * loader/i386/pc/linux.c: Likewise.
12568         * loader/i386/pc/linux_normal.c: Likewise.
12569         * loader/i386/pc/multiboot.c: Likewise.
12570         * loader/i386/pc/multiboot_normal.c: Likewise.
12571         * loader/powerpc/ieee1275/linux.c: Likewise.
12572         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12573         * normal/arg.c: Likewise.
12574         * normal/cmdline.c: Likewise.
12575         * normal/command.c: Likewise.
12576         * normal/completion.c: Likewise.
12577         * normal/execute.c: Likewise.
12578         * normal/function.c: Likewise.
12579         * normal/lexer.c: Likewise.
12580         * normal/main.c: Likewise.
12581         * normal/menu.c: Likewise.
12582         * normal/menu_entry.c: Likewise.
12583         * normal/misc.c: Likewise.
12584         * normal/parser.y: Likewise.
12585         * normal/script.c: Likewise.
12586         * normal/i386/setjmp.S: Likewise.
12587         * normal/powerpc/setjmp.S: Likewise.
12588         * normal/sparc64/setjmp.S: Likewise.
12589         * partmap/acorn.c: Likewise.
12590         * partmap/amiga.c: Likewise.
12591         * partmap/apple.c: Likewise.
12592         * partmap/gpt.c: Likewise.
12593         * partmap/pc.c: Likewise.
12594         * partmap/sun.c: Likewise.
12595         * term/gfxterm.c: Likewise.
12596         * term/terminfo.c: Likewise.
12597         * term/efi/console.c: Likewise.
12598         * term/i386/pc/console.c: Likewise.
12599         * term/i386/pc/serial.c: Likewise.
12600         * term/i386/pc/vesafb.c: Likewise.
12601         * term/i386/pc/vga.c: Likewise.
12602         * term/ieee1275/ofconsole.c: Likewise.
12603         * util/biosdisk.c: Likewise.
12604         * util/console.c: Likewise.
12605         * util/genmoddep.c: Likewise.
12606         * util/getroot.c: Likewise.
12607         * util/grub-emu.c: Likewise.
12608         * util/grub-mkdevicemap.c: Likewise.
12609         * util/grub-probe.c: Likewise.
12610         * util/lvm.c: Likewise.
12611         * util/misc.c: Likewise.
12612         * util/raid.c: Likewise.
12613         * util/resolve.c: Likewise.
12614         * util/update-grub.in: Likewise.
12615         * util/update-grub_lib.in: Likewise.
12616         * util/grub.d/00_header.in: Likewise.
12617         * util/grub.d/10_hurd.in: Likewise.
12618         * util/grub.d/10_linux.in: Likewise.
12619         * util/i386/efi/grub-install.in: Likewise.
12620         * util/i386/efi/grub-mkimage.c: Likewise.
12621         * util/i386/pc/grub-install.in: Likewise.
12622         * util/i386/pc/grub-mkimage.c: Likewise.
12623         * util/i386/pc/grub-mkrescue.in: Likewise.
12624         * util/i386/pc/grub-setup.c: Likewise.
12625         * util/i386/pc/misc.c: Likewise.
12626         * util/powerpc/ieee1275/grub-install.in: Likewise.
12627         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12628         * util/powerpc/ieee1275/misc.c: Likewise.
12629         * video/bitmap.c: Likewise.
12630         * video/video.c: Likewise.
12631         * video/i386/pc/vbe.c: Likewise.
12632         * video/i386/pc/vbeblit.c: Likewise.
12633         * video/i386/pc/vbefill.c: Likewise.
12634         * video/i386/pc/vbeutil.c: Likewise.
12635         * video/readers/tga.c: Likewise.
12637 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12639         * conf/i386-efi.rmk: Replace obsolete reference to
12640         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12641         with util/getroot.c.
12642         * conf/powerpc-ieee1275.rmk: Likewise.
12643         * conf/sparc64-ieee1275.rmk: Likewise.
12645         * util/grub-emu.c (main): Fix unchecked pointer handling.
12647 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12649         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12650         invocation to fail, in order to support partition-less media.
12652         * util/i386/pc/grub-install.in: Likewise.
12654         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12655         which fs or partmap modules are needed (akin to its sister scripts).
12657         Also use grub-probe to get rid of unportable /proc/mounts check.
12659         Print the same informational message that the other scripts do, before
12660         exiting.
12662 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12664         * util/update-grub_lib.in (font_path): New function.  Determine whether
12665         a font file can be found and, if so, echo the GRUB path to it.
12667         * util/update-grub.in: Handle multiple terminals depending on user
12668         input, platform availability and font file presence.  Propagate
12669         variables of our findings to /etc/grub.d/ children.
12671         * util/grub.d/00_header.in: Handle multiple terminals, based on
12672         environment setup by update-grub.
12674 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12676         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12678 2007-06-21  Robert Millan  <rmh@aybabtu.com>
12680         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12681         indicate end of data section in kernel image.
12682         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12683         GRUB_KERNEL_MACHINE_DATA_END.
12685         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12686         space for it.
12687         * kern/i386/efi/startup.S: Likewise.
12689         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12690         during image generation.  Implement --prefix option to override this
12691         patch.
12692         * util/i386/efi/grub-mkimage.c: Likewise.
12694         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12695         code to make path relative to its root into a separate function.
12697         * util/i386/pc/grub-install.in: Use newly provided
12698         make_system_path_relative_to_its_root() to convert ${grubdir}, then
12699         pass the result to grub-install --prefix.
12701 2007-06-13  Robert Millan  <rmh@aybabtu.com>
12703         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12704         DEFAULT_DEVICE_MAP.
12705         * util/grub-emu.c: Use above definitions from misc.h instead of
12706         defining them.
12707         * util/grub-mkdevicemap.c: Likewise.
12708         * util/i386/pc/grub-setup.c: Likewise.
12709         * util/grub-probe.c: Likewise.
12710         (probe): Abort with grub_util_error() when either
12711         grub_guess_root_device or grub_util_get_grub_dev fails.
12713 2007-06-12  Robert Millan  <rmh@aybabtu.com>
12715         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12716         "pager" assignment.
12717         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12718         "pcdata".
12719         * util/grub-probe.c (probe): Likewise for "drive_name".
12721 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12723         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12724         not just the cdrom one.
12726 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12728         * util/i386/pc/grub-mkrescue.in: Add "set -e".
12729         Add --pkglibdir=DIR option to override pkglibdir.
12730         Mention --image-type=TYPE in help output.
12731         Fix --grub-mkimage (it was a no-op).
12732         Abort gracefully when no parameter is given.
12734 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12736         * util/i386/pc/grub-mkrescue.in: New file.
12737         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
12738         * Makefile.in: Handle bin_SCRIPTS.
12740 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
12742         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12743         list of video modes.
12745 2007-06-06  Robert Millan  <rmh@aybabtu.com>
12747         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12748         file doesn't exist, or if it is in a filesystem grub can't read.
12750         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
12751         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
12752         header comment to fit in 80 columns when the variables are resolved.
12754         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12755         could be identified by update-grub.  Remove redundant check for
12756         unifont.pff existence (since convert_system_path_to_grub_path now
12757         handles that).
12759 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12761         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12763         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12765         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12767 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12769         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12771         * include/grub/partition.h: Declare grub_apple_partition_map_init and
12772         grub_apple_partition_map_fini.
12774         * util/biosdisk.c
12775         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12776         to access >2 TiB disks).
12778         Print disk->total_sectors with %llu instead of %lu, since this
12779         variable is always 64-bit (prevents wrong disk size from being displayed
12780         on either >2 TiB disk or big-endian CPU).
12782         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12783         into a generic case that supports all (sane) partition maps.
12785         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12786         breaks big-endian.
12788         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12789         and grub_apple_partition_map_fini() after that.
12791 2007-06-01  Robert Millan  <rmh@aybabtu.com>
12793         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12795         * util/grub.d/00_header.in: Only enable gfxterm when
12796         convert_system_path_to_grub_path() succeeds.
12798 2007-05-20  Robert Millan  <rmh@aybabtu.com>
12800         * util/update-grub_lib.in: New file.
12801         * DISTLIST: Add update-grub_lib.in.
12802         * conf/common.rmk: Generate update-grub_lib and install it in
12803         $(lib_DATA).
12804         * Makefile.in: Add install routine for $(lib_DATA).
12806         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12807         function provided by update-grub_lib to support arbitrary paths of
12808         unifont.pff.
12809         * util/update-grub.in: Use convert_system_path_to_grub_path() to
12810         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12812 2007-05-19  Robert Millan  <rmh@aybabtu.com>
12814         * commands/i386/cpuid.c: New module.
12815         * DISTLIST: Add it.
12816         * conf/i386-efi.rmk: Enable cpuid.mod.
12817         * conf/i386-pc.rmk: Likewise.
12819 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12821         * kern/disk.c (grub_disk_read): Check return value of
12822         grub_realloc().
12824 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12826         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12827         arrays.
12828         * disk/raid.c (grub_raid_open): Likewise.
12830 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12832         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12833         stack instead of on the heap.
12835         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12836         before doing a read on it.
12838         * configure.ac: Only use -fno-stack-protector for the target
12839         environment.
12841 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12843         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12844         __attribute_ ((unused)) to mode_type argument.
12846         * util/getroot.c (grub_guess_root_device): Fix #endif.
12848         * kern/misc.c (memcmp): Fix prototype.
12850         * include/grub/partition.h [GRUB_UTIL]
12851         (grub_gpt_partition_map_init): Add prototype.
12852         (grub_gpt_partition_map_fini): Likewise.
12854         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12855         at the right place.
12857         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12858         (grub_fat_read_data): Likewise.
12859         (grub_fat_find_dir): Likewise.
12861         * font/manager.c (find_glyph): Make table a const.
12862         (grub_font_get_glyph): Remove bitmap from if statement.
12864 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12866         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12867         code, first search for device in /dev/mapper, then in /dev.
12868         (grub_util_get_grub_dev): New function.
12869         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12870         prototype.
12871         * util/grub-probe.c (probe): Remove check for RAID, call
12872         grub_util_get_grub_dev() instead of
12873         grub_util_biosdisk_get_grub_dev().
12874         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12875         grub_util_biosdisk_get_grub_dev().
12876         * util/i386/pc/grub-setup.c (main): Likewise.
12878 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12880         * DISTLIST: Update for the latest changes.
12881         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12882         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12883         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12884         grub/util/biosdisk.h.
12885         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12886         grub/util/biosdisk.h.
12888 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12890         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12892 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12894         * util/i386/efi/grub-install.in: New.
12895         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12896         newly added grub-install.
12897         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12898         include.
12899         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12900         grub/util/biosdisk.h.
12901         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12902         grub/util/biosdisk.h.
12904 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12906         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12907         * include/grub/util/biosdisk.h: ... here.
12908         * util/i386/pc/biosdisk.c: Moved to ...
12909         * util/biosdisk.c: ... here.
12910         * util/i386/pc/getroot.c: Moved to ...
12911         * util/getroot.c: ... here.
12912         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12913         * util/grub-mkdevicemap.c: ... here.
12914         * util/i386/pc/grub-probe.c: Moved to ...
12915         * util/grub-probe.c: ... here.
12917 2007-05-15  Robert Millan  <rmh@aybabtu.com>
12919         * util/update-grub.in: Remove duplicated line in grub.cfg header
12920         message.
12922 2007-05-13  Robert Millan  <rmh@aybabtu.com>
12924         * util/update-grub.in: Fix a few assumptions about the devices holding
12925         /, /boot and /boot/grub being the same.
12926         * util/grub.d/00_header.in: Likewise.
12927         * util/grub.d/10_hurd.in: Likewise.
12928         * util/grub.d/10_linux.in: Likewise.
12930         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12931         patterns.  Use that to define the `.old' suffix as older than `'.
12933         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12935         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12936         the grub.cfg header message.
12938 2007-05-11  Robert Millan  <rmh@aybabtu.com>
12940         * util/update-grub.in: Create device.map if it doesn't already exist,
12941         before attempting to run grub-probe.
12942         Check for grub-probe and grub-mkdevicemap with the same code
12943         grub-install is using.
12944         Remove test mode.
12946 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12948         * Makefile.in: Add the datarootdir autoconf variable.
12950 2007-05-09  Robert Millan  <rmh@aybabtu.com>
12952         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12953         fail gracefully if dev->disk->partition == NULL.
12955 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12957         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12958         determine partition map module.
12959         * util/i386/pc/grub-install.in: Use this feature to decide which
12960         partition module to load, instead of hardcoding pc and gpt.
12962 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12964         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12965         source directory differs from build directory.
12967 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12969         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12970         initialisation.
12972 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12974         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12976 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12978         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12979         command-line arguments via ${GRUB_CMDLINE_LINUX}.
12981 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12983         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12984         (grub_probe_SOURCES): Likewise.
12985         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12986         GPT and initialize dos_part and bsd_part accordingly.
12987         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12988         install_bsd_part.
12989         (main): Activate gpt module for use during partition identification,
12990         and deactivate it afterwards.
12991         * util/i386/pc/grub-install.in: Add gpt module to core.img.
12992         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12993         partition identification, and deactivate it afterwards.
12995 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12997         * term/i386/pc/console.c (grub_console_fini): Call
12998         grub_term_set_current() before grub_term_unregister().
13000 2007-05-04  Robert Millan  <rmh@aybabtu.com>
13002         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13003         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13004         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
13005         and update-grub_DATA.
13006         * conf/common.rmk: Build and install update-grub components.
13007         * conf/common.mk: Regenerate.
13008         * util/update-grub.in: New.  Core of update-grub.
13009         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13010         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13011         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13012         * util/grub.d/README: New.  Document grub.d directory layout.
13014 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13016         * util/grub-emu.c: Move initialization functions
13017         grub_util_biosdisk_init() and grub_init_all() before
13018         grub_util_biosdisk_get_grub_dev(), which relies on them.
13020 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13022         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13023         it is used later.
13025 2007-04-18  Jerone Young  <jerone@gmail.com>
13027         * kernel/elf.c: Add missing parenthesis for conditional statement
13028         stanza.
13030 2007-04-10  Jerone Young  <jerone@gmail.com>
13032         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13033         continue on and look for device node with real device name.
13035 2007-04-10  Jerone Young  <jerone@gmail.com>
13037         * configure.ac: Add argument for autoconf to use transformation
13038         ability.
13039         * Makefile.in: Add autoconf package transformation code.
13040         * util/i386/pc/grub-install.in: Likewise.
13041         * util/powerpc/ieee1275/grub-install.in: Likewise.
13043 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13045         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13046         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13047         (EXT2_REVISION): Likewise.
13048         (EXT2_INODE_SIZE): Likewise.
13049         (struct grub_ext2_block_group): Added a missing member
13050         "used_dirs".
13051         (grub_ext2_read_inode): Divide by the inode size in a superblock
13052         instead of 128 to obtain INODES_PER_BLOCK.
13053         Use the macro EXT2_INODE_SIZE instead of directly using
13054         SBLOCK->INODE_SIZE.
13056 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13058         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13059         superblock instead of the structure size to compute an
13060         offset. This fixes the problem that GRUB could not read a
13061         filesystem when inode size is different from 128-byte.
13063 2007-03-05  Marco Gerards  <marco@gnu.org>
13065         * normal/main.c (read_config_file): When "menu" is not set, create
13066         an initial context.
13068 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13070         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13071         (HEAP_LIMIT): New macro.
13072         (grub_claim_heap): Claim memory up to `heaplimit'.
13074 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13076         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13077         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13078         (_start): Likewise.
13079         (grub_arch_modules_addr): Return address after `_end'.
13080         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13081         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13082         (add_segments): Calculate `_end' from phdr size and location.
13083         (ALIGN_UP): Moved to ...
13084         * include/grub/misc.h: here.
13085         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13086         New macro.
13087         (GRUB_IEEE1275_MODULE_BASE): Removed.
13089 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13091         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13092         loop boundary.
13094 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13096         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13097         All users updated.
13098         (grub_elf64_load_hook_t): Likewise.
13099         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13100         debug output.
13102 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13104         * kern/mm.c: Update copyright.
13105         (grub_mm_debug): Correct syntax error.
13106         (grub_mm_dump_free): New function.
13107         (grub_debug_free): Call `grub_free'.
13108         * include/grub/mm.h: Update copyright.
13109         (grub_mm_dump_free): Add declaration.
13111 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13113         * include/grub/ieee1275/ieee1275.h: Update copyright.
13114         * kern/powerpc/ieee1275/init.c: Likewise.
13115         * kern/powerpc/ieee1275/openfw.c: Likewise.
13117         * loader/powerpc/ieee1275/linux.c: Likewise.
13118         * include/grub/elfload.h: Likewise.
13119         * kern/elf.c: Likewise.
13120         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13121         callers.
13122         (grub_elf64_load): Likewise.
13123         (grub_elf32_load_segment): Move to a nested function.
13124         (grub_elf64_load_segment): Likewise.
13126 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13128         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13129         prototype.
13130         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13131         (grub_heap_len): Likewise.
13132         (HEAP_SIZE): New macro.
13133         (grub_claim_heap): New function.
13134         (grub_machine_init): Don't claim heap directly.  Call
13135         `grub_claim_heap'.
13136         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13137         (grub_available_iterate): New function.
13139 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13141         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13142         * configure.ac: Use it for testing the HOST and TARGET compilers.
13144 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13146         * Makefile.in (enable_grub_emu): New variable.
13147         * configure.ac (--enable-grub-emu): New option.
13148         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13149         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13150         * conf/i386-pc.rmk: Likewise.
13151         * conf/powerpc-ieee1275.rmk: Likewise.
13152         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13154 2006-12-12  Marco Gerards  <marco@gnu.org>
13156         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13158         * kern/env.c (grub_env_unset): Don't free the member `value' when
13159         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13160         pointer.
13162         * normal/main.c (current_menu): Removed.
13163         (free_menu): Unset the `menu' environment variable.
13164         (grub_normal_menu_addentry): Make use of the environment variable
13165         `menu', instead of using the global `current_menu'.  Allocate
13166         memory for the sourcecode of this entry.
13167         (read_config_file): New argument `nested', changed all callers.
13168         Only in the case of a new context, initialize a new menu.  Set the
13169         `menu' environment variable.
13170         (grub_normal_execute): Don't set and unset the environment
13171         variable `menu' here anymore.  Only free the menu when leaving the
13172         context.
13174         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13175         leak.
13177 2006-12-11  Marco Gerards  <marco@gnu.org>
13179         * normal/menu_entry.c (run): Fix off by one bug so the last line
13180         is executed.  Move the loader check to outside the loop.
13182 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13184         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13186 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13188         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13189         the number of sectors.  Reported by Andrey Shuvikov
13190         <mr_hyro@yahoo.com>.
13192 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13194         * kern/disk.c (grub_disk_read): When there is a read error, always
13195         try to read only the necessary data.
13197         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13198         disk/raid.c.
13199         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13200         prototype.
13201         [GRUB_UTIL] (grub_raid_fini): Likewise.
13202         [GRUB_UTIL] (grub_lvm_init): Likewise.
13203         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13204         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13205         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13206         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13207         and grub_raid_fini().
13209 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13211         * include/grub/types.h (__unused): Rename to UNUSED.
13212         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13213         (grub_elf64_size): Likewise.
13215 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13217         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13218         grub_error_push and grub_error_pop in the error-handling path.
13219         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13220         length.
13222 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13224         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13225         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13226         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13227         (kernel_elf_SOURCES): Likewise.
13228         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13229         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13230         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13231         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13232         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13233         (elf_mod_SOURCES): New variable.
13234         (elf_mod_CFLAGS): Likewise.
13235         (elf_mod_LDFLAGS): Likewise.
13236         * include/grub/types.h (__unused): New macro.
13237         * include/grub/elfload.h: New file.
13238         * kern/elf.c: Likewise.
13239         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13240         (ELF32_LOADMASK): New macro.
13241         (ELF64_LOADMASK): Likewise.
13242         (vmlinux): Removed.
13243         (grub_linux_load32): New function.
13244         (grub_linux_load64): Likewise.
13245         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13246         Use grub_elf_t instead of grub_file_t.
13248 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13250         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13251         `catch_result' to struct set_color_args.
13253 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13255         * normal/menu.c: Include grub/script.h.
13256         * normal/menu_entry.c: Likewise.
13257         * include/grub/normal.h: Do not include grub/script.h.
13259 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13261         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13263 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13265         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13266         disk.
13267         (grub_disk_close): Print debug messages when closing a disk.
13268         (grub_disk_read): Print debug messages when disk read fails.
13269         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13270         filesystem type.
13271         * kern/partition.c: Include misc.h.
13272         (grub_partition_iterate): Print debug messages when detecting
13273         partition type.
13275 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13277         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13278         is negative.
13279         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13281 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13283         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13284         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13286 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13288         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13289         instead of sizeof(lv). Patch by Michael Guntsche.
13291 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13293         * disk/lvm.c: Rename VGS to VG_LIST.
13294         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13295         (grub_lvm_open): Likewise.
13296         Thanks to Michael Guntsche for finding this bug.
13298 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13300         * configure.ac (AC_INIT): Bumped to 1.95.
13302 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13304         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13305         with "/dev/.static/dev/md".
13307 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13309         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13310         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13311         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13312         DRIVE_NAME are always freed.
13314         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13315         DOS_PART, as a DOS partition is counted from one instead of zero
13316         now. Reported by Robert Millan.
13318 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13320         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13321         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13322         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13323         string returned by grub_guess_root_device.
13324         * util/i386/pc/grub-setup.c: Likewise.
13325         * util/i386/pc/grub-probefs.c: Likewise.
13327         * util/i386/pc/grub-probefs.c: Rename to ...
13328         * util/i386/pc/grub-probe.c: ... this.
13329         * DISTLIST: Remove grub-probefs, add grub-probe.
13330         * conf/i386-efi.rmk: Likewise.
13331         * conf/i386-pc.rmk: Likewise.
13332         * util/i386/pc/grub-install.in: Likewise.
13334         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13335         choose which information we want to print.
13337 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13339         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13340         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13341         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13342         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13343         video/readers/tga.c and video/i386/pc/vbeutil.c.
13345 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13347         Added support for RAID and LVM.
13349         * disk/lvm.c: New file.
13350         * disk/raid.c: Likewise.
13351         * include/grub/lvm.h: Likewise.
13352         * include/grub/raid.h: Likewise.
13353         * include/grub/util/lvm.h: Likewise.
13354         * include/grub/util/raid.h: Likewise.
13355         * util/lvm.c: Likewise.
13356         * util/raid.c: Likewise.
13358         * include/grub/disk.h (grub_disk_dev_id): Add
13359         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13360         (grub_disk_get_size): New prototype.
13361         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13362         returns a partition.
13363         (grub_disk_get_size): New function.
13365         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13366         verbatim if grub_install_dos_part is -2.
13368         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13369         and LVM devices.
13371         * util/i386/pc/grub-setup.c (setup): New argument
13372         MUST_EMBED. Force embedding of GRUB when the argument is
13373         true. Close FILE before returning.
13374         (main): Add support for RAID and LVM.
13376         * conf/common.rmk: Add RAID and LVM modules.
13377         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13378         util/lvm.c.
13379         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13381         * kern/misc.c (grub_strstr): New function.
13382         * include/grub/misc.h (grub_strstr): New prototype.
13384 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13386         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13388 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13390         * kern/misc.c (grub_strtoull): Guess the base only if not
13391         specified.
13393 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13395         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13396         PowerMac support.
13398 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13400         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13402         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13403         Remove `flags' argument.  All callers changed.
13404         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13405         (IEEE1275_IHANDLE_INVALID): New variable.
13406         (IEEE1275_CELL_INVALID): New variable.
13407         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13408         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13409         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13410         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13411         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13412         codes from Open Firmware.  All callers updated.
13413         (grub_ieee1275_next_property): Directly return Open Firmware return
13414         code.
13415         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13416         Standardize error checking from `grub_ieee1275_get_property'.
13417         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13418         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13420 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13422         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13423         `instance_to_package_args' to `instance_to_path_args'.
13425         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13426         `grub_ieee1275_chosen'.
13428         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13429         `grub_ieee1275_interpret'.
13431 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13433         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13435 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13437         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13438         (__cmpdi): Likewise.
13440         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13441         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13442         `grub_ssize_t'.
13444         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13446         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13447         to type `grub_ssize_t'.
13448         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13450 2006-09-22  Marco Gerards  <marco@gnu.org>
13452         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13453         newlines.
13455 2006-09-22  Marco Gerards  <marco@gnu.org>
13457         * commands/echo.c: New file.
13459         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13461         * conf/common.rmk (echo_mod_SOURCES): New variable.
13462         (echo_mod_CFLAGS): Likewise.
13463         (echo_mod_LDFLAGS): Likewise.
13465 2006-09-22  Marco Gerards  <marco@gnu.org>
13467         * normal/main.c (get_line): Malloc memory instead of using
13468         preallocated memory.  Removed the arguments `cmdline' and
13469         `max_len'.  Updated all callers.
13471 2006-09-22  Marco Gerards  <marco@gnu.org>
13473         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13474         (normal_mod_DEPENDENCIES): Likewise.
13476         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13477         (normal_mod_DEPENDENCIES): Likewise.
13479         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13481 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13483         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13484         programs.
13485         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13486         (normal_mod_DEPENDENCIES): Likewise.
13487         * conf/i386-pc.mk: Regenerate.
13488         * conf/i386-efi.mk: Likewise
13489         * conf/common.mk: Likewise.
13490         * conf/powerpc-ieee1275.mk: Likewise.
13491         * conf/sparc64-ieee1275.mk: Likewise.
13493 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13495         Sync with i386 version.
13496         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13497         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13499 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13501         Import from GRUB Legacy (lib/device.c):
13502         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13503         (init_device_map) [__linux__]: Add support for I2O devices.
13505 2006-09-14  Marco Gerards  <marco@gnu.org>
13507         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13508         `-melf_i386'.
13510 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13512         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13513         /boot/grub/*.lst.
13515         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13517         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13518         before adding it to device.map.
13520 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13522         * genmk.rb: Let GCC generate dependencies the first time it
13523         compiles a file; using the -MD option.
13524         * conf/common.mk: Regenerate.
13525         * conf/i386-pc.mk: Likewise.
13526         * conf/i386-efi.mk: Likewise.
13527         * conf/powerpc-ieee1275.mk: Likewise.
13528         * conf/sparc64-ieee1275.mk: Likewise.
13530 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13532         Move the prototypes of grub_setjmp and grub_longjmp to
13533         cpu/setjmp.h, so that each architecture may specify different
13534         attributes.
13536         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13537         (grub_longjmp): Likewise.
13538         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13539         (grub_longjmp): Likewise.
13540         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13541         (grub_longjmp): Likewise.
13543         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13544         [!GRUB_UTIL] (grub_longjmp): Removed.
13546 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13548         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13549         "color!" method does not return any value.
13551 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13553         * include/grub/bitmap.h: New file.
13555         * include/grub/i386/pc/vbeutil.h: Likewise.
13557         * video/bitmap.c: Likewise.
13559         * video/readers/tga.c: Likewise.
13561         * video/i386/pc/vbeutil.c: Likewise.
13563         * commands/videotest.c: Code cleanup and updated to reflect to new
13564         video API.
13566         * term/gfxterm.c: Likewise.
13568         * video/video.c: Likewise.
13570         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13571         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13572         (bitmap_mod_SOURCES): New entry.
13573         (bitmap_mod_CFLAGS): Likewise.
13574         (bitmap_mod_LDFLAGS): Likewise.
13575         (tga_mod_SOURCES): Likewise.
13576         (tga_mod_CFLAGS): Likewise.
13577         (tga_mod_LDFLAGS): Likewise.
13579         * include/grub/video.h (grub_video_blit_operators): New enum type.
13580         (grub_video_render_target): Changed as forward declaration and moved
13581         actual definition to be video driver specific.
13582         (grub_video_adapter.blit_bitmap): Added blitting operator.
13583         (grub_video_adapter.blit_render_target): Likewise.
13584         (grub_video_blit_bitmap): Likewise.
13585         (grub_video_blit_render_target): Likewise.
13587         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13588         driver specific render target definition.
13589         (grub_video_vbe_map_rgba): Added driver internal helper.
13590         (grub_video_vbe_unmap_color): Updated to use
13591         grub_video_i386_vbeblit_info.
13592         (grub_video_vbe_get_video_ptr): Likewise.
13594         * include/grub/i386/pc/vbeblit.h
13595         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13596         grub_video_i386_vbeblit_info.
13597         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13598         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13599         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13600         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13601         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13602         (grub_video_i386_vbeblit_index_index): Likewise.
13603         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13604         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13605         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13606         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13607         operator.
13608         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13609         operator.
13611         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13612         include/grub/i386/pc/vbeblit.h.
13614         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13615         Updated to use grub_video_i386_vbeblit_info.
13616         (grub_video_i386_vbefill_R8G8B8): Likewise.
13617         (grub_video_i386_vbefill_index): Likewise.
13618         (grub_video_i386_vbefill): Added generic filler.
13620         * video/i386/pc/vbefill.c: Updated to reflect changes on
13621         include/grub/i386/pc/vbefill.h.
13623         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13624         grub_video_i386_vbeblit_info.
13625         (grub_video_vbe_unmap_color): Likewise.
13626         (grub_video_vbe_blit_glyph): Likewise.
13627         (grub_video_vbe_scroll): Likewise.
13628         (grub_video_vbe_draw_pixel): Removed function.
13629         (grub_video_vbe_get_pixel): Likewise.
13630         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13631         updated code to use it.
13632         (common_blitter): Added common blitter for render target and bitmap.
13633         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13634         (grub_video_vbe_blit_render_target): Likewise.
13636 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13638         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13639         is in text mode if there is no console control protocol instance
13640         available.
13642 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13644         * include/grub/video.h: Code cleanup.
13646         * include/grub/i386/pc/vbe.h: Likewise.
13648         * video/i386/pc/vbe.c: Likewise.
13650         * video/i386/pc/vbeblit.c: Likewise.
13652         * video/i386/pc/vbefill.c: Likewise.
13654         * video/video.c: Likewise.  Also added more comments.
13656 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13658         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13659         (struct grub_biosdisk_dap): Likewise.
13661         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13662         linkage settings for all functions.
13664 2006-07-12  Marco Gerards  <marco@gnu.org>
13666         * configure.ac (--enable-mm-debug): Fix typo.
13668         * genkernsyms.sh.in: Use proper quoting for `CC'.
13670 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13672         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13673         (normal_mod_ASFLAGS): Remove "-m32".
13675 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13677         * util/misc.c: Include config.h.
13678         [!HAVE_MEMALIGN]: Do not include malloc.h.
13679         (grub_memalign): Use posix_memalign, if present. Then, use
13680         memalign, if present. Otherwise, emit an error.
13682         * util/grub-emu.c: Do not include malloc.h.
13684         * include/grub/util/misc.h: Include unistd.h. This is required for
13685         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13686         D. Eades III <hde@foobar-qux.org>.
13688         * configure.ac (AC_GNU_SOURCE): Added.
13689         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13690         type.
13692 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
13694         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13695         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13697 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
13699         * include/grub/types.h (grub_host_addr_t): Rename to
13700         grub_target_addr_t.
13701         (grub_host_off_t): Rename to grub_target_off_t.
13702         (grub_host_size_t): Rename to grub_target_size_t.
13703         (grub_host_ssize_t): Rename to grub_target_ssize_t.
13704         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13706         * include/grub/kernel.h (struct grub_module_header): Change type
13707         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13708         (grub_module_info): Likewise.
13710 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13712         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13713         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13714         Velazquez <jesus.velazquez@gmail.com>.
13716 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13718         Count partitions from 1 instead of 0 in the string representation
13719         of partitions. Still use 0-based internally.
13721         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13722         (sun_partition_map_iterate): Use grub_partition_t instead of
13723         struct grub_partition *. Cast DESC->START_CYLINDER to
13724         grub_uint64_t after converting the endian.
13725         (sun_partition_map_probe): Subtract 1 for PARTNUM.
13726         (sun_partition_map_get_name): Add 1 to P->INDEX.
13728         * partmap/pc.c (grub_partition_parse): Subtract 1 for
13729         PCDATA->DOS_PART.
13730         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13732         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13733         zero instead of one.
13734         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13735         (gpt_partition_map_get_name): Add 1 into P->INDEX.
13737         * partmap/apple.c (apple_partition_map_iterate): Change the type
13738         of POS to unsigned.
13739         (apple_partition_map_probe): Subtract 1 for PARTNUM.
13740         (apple_partition_map_get_name): Add 1 into P->INDEX.
13742         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13743         of POS to unsigned.
13744         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13745         calculate the offset of a partition.
13746         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13747         (amiga_partition_map_get_name): Add 1 into P->INDEX.
13749         * partmap/acorn.c (acorn_partition_map_find): Change the type of
13750         SECTOR to grub_disk_addr_t.
13751         (acorn_partition_map_iterate): Likewise.
13752         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13753         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13754         top.
13755         (acorn_partition_map_get_name): Add 1 into P->INDEX.
13757         * kern/i386/pc/init.c (make_install_device): Add 1 into
13758         GRUB_INSTALL_DOS_PART.
13760         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13761         conditional.
13763 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13765         Clean up the code to support 64-bit addressing in disks and
13766         files. This change is not enough for filesystems yet.
13768         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13769         type of "start" to grub_uint64_t.
13770         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13771         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13772         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13773         convert addresses.
13775         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13776         to grub_disk_addr_t.
13778         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13779         string.
13781         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13783         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13784         to char *.
13786         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13788         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13790         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13792         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13793         to grub_off_t, to detect an error from grub_file_seek.
13794         (grub_multiboot_load_elf32): Likewise.
13796         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13797         maximum unsigned long value when an overflow is detected.
13798         (grub_strtoull): New function.
13799         (grub_divmod64): Likewise.
13800         (grub_lltoa): use grub_divmod64.
13802         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13803         grub_disk_addr_t.
13804         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13805         the pointer to next character. Use grub_strtoull instead of
13806         grub_strtoul.
13807         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13808         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13809         respectively.
13811         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13812         return value is signed.
13813         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13814         test if OFFSET is less than zero, as OFFSET is unsigned now.
13816         * kern/disk.c (struct grub_disk_cache): Change the type of
13817         "sector" to grub_disk_addr_t.
13818         (grub_disk_cache_get_index): Change the type of SECTOR to
13819         grub_disk_addr_t. Calculate the hash with SECTOR casted to
13820         unsigned after shifting.
13821         (grub_disk_cache_invalidate): Change the type of SECTOR to
13822         grub_disk_addr_t.
13823         (grub_disk_cache_unlock): Likewise.
13824         (grub_disk_cache_store): Likewise.
13825         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13826         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13827         grub_disk_addr_t and grub_uint64_t, respectively.
13828         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13829         body, as the value of OFFSET is tweaked by
13830         grub_disk_check_range. Change the types of START_SECTOR, LEN and
13831         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13832         respectively.
13833         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13834         body, as the value of OFFSET is tweaked by
13835         grub_disk_check_range. Change the types of LEN and N to
13836         grub_size_t.
13838         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13839         and "saved_offset" to grub_off_t.
13840         (test_header): Cast BUF to char *.
13841         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13842         to char *.
13843         (grub_gzio_read): Change the types of OFFSET and SIZE to
13844         grub_off_t and grub_size_t, respectively.
13846         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13847         Removed.
13848         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13849         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13850         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13851         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13852         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13854         * include/grub/types.h (grub_off_t): Unconditionally set to
13855         grub_uint64_t.
13856         (grub_disk_addr_t): Changed to grub_uint64_t.
13858         * include/grub/partition.h (struct grub_partition): Change the
13859         types of "start", "len" and "offset" to grub_disk_addr_t,
13860         grub_uint64_t and grub_disk_addr_t, respectively.
13861         (grub_partition_get_start): Return grub_disk_addr_t.
13862         (grub_partition_get_len): Return grub_uint64_t.
13864         * include/grub/misc.h (grub_strtoull): New prototype.
13865         (grub_divmod64): Likewise.
13867         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13868         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13869         grub_off_t, respectively.
13870         All callers and references changed.
13872         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13873         grub_size_t in "read".
13874         All callers and references changed.
13876         * include/grub/file.h (struct grub_file): Change the types of
13877         "offset" and "size" to grub_off_t and grub_off_t,
13878         respectively. Change the type of SECTOR to grub_disk_addr_t in
13879         "read_hook".
13880         (grub_file_read): Change the type of LEN to grub_size_t.
13881         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13882         grub_off_t.
13883         (grub_file_size): Return grub_off_t.
13884         (grub_file_tell): Likewise.
13885         All callers and references changed.
13887         * include/grub/disk.h (struct grub_disk_dev): Change the types of
13888         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13889         "write".
13890         (struct grub_disk): Change the type of "total_sectors" to
13891         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13892         "read_hook".
13893         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13894         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13895         (grub_disk_write): Likewise.
13896         All callers and references changed.
13898         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13899         char * for grub_strncmp to silence gcc.
13900         (grub_iso9660_mount): Likewise.
13901         (grub_iso9660_mount): Likewise.
13902         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13903         return statement.
13904         (grub_iso9660_iterate_dir): Likewise.
13905         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13907         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13908         LEN to grub_disk_addr_t and grub_size_t, respectively.
13910         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13912         * fs/jfs.c (grub_jfs_read_file): Likewise.
13914         * fs/minix.c (grub_jfs_read_file): Likewise.
13916         * fs/sfs.c (grub_jfs_read_file): Likewise.
13918         * fs/ufs.c (grub_jfs_read_file): Likewise.
13920         * fs/xfs.c (grub_jfs_read_file): Likewise.
13922         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13923         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13924         respectively.
13926         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13927         BLKNR to -1 instead of returning GRUB_ERRNO.
13928         (grub_ext2_read_file): Change the types of SECTOR and
13929         LEN to grub_disk_addr_t and grub_size_t, respectively.
13931         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13932         LEN to grub_disk_addr_t and grub_size_t, respectively.
13934         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13935         grub_file_read.
13937         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13938         string. Do not cast SECTOR explicitly.
13940         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13941         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13942         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13943         grub_disk_addr_t and grub_size_t, respectively. If the sector is
13944         over 2TB and LBA mode is not supported, raise an error.
13945         (get_safe_sectors): New function.
13946         (grub_biosdisk_read): Use get_safe_sectors.
13947         (grub_biosdisk_write): Likewise.
13949         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13950         (grub_efidisk_write): Likewise.
13952         * disk/loopback.c (delete_loopback): Cosmetic changes.
13953         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13954         correctly.
13955         (grub_loopback_open): Likewise.
13956         (grub_loopback_read): Likewise. Also, change the type of POS to
13957         grub_off_t, and fix the usage of grub_memset.
13959         * commands/i386/pc/play.c: Include grub/machine/time.h.
13961         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13962         print FILE->SIZE.
13964         * commands/configfile.c: Include grub/env.h.
13966         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13967         GRUB_ERRNO directly instead. Change the type of POS to
13968         grub_off_t. Follow the coding standard.
13970         * commands/blocklist.c: Include grub/partition.h.
13971         (grub_cmd_blocklist): Return an error if the underlying device is
13972         not a disk. Take the starting sector of a partition into account,
13973         if a partition is used.
13975         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13976         a length field.
13977         (lba_mode): Support 64-bit addresses.
13978         (chs_mode): Likewise.
13979         (copy_buffer): Adapted to the new offsets of a length field and a
13980         segment field.
13981         (blocklist_default_start): Allocate 64-bit space.
13983         * boot/i386/pc/boot.S (force_lba): Removed.
13984         (boot_drive): Moved to under KERNEL_SECTOR.
13985         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13986         space.
13987         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13988         is useless.
13989         (lba_mode): Refactored to support a 64-bit address. More size
13990         optimization.
13991         (setup_sectors): Likewise.
13993 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13995         * DISTLIST: Added include/grub/i386/linux.h. Removed
13996         include/grub/i386/pc/linux.h
13998         * configure.ac (AC_INIT): Bumped to 1.94.
14000         * config.guess: Updated from gnulib.
14001         * config.sub: Likewise.
14002         * install-sh: Likewise.
14003         * mkinstalldirs: Likewise.
14005 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14007         * conf/common.rmk (grub_modules_init.lst): Depended on
14008         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14009         MODSRCFILES.
14011         * genmk.rb (PModule::rule): Reverted the previous change.
14013 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14015         * conf/common.rmk (grub_modules_init.lst): Depends on
14016         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14017         that the target does not exist before producing.
14018         (grub_modules_init.h): Remove the target before generating.
14019         (grub_emu_init.c): Likewise.
14021         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14023 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14025         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14026         for the target-specific tests. Make sure that we also have the
14027         up-to-date target variables for those tests.
14029 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14031         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14032         (PModule::rule): Likewise.
14034 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14036         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14037         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14038         target-specific flags should be prefixed.
14039         (PModule::rule): Likewise.
14041 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14043         * configure.ac (CMP): Check if cmp is available explicitly.
14045 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14047         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14048         (target_cpu): New variable.
14049         (pkglibdir): Use target_cpu instead of host_cpu.
14051         * util/i386/pc/grub-install.in (host_cpu): Removed.
14052         (target_cpu): New variable.
14053         (pkglibdir): Use target_cpu instead of host_cpu.
14055         * util/genmoddep.c: Removed.
14057         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14058         instead of GRUB_HOST_SIZEOF_VOID_P.
14059         * kern/dl.c: Likewise.
14061         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14062         ...
14063         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14064         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14065         (GRUB_TARGET_SIZEOF_LONG): ... this.
14066         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14067         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14068         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14069         to ...
14070         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14071         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14072         (GRUB_TARGET_SIZEOF_LONG): ... this.
14073         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14074         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14075         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14076         to ...
14077         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14078         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14079         (GRUB_TARGET_SIZEOF_LONG): ... this.
14080         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14081         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14083         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14084         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14085         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14086         instead of GRUB_HOST_SIZEOF_LONG.
14087         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14088         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14089         GRUB_CPU_WORDS_BIGENDIAN.
14090         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14091         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14092         grub_host_ssize_t.
14094         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14095         (genmoddep_SOURCES): Likewise.
14096         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14097         (genmoddep_SOURCES): Likewise.
14098         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14099         (genmoddep_SOURCES): Likewise.
14100         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14101         Likewise.
14102         (genmoddep_SOURCES): Likewise.
14104         * genmoddep.awk: New file.
14106         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14107         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14108         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14109         (PModule::rule): Likewise.
14110         (Program::rule): Likewise.
14111         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14112         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14113         respectively.
14115         * configure.ac: Rewritten intensively to use host and target
14116         instead of build and host, respectively.
14118         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14119         (host_cpu): Removed.
14120         (target_cpu): New variable.
14121         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14122         (BUILD_CC): Removed.
14123         (BUILD_CFLAGS): Likewise.
14124         (BUILD_CPPFLAGS): Likewise.
14125         (TARGET_CC): New variable.
14126         (TARGET_CFLAGS): Likewise.
14127         (TARGET_CPPFLAGS): Likewise.
14128         (TARGET_LDFLAGS): Likewise.
14129         (AWK): Likewise.
14130         (include): Use target_cpu instead of host_cpu.
14131         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14133         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14135 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14137         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14138         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14139         field 'false' to 'exec_on_false'.
14140         (grub_script_create_cmdif): Renamed argument names to reflect above
14141         changes.
14143         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14145         * normal/script.c (grub_script_create_cmdif): Likewise.
14147 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14149         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14150         top.
14151         (grub_hfsplus_btree_recptr): Likewise.
14152         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14153         FILEBLOCK both to pass a block number and store next block
14154         number.
14155         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14156         overflow file correctly. Specify errors appropriately, because
14157         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14158         grub_hfsplus_btree_recptr to get the pointer to a found key.
14159         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14160         is found.
14162         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14163         linux.mod.
14164         (_linux_mod_SOURCES): New variable.
14165         (_linux_mod_CFLAGS): Likewise.
14166         (_linux_mod_LDFLAGS): Likewise.
14167         (linux_mod_SOURCES): Likewise.
14168         (linux_mod_CFLAGS): Likewise.
14169         (linux_mod_LDFLAGS): Likewise.
14171         * DISTLIST: Added loader/i386/efi/linux.c,
14172         loader/i386/efi/linux_normal.c and
14173         include/grub/i386/efi/loader.h.
14175         * loader/i386/efi/linux.c: New file.
14176         * loader/i386/efi/linux_normal.c: Likewise.
14177         * include/grub/i386/efi/loader.h: Likewise.
14179 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14181         * commands/blocklist.c: New file.
14183         * DISTLIST: Added commands/blocklist.c.
14185         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14186         color for the background, and a darker color for the foreground.
14187         (grub_console_checkkey): Return READ_KEY.
14188         (grub_console_cls): Set the background to
14189         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14191         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14193         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14194         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14196         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14197         prototype.
14199         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14200         BG. The spec is wrong again.
14202         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14203         prototype.
14204         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14206         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14207         commands/blocklist.c.
14208         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14210         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14211         (blocklist_mod_SOURCES): New variable.
14212         (blocklist_mod_CFLAGS): Likewise.
14213         (blocklist_mod_LDFLAGS): Likewise.
14215 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14217         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14218         duplication.
14219         (lba_mode): Use %eax more intensively to reduce the code size.
14221 2006-05-20  Marco Gerards  <marco@gnu.org>
14223         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14225         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14226         for `menuentry'.
14227         (script): Accept leading newlines.
14228         (newlines): New rule to describe 0 or more newlines.
14229         (commands): Accept `command' with trailing newline.  Fixed the
14230         order in which arguments were passed to `grub_script_add_cmd'.
14231         Accept commands separated by newlines.
14232         (function): Changed to accept newlines.
14233         (menuentry) Rewritten.
14235         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14236         front of the list, instead of to the end.
14238 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14240         * util/i386/pc/grub-install.in (bindir): New variable.
14241         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14242         Shaver <lbgwjl@gmail.com>.
14244 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14246         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14247         grub/machine/linux.h
14248         * loader/i386/pc/linux.c: Likewise.
14250         * include/grub/i386/pc/linux.h: Moved to ...
14251         * include/grub/i386/linux.h: ... here.
14253         * include/grub/i386/linux.h (struct linux_kernel_params): New
14254         struct.
14256 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14258         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14259         checking.
14260         (grub_video_vbe_blit_glyph): Likewise.
14261         (grub_video_vbe_blit_bitmap): Likewise.
14262         (grub_video_vbe_blit_render_target): Likewise.
14264 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14266         * configure.ac (--with-platform): Properly quote the square
14267         brackets.
14269 2006-05-08  Marco Gerards  <marco@gnu.org>
14271         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14272         this...
14273         (kernel_elf_HEADERS): ...to this.  Updated all users.
14274         (grubof_symlist.c): Renamed from this...
14275         (kernel_elf_symlist.c): ...to this.  Updated all users.
14276         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14277         (grubof_SOURCES): Renamed from this...
14278         (kernel_elf_SOURCES): ...to this.
14279         (grubof_HEADERS): Renamed from this...
14280         (kernel_elf_HEADERS): ...to this.
14281         (grubof_CFLAGS): Renamed from this...
14282         (kernel_elf_CFLAGS): ...to this.
14283         (grubof_ASFLAGS): Renamed from this...
14284         (kernel_elf_ASFLAGS): ...to this.
14285         (grubof_LDFLAGS): Renamed from this...
14286         (kernel_elf_LDFLAGS): ...to this.
14288         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14289         this...
14290         (kernel_elf_HEADERS): ...to this.  Updated all users.
14291         (grubof_symlist.c): Renamed from this...
14292         (kernel_elf_symlist.c): ...to this.  Updated all users.
14293         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14294         (grubof_SOURCES): Renamed from this...
14295         (kernel_elf_SOURCES): ...to this.
14296         (grubof_HEADERS): Renamed from this...
14297         (kernel_elf_HEADERS): ...to this.
14298         (grubof_CFLAGS): Renamed from this...
14299         (kernel_elf_CFLAGS): ...to this.
14300         (grubof_ASFLAGS): Renamed from this...
14301         (kernel_elf_ASFLAGS): ...to this.
14302         (grubof_LDFLAGS): Renamed from this...
14303         (kernel_elf_LDFLAGS): ...to this.
14305         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14306         `kernel.elf' instead of `grubof'.
14308 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14310         Add --with-platform to configure. Use pkglibdir instead of
14311         pkgdatadir. This is reported by Roger Leigh.
14313         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14314         (host_vendor): Likewise.
14315         (host_os): Likewise.
14316         (pkgdatadir): Likewise.
14317         (platform): New variable.
14318         (pkglibdir): Likewise.
14319         Use PKGLIBDIR instead of PKGDATADIR.
14321         * util/i386/pc/grub-install.in (datadir): Removed.
14322         (host_vendor): Likewise.
14323         (host_os): Likewise.
14324         (pkgdatadir): Likewise.
14325         (platform): New variable.
14326         (pkglibdir): Likewise.
14327         Use PKGLIBDIR instead of PKGDATADIR.
14329         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14330         instead of GRUB_DATADIR.
14331         (main): Likewise.
14332         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14333         (main): Likewise.
14334         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14335         (main): Likewise.
14337         * configure.ac (--with-platform): New option.
14338         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14340         * Makefile.in: Include a makefile based on PLATFORM instead of
14341         HOST_VENDOR.
14342         (pkgdatadir): Not appended by the machine type.
14343         (pkglibdir): Appended by the machine type.
14344         (host_vendor): Removed.
14345         (platform): New variable.
14346         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14347         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14348         (uninstall): Likewise.
14350 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14352         Use the environment context in the menu. Remove the commands
14353         "default" and "timeout", and use variables instead.
14355         * normal/menu.c: Include grub/env.h.
14356         (print_entry): Cast TITLE to silence gcc.
14357         (get_timeout): New function.
14358         (set_timeout): Likewise.
14359         (get_entry_number): Likewise.
14360         (run_menu): Use a default entry, a fallback entry and a timeout
14361         in the environment variables "default", "fallback" and
14362         "timeout". Also, tweak the default entry if it is not within the
14363         current menu entries.
14364         (grub_menu_run): Use a fallback entry in the environment variable
14365         "fallback".
14367         * normal/main.c (read_config_file): Do not initialize
14368         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14369         NEWMENU->TIMEOUT.
14370         (grub_normal_execute): Use a data slot to store the menu.
14372         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14373         fallback_entry and timeout.
14374         (struct grub_menu_list): Removed.
14375         (grub_menu_list_t): Likewise.
14376         (struct grub_context): Likewise.
14377         (grub_context_t): Likewise.
14378         (grub_context_get): Likewise.
14379         (grub_context_get_current_menu): Likewise.
14380         (grub_context_push_menu): Likewise.
14381         (grub_context_pop_menu): Likewise.
14382         (grub_default_init): Likewise.
14383         (grub_default_fini): Likewise.
14384         (grub_timeout_init): Likewise.
14385         (grub_timeout_fini): Likewise.
14387         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14388         and timeout.mod.
14389         (normal_mod_SOURCES): Removed normal/context.c.
14391         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14392         commands/default.c, commands/timeout.c and normal/context.c.
14393         (normal_mod_SOURCES): Removed normal/context.c.
14395         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14396         commands/timeout.c and normal/context.c.
14397         (normal_mod_SOURCES): Removed normal/context.c.
14399         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14400         commands/default.c, commands/timeout.c and normal/context.c.
14401         (normal_mod_SOURCES): Removed normal/context.c.
14403         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14404         timeout.mod.
14405         (default_mod_SOURCES): Removed.
14406         (default_mod_CFLAGS): Likewise.
14407         (default_mod_LDFLAGS): Likewise.
14408         (timeout_mod_SOURCES): Removed.
14409         (timeout_mod_CFLAGS): Likewise.
14410         (timeout_mod_LDFLAGS): Likewise.
14412         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14413         normal/context.c.
14415         * commands/default.c: Removed.
14416         * commands/timeout.c: Likewise.
14417         * normal/context.c: Likewise.
14419 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14421         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14423 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14425         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14426         "next" to "prev" for readability.
14427         (struct grub_env_sorted_var): New struct.
14428         (grub_env_context): Renamed to ...
14429         (initial_context): ... this.
14430         (grub_env_var_context): Renamed to ...
14431         (current_context): ... this.
14432         (grub_env_find): Look only at CURRENT_CONTEXT.
14433         (grub_env_context_open): Rewritten to copy exported variables from
14434         previous context.
14435         (grub_env_context_close): Rewritten according to the new
14436         scheme. Also, add an assertion to prevent the initial context from
14437         removed.
14438         (grub_env_insert): Removed the code for the sorted list.
14439         (grub_env_remove): Likewise.
14440         (grub_env_export): Simply mark the variable with
14441         GRUB_ENV_VAR_GLOBAL.
14442         (grub_env_set): A cosmetic change for naming consistency.
14443         (grub_env_get): Likewise.
14444         (grub_env_unset): Likewise.
14445         (grub_env_iterate): Rewritten to sort variables within this
14446         function.
14447         (grub_register_variable_hook): Fixed for naming consistency. Call
14448         grub_env_find again, only if NAME is not found at the first time.
14449         (mangle_data_slot_name): New function.
14450         (grub_env_set_data_slot): Likewise.
14451         (grub_env_get_data_slot): Likewise.
14452         (grub_env_unset_data_slot): Likewise.
14454         * include/grub/env.h (grub_env_var_type): New enum.
14455         (GRUB_ENV_VAR_LOCAL): New constant.
14456         (GRUB_ENV_VAR_GLOBAL): Likewise.
14457         (GRUB_ENV_VAR_DATA): Likewise.
14458         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14459         "type".
14460         (grub_env_set): Replace VAR with NAME for consistency.
14461         (grub_register_variable_hook): Likewise.
14462         (grub_env_export): Specify the name of the argument.
14463         (grub_env_set_data_slot): New prototype.
14464         (grub_env_get_data_slot): Likewise.
14465         (grub_env_unset_data_slot): Likewise.
14467 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14469         Extend the loader so that GRUB can accept a loader which comes
14470         back to GRUB when a loaded image exits. Also, this change adds
14471         support for a chainloader on EFI.
14473         * term/efi/console.c: Include grub/misc.h.
14474         (grub_console_checkkey): Display a scan code on the top for
14475         debugging. This will be removed once the EFI port gets stable.
14476         Correct the scan code mapping.
14478         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14479         allocate memory from larger regions, in order to reduce the number
14480         of allocated regions. Otherwise, the MacOSX loader panics.
14481         (filter_memory_map): Avoid less than 1MB for compatibility with
14482         other loaders.
14483         (add_memory_regions): Allocate from the tail of a region, if
14484         possible, to avoid allocating a region near to 1MB, for the MacOSX
14485         loader.
14487         * kern/efi/init.c (grub_efi_set_prefix): Specify
14488         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14490         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14491         argument IMAGE_HANDLE and specify it to get a loaded image.
14492         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14493         grub_efi_get_loaded_image.
14494         (grub_efi_get_filename): Divide the length by the size of
14495         grub_efi_char16_t.
14496         (grub_efi_get_device_path): New function.
14497         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14498         the length by the size of grub_efi_char16_t for a file path device
14499         path node.
14501         * kern/loader.c (grub_loader_noreturn): New variable.
14502         (grub_loader_set): Accept a new argument NORETURN. Set
14503         GRUB_LOADER_NORETURN to NORETURN.
14504         All callers changed.
14505         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14506         grub_machine_fini.
14508         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14509         prototype.
14510         (grub_efi_get_loaded_image): Take an argument to specify an image
14511         handle.
14513         * include/grub/loader.h (grub_loader_set): Added one more argument
14514         NORETURN.
14516         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14517         instead of grub_efi_open_protocol.
14518         (grub_efidisk_get_device_name): Likewise.
14519         (grub_efidisk_close): Print a newline.
14520         (grub_efidisk_get_device_handle): Fixed to use
14521         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14522         GRUB_EFI_DEVICE_PATH_TYPE.
14524         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14525         * kern/efi/efi.c (device_path_guid): ... here.
14527         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14528         chain.mod.
14529         (kernel_mod_HEADERS): Added efi/disk.h.
14530         (_chain_mod_SOURCES): New variable.
14531         (_chain_mod_CFLAGS): Likewise.
14532         (_chain_mod_LDFLAGS): Likewise.
14533         (chain_mod_SOURCES): Likewise.
14534         (chain_mod_CFLAGS): Likewise.
14535         (chain_mod_LDFLAGS): Likewise.
14537         * DISTLIST: Added include/grub/efi/chainloader.h,
14538         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14540         * include/grub/efi/chainloader.h: New file.
14541         * loader/efi/chainloader.c: Likewise.
14542         * loader/efi/chainloader_normal.c: Likewise.
14544 2006-04-30  Marco Gerards  <marco@gnu.org>
14546         * commands/configfile.c (grub_cmd_source): New function.
14547         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14548         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14550 2006-04-30  Marco Gerards  <marco@gnu.org>
14552         * normal/execute.c (grub_script_execute_cmd): Change the return
14553         type to `grub_err_t'.  Correctly return the error.
14554         (grub_script_execute_cmdline): In case a command line is not a
14555         command or a function, try to interpret it as an assignment.
14557 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14559         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14560         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14561         skip a node whose name is obviously invalid as UTF-16,
14562         i.e. contains a NUL character. Stop the iteration when the last
14563         directory entry is found. Instead of using the return value of
14564         grub_hfsplus_btree_iterate_node, store the value in RET and use
14565         it, because the iterator can be stopped by the last directory
14566         entry.
14568 2006-04-30  Marco Gerards  <marco@gnu.org>
14570         * include/grub/env.h (grub_env_export): New prototype.  Reported
14571         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14573 2006-04-30  Marco Gerards  <marco@gnu.org>
14575         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14576         size of the extents in a catalog file record.
14578 2006-04-29  Marco Gerards  <marco@gnu.org>
14580         * commands/configfile.c (grub_cmd_configfile): Execute the
14581         configfile within its own context.
14583         * include/grub/env.h (grub_env_context_open): New prototype.
14584         (grub_env_context_close): Likewise.
14586         * kern/env.c (grub_env): Removed.
14587         (grub_env_sorted): Likewise.
14588         (grub_env_context): New variable.
14589         (grub_env_var_context): Likewise.
14590         (grub_env_find): Search both the active context and the global
14591         context.
14592         (grub_env_context_open): New function.
14593         (grub_env_context_close): Likewise.
14594         (grub_env_insert): Likewise.
14595         (grub_env_remove): Likewise.
14596         (grub_env_export): Likewise.
14597         (grub_env_set): Changed to use helper functions to avoid code
14598         duplication.
14599         (grub_env_iterate): Rewritten so both the current context and the
14600         global context are being used.
14602         * normal/command.c (export_command): New function.
14603         (grub_command_init): Register the `export' function.
14605 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14607         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14608         explicitly to suppress gcc's warnings.
14609         * fs/fat.c (grub_fat_find_dir): Likewise.
14610         (grub_fat_label): Likewise.
14611         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14612         (grub_xfs_mount): Likewise.
14613         (grub_xfs_label): Likewise.
14614         * fs/affs.c (grub_affs_mount): Likewise.
14615         (grub_affs_label): Likewise.
14616         (grub_affs_iterate_dir): Likewise.
14617         * fs/sfs.c (grub_sfs_mount): Likewise.
14618         (grub_sfs_iterate_dir): Likewise.
14619         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14620         * fs/hfs.c (grub_hfs_mount): Likewise.
14621         (grub_hfs_cmp_catkeys): Likewise.
14622         (grub_hfs_find_dir): Likewise.
14623         (grub_hfs_dir): Likewise.
14624         (grub_hfs_label): Likewise.
14625         * fs/jfs.c (grub_jfs_mount): Likewise.
14626         (grub_jfs_opendir): Likewise.
14627         (grub_jfs_getent): Likewise.
14628         (grub_jfs_lookup_symlink): Likewise.
14629         (grub_jfs_label): Likewise.
14630         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14631         (grub_hfsplus_iterate_dir): Likewise.
14632         (grub_hfsplus_btree_iterate_node): Made static.
14634         * util/grub-emu.c (prefix): New variable.
14635         (grub_machine_set_prefix): New function.
14636         (main): Do not set the environment variable "prefix" here. Only
14637         set PREFIX, which is used later by grub_machine_set_prefix.
14639         * include/grub/video.h: Do not include grub/symbol.h.
14640         (grub_video_register): Not exported. This symbol is not defined in
14641         the kernel.
14642         (grub_video_unregister): Likewise.
14643         (grub_video_iterate): Likewise.
14644         (grub_video_setup): Likewise.
14645         (grub_video_restore): Likewise.
14646         (grub_video_get_info): Likewise.
14647         (grub_video_get_blit_format): Likewise.
14648         (grub_video_set_palette): Likewise.
14649         (grub_video_get_palette): Likewise.
14650         (grub_video_set_viewport): Likewise.
14651         (grub_video_get_viewport): Likewise.
14652         (grub_video_map_color): Likewise.
14653         (grub_video_map_rgb): Likewise.
14654         (grub_video_map_rgba): Likewise.
14655         (grub_video_fill_rect): Likewise.
14656         (grub_video_blit_glyph): Likewise.
14657         (grub_video_blit_bitmap): Likewise.
14658         (grub_video_blit_render_target): Likewise.
14659         (grub_video_scroll): Likewise.
14660         (grub_video_swap_buffers): Likewise.
14661         (grub_video_create_render_target): Likewise.
14662         (grub_video_delete_render_target): Likewise.
14663         (grub_video_set_active_render_target): Likewise.
14665         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14666         Undefined.
14667         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14669         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14670         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14671         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14672         instead of $(srcdir)/genkernsyms.sh.
14674         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14675         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14676         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14677         instead of $(srcdir)/genkernsyms.sh.
14679         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14680         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14681         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14682         instead of $(srcdir)/genkernsyms.sh.
14684         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14685         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14686         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14687         instead of $(srcdir)/genkernsyms.sh.
14689         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14690         genkernsyms.sh.
14692         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14693         genkernsyms.sh.
14694         (gensymlist.sh): New target.
14695         (genkernsyms.sh): Likewise.
14697         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14698         genkernsyms.sh.in and gensymlist.sh.in.
14700         * genkernsyms.sh: Removed.
14701         * gensymlist.sh: Likewise.
14703         * genkernsyms.sh.in: New file.
14704         * gensymlist.sh.in: Likewise.
14706 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14708         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14709         clobber "prefix", since we may have already set it manually.
14711 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14713         * kern/misc.c (abort): New alias for grub_abort.
14715 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
14717         A new machine-specific function "grub_machine_set_prefix" is
14718         defined. This is called after loading modules, so that a prefix
14719         initialization can use modules. Also, this change adds an
14720         intensive debugging feature for the memory manager via the
14721         configure option "--enable-mm-debug".
14723         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14724         PART.LEN.
14726         * kern/sparc64/ieee1275/init.c (abort): Removed.
14727         (grub_stop): Likewise.
14728         (grub_exit): New function.
14729         (grub_set_prefix): Renamed to ...
14730         (grub_machine_set_prefix): ... this.
14731         (grub_machine_init): Do not call grub_set_prefix.
14733         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14734         (grub_machine_set_prefix): ... this.
14735         (grub_machine_init): Do not call grub_set_prefix.
14737         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14738         (grub_machine_init): Do not set the prefix here.
14740         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14742         * kern/efi/init.c: Include grub/mm.h.
14743         (grub_efi_set_prefix): New function.
14745         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14746         (grub_efi_get_filename): New function.
14747         (grub_print_device_path): Renamed to ...
14748         (grub_efi_print_device_path): ... this.
14750         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14751         [MM_DEBUG] (grub_realloc): Likewise.
14752         [MM_DEBUG] (grub_free): Likewise.
14753         [MM_DEBUG] (grub_memalign): Likewise.
14754         [MM_DEBUG] (grub_mm_debug): New variable.
14755         [MM_DEBUG] (grub_debug_malloc): New function.
14756         [MM_DEBUG] (grub_debug_free): New function.
14757         [MM_DEBUG] (grub_debug_realloc): New function.
14758         [MM_DEBUG] (grub_debug_memalign): New function.
14760         * kern/misc.c (grub_abort): Print a newline to distinguish
14761         the message.
14763         * kern/main.c (grub_main): Call grub_machine_set_prefix and
14764         grub_set_root_dev after loading modules. This is necessary when
14765         setting a prefix depends on modules.
14767         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14768         (grub_efi_print_device_path): ... this.
14769         (grub_efi_get_filename): New prototype.
14770         (grub_efi_set_prefix): Likewise.
14772         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14773         and grub/disk.h.
14774         (grub_efidisk_get_device_handle): New prototype.
14775         (grub_efidisk_get_device_name): Likewise.
14777         * include/grub/mm.h: Include config.h.
14778         (MM_DEBUG): Removed.
14779         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14780         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14781         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14782         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14783         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14784         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14785         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14786         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14787         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14789         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14791         * disk/efi/efidisk.c: Include grub/partition.h.
14792         (iterate_child_devices): New function.
14793         (add_device): First, compare only last device path nodes, so that
14794         devices are sorted by the types.
14795         (grub_efidisk_get_device_handle): New function.
14796         (grub_efidisk_get_device_name): Likewise.
14798         * configure.ac (--enable-mm-debug): New option to enable the
14799         memory manager debugging feature. This makes the binary much
14800         bigger, so is disabled by default.
14802 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
14804         Use grub_abort instead of grub_stop, and grub_exit must be
14805         define in each architecture now. Also, this change adds support
14806         for EFI disks.
14808         * util/i386/pc/grub-probefs.c: Include grub/term.h.
14809         (grub_getkey): New function.
14810         (grub_term_get_current): Likewise.
14812         * util/i386/pc/grub-setup.c: Include grub/term.h.
14813         (grub_getkey): New function.
14814         (grub_term_get_current): Likewise.
14816         * util/misc.c (grub_stop): Renamed to ...
14817         (grub_exit): ... this.
14819         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14820         (grub_exit): ... this.
14821         (grub_machine_init): Use grub_abort instead of abort.
14822         (grub_stop): Removed.
14824         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14825         abort.
14827         * kern/i386/pc/startup.S (grub_exit): New function.
14828         (cold_reboot): New label.
14830         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14831         (grub_efi_init): Call grub_efidisk_init.
14832         (grub_efi_fini): Call grub_efidisk_fini.
14834         * kern/efi/efi.c: Include grub/mm.h.
14835         (grub_efi_console_control_guid): Renamed to ...
14836         (console_control_guid): ... this.
14837         (grub_efi_loaded_image_guid): Renamed to ...
14838         (loaded_image_guid): ... this.
14839         (grub_efi_locate_handle): New function.
14840         (grub_efi_open_protocol): Likewise.
14841         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14842         GRUB_EFI_CONSOLE_CONTROL_GUID.
14843         (grub_efi_exit): Removed.
14844         (grub_stop): Likewise.
14845         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14846         (grub_exit): New function.
14847         (grub_print_device_path): Likewise.
14849         * kern/rescue.c (grub_rescue_cmd_exit): New function.
14850         (grub_enter_rescue_mode): Register "exit".
14852         * kern/misc.c (grub_real_dprintf): A cosmetic change.
14853         (grub_abort): New function.
14855         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14857         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14859         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14861         * include/grub/efi/efi.h (grub_efi_exit): Removed.
14862         (grub_print_device_path): New prototype.
14863         (grub_efi_locate_handle): Likewise.
14864         (grub_efi_open_protocol): Likewise.
14866         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14867         * disk/efi/efidisk.c: Likewise.
14869         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14871         * include/grub/efi/console_control.h
14872         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14874         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14875         last 8 bytes as an array.
14876         (GRUB_EFI_DISK_IO_GUID): New macro.
14877         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14878         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14879         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14880         grub_uint8_t.
14881         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14882         (struct grub_efi_device_path): Rename the member "sub_type" to
14883         "subtype".
14884         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14885         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14886         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14887         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14888         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14889         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14890         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14891         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14892         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14893         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14894         (struct grub_efi_pci_device_path): New structure.
14895         (grub_efi_pci_device_path_t): New type.
14896         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14897         (struct grub_efi_pccard_device_path): New structure.
14898         (grub_efi_pccard_device_path_t): New type.
14899         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14900         (struct grub_efi_memory_mapped_device_path): New structure.
14901         (grub_efi_memory_mapped_device_path_t): New type.
14902         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14903         (struct grub_efi_vendor_device_path): New structure.
14904         (grub_efi_vendor_device_path_t): New type.
14905         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14906         (struct grub_efi_controller_device_path): New structure.
14907         (grub_efi_controller_device_path_t): New type.
14908         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14909         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14910         (struct grub_efi_acpi_device_path): New structure.
14911         (grub_efi_acpi_device_path_t): New type.
14912         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14913         (struct grub_efi_expanded_acpi_device_path): New structure.
14914         (grub_efi_expanded_acpi_device_path_t): New type.
14915         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14916         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14917         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14918         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14919         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14920         (struct grub_efi_atapi_device_path): New structure.
14921         (grub_efi_atapi_device_path_t): New type.
14922         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14923         (struct grub_efi_fibre_channel_device_path): New structure.
14924         (grub_efi_fibre_channel_device_path_t): New type.
14925         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14926         (struct grub_efi_1394_device_path): New structure.
14927         (grub_efi_1394_device_path_t): New type.
14928         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14929         (struct grub_efi_usb_device_path): New structure.
14930         (grub_efi_usb_device_path_t): New type.
14931         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14932         (struct grub_efi_usb_class_device_path): New structure.
14933         (grub_efi_usb_class_device_path_t): New type.
14934         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14935         (struct grub_efi_i2o_device_path): New structure.
14936         (grub_efi_i2o_device_path_t): New type.
14937         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14938         (struct grub_efi_mac_address_device_path): New structure.
14939         (grub_efi_mac_address_device_path_t): New type.
14940         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14941         (struct grub_efi_ipv4_device_path): New structure.
14942         (grub_efi_ipv4_device_path_t): New type.
14943         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14944         (struct grub_efi_ipv6_device_path): New structure.
14945         (grub_efi_ipv6_device_path_t): New type.
14946         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14947         (struct grub_efi_infiniband_device_path): New structure.
14948         (grub_efi_infiniband_device_path_t): New type.
14949         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14950         (struct grub_efi_uart_device_path): New structure.
14951         (grub_efi_uart_device_path_t): New type.
14952         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14953         (struct grub_efi_vendor_messaging_device_path): New structure.
14954         (grub_efi_vendor_messaging_device_path_t): New type.
14955         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14956         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14957         (struct grub_efi_hard_drive_device_path): New structure.
14958         (grub_efi_hard_drive_device_path_t): New type.
14959         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14960         (struct grub_efi_cdrom_device_path): New structure.
14961         (grub_efi_cdrom_device_path_t): New type.
14962         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14963         (struct grub_efi_vendor_media_device_path): New structure.
14964         (grub_efi_vendor_media_device_path_t): New type.
14965         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14966         (struct grub_efi_file_path_device_path): New structure.
14967         (grub_efi_file_path_device_path_t): New type.
14968         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14969         (struct grub_efi_protocol_device_path): New structure.
14970         (grub_efi_protocol_device_path_t): New type.
14971         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14972         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14973         (struct grub_efi_bios_device_path): New structure.
14974         (grub_efi_bios_device_path_t): New type.
14975         (struct grub_efi_disk_io): New structure.
14976         (grub_efi_disk_io_t): New type.
14977         (struct grub_efi_block_io_media): New structure.
14978         (grub_efi_block_io_media_t): New type.
14979         (struct grub_efi_block_io): New structure.
14980         (grub_efi_block_io_t): New type.
14982         * include/grub/misc.h (grub_stop): Removed.
14983         (grub_exit): New prototype.
14984         (grub_abort): Likewise.
14986         * include/grub/disk.h (enum grub_disk_dev_id): Added
14987         GRUB_DISK_DEVICE_EFIDISK_ID.
14989         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14990         disk/efi/efidisk.c.
14991         (kernel_syms.lst): Remove the target if an error occurs.
14993 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
14995         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14996         as it was simply too buggy.
14998 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
15000         * kern/misc.c (grub_lltoa): New function.
15001         (grub_vsprintf): Added support for the long long suffix,
15002         i.e. "ll".
15004 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15006         * Makefile.in (LDFLAGS): Add variable.
15007         (LD): Remove variable.
15008         * configure.ac: Add -m32 to LDFLAGS.
15009         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15010         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15011         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15012         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15013         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15014         variables.
15015         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15016         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15017         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15019 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15021         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15022         length for unknown glyph.
15024 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15026         Add support for pre-loaded modules into the EFI port.
15028         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15029         completely. Accept one more argument DIR. The caller has changed.
15031         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15033         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15034         (grub_efi_loaded_image_guid): New variable.
15035         (grub_efi_get_loaded_image): New function.
15036         (grub_arch_modules_addr): Likewise.
15038         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15039         prototype.
15041         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15042         (struct grub_efi_loaded_image): New structure.
15043         (grub_efi_loaded_image_t): New type.
15045 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15047         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15048         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15049         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15051 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15053         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15055 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15057         * DISTLIST: Added include/grub/efi/console.h,
15058         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15059         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15061         * include/grub/efi/console.h: New file.
15062         * include/grub/efi/time.h: Likewise.
15063         * include/grub/i386/efi/kernel.h: Likewise.
15064         * kern/efi/init.c: Likewise.
15065         * kern/efi/mm.c: Likewise.
15066         * term/efi/console.c: Likewise.
15068         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15069         (grub_stop): Removed.
15070         (grub_get_rtc): Likewise.
15071         (grub_machine_init): Simply call grub_efi_init.
15072         (grub_machine_fini): Call grub_efi_fini.
15074         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15075         (grub_efi_output_string): Removed.
15076         (grub_efi_stall): New function.
15077         (grub_stop): Likewise.
15078         (grub_get_rtc): Likewise.
15080         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15081         (grub_efi_stall): New prototype.
15082         (grub_efi_allocate_pages): Likewise.
15083         (grub_efi_free_pages): Likewise.
15084         (grub_efi_get_memory_map): Likewise.
15085         (grub_efi_mm_init): Likewise.
15086         (grub_efi_mm_fini): Likewise.
15087         (grub_efi_init): Likewise.
15088         (grub_efi_fini): Likewise.
15090         * include/grub/i386/efi/time.h: Do not include
15091         grub/symbol.h. Include grub/efi/time.h.
15092         (GRUB_TICKS_PER_SECOND): Removed.
15093         (grub_get_rtc): Likewise.
15095         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15096         Added padding. The EFI spec is buggy.
15097         (GRUB_EFI_BLACK): New macro.
15098         (GRUB_EFI_BLUE): Likewise.
15099         (GRUB_EFI_GREEN): Likewise.
15100         (GRUB_EFI_CYAN): Likewise.
15101         (GRUB_EFI_RED): Likewise.
15102         (GRUB_EFI_MAGENTA): Likewise.
15103         (GRUB_EFI_BROWN): Likewise.
15104         (GRUB_EFI_LIGHTGRAY): Likewise.
15105         (GRUB_EFI_BRIGHT): Likewise.
15106         (GRUB_EFI_DARKGRAY): Likewise.
15107         (GRUB_EFI_LIGHTBLUE): Likewise.
15108         (GRUB_EFI_LIGHTGREEN): Likewise.
15109         (GRUB_EFI_LIGHTCYAN): Likewise.
15110         (GRUB_EFI_LIGHTRED): Likewise.
15111         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15112         (GRUB_EFI_YELLOW): Likewise.
15113         (GRUB_EFI_WHITE): Likewise.
15114         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15115         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15116         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15117         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15118         (GRUB_EFI_BACKGROUND_RED): Likewise.
15119         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15120         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15121         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15122         (GRUB_EFI_TEXT_ATTR): Likewise.
15124         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15125         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15126         (kernel_mod_HEADERS): Added efi/time.h.
15128 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15130         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15131         include/grub/efi/api.h, include/grub/efi/console_control.h,
15132         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15133         include/grub/i386/efi/time.h, kern/efi/efi.c,
15134         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15135         and util/i386/efi/grub-mkimage.c.
15137         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15139         * genmk.rb (PModule#rule): Do not export symbols if
15140         #{prefix}_EXPORTS is set to "no".
15142         * conf/i386-efi.mk: New file.
15143         * conf/i386-efi.rmk: Likewise.
15144         * include/grub/efi/api.h: Likewise.
15145         * include/grub/efi/console_control.h: Likewise.
15146         * include/grub/efi/efi.h: Likewise.
15147         * include/grub/efi/pe32.h: Likewise.
15148         * include/grub/i386/efi/time.h: Likewise.
15149         * kern/efi/efi.c: Likewise.
15150         * kern/i386/efi/init.c: Likewise.
15151         * kern/i386/efi/startup.S: Likewise.
15152         * util/i386/efi/grub-mkimage.c: Likewise.
15154 2006-04-17  Marco Gerards  <marco@gnu.org>
15156         * include/grub/script.h: Include <grub/parser.h> and
15157         "grub_script.tab.h".
15158         (struct grub_lexer_param): New struct.
15159         (struct grub_parser_param): Likewise.
15160         (grub_script_create_arglist): Pass the state in an argument.
15161         (grub_script_add_arglist): Likewise.
15162         (grub_script_create_cmdline): Likewise.
15163         (grub_script_create_cmdblock): Likewise.
15164         (grub_script_create_cmdif): Likewise.
15165         (grub_script_create_cmdmenu): Likewise.
15166         (grub_script_add_cmd): Likewise.
15167         (grub_script_arg_add): Likewise.
15168         (grub_script_lexer_ref): Likewise.
15169         (grub_script_lexer_deref): Likewise.
15170         (grub_script_lexer_record_start): Likewise.
15171         (grub_script_lexer_record_stop): Likewise.
15172         (grub_script_mem_record): Likewise.
15173         (grub_script_mem_record_stop): Likewise.
15174         (grub_script_malloc): Likewise.
15175         (grub_script_yylex): Likewise.
15176         (grub_script_yyparse): Likewise.
15177         (grub_script_yyerror): Likewise.
15178         (grub_script_yylex): Likewise.
15179         (grub_script_lexer_init): Return the state.
15181         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15182         (grub_script_lexer_done): Likewise.
15183         (grub_script_lexer_getline): Likewise.
15184         (grub_script_lexer_refs): Likewise.
15185         (script): Likewise.
15186         (newscript): Likewise.
15187         (record): Likewise.
15188         (recording): Likewise.
15189         (recordpos): Likewise.
15190         (recordlen): Likewise.
15191         (grub_script_lexer_init): Return the state instead of setting
15192         global variables.
15193         (grub_script_lexer_ref): Use the newly added argument for state
15194         instead of globals.
15195         (grub_script_lexer_deref): Likewise.
15196         (grub_script_lexer_record_start): Likewise.
15197         (grub_script_lexer_record_stop): Likewise.
15198         (recordchar): Likewise.
15199         (nextchar): Likewise.
15200         (grub_script_yylex2): Likewise.
15201         (grub_script_yylex): Likewise.
15202         (grub_script_yyerror): Likewise.
15204         * normal/parser.y (func_mem): Removed variable.
15205         (menu_entry): Likewise.
15206         (err): Likewise.
15207         (%lex-param): New parser option.
15208         (%parse-param): Likewise.
15209         (script): Always return the AST.
15210         (argument): Pass the state around.
15211         (arguments): Likewise.
15212         (grubcmd): Likewise.
15213         (commands): Likewise.
15214         (function): Likewise.
15215         (menuentry): Likewise.
15216         (if_statement): Likewise.
15217         (if): Likewise.
15219         * normal/script.c (grub_script_memused): Removed variable.
15220         (grub_script_parsed): Likewise.
15221         (grub_script_malloc): Added a state argument.  Use that instead of
15222         global variables.
15223         (grub_script_mem_record): Likewise.
15224         (grub_script_mem_record_stop): Likewise.
15225         (grub_script_arg_add): Likewise.
15226         (grub_script_add_arglist): Likewise.
15227         (grub_script_create_cmdline): Likewise.
15228         (grub_script_create_cmdif): Likewise.
15229         (grub_script_create_cmdmenu): Likewise.
15230         (grub_script_add_cmd): Likewise.
15231         (grub_script_parse): Setup the state before calling the parser.
15233 2006-04-16  Marco Gerards  <marco@gnu.org>
15235         * normal/command.c (grub_command_init): Remove the title command.
15237         * normal/lexer.c (grub_script_yylex): Renamed from this...
15238         (grub_script_yylex2): ... to this.
15239         (grub_script_yylex): New function.  Temporary
15240         introduced to filter some tokens.
15241         (grub_script_yyerror): Print a newline.
15243         * normal/main.c (read_config_file): Output information about the
15244         lines that contain errors.  Wait for a key after all lines have
15245         been processed.  Don't return an empty menu.
15247         * normal/parser.y (func_mem): Don't initialize.
15248         (menu_entry): Likewise.
15249         (err): New variable.
15250         (script): Don't return anything when an error was encountered.
15251         (ws, returns): Removed rules.
15252         (argument): Disabled concatenated variable support.
15253         (arguments): Remove explicit separators.
15254         (grubcmd): Likewise.
15255         (function): Likewise.
15256         (menuentry): Likewise.
15257         (if): Likewise.
15258         (commands): Likewise.  Add error handling.
15260         * normal/script.c (grub_script_create_cmdline): If
15261         `grub_script_parsed' is 0, assume the parser encountered an error.
15263 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15265         * configure.ac: Add support for EFI. Fix the typo
15266         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15268 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15270         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15271         foreign multibyte characters should be shown correctly.
15273 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15275         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15276         calculation.
15277         (read_config_file): Made it to close file before returning.
15279 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15281         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15282         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15283         video/i386/pc/vbefill.c.
15285         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15286         video/i386/pc/vbefill.c.
15288         * include/grub/video.h (grub_video_blit_format): New enum.
15289         (grub_video_mode_info): Added new member blit_format.
15290         (grub_video_get_blit_format): New function prototype.
15292         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15293         function prototype.
15294         (grub_video_vbe_map_rgb): Likewise.
15295         (grub_video_vbe_unmap_color): Likewise.
15297         * include/grub/i386/pc/vbeblit.h: New file.
15299         * include/grub/i386/pc/vbefill.h: New file.
15301         * video/video.c (grub_video_get_blit_format): New function.
15302         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15303         (grub_video_vbe_map_rgb): Likewise.
15304         (grub_video_vbe_unmap_color): Likewise.
15306         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15307         optimized fills.
15308         (grub_video_vbe_blit_render_target): Changed to use more optimized
15309         blits.
15310         (grub_video_vbe_setup): Added detection for optimized settings.
15311         (grub_video_vbe_create_render_target): Likewise.
15313         * video/i386/pc/vbeblit.c: New file.
15315         * video/i386/pc/vbefill.c: New file.
15317 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15319         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15320         here...
15322         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15323         parsing to support both hex and dec ranges.  If filename was missing
15324         show usage information.
15326 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15328         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15329         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15331         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15332         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15333         (video_mod_SOURCES): Added.
15334         (video_mod_CFLAGS): Likewise.
15335         (video_mod_LDFLAGS): Likewise.
15336         (gfxterm_mod_SOURCES): Likewise.
15337         (gfxterm_mod_CFLAGS): Likewise.
15338         (gfxterm_mod_LDFLAGS): Likewise.
15339         (videotest_mod_SOURCES): Likewise.
15340         (videotest_mod_CFLAGS): Likewise.
15341         (videotest_mod_LDFLAGS): Likewise.
15342         (vesafb_mod_SOURCES): Removed.
15343         (vesafb_mod_CFLAGS): Likewise.
15344         (vesafb_mod_LDFLAGS): Likewise.
15345         (vga_mod_SOURCES): Likewise.
15346         (vga_mod_CFLAGS): Likewise.
15347         (vga_mod_LDFLAGS): Likewise.
15349         * commands/videotest.c: New file.
15351         * font/manager.c (fill_with_default_glyph): Modified to use
15352         grub_font_glyph.
15353         (grub_font_get_glyph): Likewise.
15354         (fontmanager): Renamed from this...
15355         (font_manager): ... to this.
15357         * include/grub/font.h (grub_font_glyph): Added new structure.
15358         (grub_font_get_glyph): Modified to use grub_font_glyph.
15360         * include/grub/misc.h (grub_abs): Added as inline function.
15362         * include/grub/video.h: New file.
15364         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15365         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15366         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15367         (grub_vbe_get_controller_info): Renamed from this...
15368         (grub_vbe_bios_get_controller_info): ... to this.
15369         (grub_vbe_get_mode_info): Renamed from this...
15370         (grub_vbe_bios_get_mode_info): ... to this.
15371         (grub_vbe_set_mode): Renamed from this...
15372         (grub_vbe_bios_set_mode): ... to this.
15373         (grub_vbe_get_mode): Renamed from this...
15374         (grub_vbe_bios_get_mode): ... to this.
15375         (grub_vbe_set_memory_window): Renamed from this...
15376         (grub_vbe_bios_set_memory_window): ... to this.
15377         (grub_vbe_get_memory_window): Renamed from this...
15378         (grub_vbe_bios_get_memory_window): ... to this.
15379         (grub_vbe_set_scanline_length): Renamed from this...
15380         (grub_vbe_set_scanline_length): ... to this.
15381         (grub_vbe_get_scanline_length): Renamed from this...
15382         (grub_vbe_bios_get_scanline_length): ... to this.
15383         (grub_vbe_set_display_start): Renamed from this...
15384         (grub_vbe_bios_set_display_start): ... to this.
15385         (grub_vbe_get_display_start): Renamed from this...
15386         (grub_vbe_bios_get_display_start): ... to this.
15387         (grub_vbe_set_palette_data): Renamed from this...
15388         (grub_vbe_bios_set_palette_data): ... to this.
15389         (grub_vbe_set_pixel_rgb): Removed.
15390         (grub_vbe_set_pixel_index): Likewise.
15392         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15393         from this...
15394         (grub_vbe_bios_get_controller_info): ... to this.
15395         (grub_vbe_get_mode_info): Renamed from this...
15396         (grub_vbe_bios_get_mode_info): ... to this.
15397         (grub_vbe_set_mode): Renamed from this...
15398         (grub_vbe_bios_set_mode): ... to this.
15399         (grub_vbe_get_mode): Renamed from this...
15400         (grub_vbe_bios_get_mode): ... to this.
15401         (grub_vbe_set_memory_window): Renamed from this...
15402         (grub_vbe_bios_set_memory_window): ... to this.
15403         (grub_vbe_get_memory_window): Renamed from this...
15404         (grub_vbe_bios_get_memory_window): ... to this.
15405         (grub_vbe_set_scanline_length): Renamed from this...
15406         (grub_vbe_set_scanline_length): ... to this.
15407         (grub_vbe_get_scanline_length): Renamed from this...
15408         (grub_vbe_bios_get_scanline_length): ... to this.
15409         (grub_vbe_set_display_start): Renamed from this...
15410         (grub_vbe_bios_set_display_start): ... to this.
15411         (grub_vbe_get_display_start): Renamed from this...
15412         (grub_vbe_bios_get_display_start): ... to this.
15413         (grub_vbe_set_palette_data): Renamed from this...
15414         (grub_vbe_bios_set_palette_data): ... to this.
15415         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15416         getting corrupted after calling it.  Added more pushes and pops.
15417         (grub_vbe_bios_set_mode): Likewise.
15418         (grub_vbe_bios_get_mode): Likewise.
15419         (grub_vbe_bios_get_memory_window): Likewise.
15420         (grub_vbe_bios_set_scanline_length): Likewise.
15421         (grub_vbe_bios_get_scanline_length): Likewise.
15422         (grub_vbe_bios_get_display_start): Likewise.
15423         (grub_vbe_bios_set_palette_data): Likewise.
15425         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15426         (cl_insert): Likewise.
15427         (cl_delete): Likewise.
15429         * term/gfxterm.c: New file.
15431         * term/i386/pc/vesafb.c: Removed file.
15433         * video/video.c: New file.
15435         * video/i386/pc/vbe.c (real2pm): Added new function.
15436         (grub_video_vbe_draw_pixel): Likewise.
15437         (grub_video_vbe_get_video_ptr): Likewise.
15438         (grub_video_vbe_get_pixel): Likewise
15439         (grub_video_vbe_init): Likewise.
15440         (grub_video_vbe_fini): Likewise.
15441         (grub_video_vbe_setup): Likewise.
15442         (grub_video_vbe_get_info): Likewise.
15443         (grub_video_vbe_set_palette): Likewise.
15444         (grub_video_vbe_get_palette): Likewise.
15445         (grub_video_vbe_set_viewport): Likewise.
15446         (grub_video_vbe_get_viewport): Likewise.
15447         (grub_video_vbe_map_color): Likewise.
15448         (grub_video_vbe_map_rgb): Likewise.
15449         (grub_video_vbe_map_rgba): Likewise.
15450         (grub_video_vbe_unmap_color): Likewise.
15451         (grub_video_vbe_fill_rect): Likewise.
15452         (grub_video_vbe_blit_glyph): Likewise.
15453         (grub_video_vbe_blit_bitmap): Likewise.
15454         (grub_video_vbe_blit_render_target): Likewise.
15455         (grub_video_vbe_scroll): Likewise.
15456         (grub_video_vbe_swap_buffers): Likewise.
15457         (grub_video_vbe_create_render_target): Likewise.
15458         (grub_video_vbe_delete_render_target): Likewise.
15459         (grub_video_vbe_set_active_render_target): Likewise.
15460         (grub_vbe_set_pixel_rgb): Remove function.
15461         (grub_vbe_set_pixel_index): Likewise.
15462         (index_color_mode): Remove static variable.
15463         (active_mode): Likewise.
15464         (framebuffer): Likewise.
15465         (bytes_per_scan_line): Likewise.
15466         (grub_video_vbe_adapter): Added new static variable.
15467         (framebuffer): Likewise.
15468         (render_target): Likewise.
15469         (initial_mode): Likewise.
15470         (mode_in_use): Likewise.
15471         (mode_list): Likewise.
15473 2006-03-10  Marco Gerards  <marco@gnu.org>
15475         * configure.ac (AC_INIT): Bumped to 1.93.
15477         * DISTLIST: Added `include/grub/hfs.h'.
15479 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15481         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15482         18H, which might help the BIOS falling back to next boot media.
15484 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15486         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15487         Poe Chen <poe.poechen@gmail.com>.
15489 2006-01-17  Marco Gerards  <marco@gnu.org>
15491         * include/grub/normal.h: Include <grub/script.h>.
15492         (grub_command_list): Removed struct.
15493         (grub_command_list_t): Removed type.
15494         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15495         members `commands' and `sourcecode'.
15496         * include/grub/script.h: Add inclusion guards.
15497         (grub_script_cmd_menuentry): New struct.
15498         (grub_script_execute_menuentry): New prototype.
15499         (grub_script_lexer_record_start): Likewise.
15500         (grub_script_lexer_record_stop): Likewise.
15501         * normal/execute.c (grub_script_execute_menuentry): New function.
15502         * normal/lexer.c (record, recording, recordpos, recordlen): New
15503         variables.
15504         (grub_script_lexer_record_start): New function.
15505         (grub_script_lexer_record_stop): Likewise.
15506         (recordchar): Likewise.
15507         (nextchar): Likewise.
15508         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15509         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15510         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15511         (current_menu): New variable.
15512         (free_menu): Mainly rewritten.
15513         (grub_normal_menu_addentry): New function.
15514         (read_config_file): Rewritten.
15515         * normal/menu.c (run_menu_entry): Mainly rewritten.
15516         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15517         the menu entry.
15518         (run): Mainly rewritten.
15519         * normal/parser.y (menu_entry): New variable.
15520         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15521         (menuentry): New rule.
15522         (command): Add `menuentry'.
15523         (if_statement): Allow additional returns before `fi'.
15524         * normal/script.c (grub_script_create_cmdmenu): New function.
15526 2006-01-03  Marco Gerards  <marco@gnu.org>
15528         * INSTALL: GNU Bison is required.
15529         * configure.ac: Rewritten the test to detect Bison.
15530         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15531         <xun.sun.cn@gmail.com>.
15533 2006-01-03  Marco Gerards  <marco@gnu.org>
15535         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15536         the HFS+ filesystem to filesystem blocks.
15537         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15538         GCC warning is silenced.
15540 2006-01-03  Marco Gerards  <marco@gnu.org>
15542         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15543         read from disk from big endian to host byte order.
15545 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15547         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15548         documentation.
15549         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15550         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15551         embedded HFS+ filesystem.
15552         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15553         (grub_hfs_sblock): Move from here...
15554         * include/grub/hfs.h: To here...  New file.
15555         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15556         documentation.
15557         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15558         New macros.
15559         (grub_hfsplus_volheader): Change type of member `magic' to
15560         `grub_uint16_t'.
15561         (grub_hfsplus_data): Add new member `embedded_offset'.
15562         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15563         returned block.
15564         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15565         Calculate the offset.
15567 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15569         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15570         Removed.
15571         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15573 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15575         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15576         ENV->NAME is NULL after allocating ENV->VALUE.
15578 2005-12-25  Marco Gerards  <marco@gnu.org>
15580         * kern/env.c (grub_env_set): Rewritten the error handling code.
15582 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15584         * geninit.sh: Made more robust, and more portable.
15586 2005-12-25  Marco Gerards  <marco@gnu.org>
15588         Add support for Apple HFS+ filesystems.
15590         * fs/hfsplus.c: New file.
15592         * DISTLIST: Added `fs/hfsplus.c'.
15594         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15595         (hfsplus_mod_SOURCES): New variable.
15596         (hfsplus_mod_CFLAGS): Likewise.
15597         (hfsplus_mod_LDFLAGS): Likewise.
15598         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15599         (grub_setup_SOURCES): Likewise.
15600         (grub_mkdevicemap_SOURCES): Likewise.
15601         (grub_emu_SOURCES): Likewise.
15602         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15604         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15606         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15608 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15610         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15611         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15612         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15613         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15614         normal/lexer.c, normal/parser.y, normal/script.c, and
15615         partmap/gpt.c.
15616         Removed kern/sparc64/cache.c.
15618         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15619         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15620         grub_emu_init.c.
15622         * configure.ac (AC_INIT): Bumped to 1.92.
15624 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15626         * kern/err.c (grub_error_push): Added new function to support error
15627         stacks.
15628         (grub_error_pop): Likewise.
15629         (grub_error_stack_items): New local variable to support error stacks.
15630         (grub_error_stack_pos): Likewise.
15631         (grub_error_stack_assert): Likewise.
15632         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15633         stack depth.
15634         (grub_print_error): Added support to print errors from error stack.
15636         * include/grub/err.h (grub_error_push): Added function prototype.
15637         (grub_error_pop): Likewise.
15639 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15641         * configure.ac: Accept `powerpc64' as host_cpu.
15642         (amd64): Rename to `biarch32'.
15644         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15645         non-cacheline-aligned addresses.
15647         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15648         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15649         if `size' is non-zero.
15651 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15653         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15654         and `cd' to make sure the filename is not prefixed with a
15655         directory name.
15656         (pkgdata_MODULES): Add `gpt.mod'.
15657         (gpt_mod_SOURCES): New variable.
15658         (gpt_mod_CFLAGS): Likewise.
15659         (gpt_mod_LDFLAGS): Likewise.
15661         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15663         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15664         New macro.
15666         * partmap/gpt.c: New file.
15668         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15669         GPT partition map is detected.
15671 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15673         * commands/i386/pc/play.c: New file.
15674         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15675         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15676         macros.
15678 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
15680         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15681         ((unused))' to silence gcc warning.
15683 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
15685         * configure.ac: Correct `AC_PROG_YACC' test.
15687 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15689         * util/powerpc/ieee1275/grub-install.in: Run the mount point
15690         check before installing files.
15692 2005-11-22  Mike Small  <smallm@panix.com>
15694         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15695         number regex so multidigit numbers are recognized correctly.
15697 2005-11-22  Mike Small  <smallm@panix.com>
15699         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15700         debugging message before attempting to claim memory.
15701         (grub_rescue_cmd_initrd): Add a claim debugging message and try
15702         multiple addresses in case of failure.
15704 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15706         * term/tparm.c (get_space): Remove empty `if' statement.
15708         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15710         * kern/parser.c (check_varstate): Rename `state' to 's'.
15712 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15714         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
15715         variable definitions to the beginning of each function.  Sort stack
15716         variables by size.
15717         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
15718         `buf' argument to `char *'.
15720 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15722         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15723         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15724         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15725         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15726         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15727         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15728         configfile.mod, search.mod, gzio.mod and test.mod.
15729         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15730         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15731         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15732         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15733         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15734         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15735         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15736         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15737         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15738         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15739         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15740         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15741         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15742         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15743         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15744         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15745         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15746         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15747         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15748         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15749         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15750         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15751         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15753         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15754         `grep --include'.
15755         (pkgdata_MODULES): Add test.mod.
15757 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15759         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
15760         appending to variables with "+=".
15761         (PModule): Use full pathname to generate *.lst filenames.
15763         * Makefile.in: Fixed list rules moved from genmk.rb.
15764         (.DELETE_ON_ERROR): New special target.
15765         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15767         * conf/i386-pc.rmk: Include conf/common.mk.
15768         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15769         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15770         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15771         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15772         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15773         configfile.mod, search.mod, gzio.mod and test.mod.
15774         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15775         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15776         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15777         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15778         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15779         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15780         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15781         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15782         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15783         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15784         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15785         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15786         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15787         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15788         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15789         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15790         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15791         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15792         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15793         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15794         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15795         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15796         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15797         here...
15798         * conf/common.rmk: ... to here.  New file.
15800         * conf/common.mk: New file.
15802 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
15804         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15805         (grub_script.tab.c): ... here.
15807         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15808         (grub_script.tab.c): ... here.
15810         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15811         (grub_script.tab.c): ... here.
15813         * normal/command.c (grub_command_find): Fixed a memory leak of
15814         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15816 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15818         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15819         "@" which marks the start of a comment on ARM.
15820         (VARIABLE): Likewise.
15822 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15824         Add support for Linux/ADFS partition tables.
15826         * partmap/acorn.c: New file.
15828         * include/grub/acorn_filecore.h: Likewise.
15830         * DISTLIST: Added `partmap/acorn.c' and
15831         `include/grub/acorn_filecore.h'.
15833         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15834         `partmap/acorn.c'.
15835         (pkgdata_MODULES): Add `acorn.mod'.
15836         (acorn_mod_SOURCES): New variable.
15837         (acorn_mod_CFLAGS): Likewise.
15839         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15840         `partmap/acorn.c'.
15841         (pkgdata_MODULES): Add `acorn.mod'.
15842         (acorn_mod_SOURCES): New variable.
15843         (acorn_mod_CFLAGS): Likewise.
15845         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15846         (pkgdata_MODULES): Add `acorn.mod'.
15847         (acorn_mod_SOURCES): New variable.
15848         (acorn_mod_CFLAGS): Likewise.
15849         (acorn_mod_LDFLAGS): Likewise.
15851         * include/types.h (grub_disk_addr_t): New typedef.
15853 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
15855         * geninit.sh: New file.
15857         * geninitheader.sh: Likewise.
15859         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15860         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15861         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15862         * commands/configfile.c (grub_configfile_init)
15863         (grub_configfile_fini): Likewise.
15864         * commands/default.c (grub_default_init, grub_default_fini):
15865         Likewise.
15866         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15867         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15868         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15869         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15870         Likewise.
15871         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15872         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15873         Likewise.
15874         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15875         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15876         Likewise.
15877         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15878         Likewise.
15879         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15880         Likewise.
15881         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15882         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15883         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15884         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15885         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15886         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15887         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15888         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15889         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15890         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15891         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15892         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15893         * partmap/amiga.c (grub_amiga_partition_map_init)
15894         (grub_amiga_partition_map_fini): Likewise.
15895         * partmap/apple.c (grub_apple_partition_map_init)
15896         (grub_apple_partition_map_fini): Likewise.
15897         * partmap/pc.c (grub_pc_partition_map_init)
15898         (grub_pc_partition_map_fini): Likewise.
15899         * partmap/sun.c (grub_sun_partition_map_init,
15900         grub_sun_partition_map_fini): Likewise.
15901         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15902         Likewise.
15904         * util/grub-emu.c: Include <grub_modules_init.h>.
15905         (main): Don't initialize and de-initialize any modules directly,
15906         use `grub_init_all' and `grub_fini_all' instead.
15908         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15909         `grub_vesafb_mod_init'.
15910         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
15911         all users.
15912         * term/i386/pc/vga.c (grub_vga_init): Renamed to
15913         `grub_vga_mod_init'.  Updated all users.
15914         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15916         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15917         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15918         rules.
15920         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15921         Generate a function to initialize the module in utilities.
15922         Updated all callers.
15923         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
15924         initialize the module in utilities.  Updated all callers.
15926 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15928         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15929         escape sequence and a literal ^L to clear the screen.
15931         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15932         when returning from Open Firmware.
15934 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15936         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15937         (grub_ofconsole_height): Likewise.
15938         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15939         manually insert a '\n'.
15940         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15941         `grub_ofconsole_height'.  Return early if these are already set.
15943 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
15945         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15946         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15947         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15948         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15949         and `normal/script.c'.
15950         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15951         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15952         (test_mod_SOURCES): New variable.
15953         (test_mod_CFLAGS): Likewise.
15954         (test_mod_LDFLAGS): Likewise.
15955         (pkgdata_MODULES): Add `test.mod'.
15956         (grub_script.tab.c): New rule.
15957         (grub_script.tab.h): Likewise.
15959 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
15961         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15962         `commands/test.c', `normal/execute.c', `normal/lexer.c',
15963         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15964         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15965         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15966         (test_mod_SOURCES): New variable.
15967         (test_mod_CFLAGS): Likewise.
15968         (pkgdata_MODULES): Add `test.mod'.
15969         (grub_script.tab.c): New rule.
15970         (grub_script.tab.h): Likewise.
15972 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
15974         Add initial scripting support.
15976         * commands/test.c: New file.
15977         * include/grub/script.h: Likewise.
15978         * normal/execute.c: Likewise.
15979         * normal/function.c: Likewise.
15980         * normal/lexer.c: Likewise.
15981         * normal/parser.y: Likewise.
15982         * normal/script.c: Likewise.
15984         * configure.ac: Add `AC_PROG_YACC' test.
15986         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15987         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15988         `normal/function.c' and `normal/script.c'.
15989         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15990         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15991         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15992         variables.
15993         (pkgdata_MODULES): Add `test.mod'.
15994         (grub_script.tab.c): New rule.
15995         (grub_script.tab.h): Likewise.
15997         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15999         * include/grub/normal.h (grub_test_init): New prototype.
16000         (grub_test_fini): Likewise.
16002         * normal/command.c: Include <grub/script.h>.
16003         (grub_command_execute): Rewritten.
16005         * util/grub-emu.c (main): Call `grub_test_init' and
16006         `grub_test_fini'.
16008 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16010         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16011         to 0.
16012         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16013         there are no pending characters.
16015 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16017         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16018         `grub_strndup' to drop device arguments. Replace unnecessary
16019         `grub_strndup' with `grub_strdup'.
16021 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16023         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16024         `debug' environment variable has been set.
16026 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16028         * Makefile.in (install-local): Use $(DATA).
16029         (uninstall): Likewise.
16030         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16031         (sbin_UTILITIES): ... to here.
16032         (sbin_SCRIPTS): New variable.
16033         (grub_install_SOURCES): New variable.
16034         * util/powerpc/ieee1275/grub-install.in: New file.
16035         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16036         variable.
16037         (add_segments): Call `grub_util_get_path'.
16039 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16041         From Timothy Baldwin:
16042         * commands/ls.c (grub_ls_list_files): Close FILE with
16043         grub_file_close.
16044         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16046 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16048         * include/grub/parser.h: New file.
16050         * kern/parser.c: Likewise.
16052         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16053         (grub_setup_SOURCES): Likewise.
16054         (grub_probefs_SOURCES): Likewise.
16055         (grub_emu_SOURCES): Likewise.
16056         (kernel_img_HEADERS): Add `parser.h'.
16058         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16059         (grub_emu_SOURCES): Add `kern/parser.c'.
16060         (grubof_SOURCES): Likewise.
16062         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16063         (grubof_SOURCES): Add `kern/parser.c'.
16065         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16067         * kern/misc.c (grub_split_cmdline): Removed function.
16069         * kern/rescue.c: Include <grub/parser.h>.
16070         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16071         of `grub_split_cmdline'.
16073         * normal/command.c: Include <grub/parser.h>.
16074         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16075         of `grub_split_cmdline'.
16077         * normal/completion.c: Include <grub/parser.h>.
16078         (cmdline_state): New variable.
16079         (iterate_dir): End the filename with a quote depending on the
16080         command line state.
16081         (get_state): new function.
16082         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16083         split the arguments and determine the current argument.  When the
16084         argument string is not quoted, escape all spaces.
16086 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16088         * normal/sparc64/setjmp.S: New file.
16090 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16092         * include/grub/sparc64/libgcc.h: New file.
16093         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16094         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16095         normal/sparc64/setjmp.c.
16097 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16099         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16100         * kern/sparc64/cache.S: New file.
16101         * kern/sparc64/cache.c: Removed.
16102         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16103         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16104         -mtune=ultrasparc.
16105         (COMMON_LDFLAGS): Add -melf64_sparc.
16106         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16107         (grubof_SOURCES): Use cache.S instead of cache.c.
16108         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16109         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16110         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16111         commented though.
16112         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16113         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16114         (linux_mod_CFLAGS): Commented out.
16115         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16116         out because module isn't built.
16117         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16118         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16119         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16120         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16121         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16122         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16123         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16124         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16125         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16126         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16127         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16128         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16129         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16130         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16132 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16134         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16135         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16136         longer, because HFS should not be used on PC.
16138 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16140         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16141         consistently within the loop.
16143 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16145         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16146         directory can not be read.
16148 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16150         * configure.ac (AC_INIT): Increase the version number to 1.91.
16152         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16153         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16154         term/i386/pc/serial.c.
16156 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16158         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16159         file size must be permitted.
16161         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16162         between %ah and %al.
16164 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16166         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16167         grub_uint64_t.
16168         Call the hook with a NUL-terminated filename.
16169         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16170         grub_cpu_to_be32.
16172         * kern/term.c (cursor_state): New variable.
16173         (grub_term_set_current): Reset the cursor state on a new
16174         terminal.
16175         (grub_setcursor): Rewritten to use CURSOR_STATE.
16176         (grub_getcursor): New function.
16178         * include/grub/term.h (grub_getcursor): New prototype.
16180         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16181         integers on ARM. Reported by Timothy Baldwin
16182         <T.E.Baldwin99@members.leeds.ac.uk>.
16184 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16186         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16187         allocated.
16188         (grub_sfs_dir): Likewise.
16190 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16192         Add support for the SFS filesystem.
16194         * fs/sfs.c: New file.
16196         * DISTLIST: Added `fs/sfs.c'.
16198         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16199         (grub_probefs_SOURCES): Likewise.
16200         (grub_emu_SOURCES): Likewise.
16201         (pkgdata_MODULES): Add `sfs.mod'.
16202         (sfs_mod_SOURCES): New variable.
16203         (sfs_mod_CFLAGS): Likewise.
16204         (sfs_mod_LDFLAGS): Likewise.
16206         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16207         (pkgdata_MODULES): Add `sfs.mod'.
16208         (sfs_mod_SOURCES): New variable.
16209         (sfs_mod_CFLAGS): Likewise.
16211         * util/grub-emu.c (main): Call `grub_sfs_init' and
16212         `grub_sfs_fini'.
16214         * include/grub/fs.h (grub_sfs_init): New prototype.
16215         (grub_sfs_fini): Likewise.
16217 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16219         Add support for the AFFS filesystem.
16221         * fs/affs.c: New file.
16223         * DISTLIST: Added `fs/affs.c'.
16225         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16226         (grub_probefs_SOURCES): Likewise.
16227         (grub_emu_SOURCES): Likewise.
16228         (pkgdata_MODULES): Add `affs.mod'.
16229         (affs_mod_SOURCES): New variable.
16230         (affs_mod_CFLAGS): Likewise.
16231         (affs_mod_LDFLAGS): Likewise.
16233         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16234         (pkgdata_MODULES): Add `affs.mod'.
16235         (affs_mod_SOURCES): New variable.
16236         (affs_mod_CFLAGS): Likewise.
16238         * util/grub-emu.c (main): Call `grub_affs_init' and
16239         `grub_affs_fini'.
16241         * include/grub/fs.h (grub_affs_init): New prototype.
16242         (grub_affs_fini): Likewise.
16244 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16246         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16248 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16250         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16251         `-m32' to CFLAGS.
16253         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16254         linking.
16256         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16257         (COMMON_LDFLAGS): New variable.
16258         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16259         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16260         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16261         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16262         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16263         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16264         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16265         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16266         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16267         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16268         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16269         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16270         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16271         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16272         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16273         variables.
16274         (normal_mod_ASFLAGS): Add `-m32'.
16276         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16277         (grub_host_size_t, grub_host_ssize_t): New types.
16278         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16279         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16280         `GRUB_HOST_SIZEOF_VOID_P'.
16282         * include/grub/kernel.h (struct grub_module_header): Type of
16283         member offset changed to `grub_host_off_t'.  Type of member size
16284         changed to `grub_host_size_t'.
16285         (struct grub_module_info): Type of member offset changed to
16286         `grub_host_off_t'.  Type of member size changed to
16287         `grub_host_size_t'.
16289 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16291         Make GRUB's kernel compliant to Multiboot Specification.
16293         * kern/i386/pc/startup.S (multiboot_header): New label.
16294         (multiboot_entry): Likewise.
16295         (multiboot_trampoline): Likewise.
16297         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16298         Increased to 0x4A0.
16300         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16301         put parentheses after a question mark.
16302         [!GRUB_UTIL] (my_mod): New variable.
16304         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16306 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16308         Adds support for the XFS filesystem.  Btrees are not supported
16309         yet.
16311         * fs/xfs.c: New file.
16313         * DISTLIST: Added `fs/xfs.c'.
16315         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16316         (grub_probefs_SOURCES): Likewise.
16317         (grub_emu_SOURCES): Likewise.
16318         (pkgdata_MODULES): Add `xfs.mod'.
16319         (xfs_mod_SOURCES): New variable.
16320         (xfs_mod_CFLAGS): Likewise.
16322         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16323         (pkgdata_MODULES): Add `xfs.mod'.
16324         (xfs_mod_SOURCES): New variable.
16325         (xfs_mod_CFLAGS): Likewise.
16327         * util/grub-emu.c (main): Call `grub_xfs_init' and
16328         `grub_xfs_fini'.
16330         * include/grub/fs.h (grub_xfs_init): New prototype.
16331         (grub_xfs_fini): Likewise.
16334 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16336         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16337         color modes, allow greater than 16 colors to be configured as
16338         a default palette.
16340 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16342         * normal/completion.c (complete_arguments): Add the qualifier
16343         const into OPTIONS.
16345         From Omniflux <omniflux+lists@omniflux.com>:
16346         * include/grub/terminfo.h: New file.
16347         * include/grub/tparm.h: Likewise.
16348         * include/grub/i386/pc/serial.h: Likewise.
16349         * term/terminfo.c: Likewise.
16350         * term/tparm.c: Likewise.
16351         * term/i386/pc/serial.c: Likewise.
16352         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16353         serial.mod.
16354         (terminfo_mod_SOURCES): New variable.
16355         (terminfo_mod_CFLAGS): Likewise.
16356         (serial_mod_SOURCES): Likewise.
16357         (serial_mod_CFLAGS): Likewise.
16359 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16361         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16362         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16363         and kern/powerpc/ieee1275/cmain.c, respectively.
16365         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16366         * kern/powerpc/ieee1275/crt0.S: ... here.
16368         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16369         * kern/powerpc/ieee1275/cmain.c: ... here.
16371         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16372         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16373         instead of boot/powerpc/ieee1275/crt0.S and
16374         boot/powerpc/ieee1275/cmain.c, respectively.
16376         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16377         sectors. It was not used anyway.
16379 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16381         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16382         `unused parameter' warning.
16384 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16386         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16387         function.
16388         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16389         getcharwidth.
16391 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16393         * include/grub/normal.h (enum grub_completion_type): Added
16394         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16396         * normal/cmdline.c (print_completion): Handle
16397         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16398         * normal/menu_entry.c (store_completion): Likewise.
16400         * normal/completion.c (complete_arguments): New function.
16401         (grub_normal_do_completion): Call `complete_arguments' when the
16402         current words start with a dash.
16404 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16406         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16407         `gzio.mod' instead of `io.mod').
16409 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16411         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16412         (DISTDIRS): Added io and video.
16413         Rewrite the search routine to make an output consistently.
16415         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16416         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16417         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16418         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16419         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16420         util/powerpc/ieee1275/misc.c.
16422         * include/grub/gzio.h: New file.
16423         * io/gzio.c: Likewise.
16425         * kern/file.c (grub_file_close): Call grub_device_close only if
16426         FILE->DEVICE is not NULL.
16428         * include/grub/mm.h [!NULL] (NULL): New macro.
16430         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16432         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16433         (pkgdata_MODULES): Added gzio.mod.
16434         (gzio_mod_SOURCES): New variable.
16435         (gzio_mod_CFLAGS): Likewise.
16437         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16438         (pkgdata_MODULES): Added gzio.mod.
16439         (gzio_mod_SOURCES): New variable.
16440         (gzio_mod_CFLAGS): Likewise.
16442         * commands/cat.c: Include grub/gzio.h.
16443         (grub_cmd_cat): Use grub_gzfile_open instead of
16444         grub_file_open.
16446         * commands/cmp.c: Include grub/gzio.h.
16447         (grub_cmd_cmp): Use grub_gzfile_open instead of
16448         grub_file_open.
16450         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16451         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16452         grub_file_open.
16453         (grub_rescue_cmd_module): Likewise.
16455 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16457         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16458         kern/sparc64/ieee1275/init.c because it contains _start.
16459         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16461 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16463         * configure.ac: Add support for sparc64 host with ieee1275
16464         firmware.
16465         * configure: Generated from configure.ac.
16466         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16467         instead of int.
16468         (grub_ofdisk_read): Likewise.
16469         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16470         pointers as (void *) to remove a warning.
16471         (grub_ofdisk_close): Likewise.
16472         (grub_ofdisk_read): Likewise.
16473         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16474         returns, so make it return void to remove a warning.
16475         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16476         Corresponding prototype change.
16477         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16478         values, and cast the pointers as (void *) to remove a warning.
16479         (grub_mm_dump): Likewise.
16480         * conf/sparc64-ieee1275.mk: New file.
16481         * conf/sparc64-ieee1275.rmk: Likewise.
16482         * include/grub/sparc64/setjmp.h: Likewise.
16483         * include/grub/sparc64/types.h: Likewise.
16484         * include/grub/sparc64/ieee1275/console.h: Likewise.
16485         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16486         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16487         * include/grub/sparc64/ieee1275/time.h: Likewise.
16488         * kern/sparc64/cache.c: Likewise.
16489         * kern/sparc64/dl.c: Likewise.
16490         * kern/sparc64/ieee1275/init.c: Likewise.
16491         * kern/sparc64/ieee1275/openfw.c: Likewise.
16493 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16495         * util/console.c (grub_ncurses_putchar): If C is greater than
16496         0x7f, set C to a question mark.
16497         (grub_ncurses_getcharwidth): New function.
16498         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16499         getcharwidth.
16501         * normal/menu.c (print_entry): Made aware of Unicode. First,
16502         convert TITLE to UCS-4, and predict the cursor position by
16503         grub_getcharwidth.
16505         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16506         const to SRC.
16507         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16509 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16511         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16512         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16513         grub_strcat.
16515         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16516         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16517         grub_strcpy and grub_strlen. Take it into account that a space
16518         character is inserted as a delimiter.
16520 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16522         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16523         invalid magic in the error.
16525         * commands/search.c: New file.
16527         * util/grub-emu.c (main): Call grub_search_init and
16528         grub_search_fini.
16530         * kern/rescue.c (grub_rescue_print_disks): Removed.
16531         (grub_rescue_print_devices): New function.
16532         (grub_rescue_cmd_ls): Use grub_device_iterate with
16533         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16534         grub_rescue_print_disks.
16536         * kern/partition.c (grub_partition_iterate): Return the result of
16537         PARTMAP->ITERATE instead of GRUB_ERRNO.
16539         * kern/device.c: Include grub/partition.h.
16540         (grub_device_iterate): New function.
16542         * include/grub/partition.h (grub_partition_iterate): Return int
16543         instead of grub_err_t.
16545         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16546         prototype.
16547         [GRUB_UTIL] (grub_search_fini): Likewise.
16549         * include/grub/device.h (grub_device_iterate): New prototype.
16551         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16552         commands/search.c.
16553         (pkgdata_MODULES): Added search.mod.
16554         (search_mod_SOURCES): New variable.
16555         (search_mod_CFLAGS): Likewise.
16557         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16558         (pkgdata_MODULES): Added search.mod.
16559         (search_mod_SOURCES): New variable.
16560         (search_mod_CFLAGS): Likewise.
16562         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16563         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16564         All callers changed.
16566         * DISTLIST: Added commands/search.c.
16568 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16570         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16571         conversion.
16572         (grub_getcharwidth): New function.
16574         * kern/misc.c (grub_utf8_to_ucs4): New function.
16576         * include/grub/term.h (struct grub_term): Added a new member
16577         "getcharwidth".
16578         (grub_getcharwidth): New prototype.
16580         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16582         * term/i386/pc/console.c (map_char): New function. Segregated from
16583         grub_console_putchar.
16584         (grub_console_putchar): Use map_char.
16585         (grub_console_getcharwidth): New function.
16586         (grub_console_term): Specified grub_console_getcharwidth as
16587         getcharwidth.
16589         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16590         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16592         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16593         GRUB_ERRNO.
16594         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16595         on grub_strtoul completely.
16596         (write_char): Declare local variables in the beginning of the
16597         function.
16598         (grub_vesafb_getcharwidth): New function.
16599         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16600         getcharwidth.
16602 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16604         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16605         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16606         commands/i386/pc/vbetest.c.
16608         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16609         call grub_vbe_get_controller_info again, because the returned
16610         information is volatile.
16611         (grub_vbe_set_video_mode): Mostly rewritten.
16612         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16613         grub_vbe_status_t correctly.
16614         (grub_vbe_get_video_mode_info): Likewise.
16615         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16616         several if statements.
16618         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16619         * commands/i386/pc/vbeinfo.c: ... this.
16621         * commands/i386/pc/vbe_test.c: Renamed to ...
16622         * commands/i386/pc/vbetest.c: ... this.
16624         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16625         ...
16626         (grub_cmd_vbeinfo): ... this. Save video modes before
16627         iterating. Skip a video mode, if it is not available, not enough
16628         information is given or it is monochrome. Show the memory
16629         model. Leave the interpretation of MODEVAR to grub_strtoul
16630         completely.
16631         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16632         (GRUB_MOD_FINI): Likewise.
16634         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16635         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16636         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16637         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16638         grub_strtoul completely.
16639         (real2pm): Removed.
16640         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16641         (GRUB_MOD_FINI): Likewise.
16643         * normal/misc.c: Include grub/mm.h.
16645         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16646         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16647         (vbe_list_modes_mod_SOURCES): Removed.
16648         (vbe_list_modes_mod_CFLAGS): Likewise.
16649         (vbe_test_mod_SOURCES): Likewise.
16650         (vbe_test_mod_CFLAGS): Likewise.
16651         (vbeinfo_mod_SOURCES): New variable.
16652         (vbeinfo_mod_CFLAGS): Likewise.
16653         (vbetest_mod_SOURCES): Likewise.
16654         (vbetest_mod_CFLAGS): Likewise.
16656 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16658         * normal/misc.c: New file.
16660         * DISTLIST: Added normal/misc.c.
16662         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16663         DISK to HOOK. Call HOOK with DISK.
16664         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16665         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16666         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16668         * normal/menu_entry.c (struct screen): Added a new member
16669         "completion_shown".
16670         (completion_buffer): New global variable.
16671         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16672         (store_completion): New function.
16673         (complete): Likewise.
16674         (clear_completions): Likewise.
16675         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16676         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16677         a tab, call complete.
16679         * normal/completion.c (disk_dev): Removed.
16680         (print_simple_completion): Likewise.
16681         (print_partition_completion): Likewise.
16682         (print_func): New global variable.
16683         (add_completion): Do not take the arguments WHAT or PRINT any
16684         longer. Added a new argument TYPE. Instead of printing directly,
16685         call PRINT_FUNC if not NULL.
16686         All callers changed.
16687         (complete_device): Use a local variable DEV instead of
16688         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16689         (grub_normal_do_completion): Take a new argument HOOK. Do not
16690         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16691         empty string, return NULL instead.
16692         All callers changed.
16694         * normal/cmdline.c (print_completion): New function.
16696         * kern/partition.c (grub_partition_iterate): Add an argument DISK
16697         to HOOK.
16698         All callers changed.
16700         * kern/disk.c (grub_print_partinfo): Removed.
16702         * include/grub/partition.h (struct grub_partition_map): Add a new
16703         argument DISK into HOOK of ITERATE.
16704         (grub_partition_iterate): Add a new argument DISK to HOOK.
16706         * include/grub/normal.h (enum grub_completion_type): New enum.
16707         (grub_completion_type_t): New type.
16708         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16709         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16710         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16711         (GRUB_COMPLETION_TYPE_FILE): Likewise.
16712         (grub_normal_do_completion): Added a new argument HOOK.
16713         (grub_normal_print_device_info): New prototype.
16715         * include/grub/disk.h (grub_print_partinfo): Removed.
16717         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16718         (normal_mod_SOURCES): Likewise.
16719         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16720         (normal_mod_SOURCES): Likewise.
16722         * commands/ls.c (grub_ls_list_disks): Use
16723         grub_normal_print_device_info instead of grub_print_partinfo. Free
16724         PNAME.
16725         (grub_ls_list_files): Use grub_normal_print_device_info instead of
16726         duplicating the code.
16728 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16730         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16731         follow GCS more precisely.
16732         * commands/i386/pc/vbe_test.c: Likewise.
16733         * include/grub/i386/pc/vbe.h: Likewise.
16734         * term/i386/pc/vesafb.c: Likewise.
16735         * video/i386/pc/vbe.c: Likewise.
16737 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16739         * DISTLIST: Added term/i386/pc/vesafb.c
16740         DISTLIST: Added video/i386/pc/vbe.c
16741         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16742         DISTLIST: Added commands/i386/pc/vbe_test.c.
16743         * commands/i386/pc/vbe_list_modes.c: New file.
16744         * commands/i386/pc/vbe_test.c: Likewise.
16745         * term/i386/pc/vesafb.c: Likewise.
16746         * video/i386/pc/vbe.c: Likewise.
16747         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16748         (grub_vbe_probe) Added prototype.
16749         (grub_vbe_set_video_mode) Likewise.
16750         (grub_vbe_get_video_mode) Likewise.
16751         (grub_vbe_get_video_mode_info) Likewise.
16752         (grub_vbe_set_pixel_rgb) Likewise.
16753         (grub_vbe_set_pixel_index) Likewise.
16754         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16755         (pkgdata_MODULES): Added vesafb.mod.
16756         (pkgdata_MODULES): Added vbe_list_modes.mod.
16757         (pkgdata_MODULES): Added vbe_test.mod.
16758         (vbe_mod_SOURCES): Added.
16759         (vbe_mod_CFLAGS): Likewise.
16760         (vesafb_mod_SOURCES): Likewise.
16761         (vesafb_mod_CFLAGS): Likewise.
16762         (vbe_list_modes_mod_SOURCES): Likewise.
16763         (vbe_list_modes_mod_CFLAGS): Likewise.
16764         (vbe_test_mod_SOURCES): Likewise.
16765         (vbe_test_mod_CFLAGS): Likewise.
16767 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
16769         * normal/command.c (grub_command_execute): If INTERACTIVE is
16770         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16771         CMDLINE. Disable the pager if INTERACTIVE is true.
16772         All callers are changed.
16774         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16775         before reading a config file.
16776         * normal/main.c (read_config_file): Even if a command is not
16777         found, register it if it is within an entry.
16779         * util/grub-emu.c: Include sys/types.h and unistd.h.
16780         (options): Added --hold.
16781         (struct arguments): Added a new member "hold".
16782         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16783         missing.
16784         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16785         cleared by a debugger, if it is not zero.
16787         * include/grub/normal.h (grub_command_execute): Add an argument
16788         INTERACTIVE.
16790 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
16792         * DISTLIST: Added include/grub/i386/pc/vbe.h.
16794 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
16796         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16797         program with another one, because the old one didn't detect a bug
16798         in gcc-3.4. Always use regparm 2, because the new test is still
16799         not enough for gcc-4.0. Someone must investigate a simple test
16800         case which detects a bug in gcc-4.0.
16802 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
16804         * DISTLIST: Added normal/completion.c.
16806         * normal/completion.c: New file.
16808         * term/i386/pc/console.c (grub_console_getwh): New function.
16809         (grub_console_term): Assign grub_console_getwh to getwh.
16811         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16812         function is defined in normal/completion.c as
16813         grub_normal_do_completion.
16814         (grub_cmdline_get): Use grub_normal_do_completion instead of
16815         grub_tab_complete.
16817         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16818         returns non-zero, otherwise return 0.
16819         (grub_partition_iterate): First, probe the partition map. Then,
16820         call ITERATE only for this partition map.
16822         * kern/misc.c (grub_strncmp): Rewritten.
16824         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16825         returns non-zero. Otherwise return 0.
16827         * include/grub/partition.h (grub_partition_map_iterate): Return
16828         int instead of void.
16830         * include/grub/normal.h (grub_normal_do_completion): New prototype.
16832         * include/grub/misc.h (grub_strncmp): Change the type of N to
16833         grub_size_t.
16835         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16836         of void.
16838         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16839         unsigned explicitly before comparing it with I.
16841         * kern/main.c (grub_env_write_root): Add the attribute unused into
16842         VAR.
16844         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16845         normal/completion.c.
16846         (normal_mod_SOURCES): Likewise.
16847         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16848         (normal_mod_SOURCES): Likewise.
16850         * normal/command.c (grub_iterate_commands): If ITERATE returns
16851         non-zero, return one immediately.
16853 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
16855         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16856         * kern/i386/pc/startup.S: Updated Global Descriptor table's
16857         descriptions.
16858         (grub_vbe_get_controller_info): New function.
16859         (grub_vbe_get_mode_info): Likewise.
16860         (grub_vbe_set_mode): Likewise.
16861         (grub_vbe_get_mode): Likewise.
16862         (grub_vbe_set_memory_window): Likewise.
16863         (grub_vbe_get_memory_window): Likewise.
16864         (grub_vbe_set_scanline_length): Likewise.
16865         (grub_vbe_get_scanline_length): Likewise.
16866         (grub_vbe_set_display_start): Likewise.
16867         (grub_vbe_get_display_start): Likewise.
16868         (grub_vbe_set_palette_data): Likewise.
16869         * include/grub/i386/pc/vbe.h: New file.
16871 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16873         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16874         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16875         * DISTLIST: Likewise.
16876         * kern/ieee1275/of.c: Moved to ...
16877         * kern/ieee1275/ieee1275.c: ... here.
16879 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16881         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16882         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16883         Pass 0 as `end' parameter to grub_strtoul().
16885 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16887         * include/grub/powerpc/ieee1275/console.h: Do not include
16888         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
16889         ifdef.
16890         (grub_console_cur_color): Remove i386-specific prototype.
16891         (grub_console_real_putchar): Likewise.
16892         (grub_console_checkkey): Likewise.
16893         (grub_console_getkey): Likewise.
16894         (grub_console_getxy): Likewise.
16895         (grub_console_gotoxy): Likewise.
16896         (grub_console_cls): Likewise.
16897         (grub_console_setcursor): Likewise.
16898         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16899         Include <grub/machine/console.h>.
16900         * term/ieee1275/ofconsole.c: Likewise.
16902 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
16904         * Makefile.in (LIBLZO): New variable.
16906         * configure.ac: Check for LZO version 2.
16908         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16909         lzo/lzo1x.h instead of lzo1x.h.
16911         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16912         of -llzo.
16914         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16915         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16917         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16918         copying the data from PARTITION to P.
16920 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16922         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16923         negative, unload the module.
16925         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16926         map is "pc_partition_map" but not "pc".
16927         (usage): Fix the description. The options are --boot-image and
16928         --core-image but not --boot-file or --core-file.
16929         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16930         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16931         DEFAULT_DIRECTORY.
16933         * util/i386/pc/grub-install.in: Do not specify --boot-file or
16934         --core-file. Specify INSTALL_DEVICE as an argument.
16936         * util/console.c: Include config.h.
16937         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16938         [HAVE_NCURSES_H]: Include ncurses.h.
16939         [HAVE_CURSES_H]: Include curses.h.
16940         [!A_NORMAL] (A_NORMAL): Defined as zero.
16941         [!A_STANDOUT] (A_STANDOUT): Likewise.
16943         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16944         -lncurses.
16945         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16947         * configure.ac: Check for curses libraries and headers.
16949         * Makefile.in (LIBCURSES): New variable.
16951         * genmk.rb (Script::rule): Set the executable bits.
16953         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16954         name of the PC partition map is "pc_partition_map" but not "pc".
16956 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16958         * util/i386/pc/grub-install.in (grub_probefs): New variable.
16959         (modules): Likewise.
16960         (usage): Added descriptions for --modules and --grub-probefs.
16961         Handle --modules and --grub-probefs. Save the arguments in MODULES
16962         and GRUB_PROBEFS, respectively.
16963         Auto-detect a filesystem module against GRUBDIR. If the result is
16964         empty and modules are not specified explicitly, abort the
16965         installation. Add the result to MODULES.
16967         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16968         disk/powerpc/ieee1275/ofdisk.c,
16969         include/grub/powerpc/ieee1275/init.h and
16970         term/powerpc/ieee1275/ofconsole.c.
16971         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16972         term/ieee1275/ofconsole.c.
16974         * include/grub/powerpc/ieee1275/console.h: Resurrected.
16976         * COPYING: Upgraded to the latest version. Only the address of the
16977         FSF office has changed.
16979 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16981         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16982         kern/ieee1275.c with kern/ieee1275/of.c.
16984         * kern/ieee1275.c: Moved to ...
16985         * kern/ieee1275/of.c: ... here.
16987 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
16989         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16990         readability.
16992         * config.guess: Updated to the latest version from gnulib.
16993         * config.sub: Likewise.
16994         * install.sh: Likewise.
16995         * mkinstalldirs: Likewise.
16997         * include/grub/console.h: Removed. This file is arch-specific. Do
16998         not put this in include/grub.
17000         * include/grub/i386/pc/console.h: Resurrected.
17002         * util/console.c: Include grub/machine/console.h instead of
17003         grub/console.h.
17004         * util/grub-emu.c: Likewise.
17006 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17008         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17009         hardcoded value.
17011         From Vincent Pelletier  <subdino2004@yahoo.fr>
17012         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17013         Redefined to use grub_getwh.
17014         (grub_term): New member named getwh.
17015         (grub_getwh): New prototype.
17016         * kern/term.c (grub_getwh): New function.
17017         * term/i386/pc/console.c (grub_console_getwh): New function.
17018         (grub_console_term): New member `getwh'.
17019         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17020         (grub_vga_term): New member `getwh'.
17021         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17022         grub_ssize_t.
17023         (grub_ofconsole_getw): New function.
17024         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17025         (grub_ofconsole_term): New field named getwh and new initial
17026         value.
17028 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17030         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17031         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17032         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17033         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17034         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17035         of <grub/machine/ieee1275.h>.
17036         * commands/ieee1275/reboot.c: Likewise.
17037         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17038         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17039         parameter structs to use new type `grub_ieee1275_cell_t'.
17040         * term/powerpc/ieee1275/ofconsole.c: Move ...
17041         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17042         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17043         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17044         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17045         to return int.
17046         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17047         Remove unused prototypes.  All users updated.
17048         * include/grub/powerpc/ieee1275/console.h: Removed.
17049         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17050         `grub_ieee1275_cell_t'.
17051         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17052         Cast comparisons with -1 to the correct type.
17053         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17054         type to match `grub_ieee1275_entry_fn'.
17056 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17058         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17060         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17061         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17062         partmap/sun.c.
17063         (grub_probefs_SOURCES): New variable.
17065         * util/i386/pc/grub-probefs.c: New file.
17067         * util/i386/pc/grub-setup.c (main): Call
17068         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17069         grub_hfs_init and grub_jfs_init to initialize the system. Call
17070         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17071         grub_pc_partition_map_fini to finish the system.
17073 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17075         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17076         function.
17077         (grub_multiboot_load_elf32): Likewise.
17078         (grub_multiboot_is_elf64): Likewise.
17079         (grub_multiboot_load_elf64): Likewise.
17080         (grub_multiboot_load_elf): Likewise.
17081         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17082         an ELF32 or ELF64 file.
17083         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17085         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17086         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17087         NULL before calling FS->LABEL.
17088         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17089         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17090         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17091         before calling FS->LABEL.
17093 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17095         * util/i386/pc/grub-install.in (datadir): New variable.
17096         (libdir): Removed.
17097         (pkgdatadir): New variable.
17098         (pkglibdir): Removed.
17100 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17102         * DISTLIST: Added util/i386/pc/grub-install.in.
17104         * util/i386/pc/grub-install.in: New file.
17106         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17107         (grub_install_SOURCES): Likewise.
17109         * genmk.rb: Added support for scripts.
17110         (Script): New class.
17111         (scripts): New variable.
17113         * Makefile.in (install-local): Install sbin_SCRIPTS by
17114         INSTALL_SCRIPT.
17115         (uninstall): Remove sbin_SCRIPTS.
17117         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17118         device, try to get a GRUB device by
17119         grub_util_biosdisk_get_grub_dev.
17120         Free DEST_DEV.
17122         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17123         description for --device-map.
17125 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17127         Change the semantics of variable hooks. They now return strings
17128         instead of error values.
17130         * util/i386/pc/grub-setup.c: Include grub/env.h.
17131         (setup): Use grub_device_set_root instead of grub_env_set.
17133         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17134         grub_env_get instead of grub_device_set_root and
17135         grub_device_get_root, respectively.
17137         * kern/main.c (grub_env_write_root): New function.
17138         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17139         grub_env_set instead of grub_device_set_root.
17141         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17142         many variables.
17143         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17144         rather than calling ENV->WRITE_HOOK afterwards.
17145         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17146         passing a pointer of a pointer.
17147         (grub_register_variable_hook): Change the types of "read_hook" and
17148         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17149         respectively.
17150         Allocate the default empty string on the heap, because this string
17151         may be freed later.
17153         * kern/device.c: Include grub/env.h.
17154         (grub_device_set_root): Removed.
17155         (grub_device_get_root): Likewise.
17156         (grub_device_open): Use grub_env_get instead of
17157         grub_device_get_root.
17159         * include/grub/env.h (grub_env_read_hook_t): New type.
17160         (grub_env_write_hook_t): Likewise.
17161         (grub_env_var): Change the types of "read_hook" and "write_hook"
17162         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17163         (grub_register_variable_hook): Likewise.
17165         * include/grub/device.h (grub_device_set_root): Removed.
17166         (grub_device_set_root): Likewise.
17168         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17169         make sure that DIRNAME terminates with '/', so that
17170         grub_fat_find_dir will fail if PATH is not a directory.
17172         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17173         from DIRNAME.
17174         Use the qualifier auto for print_files and print_files_long.
17175         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17176         as a regular file.
17177         Put a newline only if there is no error.
17178         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17179         used.
17181 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17183         * kern/partition.c (grub_partition_probe): Initialize PART to
17184         NULL. Otherwise, when no partition map is registered, this returns
17185         a garbage.
17187 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17189         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17190         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17191         valid.
17193 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17195         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17196         information on each device, if it does not have partitions. Print
17197         "Device" instead of "Disk", because this function is not specific
17198         to disk devices.
17200         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17201         static to ensure that it is put on the memory rather than a
17202         register.
17204 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17206         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17207         (grub_cat_init): Likewise.
17208         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17209         (options): Likewise.
17210         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17211         (grub_configfile_init): Likewise.
17212         * font/manager.c (GRUB_MOD_INIT): Likewise.
17213         * commands/help.c (GRUB_MOD_INIT): Likewise.
17214         (grub_help_init): Likewise.
17215         * normal/command.c (grub_command_init): Likewise.
17216         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17217         * disk/loopback.c (grub_loop_init): Likewise.
17218         (GRUB_MOD_INIT): Likewise.
17219         * commands/ls.c (grub_ls_init): Likewise.
17220         (GRUB_MOD_INIT): Likewise.
17221         (options): Likewise.
17222         * commands/boot.c (grub_boot_init): Likewise.
17223         (GRUB_MOD_INIT): Likewise.
17224         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17225         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17226         (GRUB_MOD_INIT): Likewise.
17227         * commands/cmp.c (grub_cmp_init): Likewise.
17228         (GRUB_MOD_INIT): Likewise.
17230         * normal/arg.c: Use <> instead of "" to include header files.
17231         (SHORT_ARG_HELP): New macro.
17232         (SHORT_ARG_USAGE): Likewise.
17233         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17234         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17235         descriptions.
17236         (find_short): Check if C is 'h' or 'u' explicitly.
17237         (grub_arg_show_help): Use space characters instead of tabs. Treat
17238         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17239         are shown with --help and --usage only if they are not used for
17240         the command itself.
17241         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17242         'h' and 'u'.
17244         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17245         const into "longarg". Change the type of "shortarg" to int.
17247 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17249         * boot/i386/pc/boot.S (boot_drive_check): New label.
17251         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17252         macro.
17254         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17255         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17257 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17259         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17260         When turning off Gate A20, skip the check and return immediately,
17261         because this is not fatal usually.
17263 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17265         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17266         be 0x7C00 instead of 0x8000.
17268         * boot/i386/pc/pxeboot.S: Rewritten.
17270         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17271         EXT_C.
17272         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17273         result.
17275 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17277         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17278         robustness. This routine now supports a BIOS call and System
17279         Control Port A to modify the gate A20.
17281         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17282         Increased to 0x440.
17284 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17286         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17287         device path and resulting ihandle.
17288         (grub_ofdisk_close): dprintf the ihandle being closed.
17289         (grub_ofdisk_read): dprintf function parameters.
17290         * kern/mm.c (grub_mm_init_region): Likewise.
17291         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17292         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17293         size, and boot arguments.
17294         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17295         before loading into memory.
17296         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17297         before loading into memory.
17299 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17301         * kern/mm.c: Added much documentation.
17302         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17303         8, set to 5 instead of 8.
17305 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17307         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17309         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17310         (grub_mkdevicemap_SOURCES): New variable.
17312         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17313         lib/device.c of GRUB Legacy.
17315 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17317         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17318         instead of PATH is NULL.
17320 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17322         * commands/cmp.c (BUFFER_SIZE): New macro.
17323         (grub_cmd_cmp): Close the right file at the right time.  Compare
17324         only data just read.  Don't report files of different  size as
17325         identical.  Dynamically allocate buffers.  Move variable
17326         declarations at the beginning of function.
17328 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17330         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17331         reverse.
17333 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17335         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17336         when backspace is pressed at beginning of line.
17338 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17340         * DISTLIST: Added genfslist.sh.
17342         * normal/main.c (fs_module_list): New variable.
17343         (autoload_fs_module): New function.
17344         (read_fs_list): Likewise.
17345         (grub_normal_execute): Call read_fs_list.
17347         * kern/fs.c (grub_fs_autoload_hook): New variable.
17348         (grub_fs_probe): Added support for auto-loading.
17350         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17351         (grub_fs_module_list_t): New type.
17353         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17354         (grub_fs_autoload_hook): New prototype.
17356         * genfslist.sh: New file.
17358         * genmk.rb: Added a rule to generate a filesystem list.
17360 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17362         * configure.ac: Fix the test for cross-compiling.
17364         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17365         define GRUB_UTIL anymore.
17367         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17368         so this function works on other systems than just big endian.
17369         (load_modules): Likewise.
17370         (add_segments): Likewise.
17372 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17374         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17375         contains `l' modifier, get a long from va_arg().
17377 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17379         * kern/mm.c (grub_free): If the next free block which is being
17380         merged is the first free block, set the first block to the block
17381         being freed.
17382         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17384 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17386         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17387         `grub_ieee1275_chosen'.
17389 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17391         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17392         (grub_ieee1275_chosen): New variable.
17393         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17394         `chosen'.
17395         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17396         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17397         Rename first argument to `phandle' for consistency.
17398         (grub_ieee1275_get_property_length): Likewise.
17399         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17400         to grub_ieee1275_phandle_t.
17401         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17402         Move export next to declaration.
17403         (grub_ieee1275_chosen): New variable.
17404         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17405         Correct cosmetic typo.
17406         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17407         `grub_ieee1275_chosen'.
17408         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17409         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17410         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17411         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17412         `grub_ieee1275_chosen'.
17414 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17416         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17417         /chosen/bootargs.
17418         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17419         /chosen/bootargs as "variable=value" pairs.
17421 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17423         * include/grub/misc.h (grub_dprintf): New macro.
17424         (grub_real_dprintf): New prototype.
17425         (grub_strword): Likewise.
17426         (grub_iswordseparator): Likewise.
17427         * kern/misc.c (grub_real_dprintf): New function.
17428         (grub_strword): Likewise.
17429         (grub_iswordseparator): Likewise.
17431 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17433         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17434         (roundup): Remove macro.
17435         (grub_ieee1275_flags): Make static.
17436         (grub_ieee1275_realmode): Remove.
17437         (grub_ieee1275_test_flag): New function.
17438         (grub_ieee1275_set_flag): Likewise.
17439         (find_options): Rename to `grub_ieee1275_find_options'; update
17440         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17441         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17442         (cmain): New prototype.
17443         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17444         `grub_ieee1275_flags' directly.
17445         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17446         machine/biosdisk.h.
17447         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17448         Don't include grub/machine/init.h.
17449         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17450         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17451         Remove prototype.
17452         (grub_ieee1275_realmode): Likewise.
17453         (grub_ieee1275_flag): New enum.
17454         (grub_ieee1275_test_flag): New prototype.
17455         (grub_ieee1275_set_flag): New prototype.
17456         * include/grub/powerpc/ieee1275/init.h: Remove file.
17457         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17458         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17459         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17460         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17461         comment.
17462         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17463         `grub_ieee1275_test_flag'.
17464         (grub_ieee1275_encode_devname): Likewise.
17466 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17468         * include/grub/powerpc/ieee1275/ieee1275.h
17469         (grub_ieee1275_encode_devname): New prototype.
17470         (grub_ieee1275_get_filename): Likewise.
17471         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17472         function.
17473         (grub_set_prefix): Likewise.
17474         (grub_machine_init): Call grub_set_prefix.
17475         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17476         (grub_parse_type): New enum.
17477         (grub_ieee1275_get_devargs): New function.
17478         (grub_ieee1275_get_devname): Likewise.
17479         (grub_ieee1275_parse_args): Likewise.
17480         (grub_ieee1275_get_filename): Likewise.
17481         (grub_ieee1275_encode_devname): Likewise.
17483 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17485         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17486         `grub_loader_unset'.
17488 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17490         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17491         instead of grub_ieee1275_interpret.
17492         (grub_halt_init): New function.
17493         (grub_halt_fini): Likewise.
17494         (GRUB_MOD_INIT): Correct message grammar.
17495         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17496         instead of grub_ieee1275_interpret.
17497         (grub_reboot_init): New function.
17498         (grub_reboot_fini): Likewise.
17499         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17500         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17501         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17502         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17503         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17504         function.
17505         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17506         Add prototype.
17507         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17508         prototype.
17509         (grub_halt): Likewise.
17510         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17511         (cmain): Remove __attribute__((unused)).
17512         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17513         (grub_heap_len): Likewise.
17514         (grub_machine_fini): New function.
17515         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17516         (grub_halt): Likewise.
17517         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17518         function.
17519         * util/powerpc/ieee1275/misc.c: New file.
17521 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17523         * DISTLIST: New file.
17524         * gendistlist.sh: Likewise.
17526         * Makefile.in (COMMON_DISTFILES): Removed.
17527         (BOOT_DISTFILES): Likewise.
17528         (CONF_DISTFILES): Likewise.
17529         (DISK_DISTFILES): Likewise.
17530         (FS_DISTFILES): Likewise.
17531         (INCLUDE_DISTFILES): Likewise.
17532         (KERN_DISTFILES): Likewise.
17533         (LOADER_DISTFILES): Likewise.
17534         (TERM_DISTFILES): Likewise.
17535         (UTIL_DISTFILES): Likewise.
17536         (DISTFILES): Likewise.
17537         (uninstall): Uninstall files in $(pkgdata_DATA).
17538         (DISTLIST): New target.
17539         (distdir): Use the contents of the file DISTLIST to get a list of
17540         distributed files.
17542 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17544         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17545         descriptor. This is ported from GRUB Legacy.
17547         * gencmdlist.sh: Added an extra semicolon to make it work with
17548         old sed versions. Reported by Robert Bihlmeyer
17549         <robbe@orcus.priv.at>.
17551 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17553         Automatic loading of commands is supported.
17555         * normal/main.c (read_command_list): New function.
17556         (grub_normal_execute): Call read_command_list.
17558         * normal/command.c (grub_register_command): Return zero or CMD.
17559         Allocate CMD->NAME from the heap.
17560         Initialize CMD->MODULE_NAME to zero.
17561         Find the same name as well. If the same command is found and it is
17562         a dummy command, overwrite members. If it is not a dummy command,
17563         return zero.
17564         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17565         (grub_command_find): If a dummy command is found, load a module
17566         and retry to find a command only once.
17568         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17569         make sure that each command is loaded.
17571         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17572         macro.
17573         (struct grub_command): Remove const from the member `name'.
17574         Add a new member `module_name'.
17575         (grub_register_command): Return grub_command_t.
17577         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17578         sure that each command is loaded.
17580         * genmk.rb (PModule::rule): Specify a module name without the
17581         suffix ".mod" to gencmdlist.sh.
17583 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17585         * gencmdlist.sh: New file.
17587         * genmk.rb (PModule::rule): Generate a rule for a command list.
17588         Clean command.lst.
17589         Generate command.lst from $(COMMANDFILES).
17591         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17592         (DATA): Added $(pkgdata_DATA).
17593         (install-local): Install files in $(pkgdata_DATA).
17595 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17597         * term/i386/pc/vga.c (debug_command): Removed.
17598         (GRUB_MOD_INIT): Do not register the command "debug".
17600         From Hollis Blanchard:
17601         * commands/configfile.c: New file.
17602         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17603         commands/configfile.c.
17604         (pkgdata_MODULES): Added configfile.mod.
17605         (configfile_mod_SOURCES): New variable.
17606         (configfile_mod_CFLAGS): Likewise.
17607         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17608         commands/configfile.c.
17609         (pkgdata_MODULES): Added configfile.mod.
17610         (configfile_mod_SOURCES): New variable.
17611         (configfile_mod_CFLAGS): Likewise.
17612         * util/grub-emu.c (main): Call grub_configfile_init and
17613         grub_configfile_fini.
17614         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17615         prototype.
17616         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17618 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17620         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17621         address.
17623         * commands/help.c (grub_cmd_help): Do not print newlines after
17624         the last command in print_command_help.
17626 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17628         * commands/default.h: New file.
17629         * commands/timeout.h: Likewise.
17630         * normal/context.c: Likewise.
17632         * util/misc.c: Do not include sys/times.h.
17633         Include sys/time.h and grub/machine/time.h.
17634         (grub_get_rtc): Rewritten with gettimeofday.
17636         * util/grub-emu.c (main): Call grub_default_init and
17637         grub_timeout_init before grub_normal_init, and call
17638         grub_timeout_fini and grub_default_fini after grub_main.
17640         * util/console.c (grub_ncurses_checkkey): Return the read
17641         character or -1.
17643         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17644         timeouts.
17646         * normal/main.c (read_config_file): Push MENU. If this fails,
17647         print an error and wait for a user input.
17648         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17649         If a menu is empty or an error occurs, pop MENU.
17650         (grub_normal_execute): Pop and free MENU after grub_menu_run
17651         returns.
17653         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17655         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17656         include time.h.
17657         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17658         without GRUB_UTIL.
17659         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17660         time.h.
17661         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17662         without GRUB_UTIL.
17664         * include/grub/normal.h (struct grub_menu_list): New struct.
17665         (grub_menu_list_t): New type.
17666         (struct grub_context): New struct.
17667         (grub_context_t): New type.
17668         (grub_register_command): Got rid of EXPORT_FUNC.
17669         (grub_unregister_command): Likewise.
17670         (grub_context_get): New prototype.
17671         (grub_context_get_current_menu): Likewise.
17672         (grub_context_push_menu): Likewise.
17673         (grub_context_pop_menu): Likewise.
17674         [GRUB_UTIL] (grub_default_init): Likewise.
17675         [GRUB_UTIL] (grub_default_fini): Likewise.
17676         [GRUB_UTIL] (grub_timeout_init): Likewise.
17677         [GRUB_UTIL] (grub_timeout_fini): Likewise.
17679         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17680         commands/timeout.c and normal/context.c.
17681         (pkgdata_MODULES): Added default.mod and timeout.mod.
17682         (normal_mod_SOURCES): Added normal/context.c.
17683         (default_mod_SOURCES): New variable.
17684         (default_mod_CFLAGS): Likewise.
17685         (timeout_mod_SOURCES): Likewise.
17686         (timeout_mod_CFLAGS): Likewise.
17687         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17688         conf/i386-pc.rmk.
17689         (pkgdata_MODULES): Added default.mod and timeout.mod.
17690         (normal_mod_SOURCES): Added normal/context.c.
17691         (default_mod_SOURCES): New variable.
17692         (default_mod_CFLAGS): Likewise.
17693         (timeout_mod_SOURCES): Likewise.
17694         (timeout_mod_CFLAGS): Likewise.
17696         * Makefile.in (all-local): Added $(MKFILES).
17698 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
17700         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17701         (grub_emu_SOURCES): Likewise.
17702         (pkgdata_MODULES): Add `sun.mod'.
17703         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17704         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17705         `partmap/sun.c'.
17706         (pkgdata_MODULES): Add `sun.mod'.
17707         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17708         * include/grub/partition.h (grub_sun_partition_map_init): New
17709         prototype.
17710         (grub_sun_partition_map_fini): Likewise.
17711         * partmap/sun.c: New file.
17712         * util/grub-emu.c (main): Initialize and de-initialize the sun
17713         partitionmap support.
17715 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
17717         This implements an Emacs-like menu entry editor.
17719         * normal/menu_entry.c: New file.
17721         * util/console.c (grub_ncurses_putchar): Translate some Unicode
17722         characters to ASCII.
17723         (saved_char): New variable.
17724         (grub_ncurses_checkkey): Rewritten completely.
17725         (grub_ncurses_getkey): Likewise.
17726         (grub_ncurses_init): Call raw instead of cbreak.
17728         * normal/menu.c (print_entry): Do not put a space.
17729         (init_page): Renamed to ...
17730         (grub_menu_init_page): ... this. All callers changed.
17731         (edit_menu_entry): Removed.
17732         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17734         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17736         * kern/misc.c (grub_vprintf): Call grub_refresh.
17738         * normal/menu.c (DISP_LEFT): Renamed to ...
17739         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17740         * normal/menu.c (DISP_UP): Renamed to ...
17741         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17742         * normal/menu.c (DISP_RIGHT): Renamed to ...
17743         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17744         * normal/menu.c (DISP_DOWN): Renamed to ...
17745         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17746         * normal/menu.c (DISP_HLINE): Renamed to ...
17747         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17748         * normal/menu.c (DISP_VLINE): Renamed to ...
17749         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17750         * normal/menu.c (DISP_UL): Renamed to ...
17751         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17752         * normal/menu.c (DISP_UR): Renamed to ...
17753         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17754         * normal/menu.c (DISP_LL): Renamed to ...
17755         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17756         * normal/menu.c (DISP_LR): Renamed to ...
17757         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17758         * normal/menu.c (TERM_WIDTH): Renamed to ...
17759         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17760         * normal/menu.c (TERM_HEIGHT): Renamed to ...
17761         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17762         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17763         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17764         * normal/menu.c (TERM_MARGIN): Renamed to ...
17765         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17766         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17767         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17768         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17769         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17770         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17771         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17772         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17773         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17774         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17775         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17776         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17777         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17778         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17779         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17780         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17781         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17782         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17783         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17784         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17785         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17786         All callers changed.
17788         * include/grub/normal.h: New prototype.
17790         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17791         normal/menu_entry.c.
17792         (normal_mod_SOURCES): Likewise.
17793         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17794         (normal_mod_SOURCES): Likewise.
17796 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
17798         * include/grub/normal.h (grub_halt_init): New prototype.
17799         (grub_halt_fini): Likewise.
17800         (grub_reboot_init): Likewise.
17801         (grub_reboot_fini): Likewise.
17803         * util/grub-emu.c: Include signal.h.
17804         (main_env): New global variable.
17805         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17806         catch C-c.
17807         (grub_machine_fini): New function.
17808         (main): Call grub_halt_init and grub_reboot_init before
17809         grub_main, and grub_reboot_fini and grub_halt_fini after it.
17810         Call setjmp with MAIN_ENV to go back afterwards.
17811         Call grub_machine_fini right before return.
17813         * include/grub/util/misc.h: Include setjmp.h.
17814         (main_env): New prototype.
17816         * include/grub/kernel.h (grub_machine_fini): New prototype.
17817         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17818         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17820         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17821         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17822         * term/i386/pc/console.c (grub_console_fini): Likewise.
17824         * util/i386/pc/misc.c: New file.
17826         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17827         util/i386/pc/misc.c, commands/i386/pc/halt.c and
17828         commands/i386/pc/reboot.c.
17830 2005-02-14  Guillem Jover  <guillem@hadrons.org>
17832         * include/grub/dl.h (grub_dl_check_header): New prototype.
17833         (grub_arch_dl_check_header): Change return type to grub_err_t,
17834         remove size parameter and export function.  Update all callers.
17835         * kern/dl.c (grub_dl_check_header): New function.
17836         (grub_dl_load_core): Use `grub_dl_check_header' instead of
17837         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
17838         are inside the core.
17839         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17840         independent ELF header checks.
17841         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17842         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17843         `grub_dl_check_header' instead of explicit checks.  Check for the
17844         ELF type.
17845         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17846         `grub_dl_check_header' instead of explicit checks.  Remove arch
17847         specific ELF header checks.
17849         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17850         argument SIZE.
17852 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
17854         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17855         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17857 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
17859         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17860         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17861         (part_map_iterate): Clear `grub_errno' and return 0 if
17862         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17863         * partmap/amiga.c (amiga_partition_map_iterate): Return
17864         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17865         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17867 2005-02-01  Guillem Jover  <guillem@hadrons.org>
17869         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17870         help info.
17872 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17874         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17875         Removed prototype.
17876         (grub_rescue_cmd_linux): New prototype.
17877         (grub_rescue_cmd_initrd): Likewise.
17878         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17879         `bi_rec'.
17880         (grub_linux_release_mem): Release the memory for the initrd.
17881         (grub_load_linux): Renamed from this...
17882         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
17883         Changed `entry' not to be static.  Loop over memory regions to
17884         find another one when the default fails.
17885         (grub_rescue_cmd_initrd): New function.
17886         (grub_linux_init): Remove function.
17887         (grub_linux_fini): Likewise.
17888         (GRUB_MOD_INIT): Register `initrd'.
17889         (GRUB_MOD_FINI): Unregister `initrd'.
17890         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17891         Function removed.
17892         (grub_linux_normal_fini): Likewise.
17893         (GRUB_MOD_INIT): Register `initrd'.
17894         (GRUB_MOD_FINI): Unregister `initrd'.
17896 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17898         * commands/help.c: New file.
17899         * normal/arg.c (show_help): Renamed to...
17900         (grub_arg_show_help): ... this.
17901         * commands/i386/pc/halt.c: New file.
17902         * commands/i386/pc/reboot.c: Likewise.
17903         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17904         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17905         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17906         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17907         variables.
17908         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17909         `commands/help.c'.
17910         (pkgdata_MODULES): Add `help.mod'.
17911         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17912         * grub/i386/pc/init.h (grub_reboot): New prototype.
17913         (grub_halt): Likewise.
17914         * include/grub/normal.h (grub_arg_show_help): New prototype.
17915         (grub_help_init): Likewise.
17916         (grub_help_fini): Likewise.
17917         * util/grub-emu.c (main): Initialize and deinitialize the help
17918         command.
17920         * normal/cmdline.c (grub_cmdline_get): Doc fix.
17922         * normal/command.c (grub_command_init): Fixed the description of
17923         the `set' and `unset' commands.
17925 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17927         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17928         function.
17929         * commands/ieee1275/halt.c: New file.
17930         * commands/ieee1275/reboot.c: Likewise.
17931         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17932         `__attribute__ ((unused))'.  Some GCS related fixed.
17933         (grub_suspend_init) [GRUB_UTIL]: Function removed.
17934         (grub_suspend_fini): Likewise.
17935         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17936         and `halt.mod'.
17937         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17938         (halt_mod_CFLAGS): New variables.
17939         * include/grub/powerpc/ieee1275/ieee1275.h
17940         (grub_ieee1275_interpret): New prototype.
17942 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
17944         * include/grub/misc.h (memmove): New prototype.
17945         (memcpy): Likewise.
17947 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
17949         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17950         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
17952 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
17954         * kern/misc.c (grub_strndup): Function rewritten.
17956 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
17958         * normal/menu.c (TERM_WIDTH): Macro redefined.
17959         (TERM_TOP_BORDER_Y): Likewise.
17960         (draw_border): Replaced while-loop by a for-loop.  Make the number
17961         of lines consistent with the number of lines displayed in
17962         print_entries.  Added a margin below the rectangle.
17963         (print_entry): Make the entry fit in the rectangle.
17964         (print_entries): Display the scroll arrows next to the right
17965         border.
17967 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17969         * fs/minix.c (grub_minix_find_file): Reserve more space for
17970         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
17971         `grub_strncpy' to copy `path' into it.
17973 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17975         Add the loopback device, a device via which files can be accessed
17976         as devices.
17978         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17979         (pkgdata_MODULES): Add loopback.mod.
17980         (loopback_mod_SOURCES): New variable.
17981         (loopback_mod_CFLAGS): Likewise.
17982         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17983         `disk/loopback.c'.
17984         (pkgdata_MODULES): Add loopback.mod.
17985         (loopback_mod_SOURCES): New variable.
17986         (loopback_mod_CFLAGS): Likewise.
17987         * disk/loopback.c: new file.
17988         * include/grub/normal.h (grub_loop_init): New prototype.
17989         (grub_loop_fini): New prototype.
17990         * util/grub-emu.c (main): Initialize and de-initialize loopback
17991         support.
17992         * include/grub/disk.h (grub_disk_dev_id): Add
17993         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17995 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
17997         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17998         function.
17999         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18000         (suspend_mod_SOURCES): New variable.
18001         (suspend_mod_CFLAGS): Likewise.
18002         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18003         New prototype.
18004         * commands/ieee1275/suspend.c: New file.
18006 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18008         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18009         ((unused))' to `__attribute__ ((used))'.
18010         (GRUB_MOD_FINI): Likewise.
18011         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18012         * genmk.rb (PModule): Assign space to common symbols when linking
18013         modules.
18015 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18017         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18018         `unsigned' arguments to `grub_size_t'.
18019         (grub_malloc): Likewise.
18020         (grub_realloc): Likewise.
18021         (grub_memalign): Likewise.
18022         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18023         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18024         * util/misc.c (grub_malloc): Likewise.
18025         (grub_realloc): Likewise.
18026         * kern/mm.c (get_header_from_pointer): Change the casts to
18027         `unsigned' into a cast to `grub_size_t'.
18029         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18030         point to `currnode' when `currnode' is changed.
18032         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18033         Schottelius <nico-linux@schottelius.org>.
18035 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18037         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18038         (note_path): Remove variable.
18039         (GRUB_IEEE1275_NOTE_NAME): New macro.
18040         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18041         (grub_ieee1275_note_hdr): New structure.
18042         (grub_ieee1275_note_desc): Likewise.
18043         (grub_ieee1275_note): Likewise.
18044         (load_note): Remove `dir' argument.  All callers updated.  Remove
18045         `note_img' and `path'.  Do not load a file from `note_path'.
18046         Initialize a struct grub_ieee1275_note and write that to `out'.
18047         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18049 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18051         * util/misc.c (grub_util_read_image): Revert last change.  It
18052         called `grub_util_read_at', which seeks from the beginning of the
18053         file.
18055 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18057         * TODO: Add note about endianness in grub-mkimage.
18058         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18059         section.
18060         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18061         (grub_mkimage_SOURCES): New target.
18062         * include/grub/kernel.h (grub_start_addr): Remove variable.
18063         (grub_end_addr): Likewise.
18064         (grub_total_module_size): Likewise.
18065         (grub_kernel_image_size): Likewise.
18066         (GRUB_MODULE_MAGIC): New constant.
18067         (grub_module_info): New structure.
18068         (grub_arch_modules_addr): New prototype.
18069         (grub_get_end_addr): Remove prototype.
18070         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18071         * include/grub/powerpc/ieee1275/kernel.h: New file.
18072         * include/grub/util/misc.h (grub_util_get_fp_size): New
18073         prototype.
18074         (grub_util_read_at): Likewise.
18075         (grub_util_write_image_at): Likewise.
18076         * kern/main.c (grub_get_end_addr): Remove function.
18077         (grub_load_modules): Call grub_arch_modules_addr instead of using
18078         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18079         the grub_module_info fields instead of calling grub_get_end_addr
18080         as loop conditions.  Move grub_add_unused_region code here.
18081         (grub_add_unused_region): Remove function.
18082         * kern/i386/pc/init.c: Include grub/cache.h.
18083         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18084         one call to add_mem_region.
18085         (grub_arch_modules_addr): New function.
18086         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18087         (grub_total_module_size): Likewise.
18088         Include grub/machine/kernel.h.
18089         (grub_arch_modules_addr): New function.
18090         * util/grub-emu.c (grub_end_addr): Remove variable.
18091         (grub_total_module_size): Likewise.
18092         (grub_arch_modules_addr): New function.
18093         * util/misc.c: Include unistd.h.
18094         (grub_util_get_fp_size): New function.
18095         (grub_util_read_at): Likewise.
18096         (grub_util_write_image_at): Likewise.
18097         (grub_util_read_image): Call grub_util_read_at.
18098         (grub_util_write_image): Call grub_util_write_image_at.
18099         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18100         additional memory in kernel_img for a struct grub_module_info.
18101         Fill in that grub_module_info.
18102         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18104 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18106         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18107         New function.
18108         * include/grub/powerpc/ieee1275/ieee1275.h
18109         (grub_ieee1275_milliseconds): New prototype.
18110         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18111         Change to 1000.
18112         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18113         grub_ieee1275_milliseconds.
18115 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18117         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18118         variable.
18119         (find_options): New function.
18120         (cmain): Call find_options.
18121         * include/grub/powerpc/ieee1275/ieee1275.h
18122         (grub_ieee1275_realmode): New extern variable.
18123         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18124         grub_map if grub_ieee1275_realmode is false.
18126 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18128         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18129         lines are inserted and make it work like readline.  Reported by
18130         Vincent Pelletier <subdino2004@yahoo.fr>.
18132 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18134         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18136         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18137         `kern/powerpc/cache.S'.
18139 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18141         * genmk.rb: Handle the `Program' class in the main loop.  Written
18142         by Johan Rydberg <jrydberg@gnu.org>.
18143         (Program): New class.
18144         (programs): New variable.
18145         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18146         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18147         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18148         (help_arch): Function removed.
18149         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18150         `powerpc/libgcc.h' and `loader.h'.
18151         (pkgdata_PROGRAMS): New variable.
18152         (sbin_UTILITIES): Variable removed.
18153         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18154         (grubof_SOURCES): Variable re-defined so it only includes the
18155         core functionality.
18156         (grubof_CFLAGS): Remove `-DGRUBOF'.
18157         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18158         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18159         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18160         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18161         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18162         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18163         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18164         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18165         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18166         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18167         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18168         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18169         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18170         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18171         (pc_mod_CFLAGS): New variables.
18172         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18173         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18174         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18175         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18176         Moved from here...
18177         * include/grub/i386/pc/init.h (grub_os_area_addr)
18178         (rub_os_area_size): ... to here.
18179         * include/grub/powerpc/ieee1275/ieee1275.h
18180         (grub_ieee1275_entry_fn): Export symbol.
18181         * include/grub/powerpc/ieee1275/init.h: New file.
18182         * include/grub/powerpc/libgcc.h: Likewise.
18183         * include/grub/cache.h: Likewise.
18184         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18185         <hollis@penguinppc.org>.
18186         * kern/dl.c: Include <grub/cache.h>.
18187         (grub_dl_flush_cache): New function.
18188         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18189         for this module.
18190         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18191         (grub_console_init): Removed prototypes.
18192         (grub_machine_init): Don't initialize the modules anymore.
18193         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18194         static.
18195         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18196         Macro undef removed.
18197         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18198         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18199         relocation `R_PPC_REL32'.  Return an error when the relocation is
18200         unknown.
18201         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18202         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18203         * util/misc.c (grub_arch_sync_caches): Likewise.
18205 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18207         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18208         `symlist.c', add `grubof_symlist.c'.
18209         (symlist.c): Variable removed.
18210         (grubof_HEADERS): Variable added.
18211         (grubof_symlist.c): New target.
18212         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18213         `kernel_img_HEADERS'.
18214         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18215         * kern/powerpc/dl.c: New file.
18216         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18217         Function removed.
18218         (grub_arch_dl_relocate_symbols): Likewise.
18219         (grub_register_exported_symbols): Likewise.
18221 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18223         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18224         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18225         to fail instead.  Reported by Vincent Pelletier
18226         <subdino2004@yahoo.fr>.
18228         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18229         it is not allocated.  Reported by Vincent Pelletier
18230         <subdino2004@yahoo.fr>.
18232         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18233         output so the output looks better.
18235 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18237         Modulize the partition map support and add support for the amiga
18238         partition map.
18240         * commands/ls.c: Include <grub/partition.h> instead of
18241         <grub/machine/partition.h>.
18242         * kern/disk.c: Likewise.
18243         * kern/rescue.c: Likewise.
18244         * loader/i386/pc/chainloader.c: Likewise.
18245         * normal/cmdline.c: Likewise.
18246         * kern/powerpc/ieee1275/init.c: Likewise.
18247         (grub_machine_init): Call `grub_pc_partition_map_init',
18248         `grub_amiga_partition_map_init' and
18249         `grub_apple_partition_map_init'.
18250         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18251         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18252         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18253         `partition.h' and `pc_partition.h'.
18254         (grub_setup_SOURCES): Remove
18255         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18256         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18257         (grub_emu_SOURCES): Likewise.
18258         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18259         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18260         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18261         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18262         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18263         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18264         (grubof_SOURCES): Likewise.
18265         * disk/i386/pc/partition.c: File removed.
18266         * disk/powerpc/ieee1275/partition.c: Likewise.
18267         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18268         * include/grub/i386/pc/partition.h: Likewise.
18269         * kern/partition.c: New file.
18270         * partmap/amiga.c: Likewise.
18271         * partmap/apple.c: Likewise.
18272         * partmap/pc.c: Likewise.
18273         * include/grub/partition.h: Likewise..
18274         * include/grub/pc_partition.h: Likewise.
18275         * util/grub-emu.c: Include <grub/partition.h> instead of
18276         <grub/machine/partition.h>.
18277         (main): Call `grub_pc_partition_map_init',
18278         `grub_amiga_partition_map_init' and
18279         `grub_apple_partition_map_init' and deinitialize afterwards.
18280         * util/i386/pc/biosdisk.c: Include `#include
18281         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18282         `<grub/machine/partition.h>'.
18283         * util/i386/pc/grub-setup.c: Likewise.
18284         * util/i386/pc/biosdisk.c: Likewise.
18285         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18286         partition information in case of a PC partition.
18287         * util/i386/pc/grub-setup.c: Include `#include
18288         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18289         `<grub/machine/partition.h>'.
18290         (setup): Only access the PC specific partition information in case
18291         of a PC partition.
18293 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18295         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18296         (grub_longjmp): Likewise.
18297         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18298         20.
18299         * normal/powerpc/setjmp.S: New file.
18300         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18301         `normal/powerpc/setjmp.S'.
18302         (grubof_CFLAGS): Add `-DGRUBOF'.
18303         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18304         [GRUB_UTIL && !GRUBOF].
18306 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18308         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18309         property named `name'.  Correctly handle the error returned by
18310         `grub_ieee1275_finddevice' if a device can not be opened.
18312 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18314         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18315         `actual' for negativity.
18316         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18317         kern/fshelp.c.
18319 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18321         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18322         (PAGE_OFFSET): New macro.
18323         (CRTC_ADDR_PORT): Likewise.
18324         (CRTC_DATA_PORT): Likewise.
18325         (START_ADDR_HIGH_REGISTER): Likewise.
18326         (START_ADDR_LOW_REGISTER): Likewise.
18327         (GRAPHICS_ADDR_PORT): Likewise.
18328         (GRAPHICS_DATA_PORT): Likewise.
18329         (READ_MAP_REGISTER): Likewise.
18330         (INPUT_STATUS1_REGISTER): Likewise.
18331         (INPUT_STATUS1_VERTR_BIT): Likewise.
18332         (page): New variable.
18333         (wait_vretrace): New function.
18334         (set_read_map): Likewise.
18335         (set_start_address): Likewise.
18336         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18337         the right page.
18338         (check_vga_mem): Take the page into account.
18339         (write_char): Likewise.
18340         (write_cursor): Likewise.
18341         (scroll_up): Likewise.  Copy the page to the page that is not
18342         shown and switch between both pages.
18343         (grub_vga_putchar): Fix off by one error.
18344         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18345         account.
18347 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18349         Add support for iso9660 (including rockridge).
18351         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18352         (iso9660_mod_SOURCES): New variable.
18353         (iso9660_mod_CFLAGS): Likewise.
18354         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18355         * include/grub/fs.h (grub_iso9660_init): New prototype.
18356         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18357         * fs/iso9660.c: New file.
18359         * include/grub/misc.h (grub_strncat): New prototype.
18360         * kern/misc.c (grub_strncat): New function.
18362         * fs/hfs.c (grub_hfs_mount): Translate the error
18363         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18364         * fs/jfs.c (grub_jfs_mount): Likewise.
18365         * fs/ufs.c (grub_ufs_mount): Likewise.
18367 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18369         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18370         which initialized BAT registers.
18371         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18372         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18373         Move from here...
18374         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18375         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18376         ... to here.
18377         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18378         (grub_mapclaim): Likewise.
18379         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18380         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18381         hand.
18383 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18385         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18386         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18387         -ffreestanding and -msoft-float.
18389 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18391         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18392         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18393         set in grub_ieee1275_flags.
18395 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18397         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18398         prototype.
18399         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18400         grub_console_init first.
18401         Change the memory range used for grub_ieee1275_claim and
18402         grub_mm_init_region.
18403         Print an error message if the claim fails.
18404         Include <grub/misc.h>.
18406 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18408         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18409         Call grub_children_iterate for device nodes of type `scsi',
18410         `ide', or `ata'.
18411         (grub_ofdisk_open): Remove manual device alias resolution.
18412         Fix memory leak when device cannot be opened.
18413         * include/grub/powerpc/ieee1275/ieee1275.h
18414         (grub_children_iterate): New prototype.
18415         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18416         New function.
18417         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18418         Return -1 if args.size was -1.
18420 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18422         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18423         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18424         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18425         Open Firmware's memory for it; claim memory from _start to _end.
18426         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18427         (_end): New extern.
18428         (_start): Zero BSS from __bss_start to _end.
18429         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18430         New extern.
18431         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18433 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18435         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18436         -1 if args.base was -1.
18438 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18440         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18441         escape sequence instead of a literal ^L. Also call
18442         grub_ofconsole_gotoxy.
18444 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18446         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18447         void *  arguments to grub_addr_t.  All callers updated.  Also make
18448         the `result' argument optional.
18449         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18450         All callers updated.
18452 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18454         * commands/ls.c (grub_ls_list_files): Use the string following the
18455         initial ')', if present, as the filesystem path.
18456         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18458         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18460 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18462         Make the source code of the menu interface more readable.
18464         * normal/menu.c: Include grub/mm.h.
18465         (TERM_WIDTH): New macro.
18466         (TERM_HEIGHT): Likewise.
18467         (TERM_INFO_HEIGHT): Likewise.
18468         (TERM_MARGIN): Likewise.
18469         (TERM_SCROLL_WIDTH): Likewise.
18470         (TERM_TOP_BORDER_Y): Likewise.
18471         (TERM_LEFT_BORDER_X): Likewise.
18472         (TERM_BORDER_WIDTH): Likewise.
18473         (TERM_MESSAGE_HEIGHT): Likewise.
18474         (TERM_BORDER_HEIGHT): Likewise.
18475         (TERM_NUM_ENTRIES): Likewise.
18476         (TERM_FIRST_ENTRY_Y): Likewise.
18477         (TERM_ENTRY_WIDTH): Likewise.
18478         (TERM_CURSOR_X): Likewise.
18479         (draw_border): Use macros instead of magic numbers.
18480         (print_entry): Likewise.
18481         (print_entries): Likewise.
18482         (run_menu): Likewise. Also, handle the key 'e'.
18483         (run_menu_entry): Ignore empty command lines.
18484         (print_message): Added a new argument EDIT. If EDIT is true,
18485         print a different message.
18486         (init_page): Likewise.
18487         (edit_menu_entry): New function. Not implemented yet.
18489 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18491         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18492         can be loaded from normal mode.
18494         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18495         `multiboot.mod'.
18496         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18497         (multiboot_mod_CFLAGS): New variables.
18498         * loader/i386/pc/linux_normal.c: New file.
18499         * loader/i386/pc/multiboot_normal.c: Likewise.
18501         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18502         attribute `unused'.
18504         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18505         `fdiro' to read the mode information from instead of `diro'.
18507         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18508         looking up a symlink.
18510         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18511         macro.
18512         * normal/command.c (grub_command_execute): Don't parse the
18513         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18514         flags of the command.
18516         * normal/menu.c (grub_menu_run): Fix typo.
18518 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18520         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18522         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18523         `y + 1' instead of `y - 1'.
18525         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18527 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18529         From Hollis Blanchard <hollis@penguinppc.org>:
18530         * kern/misc.c (memmove): New alias for grub_memmove.
18531         (memcmp): New alias for grub_memcmp.
18532         (memset): New alias for grub_memset.
18533         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18534         Change "int handle" to "grub_ieee1275_phandle_t handle".
18535         * include/grub/powerpc/ieee1275/ieee1275.h
18536         (grub_ieee1275_get_property): Likewise.
18538 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18540         Added normal mode command `chainloader' as module chain.mod, which
18541         depends on normal.mod and _chain.mod.
18543         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18544         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18545         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18546         Deleted prototype.
18547         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18548         but arguments parsing moved to ...
18549         (grub_chainloader_cmd): ... here.  New function.
18550         * include/grub/i386/pc/chainloader.h: New file.
18551         * loader/i386/pc/chainloader_normal.c: Likewise.
18553 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18555         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18556         (grub_mkimage_LDFLAGS): Likewise.
18557         (grub_emu_SOURCES): Likewise.
18558         (kernel_img_HEADERS): Added fshelp.h.
18559         * fs/ext2.c: Include <grub/fshelp.h>.
18560         (FILETYPE_REG): New macro.
18561         (FILETYPE_INO_REG): Likewise.
18562         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18563         Changed all users.
18564         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18565         all users.
18566         (grub_fshelp_node): New struct.
18567         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18568         to a pointer.
18569         (grub_ext2_get_file_block): Removed function.
18570         (grub_ext2_read_block): New function.
18571         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18572         This function was written.
18573         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18574         (grub_ext2_find_file): Removed function.
18575         (grub_ext2_read_symlink): New function.
18576         (grub_ext2_iterate_dir): Likewise.
18577         (grub_ext2_open): Rewritten.
18578         (grub_ext2_dir): Rewritten.
18579         * include/grub/fshelp.h: New file.
18580         * fs/fshelp.c: Likewise.
18582 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18584         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18585         (print_message): Add a missing newline.
18586         (run_menu): Added timeout support.
18587         (run_menu_entry): New local function.
18588         (grub_menu_run): Added support for booting.
18590         * kern/loader.c (grub_loader_is_loaded): New function.
18592         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18593         (grub_get_rtc): Exported.
18595         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18596         (grub_get_rtc): Exported.
18598         * include/grub/normal.h (struct grub_command_list): Remove
18599         constant from the member `command'.
18601         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18603         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18605         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18607 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18609         Add support for the JFS filesystem.
18611         * fs/jfs.c: New file.
18612         * include/grub/fs.h (grub_jfs_init): New prototype.
18613         (grub_jfs_fini): New prototype.
18614         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18615         (grub_emu_SOURCES): Likewise.
18616         (pkgdata_MODULES): Add jfs.mod.
18617         (jfs_mod_SOURCES): New variable.
18618         (jfs_mod_CFLAGS): Likewise.
18619         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18620         (grubof_SOURCES): Likewise.
18621         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18623         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18624         endian to the host endian.
18625         (grub_fat_utf16_to_utf8): Move function from there...
18626         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18627         the endianness of the source string anymore.
18628         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18630 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18632         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18633         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18634         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18635         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18637         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18638         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18639         for `node_found' and `it_dir'.
18640         (grub_hfs_dir): Add prototype for `dir_hook'.
18642         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18643         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18644         and `indir32' to silence a gcc warning.
18646         * include/grub/fs.h (grub_hfs_init): New prototype.
18647         (grub_hfs_fini): Likewise.
18650 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18652         Each disk device has its own id now. This is useful to make use
18653         of multiple disk devices.
18655         * include/grub/disk.h (grub_disk_dev_id): New enum.
18656         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18657         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18659         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18660         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18662         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18663         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18665         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18666         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18668         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18669         "id" which is used by the cache manager.
18671         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18672         of just "GRUB".
18674 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18676         * fs/hfs.c: New file.
18677         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18678         (grub_emu_SOURCES): Likewise.
18679         (pkgdata_MODULES): Add hfs.mod.
18680         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18681         (grubof_SOURCES): Likewise.
18682         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18684         * include/grub/misc.h (grub_strncasecmp): Add prototype.
18685         * kern/misc.c (grub_strncasecmp): Add function.
18687 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
18689         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18690         with parentheses.
18692         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18693         (grub_ext2_dir): In case the directory entry type is unknown, read
18694         it from the inode.
18696 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
18698         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18699         grub_load_linux instead of grub_rescue_cmd_linux as second
18700         argument of grub_rescue_register_command.
18702         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18704 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
18706         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18707         function.
18708         * commands/boot.c: Remove the check for `GRUB_UTIL'.
18709         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18710         `loader/powerpc/ieee1275/linux.c',
18711         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18712         * include/grub/powerpc/ieee1275/ieee1275.h
18713         (grub_ieee1275_release): New prototype.
18714         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18715         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18716         normal, boot, linux and linux_normal.
18717         * loader/powerpc/ieee1275/linux.c: New file.
18718         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18720 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
18722         * normal/arg.c (grub_arg_parse): Correct error handling after
18723         reallocating the argumentlist (check if `argl' is not null instead
18724         of checking if `args' is not null).
18725         * kern/mm.c (grub_realloc): Return the same pointer when using the
18726         same region, instead of returning the header address.
18728 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18730         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18731         one block instead of two when looking for the initial partition.
18732         (grub_partition_probe): Initialize the local variable `p' with 0.
18733         Use base 10 for the grub_strtoul call.
18734         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
18735         need for one local variable.
18736         (grub_strtoul): Don't add the new value to `num', instead of that
18737         just assign it.
18739 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18741         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18742         (pxeboot_img_SOURCES): New variable.
18743         (pxeboot_img_ASFLAGS): Likewise.
18744         (pxeboot_img_LDFLAGS): Likewise.
18745         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
18746         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
18747         <lode_leroy@hotmail.com>.
18749 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18751         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18752         there was no input.
18754 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18756         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
18757         the history buffer logic.
18759 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18761         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18762         (FILETYPE_INO_SYMLINK): New macros.
18763         (grub_ext2_find_file): Check if the node is a directory using the
18764         inode stat information instead of using the filetype in the
18765         dirent.  Exclude the first character of an absolute symlink.
18766         (grub_ext2_dir): Mask out the filetype part of the mode member of
18767         the inode.
18769 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
18771         Add support for UFS version 1 and 2.  Add support for the minix
18772         filesystem version 1 and 2, both the variants with 14 and 30 long
18773         filenames.
18775         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18776         fs/minix.c.
18777         (grub_emu_SOURCES): Likewise.
18778         (pkgdata_MODULES): Add ufs.mod and minix.mod.
18779         (ufs_mod_SOURCES): New variable.
18780         (ufs_mod_CFLAGS): Likewise.
18781         (minix_mod_SOURCES): Likewise.
18782         (minix_mod_CFLAGS): Likewise.
18783         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18784         fs/minix.c.
18785         (grubof_SOURCES): Likewise.
18786         * fs/ufs.c: New file.
18787         * fs/minix.c: New file.
18788         * include/grub/fs.h (grub_ufs_init): New prototype.
18789         (grub_ufs_fini): Likewise.
18790         (grub_minix_init): Likewise.
18791         (grub_minix_fini): Likewise.
18792         * util/grub-emu.c (main): Initialize and deinitialize UFS and
18793         minix fs.
18795 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
18797         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18798         commands/ls.c, commands/terminal.c, commands/boot.c,
18799         commands/cmp.c and commands/cat.c.
18800         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18802         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18803         "env.h"
18805 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18807         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18808         and grub_, respectively. Because the conversion is trivial and
18809         mechanical, I omit the details here. Please refer to the CVS
18810         if you need more information.
18812 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18814         * include/pupa: Renamed to ...
18815         * include/grub: ... this.
18816         * util/i386/pc/pupa-mkimage.c: Renamed to ...
18817         * util/i386/pc/grub-mkimage.c: ... this.
18818         * util/i386/pc/pupa-setup.c: Renamed to ...
18819         * util/i386/pc/grub-setup.c: ... this.
18820         * util/pupa-emu.c: Renamed to ...
18821         * util/grub-emu.c: ... this.
18823 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
18825         Add support for the newworld apple macintosh (PPC).  This has been
18826         tested on the powerbook 2000 only.  It only adds support for
18827         generic ieee1275 functions, console and disk support.  This should
18828         be easy to port to other architectures with support for Open
18829         Firmware.
18831         * configure.ac: Accept the powerpc as host_cpu.  In the case of
18832         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
18833         specific tests are only executed while building for the i386.
18834         Inverse test for crosscompile.
18835         * genmk.rb (Utility): Allow assembler files.
18836         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18837         * conf/powerpc-ieee1275.rmk: New file.
18838         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18839         * disk/powerpc/ieee1275/partition.c: Likewise.
18840         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18841         * include/pupa/powerpc/ieee1275/console.h: Likewise.
18842         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18843         * include/pupa/powerpc/ieee1275/time.h: Likewise.
18844         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18845         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18846         * include/pupa/powerpc/ieee1275/loader.h
18847         * include/pupa/powerpc/setjmp.h: Likewise.
18848         * include/pupa/powerpc/types.h: Likewise.
18849         * kern/powerpc/ieee1275/init.c: Likewise.
18850         * kern/powerpc/ieee1275/openfw.c: Likewise.
18851         * term/powerpc/ieee1275/ofconsole.c: Likewise.
18853         These files were written by Johan Rydberg
18854         (jrydberg@night.trouble.net) and I only modified them slightly.
18856         * boot/powerpc/ieee1275/cmain.c: New file.
18857         * boot/powerpc/ieee1275/crt0.S: Likewise.
18858         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18859         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18861 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
18863         * Makefile.in: Update copyright.
18864         * genmodsrc.sh: Likewise.
18865         * gensymlist.sh: Likewise.
18866         * term/i386/pc/vga.c: Indent correctly.
18868         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18869         bugreporting address.
18870         * util/i386/pc/pupa-setup.c (usage): Likewise,
18871         (main): Call pupa_ext2_init and pupa_ext2_fini.
18873         * fs/fat.c (log2): Renamed to ...
18874         (fat_log2): ... this.
18875         All callers changed.
18876         * kern/misc.c (memcpy): Alias to pupa_memmove.
18877         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18878         lvalue cast.
18879         * util/console.c (pupa_ncurses_fini): Return 0.
18881         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18882         Move fail label here.
18883         [__GNU__]: Don't warn when using stat.
18884         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18885         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18886         long int. Use strtol instead of strtoul.
18888 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
18890         * commands/boot.c: New file.
18891         * commands/cat.c: Likewise.
18892         * commands/cmp.c: Likewise.
18893         * commands/ls.c: Likewise.
18894         * commands/terminal.c: Likewise.
18895         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18896         (pupa_register_command): Changed interface to match the new
18897         argument parser.
18898         (pupa_command_execute): Changed (almost rewritten) so it uses
18899         pupa_split_command.  Added support for setting variables using the
18900         syntax `foo=bar'.
18901         (rescue_command): Changed to work with the new argument parser.
18902         (terminal_command): Moved from here to commands/terminal.c.
18903         (set_command): New function.
18904         (unset_command): New function.
18905         (insmod_command): New function.
18906         (rmmod_command): New function.
18907         (lsmod_command): New function.
18908         (pupa_command_init): Don't initialize the command terminal
18909         anymore.  Initialize the commands set, unset, insmod, rmmod and
18910         lsmod.
18911         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18912         (kernel_img_HEADERS): Add arg.h and env.h.
18913         (pupa_mkimage_LDFLAGS): Add kern/env.c.
18914         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18915         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18916         normal/arg.c.
18917         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18918         terminal.mod.
18919         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18920         (boot_mod_SOURCES): New variable.
18921         (terminal_mod_SOURCES): Likewise.
18922         (ls_mod_SOURCES): Likewise.
18923         (cmp_mod_SOURCES): Likewise.
18924         (cat_mod_SOURCES): Likewise.
18926         * normal/arg.c: New file.
18927         * kern/env.c: Likewise.
18928         * include/pupa/arg.h: Likewise.
18929         * include/pupa/env.h: Likewise.
18930         * font/manager.c (font_command): Changed to match argument parsing
18931         interface changes.
18932         (PUPA_MOD_INIT): Likewise.
18933         * hello/hello.c (pupa_cmd_hello): Likewise.
18934         (PUPA_MOD_INIT): Likewise.
18935         * include/pupa/disk.h: Include <pupa/device.h>.
18936         (pupa_print_partinfo): New prototype.
18937         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18938         (pupa_dl_get_prefix): Likewise.
18939         * include/pupa/misc.h: Include <pupa/err.h>.
18940         (pupa_isgraph): New prototype.
18941         (pupa_isdigit): Likewise.
18942         (pupa_split_cmdline): Likewise.
18943         * include/pupa/normal.h: Include <pupa/arg.h>.
18944         (pupa_command): Changed the prototype of the member `func' to
18945         match the argument parsing interface.  Added member `options'.
18946         (pupa_register_command): Updated to match function.
18947         (pupa_arg_parse): New prototype.
18948         (pupa_hello_init) [PUPA_UTIL]: New prototype.
18949         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18950         (pupa_ls_init) [PUPA_UTIL]: Likewise.
18951         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18952         (pupa_cat_init) [PUPA_UTIL]: Likewise.
18953         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18954         (pupa_boot_init) [PUPA_UTIL]: Likewise.
18955         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18956         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18957         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18958         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18959         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18960         * kern/disk.c: Include <pupa/file.h>.
18961         (pupa_print_partinfo): New function.
18962         * kern/dl.c: Include <pupa/env.h>.
18963         (pupa_dl_dir): Variable removed.
18964         (pupa_dl_load): Use the environment variable `prefix' instead of
18965         the variable pupa_dl_dir.
18966         (pupa_dl_set_prefix): Function removed.
18967         (pupa_dl_get_prefix): Likewise.
18968         * kern/i386/pc/init.c: Include <pupa/env.h>.
18969         (pupa_machine_init): Use the environment variable `prefix' instead of
18970         using pupa_dl_set_prefix to set the prefix.
18971         * kern/main.c: Include <pupa/env.h>.
18972         (pupa_set_root_dev): Use the environment variable `prefix' instead of
18973         using pupa_dl_get_prefix to get the prefix.
18974         * kern/misc.c: Include <pupa/env.h>.
18975         (pupa_isdigit): New function.
18976         (pupa_isgraph): Likewise.
18977         (pupa_ftoa): Likewise.
18978         (pupa_vsprintf): Added support for printing values of the type
18979         `double'.  Make it possible to format variable output when using
18980         formatting like `%1.2%f'.
18981         (pupa_split_cmdline): New function.
18982         * kern/rescue.c: Include <pupa/env.h>.
18983         (next_word): Removed function.
18984         (pupa_rescue_cmd_prefix): Likewise.
18985         (pupa_rescue_cmd_set): New function.
18986         (pupa_rescue_cmd_unset): New function.
18987         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18988         split the command line instead of splitting it here.  Added
18989         support for setting variables using the syntax `foo=bar'.  Don't
18990         initialize the prefix command anymore.  Initialized the set and
18991         unset commands.
18992         * normal/cmdline.c: Include <pupa/env.h>.
18993         (pupa_tab_complete): Added prototypes for print_simple_completion,
18994         print_partition_completion, add_completion, iterate_commands,
18995         iterate_dev, iterate_part and iterate_dir. Moved code to print
18996         partition information from here to kern/disk.c.
18997         (pupa_cmdline_run): Don't check if the function exists anymore.
18998         * normal/main.c: Include <pupa/env.h>.
18999         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19000         instead of using pupa_dl_get_prefix to get the prefix.
19001         * term/i386/pc/vga.c: Include <pupa/arg.h>.
19002         (check_vga_mem): Cast pointers to `void *' to silence a gcc
19003         warning.
19004         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19005         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19006         ((unused))' to silence a gcc warning.
19007         (pupa_vga_setcolor): Likewise.
19008         (debug_command): Changed to match argument parsing
19009         interface changes.
19010         * util/pupa-emu.c: Include <pupa/env.h>.
19011         (options): Added 0's for unused fields to silence a gcc warning.
19012         (argp): Likewise.
19013         (main): Use the environment variable `prefix' instead of using
19014         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19015         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19016         and terminal.
19018         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19019         * util/misc.c: Include <malloc.h>.
19020         (pupa_malloc): Rewritten so errors are correctly reported.
19021         (pupa_realloc): Likewise.
19022         (pupa_memalign): Likewise.
19023         (pupa_mm_init_region): Declare unused variables with
19024         `__attribute__ ((unused))' to silence a gcc warning.
19025         * normal/i386/setjmp.S: Remove tab at the end of the file to
19026         silence a gcc warning.
19027         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19028         variables with `__attribute__ ((unused))' to silence a gcc
19029         warning.
19030         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19031         local variable i unsigned to silence a gcc warning.
19033         * kern/term.c: Include <pupa/misc.h>.
19034         (pupa_more_lines): New variable.
19035         (pupa_more): Likewise.
19036         (pupa_putcode): When the pager is active pause at the end of every
19037         screen.
19038         (pupa_set_more): New function.
19039         * include/pupa/term.h (pupa_set_more): New prototype.
19042 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19044         Now this project is GRUB 2 rather than PUPA. The location of
19045         the CVS repository was moved to GRUB's.
19047         * configure.ac: Use bug-grub as the reporting address.
19048         Use GRUB instead of PUPA.
19049         Change the version number to 1.90.
19051 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19053         * genkernsyms.sh: Updated copyright information.
19054         * genmk.rb: Likewise.
19055         * genmodsrc.sh: Likewise.
19056         * gensymlist.sh: Likewise.
19057         * boot/i386/pc/boot.S: Likewise.
19058         * boot/i386/pc/diskboot.S: Likewise.
19059         * disk/i386/pc/biosdisk.c: Likewise.
19060         * disk/i386/pc/partition.c: Likewise.
19061         * font/manager.c: Likewise.
19062         * fs/ext2.c: Likewise.
19063         * fs/fat.c: Likewise.
19064         * include/pupa/boot.h: Likewise.
19065         * include/pupa/device.h: Likewise.
19066         * include/pupa/disk.h: Likewise.
19067         * include/pupa/dl.h: Likewise.
19068         * include/pupa/elf.h: Likewise.
19069         * include/pupa/err.h: Likewise.
19070         * include/pupa/file.h: Likewise.
19071         * include/pupa/font.h: Likewise.
19072         * include/pupa/fs.h: Likewise.
19073         * include/pupa/kernel.h: Likewise.
19074         * include/pupa/loader.h: Likewise.
19075         * include/pupa/misc.h: Likewise.
19076         * include/pupa/mm.h: Likewise.
19077         * include/pupa/net.h: Likewise.
19078         * include/pupa/normal.h: Likewise.
19079         * include/pupa/rescue.h: Likewise.
19080         * include/pupa/setjmp.h: Likewise.
19081         * include/pupa/symbol.h: Likewise.
19082         * include/pupa/term.h: Likewise.
19083         * include/pupa/types.h: Likewise.
19084         * include/pupa/i386/setjmp.h: Likewise.
19085         * include/pupa/i386/types.h: Likewise.
19086         * include/pupa/i386/pc/biosdisk.h: Likewise.
19087         * include/pupa/i386/pc/boot.h: Likewise.
19088         * include/pupa/i386/pc/console.h: Likewise.
19089         * include/pupa/i386/pc/init.h: Likewise.
19090         * include/pupa/i386/pc/kernel.h: Likewise.
19091         * include/pupa/i386/pc/linux.h: Likewise.
19092         * include/pupa/i386/pc/loader.h: Likewise.
19093         * include/pupa/i386/pc/memory.h: Likewise.
19094         * include/pupa/i386/pc/multiboot.h: Likewise.
19095         * include/pupa/i386/pc/partition.h: Likewise.
19096         * include/pupa/i386/pc/time.h: Likewise.
19097         * include/pupa/i386/pc/vga.h: Likewise.
19098         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19099         * include/pupa/util/getroot.h: Likewise.
19100         * include/pupa/util/misc.h: Likewise.
19101         * include/pupa/util/resolve.h: Likewise.
19102         * kern/device.c: Likewise.
19103         * kern/disk.c: Likewise.
19104         * kern/dl.c: Likewise.
19105         * kern/err.c: Likewise.
19106         * kern/file.c: Likewise.
19107         * kern/fs.c: Likewise.
19108         * kern/loader.c: Likewise.
19109         * kern/main.c: Likewise.
19110         * kern/misc.c: Likewise.
19111         * kern/mm.c: Likewise.
19112         * kern/rescue.c: Likewise.
19113         * kern/term.c: Likewise.
19114         * kern/i386/dl.c: Likewise.
19115         * kern/i386/pc/init.c: Likewise.
19116         * kern/i386/pc/lzo1x.S: Likewise.
19117         * kern/i386/pc/startup.S: Likewise.
19118         * loader/i386/pc/chainloader.c: Likewise.
19119         * loader/i386/pc/linux.c: Likewise.
19120         * loader/i386/pc/multiboot.c: Likewise.
19121         * normal/cmdline.c: Likewise.
19122         * normal/command.c: Likewise.
19123         * normal/main.c: Likewise.
19124         * normal/menu.c: Likewise.
19125         * normal/i386/setjmp.S: Likewise.
19126         * term/i386/pc/console.c: Likewise.
19127         * term/i386/pc/vga.c: Likewise.
19128         * util/console.c: Likewise.
19129         * util/genmoddep.c: Likewise.
19130         * util/misc.c: Likewise.
19131         * util/pupa-emu.c: Likewise.
19132         * util/resolve.c: Likewise.
19133         * util/unifont2pff.rb: Likewise.
19134         * util/i386/pc/biosdisk.c: Likewise.
19135         * util/i386/pc/getroot.c: Likewise.
19136         * util/i386/pc/pupa-mkimage.c: Likewise.
19137         * util/i386/pc/pupa-setup.c: Likewise.
19139 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19141         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19142         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19143         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19144         reading and reset it after reading.
19145         (pupa_ext2_close): Return PUPA_ERR_NONE.
19147         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19148         Correct value.
19149         (struct linux_kernel_header): Add kernel_version and
19150         initrd_addr_max.
19151         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19152         pupa_file_read succeeds.
19153         (pupa_rescue_cmd_initrd): Implement.
19155 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19157         * fs/ext2.c (pupa_ext2_label): New function.
19158         (pupa_ext2_fs): Added label.
19159         * fs/fat.c (pupa_fat_label): New function.
19160         (pupa_fat_fs): Added label.
19161         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19163         * kern/misc.c (pupa_strndup): New function.
19164         * include/pupa/misc.h (pupa_strndup): New prototype.
19166         * include/pupa/normal.h: Include <pupa/err.h>.
19167         (pupa_set_history): New prototype.
19168         (pupa_iterate_commands): New prototype.
19169         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19170         <pupa/disk.h>, <pupa/file.h>.
19171         (hist_size): New variable.
19172         (hist_lines): Likewise.
19173         (hist_end): Likewise.
19174         (hist_used): Likewise.
19175         (pupa_set_history): New function.
19176         (pupa_history_get): Likewise.
19177         (pupa_history_add): Likewise.
19178         (pupa_history_replace): Likewise.
19179         (pupa_tab_complete): Likewise.
19180         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19181         completion shows partitionnames while completing partitions, this
19182         feature was suggested by Jeff Bailey.
19183         * normal/command.c (pupa_iterate_commands): New function.
19184         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19185         (pupa_normal_init): Initialize history buffer.
19186         (PUPA_MOD_INIT): Likewise.
19187         (pupa_normal_fini): Free the history buffer.
19188         (PUPA_MOD_FINI): Likewise.
19190         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19191         key.
19193         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19194         * configure.ac [i386]: Check for regparam bug.
19195         (NESTED_FUNC_ATTR) [! i386]: Defined.
19197 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19199         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19200         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19201         (pupa_emu_SOURCES): New variable.
19202         (pupa_emu_LDFLAGS): Likewise.
19203         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19204         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19205         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19206         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19207         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19208         (pupa_jmp_buf): New typedef.
19209         (pupa_setjmp) [PUPA_UTIL]: New macro.
19210         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19211         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19212         (pupa_refresh): New prototype.
19213         * include/pupa/util/getroot.h: New file.
19214         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19215         it.
19216         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19217         (pupa_rescue_cmd_cat): Likewise.
19218         (pupa_rescue_cmd_ls): Likewise.
19219         (pupa_rescue_cmd_testload): Likewise.
19220         (pupa_rescue_cmd_lsmod): Likewise.
19221         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19222         * normal/menu.c (run_menu): Likewise.
19223         * kern/term.c (pupa_cls): Likewise.
19224         (pupa_refresh): New function.
19225         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19226         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19227         * util/console.c: New file.
19229         * util/i386/pc/getroot.c: New file.
19230         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19231         (pupa_putchar): New function.
19232         (pupa_refresh): Likewise.
19233         (xgetcwd): Function moved to ...
19234         (strip_extra_slashes): Likewise.
19235         (get_prefix): Likewise.
19236         * util/i386/pc/getroot.c: ... here.
19237         (find_root_device): Function moved and renamed to...
19238         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19239         Changed all callers.
19240         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19241         and renamed to...
19242         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19243         Changed all callers.
19244         * util/misc.c (pupa_memalign): New function.
19245         (pupa_mm_init_region): Likewise.
19246         (pupa_register_exported_symbols): Likewise.
19247         (pupa_putchar): Function removed.
19248         * util/pupa-emu.c: New file.
19250 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19252         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19253         (_multiboot_mod_SOURCES): New variable.
19254         (_multiboot_mod_CFLAGS): Likewise.
19255         * loader/i386/pc/multiboot.c: New file.
19256         * include/pupa/i386/pc/multiboot.h: Likewise.
19257         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19258         (pupa_multiboot_real_boot): New function.
19259         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19260         (pupa_multiboot_real_boot): New prototype.
19261         (pupa_rescue_cmd_multiboot): Likewise
19262         (pupa_rescue_cmd_module): Likewise.
19264         * kern/loader.c (pupa_loader_set): Continue when
19265         pupa_loader_unload_func() fails.
19266         (pupa_loader_unset): New function.
19267         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19269         * kern/misc.c (pupa_stpcpy): New function.
19270         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19272 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19274         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19275         for available extensions.
19277         * include/pupa/i386/pc/time.h: New file.
19278         * kern/disk.c: Include <pupa/machine/time.h>.
19279         (PUPA_CACHE_TIMEOUT): New macro.
19280         (pupa_last_time): New variable.
19281         (pupa_disk_open): Flush the cache when there was a timeout.
19282         (pupa_disk_close): Reset the timer.
19283         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19284         pupa_currticks.
19285         * util/misc.c: Include <sys/times.h>
19286         (pupa_get_rtc): New function.
19288 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19290         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19291         as blocks.
19292         (pupa_ext2_get_file_block): Use blocks member.
19294         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19295         first block. Return -1 instead of pupa_errno on error.
19297 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19299         * README: In the pupa-mkimage example use _chain instead of chain
19300         and ext2 instead of fat.
19301         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19302         adding journal playback for ext2fs.
19303         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19304         (pkgdata_MODULES): Added ext2.mod.
19305         (ext2_mod_SOURCES): New variable.
19306         (ext2_mod_CFLAGS): Likewise.
19307         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19308         * include/pupa/misc.h (pupa_strncpy): New prototype.
19309         (pupa_strcat): Likewise.
19310         (pupa_strncmp): Likewise.
19311         * kern/misc.c (pupa_strcat): Enable function.
19312         (pupa_strncpy): New function.
19313         (pupa_strncmp): Likewise.
19314         * fs/ext2.c: New file.
19316         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19317         when the read failed before retrying.
19318         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19319         (_FILE_OFFSET_BITS): Likewise.
19320         * configure.ac: Added AC_SYS_LARGEFILE.
19322 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19324         * genmk.rb (PModule#rule): Make sure to get only symbol names
19325         from the output of nm.
19326         Reported by Robert Millan <zeratul2@wanadoo.es>.
19328 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19330         I forgot to check in these changes for a long time. This adds
19331         incomplete support for VGA console, and this is still very
19332         buggy. Also, a lot of consideration is required for I18N,
19333         UNICODE, and VGA font issues. Therefore, assume that this is
19334         such that "better than nothing".
19336         * font/manager.c: New file.
19337         * include/pupa/font.h: Likewise.
19338         * include/pupa/i386/pc/vga.h: Likewise.
19339         * term/i386/pc/vga.c: Likewise.
19340         * util/unifont2pff.rb: Likewise.
19342         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19343         (pkgdata_MODULES): Added vga.mod and font.mod.
19344         (vga_mod_SOURCES): New variables.
19345         (vga_mod_CFLAGS): Likewise.
19346         (font_mod_SOURCES): Likewise.
19347         (font_mod_CFLAGS): Likewise.
19349         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19351         * include/pupa/term.h: Include pupa/err.h.
19352         (struct pupa_term): Added init and fini.
19353         Changed the argument of putchar to pupa_uint32_t.
19355         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19356         (pupa_console_real_putchar): New prototype.
19357         (pupa_console_putchar): Removed.
19358         (pupa_console_checkkey): Exported.
19359         (pupa_console_getkey): Likewise.
19361         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19362         characters.
19364         * kern/term.c (pupa_term_set_current): Rewritten.
19365         (pupa_putchar): Likewise.
19366         (pupa_putcode): New function.
19368         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19369         (pupa_console_real_putchar): ... this.
19370         (pupa_vga_set_mode): New function.
19371         (pupa_vga_get_font): Likewise.
19373         * normal/command.c: Include pupa/term.h.
19374         (terminal_command): New function.
19375         (pupa_command_init): Register the command "terminal".
19377         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19378         (DISP_UP): Likewise.
19379         (DISP_RIGHT): Likewise.
19380         (DISP_DOWN): Likewise.
19381         (DISP_HLINE): Likewise.
19382         (DISP_VLINE): Likewise.
19383         (DISP_UL): Likewise.
19384         (DISP_UR): Likewise.
19385         (DISP_LL): Likewise.
19386         (DISP_LR): Likewise.
19388         * term/i386/pc/console.c (pupa_console_putchar): New function.
19390 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19392         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19393         FIX. Reverse the path_list.
19395         * include/pupa/normal.h: Export pupa_register_command and
19396         pupa_unregister_command.
19398         * hello/hello.c (pupa_cmd_hello): New module.
19399         * conf/i386-pc.rmk: Added hello.mod.
19401 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19403         * kern/i386/pc/lzo1x.S: New file.
19405         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19406         (compress_kernel): New variable.
19407         (generate_image): Heavily modified to support compressing a
19408         large part of the core image.
19410         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19411         leak.
19412         (pupa_util_load_image): New function.
19414         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19415         (pupa_compressed_size): New variable.
19416         (codestart): Enable Gate A20 here.
19417         Decompress the compressed part of the core image.
19418         Rearrange the code to put functions and variables which are
19419         required for initialization in the non-compressed part.
19420         Include lzo1x.S.
19422         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19423         here.
19425         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19427         * include/pupa/i386/pc/kernel.h
19428         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19429         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19430         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19431         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19432         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19434         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19436         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19437         (Utility#rule): Likewise.
19439         * configure.ac: Check if LZO is available.
19441 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19443         * include/pupa/normal.h: New file.
19444         * include/pupa/setjmp.h: Likewise.
19445         * include/pupa/i386/setjmp.h: Likewise.
19446         * normal/cmdline.c: Likewise.
19447         * normal/command.c: Likewise.
19448         * normal/main.c: Likewise.
19449         * normal/menu.c: Likewise.
19450         * normal/i386/setjmp.S: Likewise.
19452         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19453         (pupa_rescue_cmd_initrd): Likewise.
19455         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19456         Likewise.
19458         * kern/i386/pc/startup.S (translation_table): New variable.
19459         (translate_keycode): New function.
19460         (pupa_console_getkey): Call translate_keycode.
19462         * kern/rescue.c (attempt_normal_mode): New function.
19463         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19464         it failed, print a message.
19466         * kern/mm.c (pupa_real_malloc): Print more information when a
19467         free magic is broken.
19468         (pupa_free): If the first free header is not free actually, set
19469         it to P.
19471         * kern/main.c (pupa_load_normal_mode): Just load the module
19472         "normal".
19473         (pupa_main): Don't print the message
19474         "Entering into rescue mode..." here.
19476         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19477         Declared.
19478         (pupa_rescue_cmd_initrd): Likewise.
19479         (pupa_rescue_cmd_initrd): Likewise.
19481         * include/pupa/symbol.h (FUNCTION): Specify the type.
19482         (VARIABLE): Likewise.
19484         * include/pupa/err.h (pupa_err_t): Added
19485         PUPA_ERR_UNKNOWN_COMMAND.
19487         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19488         (pupa_dl_get_prefix): Likewise.
19490         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19491         Added _chain.mod and _linux.mod instead of chain.mod and
19492         linux.mod.
19493         (chain_mod_SOURCES): Renamed to ...
19494         (_chain_mod_SOURCES): ... this.
19495         (chain_mod_CFLAGS): Renamed to ...
19496         (_chain_mod_CFLAGS): ... this.
19497         (linux_mod_SOURCES): Renamed to ...
19498         (_linux_mod_SOURCES): ... this.
19499         (linux_mod_CFLAGS): Renamed to ...
19500         (_linux_mod_CFLAGS): ... this.
19501         (normal_mod_SOURCES): New variable.
19502         (normal_mod_CFLAGS): Likewise.
19503         (normal_mod_ASFLAGS): Likewise.
19505 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19507         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19508         possible.
19510         * kern/dl.c (pupa_dl_ref): Refer depending modules
19511         recursively.
19512         (pupa_dl_unref): Unrefer depending modules recursively.
19513         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19514         a module is unloaded before one depending on that module is
19515         unloaded.
19516         (pupa_dl_unload): Unload depending modules explicitly,
19517         if possible.
19519 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19521         * include/pupa/i386/pc/linux.h: New file.
19522         * loader/i386/pc/linux.c: Likewise.
19524         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19525         Removed.
19526         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19527         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19528         of PUPA_CHAINLOADER_BOOT_SECTOR.
19530         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19531         (pupa_linux_prot_size): New variable.
19532         (pupa_linux_tmp_addr): Likewise.
19533         (pupa_linux_real_addr): Likewise.
19534         (pupa_linux_boot_zimage): New function.
19535         (pupa_linux_boot_bzimage): Likewise.
19537         * kern/i386/pc/init.c (struct mem_region): New structure.
19538         (MAX_REGIONS): New macro.
19539         (mem_regions): New variable.
19540         (num_regions): Likewise.
19541         (pupa_os_area_addr): Likewise.
19542         (pupa_os_area_size): Likewise.
19543         (pupa_lower_mem): Likewise.
19544         (pupa_upper_mem): Likewise.
19545         (add_mem_region): New function.
19546         (compact_mem_regions): Likewise.
19547         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19548         the size of the conventional memory and that of so-called upper
19549         memory (before the first memory hole).
19550         Instead of adding each found region to free memory, use
19551         add_mem_region and add them after removing overlaps.
19552         Also, add only 1/4 of the upper memory to free memory. The rest
19553         is used for loading OS images. Maybe this is ad hoc, but this
19554         makes it much easier to relocate OS images when booting.
19556         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19557         (pupa_enter_rescue_mode): Don't register initrd and module.
19559         * kern/mm.c: Include pupa/dl.h.
19561         * kern/main.c: Include pupa/file.h and pupa/device.h.
19563         * kern/loader.c (pupa_loader_load_module_func): Removed.
19564         (pupa_loader_load_module): Likewise.
19566         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19567         ``.o''.
19569         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19570         (pupa_linux_tmp_addr): Likewise.
19571         (pupa_linux_real_addr): Likewise.
19572         (pupa_linux_boot_zimage): Likewise.
19573         (pupa_linux_boot_bzimage): Likewise.
19575         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19576         (pupa_upper_mem): Likewise.
19577         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19578         module is too dangerous.
19580         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19581         (pupa_os_area_size): Likewise.
19582         (pupa_loader_set): Remove the first argument. Loader doesn't
19583         manage modules or initrd any longer.
19584         (pupa_loader_load_module): Removed.
19586         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19587         (linux_mod_SOURCES): New variable.
19588         (linux_mod_CFLAGS): Likewise.
19590 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19592         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19593         the length of a blocklist correctly.
19595         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19596         Use ioctl only if the OS file is a block device.
19597         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19598         not very useful for normal files.
19600         * kern/main.c (pupa_set_root_dev): New function.
19601         (pupa_load_normal_mode): Likewise.
19602         (pupa_main): Call those above.
19604         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19605         pupa_uint16_t.
19607         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19609 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19611         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19612         (setup): Configure the installed partition information and the
19613         dl prefix.
19615         * loader/i386/pc/chainloader.c (my_mod): New variable.
19616         (pupa_chainloader_unload): New function.
19617         (pupa_rescue_cmd_chainloader): Refer itself.
19618         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19620         * kern/i386/pc/startup.S (install_partition): Removed.
19621         (version_string): Likewise.
19622         (config_file): Likewise.
19623         (pupa_install_dos_part): New variable.
19624         (pupa_install_bsd_part): Likewise.
19625         (pupa_prefix): Likewise.
19626         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19628         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19629         and pupa/misc.h.
19630         (make_install_device): New function.
19631         (pupa_machine_init): Set the dl prefix.
19633         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19634         (buf): Renamed to ...
19635         (linebuf): ... this.
19636         (pupa_rescue_cmd_prefix): New function.
19637         (pupa_rescue_cmd_insmod): Likewise.
19638         (pupa_rescue_cmd_rmmod): Likewise.
19639         (pupa_rescue_cmd_lsmod): Likewise.
19640         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19641         rmmod and lsmod.
19643         * kern/mm.c (pupa_memalign): If failed even after invalidating
19644         disk caches, unload unneeded modules and retry.
19646         * kern/misc.c (pupa_memmove): New function.
19647         (pupa_memcpy): Removed.
19648         (pupa_strcpy): New function.
19649         (pupa_itoa): Made static.
19651         * kern/dl.c (pupa_dl_iterate): New function.
19652         (pupa_dl_ref): Likewise.
19653         (pupa_dl_unref): Likewise.
19654         (pupa_dl_unload): Return if succeeded or not.
19655         (pupa_dl_unload_unneeded): New function.
19656         (pupa_dl_unload_all): Likewise.
19657         (pupa_dl_init): Renamed to ...
19658         (pupa_dl_set_prefix): ... this.
19659         (pupa_dl_get_prefix): New function.
19661         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19662         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19663         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19664         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19665         (pupa_install_dos_part): Declared.
19666         (pupa_install_bsd_part): Likewise.
19667         (pupa_prefix): Likewise.
19668         (pupa_boot_drive): Likewise.
19670         * include/pupa/types.h: Fix a typo.
19672         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19673         pupa_memmove.
19674         (pupa_memmove): Declared.
19675         (pupa_strcpy): Likewise.
19677         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19678         pupa_mod_init takes one argument, its own module.
19679         (pupa_dl_unload_unneeded): Declared.
19680         (pupa_dl_unload_all): Likewise.
19681         (pupa_dl_ref): Likewise.
19682         (pupa_dl_unref): Likewise.
19683         (pupa_dl_iterate): Likewise.
19684         (pupa_dl_init): Renamed to ...
19685         (pupa_dl_set_prefix): ... this.
19686         (pupa_dl_get_prefix): Declared.
19688         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19689         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19690         unloaded.
19691         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19692         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19694         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19695         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19697 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19699         * util/i386/pc/pupa-setup.c (setup): Define the internal
19700         function find_first_partition_start at the top level, because GCC
19701         3.0.x cannot compile internal functions in deeper scopes
19702         correctly.
19703         (find_root_device): Use lstat instead of stat.
19704         Don't follow symbolic links.
19705         Fix the path-constructing code.
19707         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19708         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19709         by a BLKGETSIZE ioctl first, because block devices don't fill
19710         the member st_mode of the structure stat on Linux.
19711         [__linux__] (linux_find_partition): Use a temporary buffer
19712         REAL_DEV for the working space. Copy it to DEV before returning.
19713         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19714         buffer cache consistent.
19715         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19716         strncmp. The previous value was merely wrong.
19717         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19719         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19720         FAT size is 12. The previous value was merely wrong.
19722         * kern/main.c (pupa_main): Don't split the starting message from
19723         newlines.
19725         * kern/term.c (pupa_putchar): Put CR after LF instead of before
19726         LF, because BIOS goes crazy about character attributes in this
19727         case.
19729 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19731         * include/i386/pc/util/biosdisk.h: New file.
19732         * util/i386/pc/biosdisk.c: Likewise.
19733         * util/i386/pc/pupa-setup.c: Likewise.
19735         * Makefile.in (INCLUDE_DISTFILES): Added
19736         include/pupa/i386/pc/util/biosdisk.h.
19737         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19738         directory util/i386/pc.
19739         (install-local): Added a rule for sbin_UTILITIES.
19740         (uninstall): Likewise.
19742         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19744         * util/misc.c (xrealloc): New function.
19745         (pupa_malloc): Likewise.
19746         (pupa_free): Likewise.
19747         (pupa_realloc): Likewise.
19748         (pupa_stop): Likewise.
19749         (pupa_putchar): Likewise.
19751         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19753         * include/pupa/util/misc.h (xrealloc): Declared.
19755         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19756         macro.
19757         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19758         (PUPA_BOOT_MACHINE_BPB_END): ... this.
19760         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19761         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19763         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19764         way should be implemented.
19765         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19767         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19768         the size of NAME for safety.
19769         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19770         0x88.
19772         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19773         (pupa_setup_SOURCES): Likewise.
19775         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19777 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19779         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19780         bunch of pushl's from pusha, because this destroys the return
19781         value.
19783 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19785         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19786         This means that any missing prototypes could be fatal. Also, you
19787         must take care when writing assembly code. See the comments at
19788         the beginning of startup.S, for more details.
19790         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19791         compilation mechanism.
19792         (pupa_chainloader_real_boot): Likewise.
19793         (pupa_biosdisk_rw_int13_extensions): Likewise.
19794         (pupa_biosdisk_rw_standard): Likewise.
19795         (pupa_biosdisk_check_int13_extensions): Likewise.
19796         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19797         (pupa_biosdisk_get_diskinfo_standard): Likewise.
19798         (pupa_get_memsize): Likewise.
19799         (pupa_get_mmap_entry): Likewise.
19800         (pupa_console_putchar): Likewise.
19801         (pupa_console_setcursor): Likewise.
19802         (pupa_getrtsecs): Use pushl instead of push.
19804         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19805         memory instead of the stack for a mmap entry, because some
19806         BIOSes may ignore the maximum size and overflow.
19808         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19810         * genmk.rb (PModule#rule): Compile automatically generated
19811         sources with module-specific CFLAGS as well as other sources.
19813 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19815         * configure.ac: Check ld.
19816         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19817         respectively, before checking endianness and sizes.
19819         * Makefile.in (LD): New variable.
19821 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19823         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19825 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19827         * Changelog: New file.