2009-09-16 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob722f55c3ba94cf9a881167b635f84ab82670d011
1 2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
3         * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
4         uninitialized `lastaddr'.
6 2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
8         * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
10 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
12         * commands/test.c (get_fileinfo): Return immediately if
13         grub_fs_probe fails.
15 2009-09-14  José Martínez  <xosemp@gmail.com>
17         * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
19 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
21         * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
22         output.
24 2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>
26         * configure.ac: Remove --enable-grub-pe2elf.  Only build
27         grub-pe2elf when needed by the build system itself.
28         * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
30 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
32         * configure.ac: Bump version to 1.97~beta3.
33         * docs/version.texi: Likewise.
35 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
37         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
38         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
39         from here ...
40         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
41         (grub_linux_setup_video): ... to here (with some adjustments).
43 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
45         Fix memory corruption issue (spotted by Colin Watson).
47         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
48         causing returned size to be stored in an incorrect memory location.
49         Fix use of uninitialized value when storing the returned size.
51 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
53         Change clean rules to properly remove files
55         * genmk.rb: add new clean rules
56         * Makefile.in (clean): add the new targets
57         (mostlyclean): likewise
59 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
61         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
62         to grub_uint64_t.
63         * fs/ntfs.c (init_file): Understand 64-bit sizes for
64         non-resident files.
66 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
68         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
69         part of bug #27349.
71 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
73         * util/grub-mkconfig.in: Make the created config mode 400 and
74         print a warning if it fails.
76 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
78         * util/grub.d/40_custom.in: Ask user to type custom entries below
79         comment, rather than below 'exec tail' line.
81 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
83         * util/grub.d/40_custom.in: Make sure that the explanatory text is
84         visible in grub.cfg.
86 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
88         * util/grub.d/40_custom.in: Make it a little clearer how to use this
89         file.
91 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
93         * docs/grub.cfg: Add an example menu entry for memtest86+.
95 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
97         * config.guess: Update to latest version from config git.
98         * config.sub: Likewise.
100 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
102         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
103         unknown-command case.  Fixes bug #27320.
105 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
107         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
108         `help' if the command exists.
110 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
112         * INSTALL: Require GCC 4.1.3 or later.
114 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
116         * Makefile.in (RMKFILES): add i386-qemu.rmk
117         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
118         $(srcdir)/stamp-h.in
120 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
122         * util/grub-probe.c (probe): Comment out buggy codepath, which
123         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
124         should be re-enabled after 1.97.
126 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
128         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
129         find searches for.
131 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
133         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
134         unnecessary calls to grub_error.
136 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
138         * NEWS: Mention `keystatus' and Unicode fonts.
140 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
142         * configure.ac: Bump version to 1.97~beta2.
143         * docs/version.texi: Likewise.
145 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
147         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
148         containing unwind information in some cases where it previously did
149         not. Use -fno-dwarf2-cfi-asm if available to restore the old
150         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
151         discussion.
153 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
155         Embedding loadenv module into grub-emu
157         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
158         commands/loadenv.c
159         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
160         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
161         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
162         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
163         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
164         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
166 2009-09-03  Magnus Granberg  <zorry@ume.nu>
168         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
169         include -fPIE in the default specs.
170         * configure.ac: Check if pie_possible is yes and add -fno-PIE
171         to TARGET_CFLAGS.
173 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
175         * INSTALL: Note that GNU Bison 2.3 or later is required.
177 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
179         * kern/i386/pc/startup.S: Fix typo.
181 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
183         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
184         according to GCS.
186 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
188         * docs/grub.texi (Naming convention): Describe one-based partition
189         numbering.
190         (Device syntax): Likewise.
191         (File name syntax): Likewise.
192         (Block list syntax): Likewise.
193         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
194         menu.lst.
195         (File name syntax): Likewise.
196         (Command-line and menu entry commands): Document acpi, blocklist,
197         crc, export, insmod, keystatus, ls, set, and unset commands.
199 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
201         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
202         to avoid implying that only one of --shift, --ctrl, or --alt may be
203         used.
205 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
207         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
208         rather than comparing against S_IFREG, which will almost never work.
210 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
212         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
213         (write_blocklists): Likewise.
215 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
217         * script/lua/grub_lua.h (fputs): Supply a format string as the first
218         argument to grub_printf.
220 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
222         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
223          non GNU test.
225 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
227         * kern/file.c (grub_file_read): Spelling fix
229 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
231         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
232         loading of headers in some cases.
234 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
236         * configure.ac: Bump version to 1.97~beta1.
237         * docs/version.texi: Likewise.
239 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
241         * include/grub/i386/xnu.h: Add license header.
242         include grub/err.h explicitly.
244 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
246         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
247         to `ufs' in the vfs.root.mountfrom kernel parameter.
249 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
251         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
253         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
254         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
256         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
257         `ARRAY_SIZE' macro.
259 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
261         * kern/file.c (grub_file_read): Check offset.
262         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
263         * fs/jfs.c (grub_jfs_read_file): Likewise.
264         * fs/ntfs.c (grub_ntfs_read): Likewise.
265         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
266         * fs/minix.c (grub_minix_read_file): Correct offset check.
267         * fs/ufs.c (grub_ufs_read_file): Likewise.
269 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
271         * term/i386/pc/console.c (bios_data_area): Cast
272         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
274 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
276         1-bit optimised blitters.
278         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
279         prototype.
280         (grub_video_fbblit_replace_24bit_1bit): Likewise.
281         (grub_video_fbblit_replace_16bit_1bit): Likewise.
282         (grub_video_fbblit_replace_8bit_1bit): Likewise.
283         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
284         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
285         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
286         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
287         function.
288         (grub_video_fbblit_replace_24bit_1bit): Likewise.
289         (grub_video_fbblit_replace_16bit_1bit): Likewise.
290         (grub_video_fbblit_replace_8bit_1bit): Likewise.
291         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
292         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
293         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
294         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
295         when possible.
296         * video/video.c (grub_video_get_blit_format): Return
297         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
299 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
301         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
302         the first argument to grub_printf.
304 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
305 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
307         Add `getkeystatus' terminal method.  Add a new `keystatus' command
308         to query it.
310         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
311         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
312         modifier key bitmasks.
313         (struct grub_term_input): Add `getkeystatus' member.
314         (grub_getkeystatus): Add prototype.
315         * kern/term.c (grub_getkeystatus): New function.
317         * include/grub/i386/pc/memory.h
318         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
319         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
320         Data Area layout.
321         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
322         (grub_console_term_input): Set `getkeystatus' member.
323         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
324         constants.
325         (grub_usb_keyboard_getreport): Likewise.
326         (grub_usb_keyboard_checkkey): Likewise.
327         (grub_usb_keyboard_getkeystatus): New function.
328         (grub_usb_keyboard_term): Set `getkeystatus' member.
330         * commands/keystatus.c: New file.
331         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
332         (keystatus_mod_SOURCES): New variable.
333         (keystatus_mod_CFLAGS): Likewise.
334         (keystatus_mod_LDFLAGS): Likewise.
335         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
336         commands/keystatus.c.
337         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
338         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
339         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
340         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
341         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
342         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
344 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
346         Split befs.mod and afs.mod into *_be.mod and *.mod
348         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
349         (grub_fstest_SOURCES): Likewise.
350         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
351         (afs_be_mod_SOURCES): New variable.
352         (afs_be_mod_CFLAGS): Likewise.
353         (afs_be_mod_LDFLAGS): Likewise.
354         (befs_be_mod_SOURCES): Likewise.
355         (befs_be_mod_CFLAGS): Likewise.
356         (befs_be_mod_LDFLAGS): Likewise.
357         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
358         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
359         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
360         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
361         (grub_emu_SOURCES): Likewise.
362         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
363         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
364         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
365         * fs/afs_be.c: New file.
366         * fs/befs_be.c: New file.
367         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
368         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
369         (U16): Replaced with ...
370         (grub_afs_to_cpu16): ...this. All users updated.
371         (U32): Replaced with ...
372         (grub_afs_to_cpu32): ...this. All users updated.
373         (U64): Replaced with ...
374         (grub_afs_to_cpu64): ...this. All users updated.
375         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
376         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
377         (grub_afs_validate_sblock): Check only one endianness.
378         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
379         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
380         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
381         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
382         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
383         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
384         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
385         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
387 2009-08-26  Bean  <bean123ch@gmail.com>
389         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
390         64-bit number.
391         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
392         (grub_xfs_inode_block): Change return type to grub_uint64_t.
393         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
395 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
397         NetBSD memory map support.
399         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
400         (grub_netbsd_btinfo_mmap_header): New structure.
401         (grub_netbsd_btinfo_mmap_entry): Likewise.
402         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
404 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
406         Enable bsd.mod on coreboot.
408         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
409         (bsd_mod_SOURCES): New variable.
410         (bsd_mod_CFLAGS): Likewise.
411         (bsd_mod_LDFLAGS): Likewise.
412         (bsd_mod_ASFLAGS): Likewise.
413         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
414         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
416 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
418         Cleanup NetBSD root support.
420         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
421         grub_bsd_get_device.
422         Fix typo.
424 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
426         * util/grub.d/00_header.in: Move check for the video backend of
427         gfxterm from here ...
428         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
429         a suitable video backend.
431 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
433         Fix breakage in grub-setup.
435         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
436         "msdos_partition_map".
438 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
440         Fix breakage in normal/auth.c.
442         * normal/auth.c (grub_iswordseparator): New function.
444 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
446         Authentication support.
448         * commands/password.c: New file.
449         * conf/common.rmk (pkglib_MODULES): Add password.mod.
450         (password_mod_SOURCES): New variable.
451         (password_mod_CFLAGS): Likewise.
452         (password_mod_LDFLAGS): Likewise.
453         (normal_mod_SOURCES): Add normal/auth.c.
454         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
455         normal/auth.c.
456         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
457         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
458         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
459         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
460         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
461         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
462         * include/grub/auth.h: New file.
463         * include/grub/err.h (grub_err_t): New enum value
464         GRUB_ERR_ACCESS_DENIED.
465         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
466         'users'.
467         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
468         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
469         users updated.
470         * normal/auth.c: New file.
471         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
472         (grub_cmdline_run): Don't allow to go to command line without
473         authentication.
474         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
475         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
476         menuentry without superuser rights.
477         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
478         user isn't a superuser.
480 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
482         Save space by inlining misc.c functions.
484         * kern/misc.c (grub_iswordseparator): Made static.
485         * kern/misc.c (grub_strcat): Moved from here ...
486         * include/grub/misc.h (grub_strcat): ... here. Inlined.
487         * kern/misc.c (grub_strncat): Moved from here ...
488         * include/grub/misc.h (grub_strncat): ... here. Inlined.
489         * kern/misc.c (grub_strcasecmp): Moved from here ...
490         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
491         * kern/misc.c (grub_strncasecmp): Moved from here ...
492         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
493         * kern/misc.c (grub_isalpha): Moved from here ...
494         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
495         * kern/misc.c (grub_isdigit): Moved from here ...
496         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
497         * kern/misc.c (grub_isgraph): Moved from here ...
498         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
499         * kern/misc.c (grub_tolower): Moved from here ...
500         * include/grub/misc.h (grub_tolower): ... here. Inlined.
502 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
504         * script/sh/function.c (grub_script_function_find): Cut error message
505         not to flood terminal.
506         * script/sh/lexer.c (grub_script_yylex): Remove command line length
507         limit.
508         * script/sh/script.c (grub_script_arg_add): Duplicate string.
510 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
512         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
513         `report' grub_uint8_t *.
514         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
515         Use a 50-millisecond timeout rather than just repeating
516         grub_usb_keyboard_getreport 50 times.
517         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
519 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
521         Rename *_partition_map to part_*
523         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
524         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
525         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
526         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
527         All users updated.
528         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
529         All users updated.
530         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
531         * util/grub-probe.c (probe_partmap): Don't transform partition name
532         to get module name.
534 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
536         Fix OpenBSD and NetBSD support.
538         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
539         memory address conflict.
540         (OPENBSD_MMAP_ACPI): New definition.
541         (OPENBSD_MMAP_NVS): Likewise.
542         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
543         and OPENBSD_MMAP_NVS.
544         Add memory map terminator
545         Explicit cast when calling grub_unix_real_boot.
546         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
548 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
550         Let user specify NetBSD root device.
552         * loader/i386/bsd.c (netbsd_root): New variable.
553         (netbsd_opts): New option 'root'.
554         (NETBSD_ROOT_ARG): New macro.
555         (grub_netbsd_boot): Use 'netbsd_root'.
556         (grub_bsd_unload): Free 'netbsd_root'.
557         (grub_cmd_netbsd): Fill 'netbsd_root'.
559 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
561         Support for 64-bit NetBSD.
563         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
564         point when booting non-FreeBSD.
566 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
568         Support --no-smp and --no-acpi for NetBSD.
570         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
571         (NETBSD_AB_NOACPI): Likewise.
572         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
573         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
575 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
577         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
578         errors.
579         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
580         errors. Call grub_error when needed.
582 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
584         * commands/search.c (search_fs): Try searching without autoload first.
585         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
586         filesystem module explicitly for faster booting.
588 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
590         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
592 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
594         * util/grub.d/30_os-prober.in: Disable os-prober if
595         `GRUB_DISABLE_OS_PROBER' was set to true.
597 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
599         * partmap/pc.c: Rename to ...
600         * partmap/msdos.c: ... this.  Update all users.
601         (grub_pc_partition_map): Rename to ...
602         (grub_msdos_partition_map): ... this.  Update all users.
604         * parttool/pcpart.c: Rename to ...
605         * parttool/msdospart.c: ... this.  Update all users.
607         * include/grub/pc_partition.h: Rename to ...
608         * include/grub/msdos_partition.h: ... this.  Update all users.
609         (grub_pc_partition_bsd_entry): Rename to ...
610         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
611         (grub_pc_partition_disk_label): Rename to ...
612         (grub_msdos_partition_disk_label): ... this.  Update all users.
613         (grub_pc_partition_entry): Rename to ...
614         (grub_msdos_partition_entry): ... this.  Update all users.
615         (grub_pc_partition_mbr): Rename to ...
616         (grub_msdos_partition_mbr): ... this.  Update all users.
617         (grub_pc_partition): Rename to ...
618         (grub_msdos_partition): ... this.  Update all users.
619         (grub_pc_partition_is_empty): Rename to ...
620         (grub_msdos_partition_is_empty): ... this.  Update all users.
621         (grub_pc_partition_is_extended): Rename to ...
622         (grub_msdos_partition_is_extended): ... this.  Update all users.
623         (grub_pc_partition_is_bsd): Rename to ...
624         (grub_msdos_partition_is_bsd): ... this.  Update all users.
626         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
627         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
628         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
629         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
630         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
631         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
632         (gpt_mod_LDFLAGS): Rename to ...
633         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
634         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
635         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
636         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
637         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
638         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
639         (part_gpt_mod_LDFLAGS): ... this.
640         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
641         `pcpart.mod' to `msdospart.mod'.
642         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
643         to ...
644         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
645         (msdospart_mod_LDFLAGS): ... this.
647 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
649         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
650         (openbsd_opts): Likewise.
651         (netbsd_opts): Likewise.
652         (freebsd_flags): Added 0 terminator.
653         (openbsd_flags): Likewise.
654         (netbsd_flags): Likewise.
655         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
656         (grub_cmd_freebsd): Transformed into extended command.
657         (grub_cmd_openbsd): Likewise.
658         (grub_cmd_netbsd): Likewise.
659         (cmd_freebsd): Changed type to grub_extcmd_t.
660         (cmd_openbsd): Likewise.
661         (cmd_netbsd): Likewise.
662         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
663         grub_cmd_openbsd as extended commands.
664         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
665         cmd_netbsd and cmd_openbsd
667 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
669         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
671 2009-08-21  Pavel Roskin  <proski@gnu.org>
673         * Makefile.in (install-local): When checking if a file is in the
674         build directory, use "test -e" to detect symlinks.
676         * Makefile.in (install-local): Remove all files in
677         $(DESTDIR)$(pkglibdir) before installing new files there.
679 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
681         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
682         grub-mkelfimage.
684 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
686         * util/grub-mkconfig.in: Don't use gfxterm by default if not
687         explicitly specified by the user.
689 2009-08-18  Pavel Roskin  <proski@gnu.org>
691         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
692         grub_uint8_t pointer for data.
693         * include/grub/fbutil.h (struct grub_video_fbblit_info):
694         Likewise.
695         * video/fb/fbutil.c: Remove unnecessary casts.
697 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
699         VBE cleanup.
701         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
702         (grub_vbe_set_video_mode): Save active mode info
703         only after setting the mode.
704         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
705         second argument.
707 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
709         Rename variables for clarity.
711         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
712         (active_vbe_mode_info): ... this. All users updated.
713         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
714         All users updated.
715         (initial_mode): Rename to ...
716         (initial_vbe_mode): ... this. All users updated.
717         (mode_in_use): Rename to ..
718         (vbe_mode_in_use): ... this. All users updated.
719         (mode_list): Rename to ..
720         (vbe_mode_list): ... this. All users updated.
721         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
722         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
723         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
724         'mode_list_size' to 'vbe_mode_list_size'.
725         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
726         'best_mode_info' to 'best_vbe_mode_info' and
727         'best_mode' to 'best_vbe_mode'
729 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
731         Remove duplicate grub_video_fb_get_video_ptr.
733         * include/grub/fbutil.h (get_data_ptr): Rename to ...
734         (grub_video_fb_get_video_ptr): ... this.
735         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
736         * video/fb/fbutil.c: Add comment about addressing.
737         (get_data_ptr): Rename to ...
738         (grub_video_fb_get_video_ptr): ... this. All users updated.
739         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
741 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
743         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
744         grub_dprintf() that was just added.
746 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
748         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
749         (DEFAULT_VIDEO_MODE): Remove macros.
750         (grub_linux_boot): Remove assumption that Linux has FB support,
751         and use "text" as default video mode.
753 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
755         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
756         grub_dprintf.
757         * fs/fat.c (grub_fat_read_data): Likewise.
759 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
761         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
762         payload.
763         (grub_module): Likewise.
765 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
767         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
768         mbi->cmdline but free playground.
770 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
772         Handle group offset on UFS1.
774         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
775         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
777 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
779         Split ufs.mod into ufs1.mod and ufs2.mod.
781         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
782         (grub_fstest_SOURCES): Likewise.
783         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
784         (ufs_mod_SOURCES): Remove.
785         (ufs_mod_CFLAGS): Likewise.
786         (ufs_mod_LDFLAGS): Likewise.
787         (ufs1_mod_SOURCES): New variable.
788         (ufs1_mod_CFLAGS): Likewise.
789         (ufs1_mod_LDFLAGS): Likewise.
790         (ufs2_mod_SOURCES): New variable.
791         (ufs2_mod_CFLAGS): Likewise.
792         (ufs2_mod_LDFLAGS): Likewise.
793         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
794         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
795         Likewise.
796         (grub_emu_SOURCES): Likewise.
797         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
798         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
799         (grub_setup_SOURCES): Likewise.
800         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
801         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
802         (grub_setup_SOURCES): Likewise.
803         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
804         Likewise.
805         * fs/ufs2.c: New file.
806         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
808 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
810         Framebuffer split.
812         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
813         subsystem at the end.
814         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
815         (video_fb_mod_SOURCES): New variable.
816         (video_fb_mod_CFLAGS): Likewise.
817         (video_fb_mod_LDFLAGS): Likewise.
818         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
819         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
820         * video/i386/pc/vbeblit.c: Moved from here ...
821         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
822         * video/i386/pc/vbefill.c: Moved from here ...
823         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
824         * video/i386/pc/vbeutil.c: Moved from here ...
825         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
826         * include/grub/i386/pc/vbeblit.h: Moved from here ...
827         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
828         * include/grub/i386/pc/vbefill.h: Moved from here ...
829         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
830         * include/grub/i386/pc/vbeutil.h: Moved from here ...
831         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
832         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
833         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
834         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
835         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
836         (grub_video_adapter): Added 'get_info_and_fini'.
837         (grub_video_get_info_and_fini): New prototype.
838         (grub_video_set_mode): make modestring const char *.
839         * loader/i386/linux.c (grub_linux_setup_video): Use
840         grub_video_get_info_and_fini.
841         (grub_linux_boot): Move modesetting just before booting.
842         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
843         grub_video_get_info_and_fini.
844         * video/i386/pc/vbe.c: Moved framebuffer part ...
845         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
846         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
847         grub_video_fbstd_colors and grub_video_fb_set_palette.
848         (grub_video_vbe_init): Clear 'framebuffer' variable and use
849         grub_video_fb_init.
850         (grub_video_vbe_fini): Use grub_video_fb_fini.
851         (grub_video_vbe_setup): Use framebuffer.render_target instead of
852         render_target and use grub_video_fb_set_active_render_target and
853         grub_video_fb_set_palette.
854         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
855         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
856         (grub_video_vbe_adapter): Use framebuffer.
857         * video/video.c (grub_video_get_info_and_fini): New function.
858         (grub_video_set_mode): Make modestring const char *.
859         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
860         values are already initialised.
862 2009-08-14  Pavel Roskin  <proski@gnu.org>
864         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
865         ABS and APPLE_CC.
866         * boot/i386/pc/diskboot.S: Likewise.
867         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
868         sectors allow compilation on MacOSX.
869         * conf/i386-pc.rmk: Enable unconditional compilation of
870         lnxboot.img.
872 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
874         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
875         * util/grub.d/00_header.in: Enter interruptible sleep if
876         GRUB_HIDDEN_TIMEOUT is set.
878 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
880         * include/grub/symbol.h: Add the LOCAL macro.
881         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
882         starting with "L_".
884 2009-08-13  Pavel Roskin  <proski@gnu.org>
886         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
887         any modern compilers we support.
889         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
890         Use local labels starting with "L_" so that Apple assembler
891         knows they are local.
893 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
895         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
896         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
897         (bsd_kernel_types): ... this enum.
899         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
900         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
901         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
903         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
904         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
905         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
906         messages.
908 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
910         * util/grub-dumpdevtree: Moved from here ...
911         * util/i386/efi/grub-dumpdevtree: ... to here.
912         (hexify): New function.  Converts a string to its hex version.
913         Generate hex versions of "efi" and "device-properties" by calling
914         hexify() on the ASCII strings rather than by hardcoding numbers.
916 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
918         * fs/jfs.c: Update copyright year.
920 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
922         * util/grub.d/00_header.in: Fix a comment.
923         * util/grub.d/10_linux.in: Likewise.
924         * util/grub.d/10_windows.in: Likewise.
925         * util/grub.d/10_hurd.in: Likewise.
927 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
929         * util/grub-mkconfig.in: Allow the user to specify the used font
930         with GRUB_FONT.
932 2009-08-08  Pavel Roskin  <proski@gnu.org>
934         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
935         available, xfs.mod needs it now.
937         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
938         the "g" modifier in sed when the intention is to strip something
939         once.  This fixes comparison of kernels with multiple dashes.
941         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
942         on it.  Add missing space before closing bracket.  Fix
943         misleading formatting.
945 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
947         * docs/grub.texi: Major overhaul.  Remove all sections that are
948         specific to GRUB Legacy, or mostly composed of Legacy-specific
949         information.
951 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
953         * docs/version.texi: New file.  Provides version information for
954         grub.texi.
956 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
958         * docs/grub.texi: Update CVS information to SVN.
959         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
961 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
963         * util/grub-mkconfig.in: Remove a wrong `fi'.
965 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
967         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
968         (grub_jfs_uuid): New function.
969         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
971 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
973         * util/grub-mkconfig_lib.in (font_path): Move the functionality
974         of it to ...
975         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
976         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
978 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
980         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
981         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
982         Update all users.
984         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
985         not just "vmlinu[zx]".
986         Moved from here ...
987         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
988         all users.
990         * util/grub.d/10_linux.in (find_latest): Moved from here ...
991         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
992         all users.
994 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
996         * util/grub.d/10_freebsd.in: Use an absolute device path for
997         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
999 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
1001         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
1002         handling of multiple abstraction modules.
1004 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
1006         Fix a bug resulting in black screen when loading Linux using a
1007         packed video mode.
1009         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1010         function.
1012         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1013         (grub_vbe_bios_getset_dac_palette_width): New function.
1014         (grub_vbe_bios_get_dac_palette_width)
1015         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1016         grub_vbe_bios_getset_dac_palette_width()).
1018         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1019         check for return status.
1020         (grub_vbe_get_video_mode_info): When getting information for a packed
1021         mode (<= 8 bpp), obtain DAC palette width using
1022         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1023         {red,green,blue}_mark_size.
1025 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
1027         * commands/search.c (options): Fix help output to match actual code.
1029 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1031         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1032         of homegrown code.
1034 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1036         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1037         on XFS or ReiserFS.
1039 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1041         Support Apple partition map with sector size different from 512 bytes.
1043         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1044         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1045         and 'apart.partmap_size'.
1047 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1048 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1050         Fix cpuid command.
1052         * commands/i386/cpuid.c (options): New variable.
1053         (grub_cmd_cpuid): Return real error.
1054         (GRUB_MOD_INIT(cpuid)): Declare options.
1056 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1058         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1059         valid.
1061 2009-07-31  Bean  <bean123ch@gmail.com>
1063         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1064         log2_inode.
1065         (grub_fshelp_node): Move inode field to the end.
1066         (grub_xfs_data): Remove inode field.
1067         (grub_xfs_inode_block): Calculate inode size using sblock.
1068         (grub_xfs_inode_offset): Likewise.
1069         (grub_xfs_read_inode): Calculate inode size using sblock.
1070         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1071         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1072         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1073         to match inode size.
1074         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1075         not accessible when data is null.
1076         (grub_xfs_open): Likewise.
1078 2009-07-31  Bean  <bean123ch@gmail.com>
1080         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1081         Don't change pv->disk if it's already set.
1083         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1084         (grub_raid_register): ... here.
1085         (grub_raid_rescan): Removed.
1087         * include/grub/raid.h (grub_raid_rescan): Removed.
1089         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1090         (fstest): Replace grub_raid_rescan with module fini function followed
1091         by init function.
1093         * util/grub-probe.c: Add include file <grub/raid.h>.
1094         (probe_raid_level): New function.
1095         (probe): Detect abstraction by walking the disk device, support two
1096         level of abstraction (LVM on RAID) when detecting partition map.
1098 2009-07-31  Pavel Roskin  <proski@gnu.org>
1100         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1101         to grub_zalloc(), it was erroneous.
1102         Reported by Bean <bean123ch@gmail.com>
1104 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1106         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1107         embedding zone, not only the first one.
1109 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1111         * term/gfxterm.c (clear_char): New function.
1112         (grub_virtual_screen_setup): Use clear_char.
1113         (scroll_up): Likewise.
1114         (grub_virtual_screen_cls): Likewise.
1116 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1118         * util/deviceiter.c (get_acceleraid_disk_name): New static
1119         function.
1120         (grub_util_iterate_devices): Handle Accelraid devices.
1121         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1123 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1125         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1126         separator for the suggested gfxpayload string (';' collides with the
1127         parser and needs escaping).
1129 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1131         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1132         Clear direction flag before jumping to OS.
1133         (grub_multiboot2_real_boot): Likewise.
1135 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1137         * util/i386/pc/grub-install: Fix parsing of --disk-module
1138         option.
1140 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1142         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1143         when embedding.
1145 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1147         * util/grub-mkconfig.in (package_version): New variable.
1148         Use it do display the version.
1150 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1152         * kern/file.c (grub_file_open): Revert to previous check with
1153         grub_errno.
1155 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1157         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1158         from help line. It's out of sync with code.
1160 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1162         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1163         entries on failed boot.
1165 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1167         * kern/file.c (grub_file_open): Fix an error check.
1169 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1171         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1172         partition map couldn't be identified.
1174 2009-07-23  Pavel Roskin  <proski@gnu.org>
1176         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1177         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1178         case of little endian words becomes just an optimization.
1179         Respect const modifier.
1180         (md5_final): Use code that doesn't depend on endianness.
1182         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1183         to avoid loss of upper bits if align is unsigned and shorter
1184         than addr.
1186 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1188         UUID support for UFS
1190         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1191         (grub_ufs_uuid): New function.
1192         (grub_ufs_fs): add .uuid
1194 2009-07-21  Pavel Roskin  <proski@gnu.org>
1196         * kern/dl.c (grub_dl_check_header): Make static.
1198 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1200         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1201         add drivemap for Vista.  It breaks Windows 7.
1203 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1205         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1206         128 bytes
1208 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1210         Add BFS support
1212         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1213         (grub_fstest_SOURCES): Likewise.
1214         (pkglib_MODULES): Add befs.mod.
1215         (befs_mod_SOURCES): New variable.
1216         (befs_mod_CFLAGS): Likewise.
1217         (befs_mod_LDFLAGS): Likewise.
1218         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1219         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1220         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1221         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1222         (grub_setup_SOURCES): Likewise.
1223         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1224         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1225         (grub_setup_SOURCES): Likewise.
1226         * fs/befs.c: New file.
1227         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1228         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1229         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1230         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1231         (B_KEY_INDEX_ALIGN): New declaration.
1232         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1233         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1234         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1235         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1236         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1237         (grub_afs_mount) [MODE_BFS]: Likewise.
1238         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1239         (grub_afs_fs): Use GRUB_AFS_FSNAME
1240         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1241         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1242         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1243         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1245 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1247         * util/getroot.c (find_root_device): Add support for MacOSX.
1248         * util/hostdisk.c: Likewise.
1250 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1252         * font/font.c (find_glyph): Check whether a font is present to avoid
1253         segmentation fault.
1255 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1257         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1259 2009-07-20  Pavel Roskin  <proski@gnu.org>
1261         * configure.ac: Trim excessively wordy excuses.
1263 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1265         Add symlink, mtime and label support to AtheFS.
1267         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1268         (grub_afs_iterate_dir): Handle symlinks.
1269         (grub_afs_open): Use grub_afs_read_symlink.
1270         (grub_afs_dir): Likewise.
1271         Pass mtime.
1272         (grub_afs_label): New function.
1273         (grub_afs_fs): Add grub_afs_label.
1274         (grub_afs_read_symlink): New function.
1276 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1278         Fix AtheFS support.
1280         * fs/afs.c: Fix comments style.
1281         (grub_afs_blockrun): Declare as packed.
1282         (grub_afs_datastream): Likewise.
1283         (grub_afs_bnode): Likewise.
1284         (grub_afs_btree): Likewise.
1285         (grub_afs_sblock): Likewise.
1286         Declare `name' as char.
1287         (grub_afs_inode): Declare as packed.
1288         Change void *vnode to grub_uint32_t unused.
1289         (grub_afs_iterate_dir): Check that key_size is positive.
1290         (grub_afs_mount): Don't read superblock twice.
1291         (grub_afs_dir): Don't free node in case of error,
1292         grub_fshelp_find_file already handles this.
1293         (grub_afs_open): Likewise.
1295 2009-07-19  Pavel Roskin  <proski@gnu.org>
1297         * Makefile.in: Remove LIBLZO and enable_lzo.
1298         * conf/i386-pc.rmk: Remove lzo support.
1299         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1300         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1301         support.
1302         * kern/i386/pc/lzo1x.S: Remove.
1303         * kern/i386/pc/startup.S: Remove lzo support.
1304         * util/i386/pc/grub-mkimage.c: Likewise.
1306 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1308         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1309         * fs/xfs.c (grub_xfs_dir): Likewise.
1310         * fs/afs.c (grub_afs_dir): Likewise.
1311         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1312         (grub_iso9660_open): Likewise.
1313         * fs/jfs.c (grub_jfs_open): Likewise.
1314         * fs/ext2.c (grub_ext2_dir): Likewise.
1315         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1316         * script/sh/lexer.c (grub_script_yylex): Likewise.
1318 2009-07-16  Pavel Roskin  <proski@gnu.org>
1320         * configure.ac: Never add "-c" to CFLAGS.
1322         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1324         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1325         grub_cv_cc_efiemu should be used.
1327         * configure.ac: Typo fixes.
1329         * kern/mm.c (grub_zalloc): New function.
1330         (grub_debug_zalloc): Likewise.
1331         * include/grub/mm.h: Declare grub_zalloc() and
1332         grub_debug_zalloc().
1333         * util/misc.c (grub_zalloc): New function.
1334         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1335         instead of grub_malloc(), remove unneeded initializations.
1336         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1337         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1338         * commands/parttool.c (grub_cmd_parttool): Likewise.
1339         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1340         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1341         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1342         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1343         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1344         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1345         (grub_cmd_efiemu_pnvram): Likewise.
1346         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1347         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1348         (grub_iso9660_iterate_dir): Likewise.
1349         * fs/jfs.c (grub_jfs_opendir): Likewise.
1350         * fs/ntfs.c (list_file): Likewise.
1351         (grub_ntfs_mount): Likewise.
1352         * kern/disk.c (grub_disk_open): Likewise.
1353         * kern/dl.c (grub_dl_load_core): Likewise.
1354         * kern/elf.c (grub_elf_file): Likewise.
1355         * kern/env.c (grub_env_context_open): Likewise.
1356         (grub_env_set): Likewise.
1357         (grub_env_set_data_slot): Likewise.
1358         * kern/file.c (grub_file_open): Likewise.
1359         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1360         * loader/i386/multiboot.c (grub_module): Likewise.
1361         * loader/xnu.c (grub_xnu_create_key): Likewise.
1362         (grub_xnu_create_value): Likewise.
1363         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1364         (read_config_file): Likewise.
1365         * normal/menu_entry.c (make_screen): Likewise.
1366         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1367         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1368         * script/sh/script.c (grub_script_parse): Likewise.
1369         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1370         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1371         * video/readers/png.c (grub_png_output_byte): Likewise.
1372         (grub_video_reader_png): Likewise.
1374 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1376         Enable all targets that can be built by default
1378         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1379         grub-mkfont and grub-fstest if they can be built
1381 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1383         Fix hang and segmentation fault in grub-emu-usb
1385         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1386         * util/usb.c (grub_libusb_devices): likewise
1387         (grub_libusb_init): rename to ...
1388         (GRUB_MOD_INIT (libusb)):...this
1389         (grub_libusb_fini): rename to ..
1390         (GRUB_MOD_FINI (libusb)):...this
1391         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1392         * include/grub/disk.h (grub_raid_init): removed, it's useless
1393         (grub_raid_fini): likewise
1394         (grub_lvm_init): likewise
1395         (grub_lvm_fini): likewise
1396         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1397         by grub_init_all
1399 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1401         Fix libusb
1403         * Makefile.in (LIBUSB): new macro
1404         * genmk.rb (Utility/print_tail): new method
1405         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1406         (top level): call util.print_tail at the end.
1408 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1410         Make FreeBSD accept zpool.cache
1412         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1413         type is /boot/zfs/zpool.cache
1415 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1417         Fix 64-bit efiemu
1419         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1420         correct wrong typedef
1421         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1423 2009-07-15  Pavel Roskin  <proski@gnu.org>
1425         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1426         * kern/disk.c (struct grub_disk_cache): Likewise.
1428         * commands/probe.c (options): Typo fix.
1430         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1431         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1432         accordingly.
1433         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1435         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1436         the end of "Error" to make the message more readable.
1438         * boot/i386/pc/boot.S (kernel_segment): Remove.
1439         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1440         for destination.
1442         * boot/i386/pc/boot.S (boot_version): Remove.
1443         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1444         Remove.
1446         * include/grub/i386/pc/boot.h: Sort all offsets.
1447         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1448         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1449         * boot/i386/pc/boot.S: Assert location of every offset listed in
1450         include/grub/i386/pc/boot.h.
1452 2009-07-13  Pavel Roskin  <proski@gnu.org>
1454         * include/grub/i386/coreboot/machine.h: Rename
1455         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1456         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1457         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1459         * kern/dl.c: Force native word size to suppress warnings when
1460         compiling grub-emu.
1462         * kern/device.c (grub_device_iterate): Change struct part_ent to
1463         hold the name, not a pointer to it.  Use one grub_malloc() per
1464         partition, not two.  Free partition_name if grub_malloc() fails.
1465         Set ents to NULL only before grub_partition_iterate() is called.
1467 2009-07-11  Bean  <bean123ch@gmail.com>
1469         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1470         childname.
1472 2009-07-10  Bean  <bean123ch@gmail.com>
1473 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1475         * kern/ieee1275/openfw.c (grub_children_iterate)
1476         (grub_devalias_iterate): Fix size evaluation for property or path
1477         strings, which was broken since r2132.
1479 2009-07-07  Pavel Roskin  <proski@gnu.org>
1481         * commands/search.c (search_file): Merge into ...
1482         (search_fs): ... this.  Accept search type as argument.
1483         (grub_cmd_search): Pass search type to search_fs().
1485         * include/grub/util/console.h: New file.
1486         * util/console.c: Use it instead of grub/machine/console.h.
1487         * util/grub-emu.c: Likewise.
1489         * lib/arg.c (find_long_option): Remove.
1490         (find_long): Add `len' argument, make `s' const char *.
1491         (grub_arg_parse): Parse long options in place, not in a
1492         temporary buffer.
1494 2009-07-06  Pavel Roskin  <proski@gnu.org>
1496         * commands/search.c (search_fs): Fix potential NULL pointer
1497         dereference.
1499         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1500         function pointer.
1502 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1504         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1505         comparison.
1507 2009-07-05  Pavel Roskin  <proski@gnu.org>
1509         * include/grub/i386/linux.h (struct linux_kernel_params):
1510         Restore padding3, it's still needed.
1512         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1513         FreeBSD.
1514         * util/osdetect.lua: Likewise.
1516 2009-07-05  Bean  <bean123ch@gmail.com>
1518         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1520         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1521         (grub_lua_getenv): Likewise.
1522         (grub_lua_setenv): Likewise.
1523         (save_errno): New function.
1524         (push_result): Likewise.
1525         (grub_lua_enum_device): Likewise.
1526         (grub_lua_enum_file): Likewise.
1527         (grub_lua_file_open): Likewise.
1528         (grub_lua_file_close): Likewise.
1529         (grub_lua_file_seek): Likewise.
1530         (grub_lua_file_read): Likewise.
1531         (grub_lua_file_getline): Likewise.
1532         (grub_lua_file_getsize): Likewise.
1533         (grub_lua_file_getpos): Likewise.
1534         (grub_lua_file_eof): Likewise.
1535         (grub_lua_file_exist): Likewise.
1536         (grub_lua_add_menu): Likewise.
1538         * script/lua/grub_lua.h (isupper): New inline function.
1539         (islower): Likewise.
1540         (ispunct): Likewise.
1541         (isxdigit): Likewise.
1542         (strcspn): Change to normal function.
1543         (strpbkr): New function declaration.
1544         (memchr): Likewise.
1546         * script/lua/grub_main.c (scan_str): New function.
1547         (strcspn): Likewise.
1548         (strpbrk): Likewise.
1549         (memchr): Likewise.
1551         * script/lua/linit.c (lualibs): Enable the string library.
1553         * util/osdetect.lua: New file.
1555 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1557         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1558         `capabilities' member.
1560 2009-07-02  Pavel Roskin  <proski@gnu.org>
1562         * genparttoollist.sh: Add missing newline at the end.
1564 2009-07-01  Pavel Roskin  <proski@gnu.org>
1566         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1568         * util/hostdisk.c (open_device): Remove `const' from
1569         `sysctl_size', as sysctlbyname() can change it (in this case it
1570         doesn't actually happen).
1572         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1573         using signed long int constants.
1575         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1576         constant to avoid a warning on FreeBSD.
1578         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1579         where it's needed.
1581         * Makefile.in: Install include/grub/machine symlink.
1583         * Makefile.in: When installing symlinks, use "cp -fR", which
1584         works on FreeBSD and MacOSX.
1585         From Yves Blusseau <cl7m42e02@sneakemail.com>
1587         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1588         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1590         * util/misc.c: Move grub_reboot() and grub_halt() ...
1591         * util/grub-emu.c: ... here.  Make main_env static.
1592         * include/grub/util/misc.h: Remove main_env.
1594         * kern/mm.c: Use correct format to print size_t.
1596         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1597         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1598         * kern/powerpc/dl.c: Likewise.
1599         * kern/sparc64/dl.c: Likewise.
1600         * kern/x86_64/dl.c: Likewise.
1602 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1604         Fix grub-emu build on sparc64-ieee1275.
1606         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1607         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1609 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1611         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1612         (grub_reboot, grub_halt): New functions.
1614         * util/i386/pc/misc.c: Delete.  Update all users.
1615         * util/sparc64/ieee1275/misc.c: Likewise.
1616         * util/powerpc/ieee1275/misc.c: Likewise.
1618 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1620         * conf/i386.rmk (setjmp_mod_SOURCES)
1621         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1622         * conf/common.rmk (setjmp_mod_SOURCES)
1623         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1624         to use $(target_cpu).
1625         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1626         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1627         * conf/powerpc-ieee1275.rmk: Likewise.
1628         * conf/sparc64-ieee1275.rmk: Likewise.
1630         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1631         $(target_cpu) for kern/$(target_cpu)/dl.c.
1632         * conf/i386-efi.rmk: Likewise.
1633         * conf/i386-ieee1275.rmk: Likewise.
1634         * conf/x86_64-efi.rmk: Likewise.
1635         * conf/i386-coreboot.rmk: Likewise.
1636         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1637         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1638         kern/$(target_cpu)/cache.S.
1639         * conf/sparc64-ieee1275.rmk: Likewise.
1641 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1643         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1644         type to `grub_uint8_t', and adjust `padding9' accordingly.
1646 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1648         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1650         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1651         assembly in final jump, using register constraints.
1653         (grub_linux_boot): For text mode, initialize `have_vga' using
1654         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1656         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1657         right before the final jump.
1659         Set `video_mode' to 0x3.
1661         Document initialization of `video_page', `video_mode' and
1662         `video_ega_bx'.
1664 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1666         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1667         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1668         and set GRUB_LINUX_FLAG_QUIET appropriately.
1670 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1672         Fix build on Debian / sparc.
1674         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1676 2009-06-28  Pavel Roskin  <proski@gnu.org>
1678         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1679         fix a warning.
1681         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1683 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1685         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1686         `err'.
1688 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1690         Revert r2338.
1692         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1693         file can't be opened.  grub_file_open() is already supposed to set
1694         grub_errno / grub_errmsg appropriately.
1695         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1697 2009-06-27  Pavel Roskin  <proski@gnu.org>
1698 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1700         * include/grub/dl.h: Include grub/elf.h.
1701         (struct grub_dl): Add symtab field.
1702         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1703         GRUB_MODULES_MACHINE_READONLY.
1704         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1705         of the header for read-only modules.
1706         (grub_dl_unload): Free mod->symtab for read-only modules.
1707         * kern/i386/dl.c: Use mod->symtab.
1708         * kern/powerpc/dl.c: Likewise.
1709         * kern/sparc64/dl.c: Likewise.
1710         * kern/x86_64/dl.c: Likewise.
1712         * conf/i386-qemu.rmk: New file.
1713         * kern/i386/qemu/startup.S: Likewise.
1714         * kern/i386/qemu/mmap.c: Likewise.
1715         * boot/i386/qemu/boot.S: Likewise.
1716         * include/grub/i386/qemu/time.h: Likewise.
1717         * include/grub/i386/qemu/serial.h: Likewise.
1718         * include/grub/i386/qemu/kernel.h: Likewise.
1719         * include/grub/i386/qemu/console.h: Likewise.
1720         * include/grub/i386/qemu/boot.h: Likewise.
1721         * include/grub/i386/qemu/init.h: Likewise.
1722         * include/grub/i386/qemu/machine.h: Likewise.
1723         * include/grub/i386/qemu/loader.h: Likewise.
1724         * include/grub/i386/qemu/memory.h: Likewise.
1726         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1727         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1728         [qemu] (pkglib_IMAGES): Add `boot.img'.
1729         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1730         [qemu] (boot_img_FORMAT): New variables.
1731         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1732         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1733         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1734         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1735         [qemu] (kernel_img_FORMAT): New variables.
1737         * configure.ac: Recognise `i386-qemu'.
1739         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1740         (for no compression).
1741         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1742         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1743         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1744         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1745         ifdefs).
1747 2009-06-27  Pavel Roskin  <proski@gnu.org>
1749         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1750         read.
1751         * efiemu/prepare32.c: Likewise.
1752         * efiemu/prepare64.c: Likewise.
1754 2009-06-26  Pavel Roskin  <proski@gnu.org>
1756         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1757         * include/grub/elf.h: Define symbols without "32" or "64" based
1758         on GRUB_TARGET_WORDSIZE.
1759         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1760         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1761         ELF definitions.
1762         * efiemu/loadcore64.c: Likewise.
1763         * loader/i386/bsd32.c: Likewise.
1764         * loader/i386/bsd64.c: Likewise.
1765         * kern/dl.c: Remove own ELF definitions.
1766         * util/i386/efi/grub-mkimage.c: Likewise.
1768 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
1770         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1771         segment 0x0 unconditionally, because the reference generated by
1772         GAS is an absolute address.
1774 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1776         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1777         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1779 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1781         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1782         indexes.  Check for -f explicitly.
1783         (search_file): Improve error message.
1784         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1786 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1788         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1789         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
1791 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1793         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1794         * conf/i386-ieee1275.rmk: Likewise.
1795         * conf/i386-coreboot.rmk: Likewise.
1797         * kern/i386/pc/startup.S (grub_stop): Remove function.
1798         * kern/i386/ieee1275/startup.S: Likewise.
1799         * kern/i386/coreboot/startup.S: Likewise.
1800         * kern/i386/misc.S (grub_stop): New function.
1802 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1804         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1805         * kern/i386/realmode.S (real_to_prot): ... to here.
1807 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1809         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1810         with `kernel.img'.
1811         (kernel_elf_SOURCES): Rename to ...
1812         (kernel_img_SOURCES): ... this.
1813         (kernel_elf_HEADERS): Rename to ...
1814         (kernel_img_HEADERS): ... this.  Update all users.
1815         (kernel_elf_ASFLAGS): Rename to ...
1816         (kernel_img_ASFLAGS): ... this.
1817         (kernel_elf_CFLAGS): Rename to ...
1818         (kernel_img_CFLAGS): ... this.
1819         (kernel_elf_LDFLAGS): Rename to ...
1820         (kernel_img_LDFLAGS): ... this.
1821         * conf/i386-coreboot.rmk: Likewise.
1822         * conf/powerpc-ieee1275.rmk: Likewise.
1824         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1825         with "kernel.img".
1827 2009-06-21  Pavel Roskin  <proski@gnu.org>
1829         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1830         to match nested functions.
1831         * loader/sparc64/ieee1275/linux.c: Likewise.
1833         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1835 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1837         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1838         all i386 platforms.
1840 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1842         Fix asm file handling on ELF, and remove workarounds.
1844         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1845         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1846         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1847         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1849 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
1851         Load BSD ELF modules
1853         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1854         and loader/i386/bsd64.c
1855         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1856         (FREEBSD_MODTYPE_ELF_MODULE): New definition
1857         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1858         (grub_freebsd_load_elfmodule32): New declaration
1859         (grub_freebsd_load_elfmoduleobj64): Likewise
1860         (grub_freebsd_load_elf_meta32): Likewise
1861         (grub_freebsd_load_elf_meta64): Likewise
1862         (grub_freebsd_add_meta): Likewise
1863         (grub_freebsd_add_meta_module): Likewise
1864         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1865         (grub_freebsd_add_meta_module): Likewise and move module-specific
1866         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1867         (grub_cmd_freebsd): Add elf-kernel specific parts
1868         based on grub_freebsd_add_meta_module
1869         (grub_cmd_freebsd_module): Add type parsing moved from
1870         grub_freebsd_add_meta_module
1871         (grub_cmd_freebsd_module_elf): New function
1872         (cmd_freebsd_module_elf): New variable
1873         (GRUB_MOD_INIT): Register freebsd_module_elf
1874         * loader/i386/bsd32.c: New file
1875         * loader/i386/bsd64.c: Likewise
1876         * loader/i386/bsdXX.c: Likewise
1877         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1878         (grub_elf64_load): Likewise
1879         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1880         All users updated
1881         (grub_elf64_load_hook_t): Likewise
1883 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
1885         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1886         variable.
1887         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1888         don't write a menu entry for recovery mode.
1890 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1892         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1893         after it's no longer needed.
1895 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1897         * include/grub/i386/loader.h (grub_linux_prot_size)
1898         (grub_linux_tmp_addr, grub_linux_real_addr)
1899         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1900         GRUB_MACHINE_PCBIOS.
1901         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1902         common grub_util_info() call to ...
1903         (generate_image): ... here.
1904         Fix use of uninitialized memory, comparison of signed with
1905         unsigned integers and memory leak.
1906         Remove bogus module address message.
1908 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
1910         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1911         grub_raid_register
1912         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1914 2009-06-19  Pavel Roskin  <proski@gnu.org>
1916         * configure.ac: Remove stray AC_MSG_CHECKING.
1918 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
1920         * disk/scsi.c (grub_scsi_open): use continue instead of big if
1922 2009-06-18  Pavel Roskin  <proski@gnu.org>
1924         * conf/common.rmk: Add fs_file.mod.
1925         * disk/fs_file.c: New file.
1926         * include/grub/disk.h (enum grub_disk_dev_id): Add
1927         GRUB_DISK_DEVICE_FILE_ID.
1929 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1931         Fix build with Apple's toolchain. Part 2
1933         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1934         a fake start
1936 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1938         Fix build with Apple's toolchain. Part 1
1940         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1941         for long calls
1942         * configure.ac: remove a leftover AC_MSG_RESULT
1943         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1944         Apple's toolchain
1946 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1948         Fix warnings
1950         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1951         (decomp_block): initialize ch
1952         use grub_memcpy instead of memcpy
1954 2009-06-17  Pavel Roskin  <proski@gnu.org>
1956         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1957         version, use declarations needed to use vga_text as the startup
1958         console.
1960         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1961         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1962         the kernel.
1963         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1964         and grub_at_keyboard_fini(), it's done on module load and
1965         unload.
1967 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
1969         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1970         file can't be found.
1971         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1973 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1975         Fix newline handling
1977         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1978         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1979         (grub_script_yylex): don't segfault on unterminated script
1980         newline terminates command and variable
1982 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1984         avoid double grub_adjust_range call. Bug reported by David Simner
1986         * kern/disk.c (grub_disk_write): change to raw disk access before
1987         calling disk_read
1989 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
1991         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1992         spaces, for the benefit of help2man.
1993         * util/i386/efi/grub-mkimage.c (usage): Likewise.
1995 2009-06-16  Pavel Roskin  <proski@gnu.org>
1997         * kern/i386/halt.c: Include grub/machine/init.h.
1998         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
2000 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
2002         * util/grub.d/30_os-prober.in: Use ${root} in the generated
2003         drivemap menuentry.
2005 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
2007         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2008         `echo' command.
2010 2009-06-16  Pavel Roskin  <proski@gnu.org>
2012         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
2013         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
2014         save %dx, we only need %dl and we never change it.
2015         * boot/i386/pc/cdboot.S: Don't set the root drive.
2016         * boot/i386/pc/pxeboot.S: Likewise.
2017         * include/grub/i386/pc/boot.h: Remove
2018         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2019         GRUB_BOOT_MACHINE_DRIVE_CHECK.
2020         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2021         * kern/i386/pc/init.c (make_install_device): Remove references
2022         to grub_root_drive.
2023         * kern/i386/pc/startup.S: Likewise.
2024         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2026 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2028         xnu_uuid command
2030         * commands/xnu_uuid.c: new file
2031         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2032         (xnu_uuid_mod_SOURCES): new variable
2033         (xnu_uuid_mod_CFLAGS): likewise
2034         (xnu_uuid_mod_LDFLAGS): likewise
2035         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2036         * conf/i386-ieee1275.rmk: likewise
2037         * conf/i386-pc.rmk: likewise
2038         * conf/powerpc-ieee1275.rmk: likewise
2039         * conf/sparc64-ieee1275.rmk: likewise
2040         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2042 2009-06-16  Pavel Roskin  <proski@gnu.org>
2044         * configure.ac: Avoid '==' in test command, it's not portable.
2046 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2048         Probe command
2050         * commands/probe.c: new file
2051         * conf/common.rmk (pkglib_MODULES): add probe.mod
2052         (probe_mod_SOURCES): new variable
2053         (probe_mod_CFLAGS): likewise
2054         (probe_mod_LDFLAGS): likewise
2055         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2056         * conf/i386-ieee1275.rmk: likewise
2057         * conf/i386-pc.rmk: likewise
2058         * conf/powerpc-ieee1275.rmk: likewise
2059         * conf/sparc64-ieee1275.rmk: likewise
2061 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2063         Fix handling of string like \"hello\" and "a
2064         b"
2066         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2067         (grub_script_yylex): fix parsing of quoting, escaping and newline
2069 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2071         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2072         handling
2074 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2076         * util/grub-mkconfig.in: Fix parsing of --output option.
2078 2009-06-12  Pavel Roskin  <proski@gnu.org>
2080         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2081         genmk.rb don't need to be generated or installed.
2083 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2085         * commands/i386/pc/drivemap_int13h.S: add more comments
2087 2009-06-11  Pavel Roskin  <proski@gnu.org>
2089         * Makefile.in (uninstall): Uninstall manuals.
2091         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2092         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2093         and update-grub_lib in two places.
2094         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2096         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2097         a compiler warning.
2099         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2100         `entry_lo' to fix variable shadowing.
2102 2009-06-11  Christian Franke  <franke@computer.org>
2104         * kern/misc.c (__enable_execute_stack): Add missing return type
2105         to prevent gcc warning.
2107 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2109         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2111 2009-06-11  Pavel Roskin  <proski@gnu.org>
2113         * Makefile.in: Don't rely on any scripts being executable.
2114         Always use $(SHELL) to run shell scripts.
2116         * configure.ac: Always define ___main if using -nostdlib.  This
2117         fixes tests on Cygwin.
2119 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2121         UDF fix
2123         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2124         is in bytes and not in blocks
2126 2009-06-11  Pavel Roskin  <proski@gnu.org>
2128         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2129         warning.
2131 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2133         * util/grub.d/30_os-prober.in: Fix a comment. Source
2134         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2135         to set the root device.  Place drivemap command in the generated
2136         chain entry.
2138 2009-06-11  Pavel Roskin  <proski@gnu.org>
2140         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2141         have long been resolved.
2143 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2145         * util/grub.d/10_linux.in: Capitalise "Linux".
2147         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2149 2009-06-11  Pavel Roskin  <proski@gnu.org>
2151         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2152         fix a gcc warning and ensure that the function won't ever exit.
2154         * kern/i386/ieee1275/init.c: Add missing prototype for
2155         grub_stop_floppy().
2157         * loader/ieee1275/multiboot2.c [__i386__]: Include
2158         grub/cpu/multiboot.h.
2160         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2161         casts to short - they are not portable and cause warnings.  Fix
2162         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2164 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2166         Drivemap fixes
2168         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2169         new function
2170         (grub_get_root_biosnumber_saved): new variable
2171         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2172         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2173         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2174         %dx after the call if necessary
2175         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2176         (boot_mod_SOURCES): remove
2177         (boot_mod_CFLAGS): remove
2178         (boot_mod_LDFLAGS): remove
2179         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2180         (boot_mod_SOURCES): new variable
2181         (boot_mod_CFLAGS): likewise
2182         (boot_mod_LDFLAGS): likewise
2183         * conf/i386-efi.rmk: likewise
2184         * conf/i386-ieee1275.rmk: likewise
2185         * conf/i386-pc.rmk: likewise
2186         * conf/powerpc-ieee1275.rmk: likewise
2187         * conf/sparc64-ieee1275.rmk: likewise
2188         * conf/x86_64-efi.rmk: likewise
2189         * include/grub/i386/pc/biosnum.h: new file
2190         * lib/i386/pc/biosnum.c: likewise
2191         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2192         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2193         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2195 2009-06-10  Pavel Roskin  <proski@gnu.org>
2197         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2198         Use separate variables.  Read only the file size at the end, but
2199         not the checksum that we don't use.
2201         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2202         Adjust all callers.
2204         * kern/ieee1275/openfw.c: Remove libc includes.
2205         * kern/ieee1275/cmain.c: Likewise.
2206         * include/grub/ieee1275/ieee1275.h: Likewise.
2208         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2209         compiler warnings.
2211 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2213         * Makefile.in: Remove all trailing whitespace.
2214         * conf/i386-pc.rmk: Likewise.
2215         * conf/powerpc-ieee1275.rmk: Likewise.
2216         * conf/sparc64-ieee1275.rmk: Likewise.
2217         * docs/grub.texi: Likewise.
2218         * docs/texinfo.tex: Likewise.
2219         * disk/fs_uuid.c: Likewise.
2220         * disk/lvm.c: Likewise.
2221         * disk/scsi.c: Likewise.
2222         * disk/ata.c: Likewise.
2223         * disk/ieee1275/ofdisk.c: Likewise.
2224         * disk/i386/pc/biosdisk.c: Likewise.
2225         * disk/host.c: Likewise.
2226         * disk/raid.c: Likewise.
2227         * disk/efi/efidisk.c: Likewise.
2228         * disk/usbms.c: Likewise.
2229         * disk/memdisk.c: Likewise.
2230         * disk/loopback.c: Likewise.
2231         * kern/powerpc/dl.c: Likewise.
2232         * kern/device.c: Likewise.
2233         * kern/dl.c: Likewise.
2234         * kern/sparc64/dl.c: Likewise.
2235         * kern/ieee1275/ieee1275.c: Likewise.
2236         * kern/term.c: Likewise.
2237         * kern/fs.c: Likewise.
2238         * kern/i386/dl.c: Likewise.
2239         * kern/i386/pc/startup.S: Likewise.
2240         * kern/i386/pc/init.c: Likewise.
2241         * kern/i386/pc/mmap.c: Likewise.
2242         * kern/i386/pc/lzo1x.S: Likewise.
2243         * kern/i386/ieee1275/init.c: Likewise.
2244         * kern/i386/realmode.S: Likewise.
2245         * kern/i386/tsc.c: Likewise.
2246         * kern/partition.c: Likewise.
2247         * kern/corecmd.c: Likewise.
2248         * kern/file.c: Likewise.
2249         * kern/efi/efi.c: Likewise.
2250         * kern/efi/init.c: Likewise.
2251         * kern/efi/mm.c: Likewise.
2252         * kern/main.c: Likewise.
2253         * kern/err.c: Likewise.
2254         * kern/env.c: Likewise.
2255         * kern/disk.c: Likewise.
2256         * kern/generic/millisleep.c: Likewise.
2257         * kern/generic/rtc_get_time_ms.c: Likewise.
2258         * kern/misc.c: Likewise.
2259         * kern/parser.c: Likewise.
2260         * genmk.rb: Likewise.
2261         * configure.ac: Likewise.
2262         * boot/i386/pc/diskboot.S: Likewise.
2263         * boot/i386/pc/pxeboot.S: Likewise.
2264         * boot/i386/pc/boot.S: Likewise.
2265         * boot/i386/pc/lnxboot.S: Likewise.
2266         * boot/i386/pc/cdboot.S: Likewise.
2267         * parttool/pcpart.c: Likewise.
2268         * video/readers/tga.c: Likewise.
2269         * video/video.c: Likewise.
2270         * video/bitmap.c: Likewise.
2271         * lib/envblk.c: Likewise.
2272         * lib/i386/setjmp.S: Likewise.
2273         * fs/xfs.c: Likewise.
2274         * fs/afs.c: Likewise.
2275         * fs/fat.c: Likewise.
2276         * fs/ntfs.c: Likewise.
2277         * fs/udf.c: Likewise.
2278         * fs/affs.c: Likewise.
2279         * fs/iso9660.c: Likewise.
2280         * fs/hfs.c: Likewise.
2281         * fs/fshelp.c: Likewise.
2282         * fs/ext2.c: Likewise.
2283         * fs/jfs.c: Likewise.
2284         * fs/reiserfs.c: Likewise.
2285         * fs/hfsplus.c: Likewise.
2286         * fs/minix.c: Likewise.
2287         * fs/cpio.c: Likewise.
2288         * fs/sfs.c: Likewise.
2289         * fs/ufs.c: Likewise.
2290         * efiemu/prepare.c: Likewise.
2291         * efiemu/loadcore_common.c: Likewise.
2292         * efiemu/runtime/efiemu.sh: Likewise.
2293         * efiemu/runtime/efiemu.S: Likewise.
2294         * efiemu/runtime/efiemu.c: Likewise.
2295         * efiemu/pnvram.c: Likewise.
2296         * efiemu/main.c: Likewise.
2297         * efiemu/i386/pc/cfgtables.c: Likewise.
2298         * efiemu/i386/loadcore64.c: Likewise.
2299         * efiemu/i386/loadcore32.c: Likewise.
2300         * efiemu/loadcore.c: Likewise.
2301         * efiemu/symbols.c: Likewise.
2302         * efiemu/mm.c: Likewise.
2303         * include/grub/autoefi.h: Likewise.
2304         * include/grub/datetime.h: Likewise.
2305         * include/grub/term.h: Likewise.
2306         * include/grub/hfs.h: Likewise.
2307         * include/grub/lvm.h: Likewise.
2308         * include/grub/i386/tsc.h: Likewise.
2309         * include/grub/i386/linux.h: Likewise.
2310         * include/grub/i386/xnu.h: Likewise.
2311         * include/grub/i386/efiemu.h: Likewise.
2312         * include/grub/i386/pc/biosdisk.h: Likewise.
2313         * include/grub/i386/pc/memory.h: Likewise.
2314         * include/grub/i386/pc/vbe.h: Likewise.
2315         * include/grub/parttool.h: Likewise.
2316         * include/grub/video.h: Likewise.
2317         * include/grub/memory.h: Likewise.
2318         * include/grub/fs.h: Likewise.
2319         * include/grub/partition.h: Likewise.
2320         * include/grub/xnu.h: Likewise.
2321         * include/grub/efi/api.h: Likewise.
2322         * include/grub/efi/pe32.h: Likewise.
2323         * include/grub/efi/memory.h: Likewise.
2324         * include/grub/multiboot.h: Likewise.
2325         * include/grub/usbdesc.h: Likewise.
2326         * include/grub/multiboot2.h: Likewise.
2327         * include/grub/acpi.h: Likewise.
2328         * include/grub/efiemu/efiemu.h: Likewise.
2329         * include/grub/disk.h: Likewise.
2330         * include/grub/ieee1275/ieee1275.h: Likewise.
2331         * include/grub/net.h: Likewise.
2332         * include/grub/machoload.h: Likewise.
2333         * include/grub/macho.h: Likewise.
2334         * include/multiboot.h: Likewise.
2335         * genmoddep.awk: Likewise.
2336         * normal/main.c: Likewise.
2337         * normal/menu_entry.c: Likewise.
2338         * normal/menu_viewer.c: Likewise.
2339         * normal/completion.c: Likewise.
2340         * normal/cmdline.c: Likewise.
2341         * normal/misc.c: Likewise.
2342         * normal/datetime.c: Likewise.
2343         * bus/usb/usbtrans.c: Likewise.
2344         * bus/usb/ohci.c: Likewise.
2345         * bus/usb/uhci.c: Likewise.
2346         * bus/usb/usb.c: Likewise.
2347         * mmap/efi/mmap.c: Likewise.
2348         * mmap/i386/pc/mmap_helper.S: Likewise.
2349         * mmap/i386/pc/mmap.c: Likewise.
2350         * mmap/i386/mmap.c: Likewise.
2351         * mmap/i386/uppermem.c: Likewise.
2352         * mmap/mmap.c: Likewise.
2353         * commands/acpi.c: Likewise.
2354         * commands/echo.c: Likewise.
2355         * commands/blocklist.c: Likewise.
2356         * commands/loadenv.c: Likewise.
2357         * commands/usbtest.c: Likewise.
2358         * commands/boot.c: Likewise.
2359         * commands/parttool.c: Likewise.
2360         * commands/search.c: Likewise.
2361         * commands/cat.c: Likewise.
2362         * commands/i386/pc/play.c: Likewise.
2363         * commands/i386/pc/drivemap.c: Likewise.
2364         * commands/i386/pc/vbeinfo.c: Likewise.
2365         * commands/i386/pc/acpi.c: Likewise.
2366         * commands/i386/pc/vbetest.c: Likewise.
2367         * commands/ls.c: Likewise.
2368         * commands/cmp.c: Likewise.
2369         * commands/test.c: Likewise.
2370         * commands/efi/acpi.c: Likewise.
2371         * commands/gptsync.c: Likewise.
2372         * commands/help.c: Likewise.
2373         * partmap/amiga.c: Likewise.
2374         * partmap/apple.c: Likewise.
2375         * partmap/acorn.c: Likewise.
2376         * partmap/pc.c: Likewise.
2377         * partmap/sun.c: Likewise.
2378         * partmap/gpt.c: Likewise.
2379         * script/sh/lexer.c: Likewise.
2380         * script/sh/function.c: Likewise.
2381         * font/font.c: Likewise.
2382         * font/font_cmd.c: Likewise.
2383         * loader/powerpc/ieee1275/linux.c: Likewise.
2384         * loader/efi/chainloader.c: Likewise.
2385         * loader/multiboot_loader.c: Likewise.
2386         * loader/macho.c: Likewise.
2387         * loader/i386/multiboot.c: Likewise.
2388         * loader/i386/linux.c: Likewise.
2389         * loader/i386/pc/linux.c: Likewise.
2390         * loader/i386/pc/multiboot2.c: Likewise.
2391         * loader/i386/pc/chainloader.c: Likewise.
2392         * loader/i386/pc/xnu.c: Likewise.
2393         * loader/i386/bsd_trampoline.S: Likewise.
2394         * loader/i386/efi/linux.c: Likewise.
2395         * loader/i386/multiboot_elfxx.c: Likewise.
2396         * loader/i386/bsd_helper.S: Likewise.
2397         * loader/i386/bsd.c: Likewise.
2398         * loader/i386/linux_trampoline.S: Likewise.
2399         * loader/i386/xnu_helper.S: Likewise.
2400         * loader/i386/xnu.c: Likewise.
2401         * loader/i386/bsd_pagetable.c: Likewise.
2402         * loader/i386/multiboot_helper.S: Likewise.
2403         * loader/xnu.c: Likewise.
2404         * loader/xnu_resume.c: Likewise.
2405         * io/gzio.c: Likewise.
2406         * term/efi/console.c: Likewise.
2407         * term/terminfo.c: Likewise.
2408         * term/ieee1275/ofconsole.c: Likewise.
2409         * term/i386/pc/serial.c: Likewise.
2410         * term/i386/pc/vesafb.c: Likewise.
2411         * term/i386/pc/vga.c: Likewise.
2412         * term/usb_keyboard.c: Likewise.
2413         * term/gfxterm.c: Likewise.
2414         * aclocal.m4: Likewise.
2415         * util/lvm.c: Likewise.
2416         * util/grub.d/30_os-prober.in: Likewise.
2417         * util/grub.d/10_hurd.in: Likewise.
2418         * util/console.c: Likewise.
2419         * util/grub-macho2img.c: Likewise.
2420         * util/grub-probe.c: Likewise.
2421         * util/hostfs.c: Likewise.
2422         * util/i386/pc/grub-mkimage.c: Likewise.
2423         * util/i386/pc/grub-setup.c: Likewise.
2424         * util/i386/efi/grub-mkimage.c: Likewise.
2425         * util/grub-mkconfig.in: Likewise.
2426         * util/raid.c: Likewise.
2427         * util/resolve.c: Likewise.
2428         * util/grub-mkdevicemap.c: Likewise.
2429         * util/grub-emu.c: Likewise.
2430         * util/getroot.c: Likewise.
2431         * util/hostdisk.c: Likewise.
2432         * util/usb.c: Likewise.
2433         * util/grub-editenv.c: Likewise.
2434         * util/misc.c: Likewise.
2436 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2438         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2439         `genparttoollist.sh'.
2440         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2441         Add `*.sh' to the list find searches for and change `mdate.sh'
2442         to `mdate-sh'.
2444 2009-06-10  Pavel Roskin  <proski@gnu.org>
2446         * include/grub/multiboot2.h: Provide compatibility defines for
2447         multiboot2.h.
2448         * include/multiboot2.h: Include stdint.h only if needed, using
2449         angle brackets.
2450         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2451         grub/multiboot2.h.
2452         * loader/ieee1275/multiboot2.c: Likewise.
2453         * loader/multiboot2.c: Likewise.
2454         * loader/multiboot_loader.c: Likewise.
2456         * configure.ac: Use -nostdlib when probing for the target.  It
2457         should not be required to have libc for the target.
2459         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2460         they fail without libc headers for the target.
2461         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2462         exports.
2463         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2464         preprocessor conditionals.
2466         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2467         build system doesn't need to be aware of the tar.c internals.
2469 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2471         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2473 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2475         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2476         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2478 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2480         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2481         aren't available if ata.mod gets used.
2483 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2485         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2486         initialising controller.
2487         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2489 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2491         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2492         to choose between ata and biosdisk module on i386-pc.
2494 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2496         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2497         Subclass and Programming Interface fields in terms of the 3 byte
2498         Class Code register.
2499         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2501         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2502         interface is OHCI.  Add grub_dprintf for symmetry with
2503         bus/usb/uhci.c.
2504         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2505         interface is UHCI.  Add interf variable for programming
2506         interface.  Print interface with class/subclass.
2508         * bus/usb/ohci.c: Set interf with correct field.
2510         * bus/usb/uhci.c: Remove unneeded doubled lines.
2511         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2512         Remove whitespace inside comment.
2514 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2516         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2517         as fallback an equivalent option without depth.
2519 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2521         Not fail if unable to retrieve C/H/S on LBA disks
2523         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2524         if unable to retrieve C/H/S on LBA disks
2526 2009-06-08  Pavel Roskin  <proski@gnu.org>
2528         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2529         about aliasing.
2531 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2533         * Makefile.in (uninstall): Remove all $lib_DATA files.
2535 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2537         Bugfix: install on partitionless device
2539         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2540         is a whole disk
2542 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2544         * Makefile.in (uninstall): Remove all $include_DATA files.
2546 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2548         * commands/true.c: New file.  Implement the true and false commands.
2549         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2550         (true_mod_SOURCES): New variable.
2551         (true_mod_CFLAGS): Likewise.
2552         (true_mod_LDFLAGS): Likewise.
2554 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2556         Optimized font character lookup using binary search instead of linear
2557         search.  Fonts now are required to have the character index ordered by
2558         code point.
2560         * font/font.c (load_font_index): Verify that fonts have ordered
2561         character indices.
2562         (find_glyph): Use binary search instead of linear search to find a
2563         character in a font.
2565 2009-06-05  Michael Scherer  <misc@mandriva.org>
2567         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2568         uses case sensitive btree.
2569         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2570         only for case insensitive filesystems.
2572 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2574         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2575         * conf/common.rmk (search_mod_CFLAGS): likewise
2577 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2579         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2580         compensate a compiler bug
2582 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2584         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2585         instead of '\b'
2587 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2589         Definitions for creating asm symbols with Apple's CC
2591         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2592         [APPLE_CC] (VARIABLE): likewise
2594 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2596         Disable lnxboot.img when compiled
2597         with Apple's CC
2599         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2600         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2601         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2602         [! APPLE_CC] (CODE_LENG): skip
2603         [! APPLE_CC] (setup_sects): likewise
2604         [! APPLE_CC]: skip filling
2606 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2608         Address in trampolines based on 32-bit registers when compiled
2609         with Apple's CC
2611         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2612         for addresses
2613         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2615 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2617         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2619         * kern/misc.c [APPLE_CC] (memcpy): new function
2620         [APPLE_CC] (memmove): likewise
2621         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2622         (memcpy): define alias conditionally on !APPLE_CC
2623         (memset): likewise
2624         (abort): likewise
2625         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2626         APPLE_CC are defined
2627         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2628         (grub_assert_fail): make prototype conditional
2630 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2632         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2634         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2635         grub-macho2img
2636         (CLEANFILES): add grub-macho2img
2637         (grub_macho2img_SOURCES): new variable
2638         * kern/i386/pc/startup.S (bss_start): new variable
2639         (bss_end): likewise
2640         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2641         * util/grub-macho2img.c: new file
2643 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2645         Use objconv when compiling with Apple's CC
2647         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2648         (efiemu64.o): likewise
2649         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2650         when compiling with Apple's CC
2651         (efiemu64_s.o): likewise
2652         * configure.ac: check for objconv when compiling with Apple's CC
2653         * genmk.rb: use objconv for modules when compiled with Apple's CC
2655 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2657         Define segment as well as section when compiling with
2658         Apple's CC
2660         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2661         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2662         (efiemu_convert_pointer): likewise
2663         (efiemu_set_virtual_address_map): likewise
2664         (efiemu_convert_pointer): likewise
2665         (efiemu_getcrc32): likewise
2666         (init_crc32_table): likewise
2667         (reflect): likewise
2668         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2669         (GRUB_MOD_DEP): likewise
2671 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2673         Allow a compilation without -mcmodel=large
2675         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2676         when compiled without -mcmodel=large
2677         (filter_memory_map): remove memory post 4 GiB when compiled
2678         without -mcmodel=large
2679         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2680         TARGET_CFLAGS when -mcmodel=large isn't supported
2682 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2684         Remove nested functions in efiemu core
2686         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2688 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2690         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2692         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2693         temporary storage
2694         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2695         using Apple's CC
2696         (grub_cpu_is_tsc_supported): likewise
2697         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2699 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2701         Absolute addressing through constant with Apple's cc
2703         * kern/i386/pc/startup.S: Define necessary constants
2704         and address through it when using ABS with Apple's CC
2705         * boot/i386/pc/diskboot.S: likewise
2706         * boot/i386/pc/boot.S: likewise
2707         * boot/i386/pc/lnxboot.S: likewise
2708         * boot/i386/pc/cdboot.S: likewise
2709         * mmap/i386/pc/mmap_helper.S: likewise
2710         * commands/i386/pc/drivemap_int13h.S: likewise
2712 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2714         Check if compiler is apple cc
2716         * Makefile.in (ASFLAGS): new variable
2717         (TARGET_ASFLAGS): likewise
2718         (TARGET_MODULE_FORMAT): likewise
2719         (TARGET_APPLE_CC): likewise
2720         (OBJCONV): likewise
2721         (TARGET_IMG_CFLAGS): likewise
2722         (TARGET_CPPFLAGS): add includedir
2723         * configure.ac: call grub_apple_cc and grub_apple_target_cc
2724         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2725         Check for linker script only if compiler isn't Apple's CC
2726         (TARGET_MODULE_FORMAT): set
2727         (TARGET_APPLE_CC): likewise
2728         (TARGET_ASFLAGS): likewise
2729         (ASFLAGS): likewise
2730         Check for objcopy only if compiler isn't Apple's CC
2731         Check for BSS symbol only if compiler isn't Apple's CC
2732         * genmk.rb: adapt nm options if we use Apple's utils
2733         * aclocal.m4 (grub_apple_cc): new test
2734         (grub_apple_target_cc): likewise
2736 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2738         Simplify sed expressions and improve awk
2740         * Makefile.in (install-local): simplify sed expression
2741         * gencmdlist.sh: likewise
2742         * genmoddep.awk: avoid adding module as a dependency of itself
2744 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2746         Add missing start symbols
2748         * boot/i386/pc/boot.S: add start
2749         * boot/i386/pc/pxeboot.S: likewise
2751 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2753         Fix wrong assumptions with grub-mkimage on EFI
2755         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2756         (relocate_addresses): consider both r_addend and value at offset
2757         (make_mods_section): zerofill modinfo and header
2758         (convert_elf): write prefix here
2760 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2762         Use .asciz instead of .string
2764         * i386/pc/diskboot.S: use .asciz instead of .string
2765         * i386/pc/boot.S: likewise
2766         * include/grub/dl.h (GRUB_MOD_DEP): likewise
2767         (GRUB_MOD_NAME): likewise
2769 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2771         gfxpayload support
2773         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2774         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2775         (grub_video_setup): remove
2776         (grub_video_set_mode): new prototype
2777         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2778         (vid_mode): remove
2779         (linux_vesafb_res): compile only on PCBIOS
2780         (grub_linux_boot): support gfxpayload
2781         * loader/i386/pc/xnu.c (video_hook): new function
2782         (grub_xnu_set_video): support gfxpayload
2783         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2784         (DEFAULT_VIDEO_HEIGHT): likewise
2785         (DEFAULT_VIDEO_FLAGS): likewise
2786         (DEFAULT_VIDEO_MODE): new definition
2787         (video_hook): new function
2788         (grub_gfxterm_init): use grub_video_set_mode
2789         * util/grub.d/30_os-prober.in: remove explicit modesetting before
2790         loading xnu
2791         * video/video.c (grub_video_setup): removed
2792         (grub_video_set_mode): new function based on grub_gfxterm_init and
2793         grub_video_setup
2795 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2797         Avoid calling biosdisk in drivemap
2799         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2800         (revparse_biosdisk): likewise
2801         (list_mappings): derive name from id directly
2802         (grub_cmd_drivemap): use tryparse_diskstring
2804 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2806         Script fixes
2808         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2809         (grub_lexer_param): add tokenonhold
2810         (grub_script_create_cmdline): remove cmdline. All callers updated
2811         (grub_script_function_create): make functionname
2812         grub_script_arg. All callers updated
2813         (grub_script_execute_argument_to_string): new prototype
2814         * kern/parser.c (state_transitions): reorder
2815         (grub_parser_cmdline_state): fix a bug and make more compact
2816         * script/sh/execute.c (grub_script_execute_argument_to_string):
2817         make global
2818         (grub_script_execute_cmdline): use new format
2819         * script/sh/function.c (grub_script_function_create): make functionname
2820         grub_script_arg. All callers updated
2821         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2822         (grub_script_yylex): remove
2823         (grub_script_yylex2): renamed to ...
2824         (grub_script_yylex): ...renamed
2825         parse the expressions like a${b}c
2826         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2827         (GRUB_PARSER_TOKEN_VAR): remove
2828         (GRUB_PARSER_TOKEN_NAME): likewise
2829         ("if"): declare as typeless
2830         ("while"): likewise
2831         ("function"): likewise
2832         ("else"): likewise
2833         ("then"): likewise
2834         ("fi"): likewise
2835         (text): remove
2836         (argument): likewise
2837         (script): accept empty scripts and make exit on error
2838         (arguments): use GRUB_PARSER_TOKEN_ARG
2839         (function): likewise
2840         (command): move error handling to script
2841         (menuentry): move grub_script_lexer_ref before
2842         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2843         argument. All callers updated
2845 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2847         Prevent GRUB from probing floppies during boot.
2849         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2850         * commands/search.c (options): Add --no-floppy.
2851         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2852         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2853         --no-floppy when searching for UUIDs.
2855 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2857         Simplify the code duplication in commands/search.c.
2859         * commands/search.c (search_label, search_fs_uuid): Merge into ...
2860         (search_fs): ... this.  Update all users.
2862 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
2864         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2866 2009-05-28  Pavel Roskin  <proski@gnu.org>
2868         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2869         Remove the original symlink explicitly.
2871         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2872         just one slash.  That's how grub_fshelp_find_file() does it.
2874 2009-05-26  Pavel Roskin  <proski@gnu.org>
2876         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2877         to `str'.
2879         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2880         possibly unused.
2882 2009-05-25  Christian Franke  <franke@computer.org>
2884         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2885         register.
2886         (grub_atapi_identify): Add wait after drive select.
2887         (grub_ata_identify): Do more strict status register check before
2888         calling grub_atapi_identify ().  Suppress error message if status
2889         register is 0x00 after command failure.  Add status register
2890         check after PIO read to avoid bogus identify due to stuck DRQ.
2891         Thanks to Pavel Roskin for testing.
2892         (grub_device_initialize): Remove unsafe status register check.
2893         Thanks to 'phcoder' for problem report and patch.
2894         Prevent sign extension in debug message.
2896 2009-05-23  Colin D Bennett  <colin@gibibit.com>
2898         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
2899         definition file, and functions defined in `normal/menu.c' have had
2900         their prototypes moved to `include/grub/menu.h' for consistency.
2902         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2903         from normal.h.
2904         (grub_menu_get_entry): Likewise.
2905         (grub_menu_get_timeout): Likewise.
2906         (grub_menu_set_timeout): Likewise.
2907         (grub_menu_execute_entry): Likewise.
2908         (grub_menu_execute_with_fallback): Likewise.
2909         (grub_menu_entry_run): Likewise.
2911         * include/grub/normal.h: Re-ordered and grouped function
2912         prototypes by file that the function is defined in.
2913         (grub_menu_execute_callback): Removed; moved to menu.h.
2914         (grub_menu_get_entry): Likewise.
2915         (grub_menu_get_timeout): Likewise.
2916         (grub_menu_set_timeout): Likewise.
2917         (grub_menu_execute_entry): Likewise.
2918         (grub_menu_execute_with_fallback): Likewise.
2919         (grub_menu_entry_run): Likewise.
2920         (grub_menu_addentry): Renamed from this ...
2921         (grub_normal_add_menu_entry): ... to this.
2923         * normal/main.c (grub_menu_addentry): Renamed from this ...
2924         (grub_normal_add_menu_entry): ... to this.
2926         * script/sh/execute.c (grub_script_execute_menuentry): Update
2927         reference to renamed grub_menu_addentry function.
2929 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
2931         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2933 2009-05-22  Pavel Roskin  <proski@gnu.org>
2935         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2936         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
2937         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
2938         compiling for the i386 targets, but not for the utilities.
2940         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2941         to grub_uint8_t.
2942         (grub_root_drive): Likewise.
2943         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2944         remove alignment.
2945         (grub_root_drive): Change size to byte.
2946         (grub_start_addr): Remove.
2947         (grub_end_addr): Likewise.
2948         (grub_apm_bios_info): Likewise.
2950 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
2952         * normal/i386: Remove.
2953         * normal/powerpc: Likewise.
2954         * normal/sparc64: Likewise.
2955         * normal/x86_64: Likewise.
2957 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
2959         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2960         * loader/i386/linux_trampoline.S: Fix indentation
2961         * loader/i386/xnu_helper.S: Likewise
2963 2009-05-18  Colin D Bennett  <colin@gibibit.com>
2965         Display error messages when parsing a Lua statement fails.
2966         Previously, executing a syntactically invalid statement like
2967         ")foo" or "bar;" would silently fail.
2969         * script/lua/grub_main.c (handle_lua_error): New function.
2970         (grub_lua_parse_line): Improved reporting of Lua parser and
2971         execution errors.
2973 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2975         Remove -Werror which causes build to fail on some systems
2977         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2978         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2979         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2981 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2983         trampoline for linux on 64-bit platform
2985         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2986         loader/i386/efi/linux_trampoline.S
2987         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2988         declaration
2989         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2990         here
2991         * loader/i386/linux_trampoline.S: moved here
2992         * loader/i386/efi/linux.c (allocate_pages): reserve space for
2993         trampoline
2994         (jumpvector): removed
2995         (grub_linux_trampoline_start): new declaration
2996         (grub_linux_trampoline_end): likewise
2997         (grub_linux_boot): use trampoline when on 64-bit platform
2998         * loader/i386/linux.c: likewise
3000 2009-05-16  Pavel Roskin  <proski@gnu.org>
3002         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
3003         const to avoid a warning.
3004         (grub_lua_setenv): Likewise.
3005         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3006         lmsg to fix a warning.
3008 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3010         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
3011         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3012         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3013         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3014         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3015         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3016         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3017         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3019 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3021         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3023 2009-05-16  Bean  <bean123ch@gmail.com>
3025         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3026         (lua_mod_SOURCES): New variable.
3027         (lua_mod_CFLAGS): Likewise.
3028         (lua_mod_LDFLAGS): Likewise.
3030         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3031         (setjmp_mod_SOURCES): New variable.
3032         (setjmp_mod_CFLAGS): Likewise.
3033         (setjmp_LDFLAGS): Likewise.
3035         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3036         (setjmp_mod_SOURCES): New variable.
3037         (setjmp_mod_CFLAGS): Likewise.
3038         (setjmp_LDFLAGS): Likewise.
3040         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3041         (setjmp_mod_SOURCES): New variable.
3042         (setjmp_mod_CFLAGS): Likewise.
3043         (setjmp_LDFLAGS): Likewise.
3045         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3046         (setjmp_mod_SOURCES): New variable.
3047         (setjmp_mod_CFLAGS): Likewise.
3048         (setjmp_LDFLAGS): Likewise.
3050         * normal/i386/setjmp.S: Moved from here ...
3051         * lib/i386/setjmp.S: ... Moved here
3052         * normal/x86_64/setjmp.S: Moved from here ...
3053         * lib/x86_64/setjmp.S: ... Moved here
3054         * normal/powerpc/setjmp.S: Moved from here ...
3055         * lib/powerpc/setjmp.S: ... Moved here
3056         * normal/sparc64/setjmp.S: Moved from here ...
3057         * lib/sparc64/setjmp.S: ... Moved here
3059         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3060         returns_twice in mingw.
3062         * script/lua/grub_lib.c: New file.
3063         * script/lua/grub_lib.h: Likewise.
3064         * script/lua/grub_lua.h: Likewise.
3065         * script/lua/grub_main.c: Likewise.
3066         * script/lua/lapi.c: Likewise.
3067         * script/lua/lapi.h: Likewise.
3068         * script/lua/lauxlib.c: Likewise.
3069         * script/lua/lauxlib.h: Likewise.
3070         * script/lua/lbaselib.c: Likewise.
3071         * script/lua/lcode.c: Likewise.
3072         * script/lua/lcode.h: Likewise.
3073         * script/lua/ldblib.c: Likewise.
3074         * script/lua/ldebug.c: Likewise.
3075         * script/lua/ldebug.h: Likewise.
3076         * script/lua/ldo.c: Likewise.
3077         * script/lua/ldo.h: Likewise.
3078         * script/lua/ldump.c: Likewise.
3079         * script/lua/lfunc.c: Likewise.
3080         * script/lua/lfunc.h: Likewise.
3081         * script/lua/lgc.c: Likewise.
3082         * script/lua/lgc.h: Likewise.
3083         * script/lua/linit.c: Likewise.
3084         * script/lua/liolib.c: Likewise.
3085         * script/lua/llex.c: Likewise.
3086         * script/lua/llex.h: Likewise.
3087         * script/lua/llimits.h: Likewise.
3088         * script/lua/lmathlib.c: Likewise.
3089         * script/lua/lmem.c: Likewise.
3090         * script/lua/lmem.h: Likewise.
3091         * script/lua/loadlib.c: Likewise.
3092         * script/lua/lobject.c: Likewise.
3093         * script/lua/lobject.h: Likewise.
3094         * script/lua/lopcodes.c: Likewise.
3095         * script/lua/lopcodes.h: Likewise.
3096         * script/lua/loslib.c: Likewise.
3097         * script/lua/lparser.c: Likewise.
3098         * script/lua/lparser.h: Likewise.
3099         * script/lua/lstate.c: Likewise.
3100         * script/lua/lstate.h: Likewise.
3101         * script/lua/lstring.c: Likewise.
3102         * script/lua/lstring.h: Likewise.
3103         * script/lua/lstrlib.c: Likewise.
3104         * script/lua/ltable.c: Likewise.
3105         * script/lua/ltable.h: Likewise.
3106         * script/lua/ltablib.c: Likewise.
3107         * script/lua/ltm.c: Likewise.
3108         * script/lua/ltm.h: Likewise.
3109         * script/lua/lua.h: Likewise.
3110         * script/lua/luaconf.h: Likewise.
3111         * script/lua/lualib.h: Likewise.
3112         * script/lua/lundump.c: Likewise.
3113         * script/lua/lundump.h: Likewise.
3114         * script/lua/lvm.c: Likewise.
3115         * script/lua/lvm.h: Likewise.
3116         * script/lua/lzio.c: Likewise.
3117         * script/lua/lzio.h: Likewise.
3119 2009-05-16  Bean  <bean123ch@gmail.com>
3121         * include/grub/kernel.h (grub_module_header_types): Add type
3122         OBJ_TYPE_CONFIG.
3124         * kern/main.c (grub_load_config): New function.
3125         (grub_main): Call grub_load_config to read boot config.
3127         * grub-mkimage (generate_image): New parameter config_path.
3128         (options): New option --config.
3129         (main): Parse --config option, and pass it to generate_image.
3131 2009-05-14  Christian Franke  <franke@computer.org>
3133         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3134         This fixes build on Cygwin.
3136 2009-05-14  Pavel Roskin  <proski@gnu.org>
3138         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3139         jump.  This saves two bytes, so the typical case of 2 swapped
3140         drives would fit 32 bytes.
3142 2009-05-13  Pavel Roskin  <proski@gnu.org>
3144         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3145         grub_uint32_t to avoid a warning.
3147         * loader/i386/linux.c (allocate_pages): When assigning
3148         real_mode_mem, cast through grub_size_t to fix a warning.  The
3149         code already makes sure that the value would fit a pointer.
3150         (grub_linux_setup_video): Cast render_target->data to
3151         grub_size_t to fix a warning.
3153 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3155         * commands/i386/pc/drivemap.c: New file - implement drivemap
3156         command.
3157         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3158         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3160 2009-05-13  Pavel Roskin  <proski@gnu.org>
3162         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3163         embedding_area_exists.
3165 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3167         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3168         it easier to understand / work with.
3169         Improve warning messages for cases where there's no embedding area,
3170         or when it is too small (or core.img too large).
3172 2009-05-13  Pavel Roskin  <proski@gnu.org>
3174         * loader/i386/pc/multiboot2.c: Add necessary includes for
3175         grub_multiboot2_real_boot().
3177         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3178         PX record is always little-endian.  We only need the lower 2
3179         bytes of the mode.
3181         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3182         facilitate code reuse.
3183         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3184         fixes a warning reported by gcc 4.4.
3186         * kernel/disk.c (grub_disk_read): Use void pointer for the
3187         buffer.
3188         (grub_disk_write): Use const void pointer for the buffer.
3189         Adjust all callers.  Remove unnecessary casts.
3191 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3193         * util/i386/pc/grub-install.in: Update copyright year.
3195 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3197         gptsync
3199         * commands/gptsync.c: new file
3200         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3201         (gptsync_mod_SOURCES): new variable
3202         (gptsync_mod_CFLAGS): likewise
3203         (gptsync_mod_LDFLAGS): likewise
3204         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3205         new definition
3206         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3207         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3208         * conf/i386-ieee1275.rmk: likewise
3209         * conf/i386-pc.rmk: likewise
3210         * conf/powerpc-ieee1275.rmk: likewise
3212 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3214         Fixed grub-emu
3216         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3217         (grub_dl_ref): likewise
3219 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3221         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3222         split in two functions (one for msdos and one for gpt).
3224 2009-05-08  Pavel Roskin  <proski@gnu.org>
3226         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3227         not modified.
3229         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3230         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3231         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3232         nerr variable.
3234 2009-05-08  David S. Miller  <davem@davemloft.net>
3236         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3238 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3240         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3241         existence.
3243 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3245         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3246         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3248 2009-05-05  David S. Miller  <davem@davemloft.net>
3250         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3252 2009-05-05  Pavel Roskin  <proski@gnu.org>
3254         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3255         of grub_dl_ref() and grub_dl_unref().
3256         * commands/parttool.c: Remove preprocessor conditionals around
3257         grub_dl_ref() and grub_dl_unref().
3258         * fs/affs.c: Likewise.
3259         * fs/afs.c: Likewise.
3260         * fs/cpio.c: Likewise.
3261         * fs/ext2.c: Likewise.
3262         * fs/fat.c: Likewise.
3263         * fs/hfs.c: Likewise.
3264         * fs/hfsplus.c: Likewise.
3265         * fs/iso9660.c: Likewise.
3266         * fs/jfs.c: Likewise.
3267         * fs/minix.c: Likewise.
3268         * fs/ntfs.c: Likewise.
3269         * fs/reiserfs.c: Likewise.
3270         * fs/sfs.c: Likewise.
3271         * fs/udf.c: Likewise.
3272         * fs/ufs.c: Likewise.
3273         * fs/xfs.c: Likewise.
3274         * include/grub/dl.h: Likewise.
3275         * loader/xnu.c: Likewise.
3277 2009-05-04  Pavel Roskin  <proski@gnu.org>
3279         * commands/acpi.c: Remove unused variable my_mod.
3280         * partmap/amiga.c: Likewise.
3281         * partmap/apple.c: Likewise.
3282         * partmap/gpt.c: Likewise.
3283         * partmap/pc.c: Likewise.
3284         * partmap/sun.c: Likewise.
3285         * term/gfxterm.c: Likewise.
3286         * term/i386/pc/vesafb.c: Likewise.
3287         * term/i386/pc/vga.c: Likewise.
3289 2009-05-04  David S. Miller  <davem@davemloft.net>
3291         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3292         pointer args to grub_ieee1275_get_property().
3294         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3296         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3297         devices, and do not traverse down under controller nodes.
3299         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3300         (grub_ofdisk_open): Use it to un-escape "," characters.
3301         * kern/disk.c (find_part_sep): New.
3302         (grub_disk_open): Use it to find the first non-escaped ','
3303         character in the disk name.
3304         * util/ieee1275/devicemap.c (escape_of_path): New.
3305         (grub_util_emit_devicemap_entry): Use it.
3306         * util/sparc64/ieee1275/grub-install.in: Update script to
3307         strip partition specifiers properly by not triggering on
3308         '\' escaped ',' characters.
3310 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3312         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3313         to 0x300.
3314         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3315         resolutions.
3316         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3317         on documentation from Wikipedia).
3319 2009-05-04  Pavel Roskin  <proski@gnu.org>
3321         * disk/ata.c: Spelling fixes.
3322         * disk/raid.c: Likewise.
3323         * disk/usbms.c: Likewise.
3324         * disk/dmraid_nvidia.c: Likewise.
3325         * kern/ieee1275/openfw.c: Likewise.
3326         * kern/ieee1275/init.c: Likewise.
3327         * kern/ieee1275/cmain.c: Likewise.
3328         * boot/i386/pc/cdboot.S: Likewise.
3329         * video/readers/png.c: Likewise.
3330         * video/i386/pc/vbe.c: Likewise.
3331         * fs/udf.c: Likewise.
3332         * fs/hfs.c: Likewise.
3333         * fs/reiserfs.c: Likewise.
3334         * efiemu/runtime/efiemu.c: Likewise.
3335         * efiemu/main.c: Likewise.
3336         * efiemu/mm.c: Likewise.
3337         * include/grub/elf.h: Likewise.
3338         * include/grub/xnu.h: Likewise.
3339         * include/grub/usbdesc.h: Likewise.
3340         * include/grub/usb.h: Likewise.
3341         * include/grub/script_sh.h: Likewise.
3342         * include/grub/lib/LzmaEnc.h: Likewise.
3343         * include/grub/efiemu/efiemu.h: Likewise.
3344         * include/grub/command.h: Likewise.
3345         * normal/menu.c: Likewise.
3346         * normal/main.c: Likewise.
3347         * normal/datetime.c: Likewise.
3348         * bus/usb/uhci.c: Likewise.
3349         * mmap/i386/uppermem.c: Likewise.
3350         * mmap/mmap.c: Likewise.
3351         * commands/acpi.c: Likewise.
3352         * commands/test.c: Likewise.
3353         * partmap/apple.c: Likewise.
3354         * font/font.c: Likewise.
3355         * loader/sparc64/ieee1275/linux.c: Likewise.
3356         * loader/macho.c: Likewise.
3357         * loader/i386/bsd_trampoline.S: Likewise.
3358         * loader/i386/bsd.c: Likewise.
3359         * loader/xnu.c: Likewise.
3360         * term/i386/pc/vesafb.c: Likewise.
3361         * term/usb_keyboard.c: Likewise.
3362         * util/resolve.c: Likewise.
3363         * util/getroot.c: Likewise.
3365 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3367         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3369 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3371         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3372         build error.
3374 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3376         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3377         parameter only available on BIOS.
3379 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3381         Removed wrong semicolon in declaration
3383         * grub/misc.h (grub_dprintf): remove semicolon
3385 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3387         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3388         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3389         is done by grub_cmd_linux() now).
3390         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3391         restore video to text mode.
3392         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3393         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3394         `GRUB_LINUX_VID_MODE_NORMAL'.
3396 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3398         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3399         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3400         and `normal/script.c'.  Add `kern/rescue_reader.c',
3401         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3402         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3403         `grub_script.tab.c'.
3405         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3406         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3407         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3408         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3409         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3411         * Makefile.in: Remove duplicated 2008 in Copyright line.
3413 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3415         * util/misc.c (grub_util_warn): New function.  Emits a warning
3416         unconditionally.
3417         * include/grub/util/misc.h (grub_util_warn): New declaration.
3419         * util/i386/pc/grub-install.in: Understand --force and pass it down
3420         to grub-setup.
3422         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3423         down to setup().
3424         (setup): Improve error messages and add warnings when requested to
3425         install in odd layouts.  Refuse to install using blocklists unless
3426         --force was set.
3428 2009-05-04  martin f. krafft  <madduck@madduck.net>
3430         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3432 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3434         Updated copyright year
3436         * fs/hfsplus.c: updated copyright year
3438 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3440         HFS+ UUID
3442         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3443         in the space previously used by unused3
3444         (grub_hfsplus_uuid): new function
3445         (grub_hfsplus_fs): added uuid field
3447 2009-05-03  Pavel Roskin  <proski@gnu.org>
3449         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3450         suppress warnings.  It's no longer needed.
3451         * disk/host.c: Likewise.
3452         * disk/ata_pthru.c: Likewise.
3453         * disk/loopback.c: Likewise.
3454         * hook/datehook.c: Likewise.
3455         * parttool/pcpart.c: Likewise.
3456         * fs/i386/pc/pxe.c: Likewise.
3457         * fs/ntfscomp.c: Likewise.
3458         * efiemu/main.c: Likewise.
3459         * mmap/mmap.c: Likewise.
3460         * commands/crc.c: Likewise.
3461         * commands/hexdump.c: Likewise.
3462         * commands/hdparm.c: Likewise.
3463         * commands/acpi.c: Likewise.
3464         * commands/echo.c: Likewise.
3465         * commands/minicmd.c: Likewise.
3466         * commands/blocklist.c: Likewise.
3467         * commands/memrw.c: Likewise.
3468         * commands/loadenv.c: Likewise.
3469         * commands/usbtest.c: Likewise.
3470         * commands/lsmmap.c: Likewise.
3471         * commands/boot.c: Likewise.
3472         * commands/parttool.c: Likewise.
3473         * commands/configfile.c: Likewise.
3474         * commands/search.c: Likewise.
3475         * commands/ieee1275/suspend.c: Likewise.
3476         * commands/cat.c: Likewise.
3477         * commands/i386/pc/pxecmd.c: Likewise.
3478         * commands/i386/pc/play.c: Likewise.
3479         * commands/i386/pc/halt.c: Likewise.
3480         * commands/i386/pc/vbeinfo.c: Likewise.
3481         * commands/i386/pc/vbetest.c: Likewise.
3482         * commands/lspci.c: Likewise.
3483         * commands/date.c: Likewise.
3484         * commands/handler.c: Likewise.
3485         * commands/ls.c: Likewise.
3486         * commands/test.c: Likewise.
3487         * commands/cmp.c: Likewise.
3488         * commands/efi/loadbios.c: Likewise.
3489         * commands/efi/fixvideo.c: Likewise.
3490         * commands/halt.c: Likewise.
3491         * commands/help.c: Likewise.
3492         * commands/reboot.c: Likewise.
3493         * hello/hello.c: Likewise.
3494         * script/sh/main.c: Likewise.
3495         * loader/xnu.c: Likewise.
3496         * term/terminfo.c: Likewise.
3497         * term/i386/pc/serial.c: Likewise.
3498         * term/usb_keyboard.c: Likewise.
3500 2009-05-03  David S. Miller  <davem@davemloft.net>
3502         * normal/menu.c: Include grub/parser.h
3504 2009-05-03  Pavel Roskin  <proski@gnu.org>
3506         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3507         not char*.
3508         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3509         Suggested by Javier Martín <lordhabbit@gmail.com>
3511         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3512         efiemu??.o doesn't exist.
3513         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3514         copying.
3516 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3518         FreeBSD 64-bit support
3520         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3521         and loader/i386/bsd_trampoline.S
3522         (bsd_mod_ASFLAGS): new variable
3523         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3524         (FREEBSD_MODTYPE_KERNEL64): likewise
3525         (grub_bsd64_trampoline_start): likewise
3526         (grub_bsd64_trampoline_end): likewise
3527         (grub_bsd64_trampoline_selfjump): likewise
3528         (grub_bsd64_trampoline_gdt): likewise
3529         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3530         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3531         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3532         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3533         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3534         of "attrib" member
3535         * loader/i386/bsd_pagetable.c: new file
3536         * loader/i386/bsd_trampoline.S: likewise
3537         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3538         (ALIGN_VAR): likewise
3539         (entry_hi): new variable
3540         (kern_end_mdofs): likewise
3541         (is_64bit): likewise
3542         (grub_freebsd_add_meta): use ALIGN_VAR
3543         (grub_e820_mmap): new declaration
3544         (grub_freebsd_add_mmap): new function
3545         (grub_freebsd_add_meta_module): support 64 bit kernels
3546         (grub_freebsd_list_modules): use ALIGN_VAR
3547         (gdt_descriptor): new declaration
3548         (grub_freebsd_boot): support 64 bit kernels
3549         (grub_bsd_elf64_hook): new function
3550         (grub_bsd_load_elf): support elf64
3552 2009-05-03  Bean  <bean123ch@gmail.com>
3554         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3555         after we get the result of if statement.
3557 2009-05-03  Bean  <bean123ch@gmail.com>
3559         * Makefile.in (enable_efiemu): New variable.
3561         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3562         set.
3563         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3564         path.
3565         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3566         path, add -mno-red-zone option.
3567         (efiemu64_s.o): Likewise.
3568         (efiemu64.o): Use macro $^ for source file.
3570         * configure.ac (--enable-efiemu): New option.
3572 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3574         xnu support
3576         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3577         (pkglib_MODULES): add xnu.mod
3578         (xnu_mod_SOURCES): new variable
3579         (xnu_mod_CFLAGS): likewise
3580         (xnu_mod_LDFLAGS): likewise
3581         (xnu_mod_ASFLAGS): likewise
3582         * conf/i386-pc.rmk: likewise
3583         * conf/x86_64-efi.rmk: likewise
3584         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3585         new declaration
3586         * include/grub/i386/macho.h: new file
3587         * include/grub/i386/xnu.h: likewise
3588         * include/grub/macho.h: likewise
3589         * include/grub/machoload.h: likewise
3590         * include/grub/x86_64/macho.h: likewise
3591         * include/grub/x86_64/xnu.h: likewise
3592         * include/grub/xnu.h: likewise
3593         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3594         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3595         * loader/i386/efi/xnu.c: new file
3596         * loader/i386/pc/xnu.c: likewise
3597         * loader/i386/xnu.c: likewise
3598         * loader/i386/xnu_helper.S: likewise
3599         * loader/macho.c: likewise
3600         * loader/xnu.c: likewise
3601         * loader/xnu_resume.c: likewise
3602         * util/grub-dumpdevtree: likewise
3603         * include/grub/i386/pit.h: include grub/err.h
3604         (grub_pit_wait): export
3605         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3607 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3609         Efiemu
3611         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3612         _linux_efi, linux_efi.
3613         new files in grub-emu
3614         new targets efiemu32.o and efiemu64.o
3615         * loader/linux_normal_efiemu.c: likewise
3616         * loader/i386/efi/linux.c: added preliminary efiemu support
3617         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3618         files to copy
3619         * include/grub/autoefi.h: new file
3620         * include/grub/i386/efiemu.h: likewise
3621         * include/grub/i386/pc/efiemu.h: likewise
3622         * include/grub/efi/api.h: add LL suffix when necessary
3623         new definitions relating to tables
3624         * include/grub/efiemu/efiemu.h: new file
3625         * include/grub/efiemu/runtime.h: likewise
3626         * efiemu/prepare.c: likewise
3627         * efiemu/loadcore_common.c: likewise
3628         * efiemu/loadcore64.c: likewise
3629         * efiemu/runtime/efiemu.sh: likewise
3630         * efiemu/runtime/efiemu.S: likewise
3631         * efiemu/runtime/efiemu.c: likewise
3632         * efiemu/runtime/config.h: likewise
3633         * efiemu/prepare32.c: likewise
3634         * efiemu/main.c: likewise
3635         * efiemu/modules/pnvram.c: likewise
3636         * efiemu/modules/i386: likewise
3637         * efiemu/modules/i386/pc: likewise
3638         * efiemu/modules/acpi.c: likewise
3639         * efiemu/i386/pc/cfgtables.c: likewise
3640         * efiemu/i386/loadcore64.c: likewise
3641         * efiemu/i386/loadcore32.c: likewise
3642         * efiemu/prepare64.c: likewise
3643         * efiemu/loadcore.c: likewise
3644         * efiemu/symbols.c: likewise
3645         * efiemu/mm.c: likewise
3646         * efiemu/loadcore32.c: likewise
3648 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3650         ACPI spoofing
3652         * commands/acpi.c: new file
3653         * commands/i386/pc/acpi.c: likewise
3654         * commands/efi/acpi.c: likewise
3655         * include/grub/acpi.h: likewise
3656         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3657         (acpi_mod_SOURCES): new variable
3658         (acpi_mod_CFLAGS): likewise
3659         (acpi_mod_LDFLAGS): likewise
3660         * conf/i386-efi.rmk: likewise
3661         * conf/x86_64-efi.rmk: likewise
3663 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3665         Missing part from mmap patch
3667         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3668         (grub_mmap_unregister)
3669         (grub_mmap_free_and_unregister): use grub_mmap_register
3671 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3673         Mmap services
3675         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3676         * loader/i386/linux.c (find_mmap_size): likewise
3677         (allocate_pages): likewise
3678         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3679         (grub_fill_multiboot_mmap): likewise
3680         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3681         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3682         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3683         (OPENBSD_MMAP_RESERVED): likewise
3684         * include/grub/i386/pc/memory.h: include grub/memory.h
3685         (grub_lower_mem): removed
3686         (grub_upper_mem): likewise
3687         (GRUB_MACHINE_MEMORY_ACPI): new definition
3688         (GRUB_MACHINE_MEMORY_NVS): likewise
3689         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3690         (GRUB_MACHINE_MEMORY_HOLE): likewise
3691         (grub_machine_mmap_register): likewise
3692         (grub_machine_mmap_unregister): likewise
3693         (grub_machine_get_upper): likewise
3694         (grub_machine_get_lower): likewise
3695         (grub_machine_get_post64): likewise
3696         * include/grub/i386/efi/memory.h: new file
3697         * include/grub/x86_64/efi/memory.h: likewise
3698         * include/grub/efi/memory.h: likewise
3699         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3700         (mmap_mod_SOURCES): new variable
3701         (mmap_mod_LDFLAGS): likewise
3702         (mmap_mod_ASFLAGS): likewise
3703         * conf/i386-coreboot.rmk: likewise
3704         * conf/i386-ieee1275.rmk: likewise
3705         * conf/i386-efi.rmk: likewise
3706         * conf/x86_64-efi.rmk: likewise
3707         * include/grub/types.h (UINT_TO_PTR): new macro
3708         (PTR_TO_UINT32): likewise
3709         (PTR_TO_UINT64): likewise
3710         * include/grub/memory.h: new file
3711         * mmap/i386/pc/mmap.c: likewise
3712         * mmap/i386/pc/mmap_helper.S: likewise
3713         * mmap/i386/uppermem.c: likewise
3714         * mmap/mmap.c: likewise
3715         * mmap/efi/mmap.c: likewise
3716         * kern/i386/coreboot/init.c (grub_machine_init): don't use
3717         grub_upper_mem
3718         * kern/i386/pc/init.c (grub_lower_mem): removed variable
3719         (grub_upper_mem): likewise
3720         (grub_machine_init): don't use grub_upper_mem,
3721         make grub_lower_mem local
3722         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3723         grub_mmap_iterate and grub_mmap_get_upper
3724         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3726 2009-05-02  Bean  <bean123ch@gmail.com>
3728         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3729         script/sh/parser.y.
3730         (pkglib_MODULES): Add normal.mod and sh.mod.
3731         (normal_SOURCES): New variable.
3732         (normal_mod_CFLAGS): Likewise.
3733         (normal_mod_LDFLAGS): Likewise.
3734         (sh_mod_SOURCES): Likewise.
3735         (sh_mod_CFLAGS): Likewise.
3736         (sh_mod_LDFLAGS): Likewise.
3738         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3739         script/sh/lexer.c_DEPENDENCIES.
3740         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3741         kern/rescue_reader.c and kern/rescue_parser.c.
3742         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3743         (grub_emu_SOURCES): Change source files.
3744         (pkglib_MODULES): Remove normal.mod.
3745         (normal_SOURCES): Removed.
3746         (normal_mod_CFLAGS): Likewise.
3747         (normal_mod_LDFLAGS): Likewise.
3748         * conf/i386-coreboot.rmk: Likewise.
3749         * conf/i386-efi.rmk: Likewise.
3750         * conf/i386-ieee1276.rmk: Likewise.
3751         * conf/powerpc-ieee1275.rmk: Likewise.
3752         * conf/sparc64-ieee1275.rmk: Likewise.
3753         * conf/x86_64-efi.rmk: Likewise.
3755         * include/grub/command.h (grub_command_execute): New inline function.
3757         * include/grub/menu.h (grub_menu_entry): Removed commands field.
3759         * include/grub/normal.h: Remove <grub/setjmp.h>.
3760         (grub_fs_module_list): Moved to normal/autofs.c.
3761         (grub_exit_env): Removed.
3762         (grub_command_execute): Likewise.
3763         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3764         parameter script.
3765         (read_command_list): New function declaration.
3766         (read_fs_list): Likewise.
3768         * include/parser.h: Include <grub/reader.h>.
3769         (grub_parser_split_cmdline): Change type of getline parameter.
3770         (grub_parser): New structure.
3771         (grub_parser_class): New variable.
3772         (grub_parser_execute): New function declaration.
3773         (grub_register_rescue_parser): Likewise.
3774         (grub_parser_register): New inline function.
3775         (grub_parser_unregister): Likewise.
3776         (grub_parser_get_current): Likewise.
3777         (grub_parser_set_current): Likewise.
3779         * include/grub/reader.h: New file.
3780         * kern/reader.c: Likewise.
3781         * kern/rescue_parser.c: Likewise.
3782         * kern/rescue_reader.c: Likewise.
3783         * normal/autofs.c: Likewise.
3784         * normal/dyncmd.c: Likewise.
3786         * include/grub/rescue.h: Removed.
3787         * normal/command.h: Likewise.
3789         * include/grub/script.h: Moved to ...
3790         * include/grub/script_sh.h: ... Moved here.
3791         * normal/execute.c: Moved to ...
3792         * script/sh/execute.c: ... Moved here.
3793         * normal/function.c: Moved to ...
3794         * script/sh/function.c: ... Moved here.
3795         * normal/lexer.c: Moved to ...
3796         * script/sh/lexer.c: ... Moved here.
3797         * normal/parser.y: Moved to ...
3798         * script/sh/parser.y: ... Moved here.
3799         * normal/script.c: Moved to ...
3800         * script/sh/script.c: ... Moved here.
3802         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3803         <grub/reader.h>.
3804         (grub_exit_env): Removed.
3805         (fs_module_list): Moved to normal/autofs.c.
3806         (grub_file_getline): Don't handle comment here.
3807         (free_menu): Skip removed field entry->commands.
3808         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3809         script parameter.
3810         (read_config_file): Removed nested parameter, change getline function.
3811         (grub_enter_normal_mode): Removed.
3812         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3813         (read_command_list): Likewise.
3814         (autoload_fs_module): Moved to normal/autofs.c.
3815         (read_fs_list): Likewise.
3816         (reader_nested): New variable.
3817         (grub_normal_execute): Run parser.sh to switch to sh parser.
3818         (grub_cmd_rescue): Removed.
3819         (cmd_normal): Removed.
3820         (grub_cmd_normal): Unregister itself at the beginning. Don't register
3821         rescue command.
3822         (grub_cmdline_run): New function.
3823         (grub_normal_reader_init): Likewise.
3824         (grub_normal_read_line): Likewise.
3825         (grub_env_write_pager): Likewise.
3826         (cmdline): New variable.
3827         (grub_normal_reader): Likewise.
3828         (GRUB_MOD_INIT): Register normal reader and set as current, register
3829         pager hook, register normal command with grub_register_command_prio,
3830         so that it won't show up in command.lst.
3831         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3832         grub_fs_autoload_hook.
3834         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3835         (grub_menu_execute_entry): Replace grub_script_execute with
3836         grub_parser_execute, change parameter to grub_command_execute.
3838         * normal/menu_text.c: Remove <grub/script.h>.
3840         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3841         and <grub/parser.h>.
3842         (run): Change editor_getline to use new parser interface. Change
3843         parameter to grub_command_execute.
3845         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3846         <grub/reader.h> and <grub/parser.h>.
3847         (grub_load_normal_mode): Execute normal command.
3848         (grub_main): Call grub_register_core_commands,
3849         grub_register_rescue_parser and grub_register_rescue_reader, use
3850         grub_reader_loop to enter input loop.
3852         * kern/parser.c (grub_parser_split_cmdline): Change type of
3853         getline parameter.
3854         (grub_parser_class): New variable.
3855         (grub_parser_execute): New function.
3857         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3858         * loader/multiboot2.c: Likewise.
3859         * loader/sparc64/ieee1275/linux.c: Likewise.
3861         * util/grub-emu.c (read_command_list): New dummy function.
3863 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3865         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3866         count to 16 for CCISS and IDA.
3868 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3870         * normal/menu_text.c  (grub_wait_after_message): Print a newline
3871         after waiting for user input.
3873         * loader/i386/linux.c: Include `<grub/normal.h>'.
3874         (grub_cmd_linux): Improve the error message about `ask' mode, by
3875         waiting for user input so it's not missed (we can do this, since
3876         user requested interaction).
3878 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3880         Added missing lst to grub-mkrescue
3882         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3883         and ${input_dir}/parttool.lst
3885 2009-04-30  David S. Miller  <davem@davemloft.net>
3887         * util/hostdisk.c (device_is_wholedisk): New function.
3888         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3889         zero only if device_is_wholedisk() returns true.
3891         * util/hostdisk.c (convert_system_partition_to_system_disk):
3892         Handle virtual disk devices named /dev/vdiskX as found on sparc
3893         and powerpc.
3895         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3896         lettered partition specifier is found, convert to numbered.
3898 2009-04-29  David S. Miller  <davem@davemloft.net>
3900         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3901         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3903         * normal/command.c: Add missing newline at end of file.
3905         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3906         warnings.
3907         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3908         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3909         grub_ofdisk_read): Likewise, and deal similarly with the fact that
3910         ihandles have a 32-bit type but need to be stored in a "void *".
3912 2009-04-28  Pavel Roskin  <proski@gnu.org>
3914         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3915         not disk.  Adjust all dependencies.
3916         (grub_fs_uuid_close): Use grub_device_close(), not
3917         grub_disk_close().
3919         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3920         parent's partition, don't copy it by reference, as it gets freed
3921         on close.
3923 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3925         Preboot hooks support
3927         * commands/boot.c (struct grub_preboot_t): new declaration
3928         (preboots_head): new variable
3929         (preboots_tail): likewise
3930         (grub_loader_register_preboot_hook): new function
3931         (grub_loader_unregister_preboot_hook): likewise
3932         (grub_loader_set): launch preboot hooks
3933         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3934         (grub_loader_register_preboot_hook): new declaration
3935         (grub_loader_unregister_preboot_hook): likewise
3937 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3939         Warning fix
3941         * disk/scsi.c (grub_scsi_open): added missing cast when
3942         calling grub_dprintf
3944 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
3946         Bug and warning fixes
3948         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3949         declaration
3950         * commands/test.c (test_parse): fixed bug with file tests and corrected
3951         declaration of find_file
3953 2009-04-26  Pavel Roskin  <proski@gnu.org>
3955         * Makefile.in: Don't install empty manual pages if help2man is
3956         missing.  Use help2man option for output, not shell redirection.
3958 2009-04-26  David S. Miller  <davem@davemloft.net>
3960         * util/grub-mkdevicemap.c (make_device_map): Add missing
3961         NESTED_FUNC_ATTR to process_device().
3963 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3965         Test command
3967         * commands/test.c: rewritten to use bash-like test
3969 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3971         Parttool autoloading and improvements
3973         * Makefile.in (pkglib_DATA): add parttool.lst
3974         (parttool.lst): new target
3975         * genmk.rb: generate parttool-*
3976         (CLEANFILES): add #{parttool}
3977         (PARTTOOLFILES): new variable
3978         * genparttoollist.sh: new file
3979         * parttool/pcpart.c (grub_pcpart_boot): more feedback
3980         (grub_pcpart_type): likewise
3981         * commands/parttool.c (helpmsg): new variable
3982         (grub_cmd_parttool): output help if not enough arguments are supplied
3983         autoload modules
3984         (GRUB_MOD_INIT(parttool)): use helpmsg
3986 2009-04-24  David S. Miller  <davem@davemloft.net>
3988         Avoiding opening same device multiple times in device iterator.
3990         * kern/device.c: (grub_device_iterate): Define struct part_ent,
3991         and use it to build a list of partitions in iterate_disk() and
3992         iterate_partition().
3994         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3995         on disk->data.
3997         * disk/ieee1275/nand.c (grub_nand_iterate): Return
3998         grub_devalias_iterate() result instead of unconditional 0.
3999         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
4000         Also, capture hook return value, either directly or via
4001         grub_children_iterate(), and propagate to caller.
4002         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
4003         grub_children_iterate): Return value is now 'int' instead of
4004         'grub_err_t'.
4005         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4006         like a proper iterator, stopping when hooks return non-zero.
4007         (grub_devalias_iterate): Likewise.
4009 2009-04-23  David S. Miller  <davem@davemloft.net>
4011         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4013 2009-04-22  David S. Miller  <davem@davemloft.net>
4015         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4016         is larger than address_cells, use that value for address_cells too.
4018         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4019         IEEE1275_MAX_PATH_LEN): Define.
4020         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4021         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4022         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4023         'devtype'.  Explicitly NULL terminate devalias expansion.
4025         * util/sparc64/ieee1275/misc.c: New file.
4026         * util/sparc64/ieee1275/grub-setup.c: New file.
4027         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4028         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4029         * util/sparc64/ieee1275/grub-install.in: New file.
4030         * util/ieee1275/ofpath.c: New file.
4031         * util/ieee1275/devicemap.c: New file.
4032         * util/devicemap.c: New file.
4033         * util/deviceiter.c: New file.
4034         * kern/sparc64/ieee1275/init.c: New file.
4035         * include/grub/util/ofpath.h: New file.
4036         * include/grub/util/deviceiter.h: New file.
4037         * util/grub-mkdevicemap.c: Include deviceiter.h.
4038         Implement using grub_util_emit_devicemap_entry and
4039         grub_util_iterate_devices.
4040         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4041         util/devicemap.c into grub-mkdevicemap
4042         * conf/i386-efi.rmk: Likewise.
4043         * conf/i386-ieee1275.rmk: Likewise.
4044         * conf/i386-pc.rmk: Likewise.
4045         * conf/powerpc-ieee1275.rmk: Likewise.
4046         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4047         images and installation utilities.  Build kernel as image
4048         instead of as elf binary.  Use common rules as much as possible.
4050 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4052         Correct GPT definition
4054         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4055         of "attrib" member
4057 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4059         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4061 2009-04-19  David S. Miller  <davem@davemloft.net>
4063         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4064         (grub_rescue_cmd_linux): Rename to...
4065         (grub_cmd_linux): and fix prototype.
4066         (grub_rescue_cmd_initrd): Rename to...
4067         (grub_cmd_initrd): and fix prototype.
4068         (cmd_linux, cmd_initrd): New.
4069         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4070         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4072 2009-04-17  Pavel Roskin  <proski@gnu.org>
4074         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4075         format.
4076         (grub_ohci_transfer): Likewise.
4078         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4080         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4081         return without a value.  Fix inconsistent indentation.
4083         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4084         match struct grub_fs.
4086         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4087         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4088         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4089         * commands/lspci.c (grub_lspci_iter): Likewise.
4091 2009-04-16  Bean  <bean123ch@gmail.com>
4093         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4094         value.
4096 2009-04-15  Pavel Roskin  <proski@gnu.org>
4098         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4099         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4100         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4101         definitions.
4103 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4105         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4106         that no multiple data or metadata areas are supported and `Unknown
4107         metadata header'.
4109 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4111         Move loader out of the kernel
4113         * kern/loader.c: moved to ...
4114         * commands/boot.c: ... moved here
4115         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4116         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4117         * include/grub/kernel.h (grub_machine_fini): export
4118         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4119         (grub_loader_set): likewise
4120         (grub_loader_unset): likewise
4121         (grub_loader_boot): likewise
4122         * conf/common.rmk: new module boot.mod
4123         (pkglib_MODULES): add boot.mod
4124         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4125         (grub_emu_SOURCES): likewise
4126         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4127         (grub_emu_SOURCES): likewise
4128         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4129         (grub_emu_SOURCES): likewise
4130         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4131         (grub_emu_SOURCES): likewise
4132         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4133         (grub_emu_SOURCES): likewise
4134         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4135         (grub_emu_SOURCES): likewise
4136         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4137         (grub_emu_SOURCES): likewise
4139 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4141         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4143         * kern/misc.c (grub_itoa): Removed function
4144         (grub_ltoa): likewise
4145         (grub_vsprintf): use grub_lltoa
4147 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4149         Restore grub-emu
4151         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4152         * conf/i386-coreboot.rmk: likewise
4153         * conf/i386-ieee1275.rmk: likewise
4154         * conf/powerpc-ieee1275.rmk: likewise
4156 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4158         * INSTALL: Add that `./autogen.sh' needs to be run before
4159         `./configure.'.
4161 2009-04-14  Bean  <bean123ch@gmail.com>
4163         * Makefile.in (pkglib_DATA): Add handler.lst.
4164         (handler.lst): New rule.
4166         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4167         * conf/i386-coreboot.rmk: Likewise.
4168         * conf/i386-ieee1275.rmk: Likewise.
4169         * conf/i386-efi.rmk: Likewise.
4170         * conf/x86_64-efi.rmk: Likewise.
4171         * conf/powerpc-ieee1275.rmk: Likewise.
4172         * conf/sparc64-ieee1275.rmk: Likewise.
4174         * genhandlerlist.sh: New file.
4176         * genmk.rb: Add rules to generate handler.lst.
4178         * include/grub/normal.h (grub_file_getline): New function definition.
4179         (read_handler_list): Likewise.
4180         (free_handler_list): Likewise.
4182         * include/grub/term.h (grub_term_register_input): Add name parameter
4183         for auto generation of handler.lst.
4184         (grub_term_register_output): Likewise.
4186         * normal/handler.c: New file.
4188         * normal/main.c (get_line): Renamed to grub_file_getline.
4189         (read_config_file): Use the newly renamed grub_file_getline.
4190         (read_command_list): Likewise.
4191         (read_fs_list): Likewise.
4192         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4193         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4195         * term/efi/console.c (grub_console_init): Add name parameter for auto
4196         generation of handler.lst.
4197         * term/gfxterm.c: Likewise.
4198         * term/i386/pc/at_keyboard.c: Likewise.
4199         * term/i386/pc/console.c: Likewise.
4200         * term/i386/pc/serial.c: Likewise.
4201         * term/i386/pc/vesafb.c: Likewise.
4202         * term/i386/pc/vga.c: Likewise.
4203         * term/i386/pc/vga_text.c: Likewise.
4204         * term/ieee1275/ofconsole.c: Likewise.
4205         * term/usb_keyboard.c: Likewise.
4207 2009-04-14  Bean  <bean123ch@gmail.com>
4209         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4210         properly with null character.
4212 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4214         * configure: Remove.
4215         * config.h.in: Likewise.
4216         * stamp-h.in: Likewise.
4217         * DISTLIST: Likewise.
4218         * conf/common.mk: Likewise.
4219         * conf/i386-coreboot.mk: Likewise.
4220         * conf/i386-efi.mk: Likewise.
4221         * conf/i386-ieee1275.mk: Likewise.
4222         * conf/i386.mk: Likewise.
4223         * conf/i386-pc.mk: Likewise.
4224         * conf/powerpc-ieee1275.mk: Likewise.
4225         * conf/sparc64-ieee1275.mk: Likewise.
4226         * conf/x86_64-efi.mk: Likewise.
4228         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4229         develop on GRUB.
4231 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4232             David S. Miller  <davem@davemloft.net>
4234         * util/hostdisk.c (make_device_name): Fix buffer length
4235         calculations.
4237 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4239         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4240         <sys/param.h> and <sys/sysctl.h>.
4241         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4242         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4243         opening the device and reset them afterwards.
4245 2009-04-13  Pavel Roskin  <proski@gnu.org>
4247         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4248         Reported by John Stanley <jpsinthemix@verizon.net>
4250 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4252         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4253         that name for menuentries when appropriate.
4255 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4257         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4259 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4261         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4262         to Linux, simply abort telling the user it's no longer supported.
4264 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4266         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4267         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4268         `freebsd_loadenv' only when devices.hints exist.
4270 2009-04-13  Pavel Roskin  <proski@gnu.org>
4272         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4274 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4276         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4277         partition number.
4278         (grub_drive): Likewise.
4280 2009-04-13  David S. Miller  <davem@davemloft.net>
4282         * kern/sparc64/ieee1275/ieee1275.c: New file.
4283         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4284         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4285         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4286         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4287         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4288         grub_ieee1275_alloc_physmem): Declare new exported functions.
4290         * include/grub/sparc64/ieee1275/loader.h: New file.
4291         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4292         * include/grub/sparc64/kernel.h: Likewise.
4293         * loader/sparc64/ieee1275/linux.c: Likewise.
4295         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4296         (grub_fstest_SOURCES): Likewise.
4298         * util/hostdisk.c (make_device_name): Do not make any assumptions
4299         about the length of drive names.
4301         * kern/dl.c (grub_dl_load_file): Close file immediately when
4302         we are done using it.
4304 2009-04-12  David S. Miller  <davem@davemloft.net>
4306         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4307         values.  Noticed by Pavel Roskin.
4309         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4310         target compiler.
4312         * genmk.rb: Add more flexible image type specification, also
4313         pass --strip-unneeded to objcopy.
4314         * conf/i386-pc.rmk: Use *_FORMAT.
4315         * conf/i386-pc.mk: Rebuilt.
4317         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4318         (OFDISK_HASH_SZ): Define.
4319         (ofdisk_hash): New hash table.
4320         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4321         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4322         instead of device phandle which is not unique.
4324         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4325         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4326         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4327         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4328         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4329         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4330         GRUB_KERNEL_MACHINE_DATA_END): Define.
4331         (grub_kernel_image_size, grub_total_module_size): Declare.
4333 2009-04-12  Pavel Roskin  <proski@gnu.org>
4335          * configure.ac: Change the logic when we check for target tools.
4336          Do it when the target is specified and it's different from the
4337          specified value of the host.
4339 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4341         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4342         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4343         GNU/kFreeBSD. Check if a device is a character device. Use
4344         DIOCGMEDIASIZE to get the size.
4345         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4346         support for GNU/kFreeBSD.
4347         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4348         is a character device instead of a block device. Add support for
4349         FreeBSD device names.
4351         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4352         is a character device instead of a block device.
4354         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4355         is a character device instead of a block device.
4357 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4359         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4360         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4361         FreeBSD. Check if a device is a character device. Use
4362         DIOCGMEDIASIZE to get the size.
4363         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4364         support for FreeBSD.
4365         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4366         is a character device instead of a block device. Add support for
4367         FreeBSD device names.
4369         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4370         a character device instead of a block device.
4371         (grub_util_check_char_device): New function.
4373         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4374         a character device instead of a block device.
4376         * include/grub/util/getroot.h (grub_util_check_char_device): New
4377         prototype.
4379 2009-04-11  David S. Miller  <davem@davemloft.net>
4381         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4382         static libgcc.
4383         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4384         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4385         function, if present.
4386         (__bswapdi2): Likewise.
4388         * include/grub/sparc64/ieee1275/boot.h: New file.
4389         * boot/sparc64/ieee1275/boot.S: Likewise.
4390         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4392         * kern/misc.c (grub_ltoa): New function.
4393         (grub_vsprintf): Use it to format 'long' integers.
4395 2009-04-10  David S. Miller  <davem@davemloft.net>
4397         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4398         slots are of type grub_ieee1275_cell_t.
4399         (grub_nand_read): Likewise.
4400         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4401         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4402         macros are used to compare values in arg/ret block of the call.
4403         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4404         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4405         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4406         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4407         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4408         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4409         grub_ieee1275_close, grub_ieee1275_set_property,
4410         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4411         grub_ieee1275_cell_t.
4412         * kern/ieee1275/openfw.c (grub_map): Likewise.
4413         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4414         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4416         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4417         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4418         (grub_devalias_iterate): Likewise.
4420 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4422         UFS improvements
4424         * fs/ufs.c (INODE_NBLOCKS): new definition
4425         (struct grub_ufs_dirent): added fields for non-BSD dirents
4426         (grub_ufs_get_file_block): fixed double indirect handling
4427         (grub_ufs_lookup_symlink): use more robust way to determine whether
4428         symlink is inline
4429         (grub_ufs_find_file): support for non-BSD dirents
4430         (grub_ufs_dir): support for non-BSD dirents
4432 2009-04-10  Bean  <bean123ch@gnail.com>
4434         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4435         attribute, otherwise the size would be wrong for i386 platform.
4437         * include/grub/pci.h (grub_pci_read_word): New inline function.
4438         (grub_pci_read_byte): Likewise.
4439         (grub_pci_write): Likewise.
4440         (grub_pci_write_word): Likewise.
4441         (grub_pci_write_byte): Likewise.
4443         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4445         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4446         (find_framebuf): Scan pci to locate the frame buffer address.
4448         * commands/efi/fixvideo.c: New file.
4450         * commands/efi/loadbios.c: Likewise.
4452         * commands/memrw.c: Likewise.
4454         * util/grub-dumpbios.in: Likewise.
4456         * conf/common.rmk (grub-dumpbios): New utility.
4457         (pkglib_MODULES): New module memrw.mod.
4458         (memrw_mod_SOURCE): New macro.
4459         (memrw_mod_CFLAGS): Likewise.
4460         (memrw_mod_LDFLAGS): Likewise.
4462         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4463         fixvideo.mod.
4464         (loadbios_mod_SOURCE): New macro.
4465         (loadbios_mod_CFLAGS): Likewise.
4466         (loadbios_mod_LDFLAGS): Likewise.
4467         (fixvideo_mod_SOURCE): Likewise.
4468         (fixvideo_mod_CFLAGS): Likewise.
4469         (fixvideo_mod_LDFLAGS): Likewise.
4471         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4472         fixvideo.mod.
4473         (loadbios_mod_SOURCE): New macro.
4474         (loadbios_mod_CFLAGS): Likewise.
4475         (loadbios_mod_LDFLAGS): Likewise.
4476         (fixvideo_mod_SOURCE): Likewise.
4477         (fixvideo_mod_CFLAGS): Likewise.
4478         (fixvideo_mod_LDFLAGS): Likewise.
4480 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4482         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4484 2009-04-07  David S. Miller  <davem@davemloft.net>
4486         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4487         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4488         R_SPARC_WDISP30 case.
4489         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4491 2009-04-06  Pavel Roskin  <proski@gnu.org>
4493         * include/grub/misc.h (ARRAY_SIZE): New macro.
4494         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4495         New macro.
4496         * loader/i386/linux.c (allocate_pages): Use free_pages().
4497         (grub_linux_unload): Don't use free_pages().
4498         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4499         wrong index.  Treat all other modes as text modes.
4500         (grub_cmd_linux): Initialize vid_mode unconditionally to
4501         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4503         * commands/help.c (print_command_help): Use cmd->prio, not
4504         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4506 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4508         Parttool
4510         * parttool/pcpart.c: new file
4511         * commands/parttool.c: likewise
4512         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4513         (parttool_mod_SOURCES): new variable
4514         (parttool_mod_CFLAGS): likewise
4515         (parttool_mod_LDFLAGS): likewise
4516         (pcpart_mod_SOURCES): likewise
4517         (pcpart_mod_CFLAGS): likewise
4518         (pcpart_mod_LDFLAGS): likewise
4519         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4520         and parttool/pcpart.c
4521         * conf/i386-efi.rmk: likewise
4522         * conf/i386-ieee1275.rmk: likewise
4523         * conf/i386-pc.rmk: likewise
4524         * conf/powerpc-ieee1275.rmk: likewise
4525         * conf/sparc64-ieee1275.rmk: likewise
4526         * conf/x86_64-ieee1275.rmk: likewise
4528 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4530         Support for mtime and further expandability of dir command
4532         * include/grub/lib/datetime.h: moved to ...
4533         * include/grub/datetime.h: ... moved here and added
4534         declaration of grub_unixtime2datetime. All users updated
4535         * include/grub/fs.h: new syntax for dir and mtime functions in
4536         struct grub_fs
4537         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4538         and GRUB_FSHELP_FLAGS_MASK
4539         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4540         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4541         (grub_ext2_mtime): new function
4542         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4543         (grub_hfsplus_mtime): new function
4544         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4545         (GRUB_UFS_ATTR_FILE): likewise
4546         (GRUB_UFS_ATTR_LNK): likewise
4547         (struct grub_ufs_sblock): new fields mtime
4548         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4549         all users updated
4550         (grub_ufs_dir): mtime support
4551         (grub_ufs_mtime): new function
4552         * fs/affs.c (grub_affs_dir): use new dir syntax
4553         * fs/afs.c (grub_afs_dir): likewise
4554         * fs/cpio.c (grub_cpio_dir): likewise
4555         * fs/fat.c (grub_fat_find_dir): likewise
4556         * fs/hfs.c (grub_hfs_dir): likewise
4557         * fs/iso9660.c (grub_iso9660_dir): likewise
4558         * fs/jfs.c (grub_jfs_dir): likewise
4559         * fs/minix.c (grub_minix_dir): likewise
4560         * fs/ntfs.c (grub_ntfs_dir): likewise
4561         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4562         * fs/sfs.c (grub_sfs_dir): likewise
4563         * fs/xfs.c (grub_xfs_dir): likewise
4564         * util/hostfs.c (grub_hostfs_dir): likewise
4565         * lib/datetime.c: moved to ...
4566         * normal/datetime.c: ... moved here
4567         (grub_unixtime2datetime): new function
4568         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4569         * normal/completion.c (iterate_dir): use new dir syntax
4570         * normal/misc.c (grub_normal_print_device_info): tell the
4571         last modification time of a volume
4572         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4573         * conf/common.rmk: added lib/datetime.c to ls.mod
4574         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4575         (normal_mod_SOURCES): likewise
4576         (datetime_mod_SOURCES): Removed lib/datetime.c
4577         * conf/i386-efi.rmk: likewise
4578         * conf/i386-ieee1275.rmk: likewise
4579         * conf/i386-pc.rmk: likewise
4580         * conf/powerpc-ieee1275.rmk: likewise
4581         * conf/sparc64-ieee1275.rmk: likewise
4582         * conf/x86_64-efi.rmk: likewise
4584 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4586         Trim trailing spaces in FAT label and support mtools-like labels
4588         * fs/fat.c (grub_fat_iterate_dir): New function based
4589         on grub_fat_find_dir
4590         (grub_fat_find_dir): use grub_fat_iterate_dir
4591         (grub_fat_label): likewise
4593 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4595         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4596         and command.h
4597         remove extraneous kernel_elf_HEADERS
4599 2009-04-04  Bean  <bean123ch@gnail.com>
4601         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4603         * util/misc.c: Likewise.
4605 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4607         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4608         instead of grub_printf.
4610 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4612         * loader/i386/linux.c (grub_linux_setup_video): Fill
4613         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4614         values from `mode info' structure instead of hardcoded
4615         values.
4617 2009-04-01  Pavel Roskin  <proski@gnu.org>
4619         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4620         unused now.
4621         * genmk.rb: Likewise.
4622         * configure.ac: Likewise.
4624 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4626         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4627         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4629 2009-04-01  David S. Miller  <davem@davemloft.net>
4631         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4632         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4633         (grub_setjmp): Mark with 'returns_twice' attribute.
4634         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4635         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4636         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4638 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4640         Reapply fix from 2008-07-28 which was accidentally reverted; also
4641         perform the same fix to a similar check in same function.
4643         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4644         with the same number are found, just use issue a warning with
4645         grub_dprintf(), as this error has been reported to be non-fatal.
4647 2009-03-31  Pavel Roskin  <proski@gnu.org>
4649         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4650         for cross-compilation.
4652 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4654         Fix i386-ieee1275 build.
4656         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4657         Remove declaration.
4659 2009-03-30  Pavel Roskin  <proski@gnu.org>
4661         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4662         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4663         zero-terminated, rely only on the strlen value.  Fix comparison
4664         of strings differing in length.
4666 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4668         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4669         checking for abi version.  Improve error messages on BIOS to notify
4670         user about `linux16' command.
4672 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4674         Leak fixes
4676         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4677         in case of collision
4678         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4680 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4682         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4683         set `vid_mode' accordingly.
4684         (grub_linux_boot): Process `vid_mode' and set video mode.
4686 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4688         * util/grub.d/10_linux.in (linux_entry): New function.
4689         Factorize generation of Linux boot entries.
4691 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4693         Make the format of Environment Block plain text. The boot loader
4694         part is not tested well yet.
4696         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4697         (buffer): Removed.
4698         (envblk): Likewise.
4699         (usage): Remove "info" and "clear". Add "unset". Update the
4700         description of "set", as this does not delete variables any
4701         longer.
4702         (create_envblk_file): Complete rewrite.
4703         (open_envblk_file): Likewise.
4704         (cmd_info): Removed.
4705         (cmd_list): Likewise.
4706         (cmd_set): Likewise.
4707         (cmd_clear): Likewise.
4708         (list_variables): New function.
4709         (write_envblk): Likewise.
4710         (set_variables): Likewise.
4711         (unset_variables): Likewise.
4712         (main): Complete rewrite.
4714         * commands/loadenv.c (buffer): Removed.
4715         (envblk): Likewise.
4716         (open_envblk_file): New function.
4717         (read_envblk_file): Complete rewrite.
4718         (grub_cmd_load_env): Likewise.
4719         (grub_cmd_list_env): Likewise.
4720         (struct blocklist): New struct.
4721         (free_blocklists): New function.
4722         (check_blocklists): Likewise.
4723         (write_blocklists): Likewise.
4724         (grub_cmd_save_env): Complete rewrite.
4726         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4727         a plain text signature.
4728         (GRUB_ENVBLK_MAXLEN): Removed.
4729         (struct grub_envblk): Complete rewrite.
4730         (grub_envblk_find): Removed.
4731         (grub_envblk_insert): Likewise.
4732         (grub_envblk_open): New prototype.
4733         (grub_envblk_set): Likewise.
4734         (grub_envblk_delete): Put const to VALUE.
4735         (grub_envblk_iterate): Put const to NAME and VALUE.
4736         (grub_envblk_close): New prototype.
4737         (grub_envblk_buffer): New inline function.
4738         (grub_envblk_size): Likewise.
4740         * lib/envblk.c: Include grub/mm.h.
4741         (grub_env_find): Removed.
4742         (grub_envblk_open): New function.
4743         (grub_envblk_close): Likewise.
4744         (escaped_value_len): Likewise.
4745         (find_next_line): Likewise.
4746         (grub_envblk_insert): Removed.
4747         (grub_envblk_set): New function.
4748         (grub_envblk_delete): Complete rewrite.
4749         (grub_envblk_iterate): Likewise.
4751 2009-03-28  Robert Millan  <rmh@aybabtu.com>
4753         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4754         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4755         variables.  Use 16-bit loader.
4756         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4757         loader.
4758         * kern/i386/loader.S (grub_linux_boot): Rename to ...
4759         (grub_linux16_boot): ... this.  Update all users.
4760         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4761         (grub_linux_boot): ... this.  Update all users.
4763         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4764         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
4765         commands to `linux16' and `initrd16'.
4766         (GRUB_MOD_FINI(linux)): Rename to ...
4767         (GRUB_MOD_FINI(linux16)): ... this.
4769 2009-03-24  Pavel Roskin  <proski@gnu.org>
4771         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4772         not just for compilation.
4774 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
4776         Move multiboot helper out of kernel
4778         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4779         `loader/i386/multiboot_helper.S'.
4780         * conf/i386-coreboot.rmk: Likewise
4781         * conf/i386-ieee1275.rmk: Likewise
4783         * kern/i386/loader.S: Move multiboot helpers from here...
4784         * loader/i386/multiboot_helper.S: ...moved here
4785         * include/grub/i386/loader.h: Move declarations of multiboot
4786         helpers from here...
4787         * include/grub/i386/multiboot.h: ...moved here
4788         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4790 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4792         * kern/env.c (grub_env_context_open): Added an argument to specify
4793         whether a new context inherits exported variables from current
4794         one. This is useful when making a sandbox to interpret a config
4795         file.
4796         All callers updated.
4798         * include/grub/env.h (grub_env_context_open): Updated the prototype.
4800 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4802         * kern/env.c (grub_env_context_close): Fix memory leaks.
4804 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4806         * normal/main.c (grub_normal_execute): Added an argument
4807         BATCH to specify if an interactive interface should be provided
4808         after reading a config file.
4809         All callers updated.
4810         (read_command_list): Prevent being executed twice.
4811         (read_fs_list): Likewise.
4813         * include/grub/normal.h (grub_normal_execute): Updated the
4814         prototype.
4816 2009-03-22  Pavel Roskin  <proski@gno.org>
4818         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4819         _start.
4820         * kern/i386/pc/startup.S: Likewise.
4821         * kern/i386/efi/startup.S: Likewise.
4822         * kern/i386/ieee1275/startup.S: Likewise.
4823         * kern/i386/coreboot/startup.S: Likewise.
4824         * kern/x86_64/efi/startup.S: Likewise.
4826         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4827         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4828         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4830 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
4832         Bugfixes in multiboot for bugs uncovered by solaris kernel.
4834         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4835         limit detection.
4836         Use vaddr of correct segment for entry_point.
4838 2009-03-21  Bean  <bean123ch@gmail.com>
4840         * commands/blocklist.c: Add include file <grub/command.h>, remove
4841         <grub/normal.h> and <grub/arg.h>.
4842         (grub_cmd_blocklist): Use the new command interface.
4843         (GRUB_MOD_INIT): Likewise.
4844         (GRUB_MOD_FINI): Likewise.
4845         * commands/boot.c: Likewise.
4846         * commands/cat.c: Likewise.
4847         * commands/cmp.c: Likewise.
4848         * commands/configfile.c: Likewise.
4849         * commands/crc.c: Likewise.
4850         * commands/echo.c: Likewise.
4851         * commands/halt.c: Likewise.
4852         * commands/handler.c: Likewise.
4853         * commands/hdparm.c: Likewise.
4854         * commands/help.c: Likewise.
4855         * commands/hexdump.c: Likewise.
4856         * commands/loadenv.c: Likewise.
4857         * commands/ls.c: Likewise.
4858         * commands/lsmmap.c: Likewise.
4859         * commands/lspci.c: Likewise.
4860         * commands/loadenv.c: Likewise.
4861         * commands/read.c: Likewise.
4862         * commands/reboot.c: Likewise.
4863         * commands/search.c: Likewise.
4864         * commands/sleep.c: Likewise.
4865         * commands/test.c: Likewise.
4866         * commands/usbtest.c: Likewise.
4867         * commands/videotest.c: Likewise.
4868         * commands/i386/cpuid.c: Likewise.
4869         * commands/i386/pc/halt.c: Likewise.
4870         * commands/i386/pc/play.c: Likewise.
4871         * commands/i386/pc/pxecmd.c: Likewise.
4872         * commands/i386/pc/vbeinfo.c: Likewise.
4873         * commands/i386/pc/vbetest.c: Likewise.
4874         * commands/ieee1275/suspend.c: Likewise.
4875         * disk/loopback.c: Likewise.
4876         * font/font_cmd.c: Likewise.
4877         * hello/hello.c: Likewise.
4878         * loader/efi/appleloader.c: Likewise.
4879         * loader/efi/chainloader.c: Likewise.
4880         * loader/i386/bsd.c: Likewise.
4881         * loader/i386/efi/linux.c: Likewise.
4882         * loader/i386/ieee1275/linux.c: Likewise.
4883         * loader/i386/linux.c: Likewise.
4884         * loader/i386/pc/chainloader.c: Likewise.
4885         * loader/i386/pc/linux.c: Likewise.
4886         * loader/powerpc/ieee1275/linux.c: Likewise.
4887         * loader/multiboot_loader.c: Likewise.
4888         * term/gfxterm.c: Likewise.
4889         * term/i386/pc/serial.c: Likewise.
4890         * term/terminfo.c: Likewise.
4892         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4893         * term/i386/pc/vga.c: Likewise.
4894         * video/readers/jpeg.c: Likewise.
4895         * video/readers/png.c: Likewise.
4896         * video/readers/tga.c: Likewise.
4898         * util/grub-fstest (cmd_loopback): Removed.
4899         (cmd_blocklist): Likewise.
4900         (cmd_ls): Likewise.
4901         (grub_register_command): Likewise.
4902         (grub_unregister_command): Likewise.
4903         (execute_command): Use grub_command_find to locate command and execute
4904         it.
4906         * include/grub/efi/chainloader.h: Removed.
4907         * loader/efi/chainloader_normal.c: Likewise.
4908         * loader/i386/bsd_normal.c: Likewise.
4909         * loader/i386/pc/chainloader_normal.c: Likewise.
4910         * loader/i386/pc/multiboot_normal.c: Likewise.
4911         * loader/linux_normal.c: Likewise.
4912         * loader/multiboot_loader_normal.c: Likewise.
4913         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4915         * gencmdlist.sh: Scan new registration command grub_register_extcmd
4916         and grub_register_command_p1.
4918         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4919         kern/command.c, lib/arg.c and commands/extcmd.c.
4920         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4921         (minicmd_mod_SOURCES): New variable.
4922         (minicmd_mod_CFLAGS): Likewise.
4923         (minicmd_mod_LDFLAGS): Likewise.
4924         (extcmd_mod_SOURCES): Likewise.
4925         (extcmd_mod_CFLAGS): Likewise.
4926         (extcmd_mod_LDFLAGS): Likewise.
4927         (boot_mod_SOURCES): Removed.
4928         (boot_mod_CFLAGS): Likewise.
4929         (boot_mod_LDFLAGS): Likewise.
4931         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4932         kern/corecmd.c.
4933         (kernel_img_HEADERS): Add command.h.
4934         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4935         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4936         and lib/arg.c.
4937         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4938         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4939         remove the corresponding normal mode command.
4940         (normal_mod_SOURCES): Remove normal/arg.c.
4941         * conf/i386-coreboot.rmk: Likewise.
4942         * conf/i386-efi.rmk: Likewise.
4943         * conf/i386-ieee1275.rmk: Likewise.
4944         * conf/powerpc-ieee1275.rmk: Likewise.
4945         * conf/x86_64-efi.rmk: Likewise.
4947         * include/grub/arg.h: Move from here ...
4948         * include/grub/lib/arg.h: ... to here.
4950         * normal/arg.c: Move from here ...
4951         * lib/arg.c: ... to here.
4953         * commands/extcmd.c: New file.
4954         * commands/minicmd.c: Likewise.
4955         * include/grub/command.h: Likewise.
4956         * include/grub/extcmd.h: Likewise.
4957         * kern/command.c: Likewise.
4958         * kern/corecmd.c: Likewise.
4960         * kern/list.c (grub_list_iterate): Return int instead of void.
4961         (grub_list_insert): New function.
4962         (grub_prio_list_insert): Likewise.
4964         * kern/rescue.c (grub_rescue_command): Removed.
4965         (grub_rescue_command_list): Likewise.
4966         (grub_rescue_register_command): Likewise.
4967         (grub_rescue_unregister_command): Likewise.
4968         (grub_rescue_cmd_boot): Move to minicmd.c
4969         (grub_rescue_cmd_help): Likewise.
4970         (grub_rescue_cmd_info): Likewise.
4971         (grub_rescue_cmd_boot): Likewise.
4972         (grub_rescue_cmd_testload): Likewise.
4973         (grub_rescue_cmd_dump): Likewise.
4974         (grub_rescue_cmd_rmmod): Likewise.
4975         (grub_rescue_cmd_lsmod): Likewise.
4976         (grub_rescue_cmd_exit): Likewise.
4977         (grub_rescue_print_devices): Moved to corecmd.c.
4978         (grub_rescue_print_files): Likewise.
4979         (grub_rescue_cmd_ls): Likewise.
4980         (grub_rescue_cmd_insmod): Likewise.
4981         (grub_rescue_cmd_set): Likewise.
4982         (grub_rescue_cmd_unset): Likewise.
4983         (attempt_normal_mode): Use grub_command_find to get normal module.
4984         (grub_enter_rescue_mode): Use grub_register_core_commands to register
4985         commands, remove grub_rescue_register_command calls.
4987         * normal/command.c (grub_register_command): Removed.
4988         (grub_unregister_command): Likewise.
4989         (grub_command_find): Likewise.
4990         (grub_iterate_commands): Likewise.
4991         (rescue_command): Likewise.
4992         (export_command): Moved to corecmd.c.
4993         (set_command): Removed.
4994         (unset_command): Likewise.
4995         (insmod_command): Likewise.
4996         (rmmod_command): Likewise.
4997         (lsmod_command): Likewise.
4998         (grub_command_init): Likewise.
5000         * normal/completion.c (iterate_command): Use cmd->prio to check for
5001         active command.
5002         (complete_arguments): Use grub_extcmd_t structure to find options.
5003         (grub_normal_do_completion): Change function grub_iterate_commands to
5004         grub_command_iterate.
5006         * normal/execute.c (grub_script_execute_cmd): No need to parse
5007         argument here.
5009         * normal/main.c (grub_dyncmd_dispatcher): New function.
5010         (read_command_list): Register unload commands as dyncmd.
5011         (grub_cmd_normal): Use new command interface, register rescue,
5012         unregister normal at entry, register normal, unregister rescue at exit.
5014         * include/grub/list.h (grub_list_test_t): New type.
5015         (grub_list_iterate): Return int instead of void.
5016         (grub_list_insert): New function.
5017         (GRUB_AS_NAMED_LIST_P): New macro.
5018         (GRUB_AS_PRIO_LIST): Likewise.
5019         (GRUB_AS_PRIO_LIST_P): Likewise.
5020         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5021         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5022         (grub_prio_list): New structure.
5023         (grub_prio_list_insert): New function.
5024         (grub_prio_list_remove): New inline function.
5026         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5027         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5028         (GRUB_COMMAND_FLAG_MENU): Likewise.
5029         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5030         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5031         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5032         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5033         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5034         (grub_command): Likewise.
5035         (grub_register_command): Likewise.
5036         (grub_command_find): Likewise.
5037         (grub_iterate_commands): Likewise.
5038         (grub_command_init): Likewise.
5039         (grub_arg_parse): Likewise.
5040         (grub_arg_show_help): Likewise.
5042         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5043         (grub_rescue_unregister_command): Likewise.
5045         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5046         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5047         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5049         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5050         grub_rescue_cmd_initrd.
5051         * include/grub/i386/loader.h: Likewise.
5052         * include/grub/x86_64/loader.h: Likewise.
5054         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5056 2009-03-21  Bean  <bean123ch@gmail.com>
5058         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5059         instead of stat in mingw environment.
5061         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5063         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5065         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5066         AC_CONFIG_LINKS.
5068 2009-03-21  Bean  <bean123ch@gmail.com>
5070         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5071         out of range error.
5073 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5075         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5076         checking inode flags for EXT4_EXTENTS_FLAG.
5078 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5080         * loader/i386/linux.c: Include `<grub/video.h>' and
5081         `<grub/i386/pc/vbe.h>'..
5082         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5083         (grub_linux32_boot): Attempt to configure video settings with
5084         grub_linux_setup_video().
5085         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5086         to avoid grub_console_fini() which would step out of graphical mode
5087         unconditionally.
5089 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5091         Fix build on powerpc.
5092         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5094 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5096         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5097         background image command.
5099 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5101         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5102         (grub_gfxterm_putchar): Extract pairs of identical calls to
5103         draw_cursor out of conditional blocks.
5105 2009-03-11  Pavel Roskin  <proski@gnu.org>
5107         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5108         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5110 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5112         * loader/i386/multiboot_elfxx.c
5113         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5115 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5117         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5118         `kern/handler.c'.
5120 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5122         * loader/i386/multiboot.c (code_size): New variable.
5123         (grub_multiboot): Define offsets by adding to `code_size' rather
5124         than subtracting from `grub_multiboot_payload_size'.  Provide
5125         4-byte alignment to MBI and others by increasing
5126         `boot_loader_name_length' appropriately.
5128         * loader/i386/multiboot_elfxx.c
5129         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5131 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5133         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5134         `fs/ext2.c'.
5136 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5138         Make loader/i386/linux.c usable on i386-pc again.
5140         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5141         memory to heap.
5142         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5143         `#error' stanza.
5145 2009-03-07  Bean  <bean123ch@gmail.com>
5147         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5148         allocation.
5150 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5152         Fix display issue on terminals with screen size other than 80x25
5153         (e.g. gfxterm with resolution higher than 640x480).
5155         * normal/main.c (grub_normal_init_page): Display title text in a
5156         position relative to the center of the terminal instead of relying
5157         on a hardcoded offset.
5159 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5161         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5162         installed.
5164         * Makefile.in (host_kernel): New variable.
5165         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5166         scripts instead of just the windows one.
5167         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5169 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5171         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5172         `kern/handler.c'.
5173         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5174         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5175         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5176         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5177         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5178         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5180 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5182         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5183         or if there's no space for the disk label and print the partition number on a
5184         invalid magic.
5186 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5188         * util/misc.c: Include <time.h>.
5189         (grub_millisleep): New function.
5191 2009-03-04  Bean  <bean123ch@gmail.com>
5193         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5194         another option -mno-red-zone.
5196         * commands/handler.c: Change module description.
5198         * kern/handler.c: Add missing space at the end of description line.
5200         * kern/list.c: Likewise.
5202 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5204         Move more components to the relocation area, and fix mbi pointer
5205         handling to use the destination rather than the origin (thanks to
5206         Vladimir Serbinenko for spotting).
5208         * loader/i386/multiboot.c (mbi_dest): New variable.
5209         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5210         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5211         relocation area.
5213 2009-03-01  Bean  <bean123ch@gmail.com>
5215         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5216         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5217         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5218         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5220         * loader/i386/efi/linux.c (acpi_guid): New variable.
5221         (acpi_guid): Likewise.
5222         (EBDA_SEG_ADDR): New constant.
5223         (LOW_MEM_ADDR): Likewise.
5224         (FAKE_EBDA_SEG): Likewise.
5225         (fake_bios_data): New function.
5226         (grub_linux_boot): Call fake_bios_data.
5228 2009-03-01  Bean  <bean123ch@gmail.com>
5230         * commands/terminal.c: Removed.
5232         * commands/handler.c: New file.
5234         * include/grub/list.h: Likewise.
5236         * include/grub/handler.h: Likewise.
5238         * kern/list.c: Likewise.
5240         * kern/handler.c: Likewise.
5242         * kern/term.h: Include header file <grub/handler.h>.
5243         (grub_term_input): Move next field to the beginning.
5244         (grub_term_output): Likewise.
5245         (grub_term_input_class): New variable.
5246         (grub_term_output_class): Likewise.
5247         (grub_term_register_input): Changed to inline function.
5248         (grub_term_register_output): Likewise.
5249         (grub_term_unregister_input): Likewise.
5250         (grub_term_unregister_output): Likewise.
5251         (grub_term_set_current_input): Likewise.
5252         (grub_term_set_current_output): Likewise.
5253         (grub_term_get_current_input): Likewise.
5254         (grub_term_get_current_output): Likewise.
5255         (grub_term_iterate_input): Removed.
5256         (grub_term_iterate_output): Likewise.
5258         * kern/term.c (grub_term_list_input): Removed.
5259         (grub_term_list_output): Likewise.
5260         (grub_term_input_class): New variable.
5261         (grub_term_output_class): Likewise.
5262         (grub_cur_term_input): Change variable as macro.
5263         (grub_cur_term_output): Likewise.
5264         (grub_term_register_input): Removed.
5265         (grub_term_register_output): Likewise.
5266         (grub_term_unregister_input): Likewise.
5267         (grub_term_unregister_output): Likewise.
5268         (grub_term_set_current_input): Likewise.
5269         (grub_term_set_current_output): Likewise.
5270         (grub_term_iterate_input): Likewise.
5271         (grub_term_iterate_output): Likewise.
5272         (grub_term_get_current_input): Likewise.
5273         (grub_term_get_current_output): Likewise.
5275         * util/grub-editenv.c: Include header file <grub/handler.h>.
5276         (grub_term_get_current_input): Removed.
5277         (grub_term_get_current_output): Likewise.
5278         (grub_term_input_class): New variable.
5279         (grub_term_output_class): Likewise.
5281         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5282         (grub_term_get_current_output): Likewise.
5283         (grub_term_input_class): New variable.
5284         (grub_term_output_class): Likewise.
5286         * util/grub-probe.c (grub_term_get_current_input): Removed.
5287         (grub_term_get_current_output): Likewise.
5288         (grub_term_input_class): New variable.
5289         (grub_term_output_class): Likewise.
5291         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5292         (grub_term_get_current_output): Likewise.
5293         (grub_term_input_class): New variable.
5294         (grub_term_output_class): Likewise.
5296         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5297         (terminal_mod_SOURCES): Likewise.
5298         (terminal_mod_CFLAGS): Likewise.
5299         (terminal_mod_LDFLAGS): Likewise.
5301         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5302         handler.c.
5303         (kernel_img_SOURCES): Add list.c and handler.c.
5304         (kernel_img_HEADERS): Add list.h and handler.h.
5306         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5307         handler.c.
5308         (kernel_mod_SOURCES): Add list.c and handler.c.
5309         (kernel_mod_HEADERS): Add list.h and handler.h.
5311         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5312         handler.c.
5313         (kernel_elf_SOURCES): Add list.c and handler.c.
5314         (kernel_elf_HEADERS): Add list.h and handler.h.
5316         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5317         handler.c.
5318         (kernel_elf_SOURCES): Add list.c and handler.c.
5319         (kernel_elf_HEADERS): Add list.h and handler.h.
5321         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5322         handler.c.
5323         (kernel_mod_SOURCES): Add list.c and handler.c.
5324         (kernel_mod_HEADERS): Add list.h and handler.h.
5326         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5327         handler.c.
5328         (kernel_elf_SOURCES): Add list.c and handler.c.
5329         (kernel_elf_HEADERS): Add list.h and handler.h.
5331 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5333         Factorize elf32 / elf64 code in Multiboot loader.  This will
5334         prevent it from getting out of sync again.
5336         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5337         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5338         grub_multiboot_load_elf64): Move from here ...
5339         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5340         grub_multiboot_load_elf): ... to here (new file).
5342 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5344         * util/grub.d/10_linux.in: Rename "single-user mode" to
5345         "recovery mode".
5347 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5349         Don't leak in SCSI code.
5350         * disk/scsi.c (grub_scsi_close): free `scsi'.
5352 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5354         * loader/i386/pc/multiboot.c: Move from here ...
5355         * loader/i386/multiboot.c: ... to here.  Update all users.
5357 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5359         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5360         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5362 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5364         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5365         b-tree.
5367 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5369         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5370         `0x' qualifier as 0 when base is specified as parameter).
5372 2009-02-24  Bean  <bean123ch@gmail.com>
5374         * configure.ac: Check for -mcmodel=large in x86_64 target.
5376         * include/grub/efi/api.h (efi_call_10): New macro.
5377         (efi_wrap_10): New function.
5379         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5380         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5381         (GRUB_PE32_REL_BASED_LOW): Likewise.
5382         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5383         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5384         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5385         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5386         (GRUB_PE32_REL_BASED_REL): Likewise.
5387         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5388         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5389         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5391         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5392         issue.
5394         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5395         (efi_wrap_10): New function.
5397         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5399         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5400         MB/MBP model (NV chipset).
5401         (devdata_devs): Add devpath_5 to the list.
5403         * load/i386/efi/linux.c (video_base): Remove variable.
5404         (RGB_MASK): New macro.
5405         (RGB_MAGIC): Likewise.
5406         (LINE_MIN): Likewise.
5407         (LINE_MAX): Likewise.
5408         (FBTEST_STEP): Likewise.
5409         (FBTEST_COUNT): Likewise.
5410         (fb_list): New variable.
5411         (grub_find_video_card): Remove function.
5412         (find_framebuf): New function.
5413         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5414         line length.
5416         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5417         problem for x86_64.
5419 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5421         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5423         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5424         coding tool name.
5426 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5428         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5429         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5430         in our relocation, instead of using it directly from heap.  Also
5431         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5433 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5435         Implement USB keyboard support (based on patch by Marco Gerards)
5437         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5438         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5439         (usb_keyboard_mod_LDFLAGS): New variables.
5441         * term/usb_keyboard.c: New file.
5443 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5445         Corrected wrong declaration
5447         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5449 2009-02-14  Christian Franke  <franke@computer.org>
5451         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5452         (grub_lspci_iter): Print class code and programming interface byte.
5454 2009-02-14  Christian Franke  <franke@computer.org>
5456         * gendistlist.sh: Ignore `.svn' directories.
5458 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5460         * fs/fat.c: Add 2009 to Copyright line.
5462 2009-02-14  Christian Franke  <franke@computer.org>
5464         * commands/hdparm.c: New file.  Provides `hdparm' command
5465         which sends ATA commands via grub_disk_ata_pass_through ().
5467         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5469         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5470         and <grub/cpu/io.h> to include/grub/ata.h.
5471         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5472         (GRUB_CDROM_SECTOR_SIZE): Remove.
5473         (GRUB_ATA_*): Move to include/grub/ata.h.
5474         (GRUB_ATAPI_*): Likewise.
5475         (enum grub_ata_commands): Likewise.
5476         (enum grub_ata_timeout_milliseconds): Likewise.
5477         (struct grub_ata_device): Likewise.
5478         (grub_ata_regset): Likewise.
5479         (grub_ata_regget): Likewise.
5480         (grub_ata_regset2): Likewise.
5481         (grub_ata_regget2): Likewise.
5482         (grub_ata_check_ready): Likewise.
5483         (grub_ata_wait_not_busy): Remove static, exported in
5484         include/grub/ata.h.
5485         (grub_ata_wait_drq): Likewise.
5486         (grub_ata_pio_read): Likewise.
5488         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5489         function for hdparm.mod.
5491         * include/grub/ata.h: New file, contains declarations from
5492         disk/ata.c.
5493         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5495         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5496         (grub_disk_ata_pass_through): New exported variable.
5498         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5500 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5502         Support multiple fallback entries, and provide an API to support
5503         executing default+fallback menu entries.  Renamed the `terminal' menu
5504         viewer to `text'.
5506         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5507         variable declaration.
5508         (grub_menu_execute_callback): New structure declaration.
5509         (grub_menu_execute_callback_t): New typedef.
5510         (grub_menu_execute_with_fallback): New function declaration.
5511         (grub_menu_get_entry): Likewise.
5512         (grub_menu_get_timeout): Likewise.
5513         (grub_menu_set_timeout): Likewise.
5515         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5517         * normal/menu.c (grub_wait_after_message): Moved to
5518         `normal/menu_text.c'.
5519         (draw_border): Likewise.
5520         (print_message): Likewise.
5521         (print_entry): Likewise.
5522         (print_entries): Likewise.
5523         (grub_menu_init_page): Likewise.
5524         (get_entry_number): Likewise.
5525         (print_timeout): Likewise.
5526         (run_menu): Likewise.
5527         (grub_menu_execute_entry): Likewise.
5528         (show_text_menu): Likewise.
5529         (get_and_remove_first_entry_number): New function.
5530         (grub_menu_execute_with_fallback): Likewise.
5531         (get_entry): Renamed to ...
5532         (grub_menu_get_entry): .. this and made it global.
5533         (get_timeout): Renamed to ...
5534         (grub_menu_get_timeout): ... this and made it global.
5535         (set_timeout): Renamed to ...
5536         (grub_menu_set_timeout): ... this and made it global.
5537         (grub_normal_terminal_menu_viewer): Renamed to ...
5538         (grub_normal_text_menu_viewer): ... this.
5540         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5541         from normal/menu.c.
5543         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5544         (normal_mod_SOURCES): Likewise.
5546         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5547         (normal_mod_SOURCES): Likewise.
5549         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5550         (normal_mod_SOURCES): Likewise.
5552         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5553         (normal_mod_SOURCES): Likewise.
5555         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5556         (normal_mod_SOURCES): Likewise.
5558         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5559         (normal_mod_SOURCES): Likewise.
5561         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5562         (normal_mod_SOURCES): Likewise.
5564 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5566         * util/grub.d/00_header.in: Update old reference to `font' command.
5568 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5570         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5572         Based on patch from Javier Martín.
5574 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5576         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5577         to avoid false positives with FAT.
5578         (grub_fstest_SOURCES): Likewise.
5579         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5580         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5581         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5582         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5583         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5584         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5586 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5588         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5589         bpb.version_specific.fat12_or_fat16.fstype and
5590         bpb.version_specific.fat32.fstype.
5592 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5594         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5596 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5598         * Makefile.in (host_os, host_cpu): New variables.
5599         (target_os): Remove.  Update all users.
5601 2009-02-08  Marco Gerards  <marco@gnu.org>
5603         * Makefile.in (enable_grub_emu_usb): New variable.
5604         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5605         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5606         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5607         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5608         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5609         `usbtest.mod' and `usbms.mod'.
5610         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5611         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5612         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5613         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5614         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5615         variables.
5617         * disk/usbms.c: New file.
5619         * include/grub/usb.h: Likewise.
5621         * include/grub/usbtrans.h: Likewise.
5623         * include/grub/usbdesc.h: Likewise.
5625         * bus/usb/usbtrans.c: Likewise.
5627         * bus/usb/ohci.c: Likewise.
5629         * bus/usb/uhci.c: Likewise.
5631         * bus/usb/usbhub.c: Likewise.
5633         * bus/usb/usb.c: Likewise.
5635         * commands/usbtest.c: Likewise.
5637         * util/usb.c: Likewise.
5639         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5641         * configure.ac: Test for libusb presence.
5643         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5645 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5647         * kern/mm.c: Add more comments.
5649 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5651         Patch from Javier Martín.
5652         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5653         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5655 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5657         * fs/cpio.c: Split tar functionality to ...
5658         * fs/tar.c: ... here (new file).  Update all users.
5660 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5662         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5663         backward-incompatible features.
5665         Based on patch from Javier Martín, with some adjustments.
5667 2009-02-07  Michael Scherer  <misc@mandriva.org>
5669         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5671 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5673         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5674         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5675         after the RAID stuff.
5677 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5679         Fixes problem when running vbetest command as reported by
5680         Vladimir Serbinenko <phcoder@gmail.com>.
5682         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5684 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5686         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5687         /dev/md/NpN style mdraid devices.
5689 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5691         * util/unifont2pff.rb: Remove.
5693 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5695         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5696         `#'.
5698 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5700         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5701         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5702         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5703         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5704         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5705         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5706         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5708 2009-02-02  Christian Franke  <franke@computer.org>
5710         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5712 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
5714         * INSTALL: Note that we now require at least autoconf 2.59 and
5715         that LZO is optional.
5717 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5719         Base on patch on bug #24154 created by Tomas Tintera
5720         <trosos@seznam.cz>.
5722         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5724 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5726         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5727         <bero@arklinux.org>.
5729         * normal/parser.y (script_init): Add missing semicolon.
5731 2009-01-31  Colin D Bennett  <colin@gibibit.com>
5733         * normal/main.c: Add include to grub/menu_viewer.h.
5734         (free_menu_entry_classes): Added.
5735         (grub_normal_menu_addentry): Added class property handling.
5736         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5737         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5739         * normal/menu_viewer.c: New file.
5741         * normal/menu.c (run_menu_entry): Renamed to ...
5742         (grub_menu_execute_entry): ... this and made it as global.
5743         (grub_menu_run): Renamed to ...
5744         (show_text_menu): ... this and made it local.
5745         (show_text_menu): Adapt to new function names.
5746         (grub_normal_terminal_menu_viewer): New global variable.
5748         * include/grub/menu.h: New file.
5750         * include/grub/menu_viewer.h: New file.
5752         * include/grub/normal.h: Added include to grub/menu.h.
5753         (grub_menu_entry): Moved to include/grub/menu.h.
5754         (grub_menu_entry_t): Likewise.
5755         (grub_menu): Likewise.
5756         (grub_menu_t): Likewise.
5757         (grub_normal_terminal_menu_viewer): Added.
5758         (grub_menu_execute_entry): Likewise.
5759         (grub_menu_run): Removed.
5761         * DISTLIST: Added include/grub/menu.h.
5762         Added include/grub/menu_viewer.h.
5763         Added normal/menu_viewer.c.
5765 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
5767         * normal/execute.c (grub_script_execute_menuentry): Changed to use
5768         arglist for menutitle arguments.
5770         * normal/main.c (grub_normal_menu_addentry): Likewise.
5772         * normal/parser.y (menuentry): Likewise.
5774         * normal/script.c (grub_script_create_cmdmenu): Likewise.
5776         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5777         (grub_script_create_cmdmenu): Likewise.
5779         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5781         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5782         changes.
5784         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5786         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5788         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5790         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5792         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5794         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5796 2009-01-30  Christian Franke  <franke@computer.org>
5798         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5799         in option help text.
5801 2009-01-27  Pavel Roskin  <proski@gnu.org>
5803         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5805 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5807         * commands/lsmmap.c: Add include to grub/machine/memory.h.
5809         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5811         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5812         unregister function.
5814 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5816         * disk/scsi.c (grub_scsi_read): Fix sign problem.
5818         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5820         * util/grub-mkfont.c (usage): Fix typo.
5822         * util/elf/grub-mkimage.c (load_modules): Fix warning.
5824 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
5826         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5828         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5830         * kern/misc.c (grub_strcasecmp): New function.
5831         (grub_strcasecmp): Use grub_size_t instead of int for length.
5832         Fix return value.
5833         * include/grub/misc.h: Update function prototypes.
5835 2009-01-26  Robert Millan  <rmh@aybabtu.com>
5837         * configure.ac: Fix cross-compilation check.
5839 2009-01-22  Christian Franke  <franke@computer.org>
5841         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5842         (precision) digit string.  Allow `.format2' without `format1' (width).
5843         Limit input chars for `%s' output to `format2' if specified.  This is
5844         compatible with standard printf ().
5846 2009-01-22  Christian Franke  <franke@computer.org>
5848         * disk/ata.c (grub_ata_wait_status): Replace by ...
5849         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
5850         other status bits may be invalid while BSY is asserted.
5851         (grub_ata_check_ready): New function.
5852         (grub_ata_cmd): Removed.
5853         (grub_ata_wait_drq): New function.
5854         (grub_ata_strncpy): Remove inline.
5855         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
5856         and error check now done by grub_ata_wait_drq ().
5857         (grub_ata_pio_write): Likewise.
5858         (grub_atapi_identify): Set DEV before check for !BSY.  Use
5859         grub_ata_wait_drq () to wait for data.
5860         (grub_ata_device_initialize): Add status register check to
5861         detect missing SATA slave devices.  Add debug messages.
5862         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5863         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
5864         transfer loop by grub_ata_pio_write ().
5865         (grub_ata_identify): Set DEV before check for !BSY. Use
5866         grub_ata_wait_drq () to wait for data.
5867         (grub_ata_setaddress): Set DEV before check for !BSY.
5868         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5869         read/write in one loop.  Fix invalid command on write.  Fix incomplete
5870         command on (size % batch) == 0.  Add missing error check after write of
5871         last block.  Add debug messages.
5872         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
5874 2009-01-19  Christian Franke  <franke@computer.org>
5876         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5877         (GRUB_ATAPI_IREASON_*): Likewise.
5878         (grub_ata_pio_write): Fix timeout error return.
5879         (grub_atapi_identify): Add grub_ata_wait () after cmd.
5880         (grub_atapi_wait_drq): New function.
5881         (grub_atapi_packet): New parameter `size'.
5882         Use grub_atapi_wait_drq () and direct write instead of
5883         grub_ata_pio_write ().
5884         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5885         reads the number of bytes requested by the device for each DRQ
5886         assertion.
5887         (grub_atapi_write): Remove old implementation, return not
5888         implemented instead.
5890 2009-01-19  Christian Franke  <franke@computer.org>
5892         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5893         of 512 to calculate data size.
5894         (grub_scsi_read12): Likewise.
5895         (grub_scsi_write10): Likewise.
5896         (grub_scsi_write12): Likewise.
5897         (grub_scsi_read): Adjust size according to blocksize.
5898         Add checks for invalid blocksize and unaligned transfer.
5900 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
5902         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5904         * term/gfxterm.c (write_char): Fix background rendering for wide
5905         width glyphs.
5907 2009-01-19  Robert Millan  <rmh@aybabtu.com>
5909         * config.guess: Update to latest version from config git.
5910         * config.sub: Likewise.
5912 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
5914         * Makefile.in: Change font compilation to use new grub-mkfont instead
5915         of java version.
5917         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5918         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5919         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5920         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5921         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5922         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5923         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5924         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5925         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5927 2009-01-16  Christian Franke  <franke@computer.org>
5929         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5930         (enum grub_ata_timeout_milliseconds): New enum.
5931         (grub_ata_wait_status): Add parameter milliseconds.
5932         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
5933         recovery from timed-out commands.
5934         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
5935         return grub_errno instead of REG_ERROR.
5936         (grub_ata_pio_write): Add parameter milliseconds.
5937         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5938         Pass milliseconds to grub_ata_wait_status () and
5939         grub_ata_pio_read ().
5940         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5941         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
5942         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
5943         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5944         It is not suitable for device detection, because DEV bit is ignored,
5945         the command may run too long, and not all devices set the signature
5946         properly.
5947         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5948         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5949         Fix device selection, DEV bit must be set first to address the registers
5950         of the correct device.
5951         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5952         grub_ata_pio_read/write ().
5953         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5954         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5956 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
5958         * util/grub-editenv.c (main): Use fseeko(), not fseek().
5960 2009-01-13  Bean  <bean123ch@gmail.com>
5962         * util/grub-mkfont.c (write_font): forget to remove some debug code.
5964 2009-01-13  Bean  <bean123ch@gmail.com>
5966         * Makefile.in: (enable_grub_mkfont): New variable.
5967         (freetype_cflags): Likewise.
5968         (freetype_libs): Likewise.
5970         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5971         (grub_mkfont_SOURCES): New variable.
5972         (grub_mkfont_CFLAGS): Likewise.
5973         (grub_mkfont_LDFLAGS): Likewise.
5975         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5976         library if `--enable-grub-mkfont' is requested.
5977         (enable_grub_mkfont): New variable.
5978         (freetype_cflags): Likewise.
5979         (freetype_libs): Likewise.
5981         * util/grub-mkfont.c: New file.
5983 2009-01-12  Christian Franke  <franke@computer.org>
5985         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5986         mode check.  Fix setting of compat_use[].
5988 2009-01-10  Robert Millan  <rmh@aybabtu.com>
5990         Update a few copyright years which we forgot to do in 2008 (only for
5991         files whose changes made in 2008 were copyright-significant)
5993         * Makefile.in: Add 2008 to Copyright line.
5994         * disk/ieee1275/ofdisk.c: Likewise.
5995         * disk/efi/efidisk.c: Likewise.
5996         * kern/dl.c: Likewise.
5997         * kern/sparc64/ieee1275/init.c: Likewise.
5998         * kern/mm.c: Likewise.
5999         * kern/efi/mm.c: Likewise.
6000         * boot/i386/pc/boot.S: Likewise.
6001         * genfslist.sh: Likewise.
6002         * fs/iso9660.c: Likewise.
6003         * fs/hfs.c: Likewise.
6004         * fs/jfs.c: Likewise.
6005         * fs/minix.c: Likewise.
6006         * fs/ufs.c: Likewise.
6007         * gensymlist.sh.in: Likewise.
6008         * genkernsyms.sh.in: Likewise.
6009         * include/grub/misc.h: Likewise.
6010         * include/grub/types.h: Likewise.
6011         * include/grub/symbol.h: Likewise.
6012         * include/grub/elf.h: Likewise.
6013         * include/grub/kernel.h: Likewise.
6014         * include/grub/disk.h: Likewise.
6015         * include/grub/dl.h: Likewise.
6016         * include/grub/i386/linux.h: Likewise.
6017         * include/grub/i386/pc/biosdisk.h: Likewise.
6018         * include/grub/efi/api.h: Likewise.
6019         * include/grub/efi/pe32.h: Likewise.
6020         * include/grub/util/misc.h: Likewise.
6021         * normal/execute.c: Likewise.
6022         * normal/arg.c: Likewise.
6023         * normal/completion.c: Likewise.
6024         * normal/lexer.c: Likewise.
6025         * normal/parser.y: Likewise.
6026         * normal/misc.c: Likewise.
6027         * commands/i386/pc/vbeinfo.c: Likewise.
6028         * commands/hexdump.c: Likewise.
6029         * commands/terminal.c: Likewise.
6030         * commands/ls.c: Likewise.
6031         * commands/help.c: Likewise.
6032         * partmap/pc.c: Likewise.
6033         * loader/efi/chainloader.c: Likewise.
6034         * loader/multiboot_loader.c: Likewise.
6035         * loader/i386/pc/multiboot2.c: Likewise.
6036         * term/efi/console.c: Likewise.
6037         * term/i386/pc/serial.c: Likewise.
6038         * util/lvm.c: Likewise.
6039         * util/console.c: Likewise.
6040         * util/i386/efi/grub-mkimage.c: Likewise.
6041         * util/raid.c: Likewise.
6043 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6045         * commands/videotest.c: Removed include to grub/machine/memory.h.
6047         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6048         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6049         (video_mod_SOURCES): Removed.
6050         (video_mod_CFLAGS): Likewise.
6051         (video_mod_LDFLAGS): Likewise.
6052         (gfxterm_mod_SOURCES): Likewise.
6053         (gfxterm_mod_CFLAGS): Likewise.
6054         (gfxterm_mod_LDFLAGS): Likewise.
6055         (videotest_mod_SOURCES): Likewise.
6056         (videotest_mod_CFLAGS): Likewise.
6057         (videotest_mod_LDFLAGS): Likewise.
6058         (bitmap_mod_SOURCES): Likewise.
6059         (bitmap_mod_CFLAGS): Likewise.
6060         (bitmap_mod_LDFLAGS): Likewise.
6061         (tga_mod_SOURCES): Likewise.
6062         (tga_mod_CFLAGS): Likewise.
6063         (tga_mod_LDFLAGS): Likewise.
6064         (jpeg_mod_SOURCES): Likewise.
6065         (jpeg_mod_CFLAGS): Likewise.
6066         (jpeg_mod_LDFLAGS): Likewise.
6067         (png_mod_SOURCES): Likewise.
6068         (png_mod_CFLAGS): Likewise.
6069         (png_mod_LDFLAGS): Likewise.
6071         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6072         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6073         (video_mod_SOURCES): Added.
6074         (video_mod_CFLAGS): Likewise.
6075         (video_mod_LDFLAGS): Likewise.
6076         (videotest_mod_SOURCES): Likewise.
6077         (videotest_mod_CFLAGS): Likewise.
6078         (videotest_mod_LDFLAGS): Likewise.
6079         (bitmap_mod_SOURCES): Likewise.
6080         (bitmap_mod_CFLAGS): Likewise.
6081         (bitmap_mod_LDFLAGS): Likewise.
6082         (tga_mod_SOURCES): Likewise.
6083         (tga_mod_CFLAGS): Likewise.
6084         (tga_mod_LDFLAGS): Likewise.
6085         (jpeg_mod_SOURCES): Likewise.
6086         (jpeg_mod_CFLAGS): Likewise.
6087         (jpeg_mod_LDFLAGS): Likewise.
6088         (png_mod_SOURCES): Likewise.
6089         (png_mod_CFLAGS): Likewise.
6090         (png_mod_LDFLAGS): Likewise.
6091         (gfxterm_mod_SOURCES): Likewise.
6092         (gfxterm_mod_CFLAGS): Likewise.
6093         (gfxterm_mod_LDFLAGS): Likewise.
6095         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6096         grub/machine/console.h.
6098 2009-01-04  Jerone Young  <jerone@gmail.com>
6100         Make on screen instructions clearer
6102         Based on patch created by Jidanni <jidanni@jidanni.org>
6104         * normal/menu.c: print clearer instructions on the screen
6106 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6108         New font engine.
6110         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6111         build system and fixed gfxterm.c to work with different sized fonts.
6113         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6115         * configure: Re-generated.
6117         * DISTLIST: Removed font/manager.c.
6118         Added font/font.c.
6119         Added font/font_cmd.c.
6121         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6122         compilation.
6124         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6126         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6128         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6130         * normal/menu.c: Likewise.
6132         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6133         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6135         * include/grub/font.h: Replaced with new file.
6137         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6138         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6139         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6140         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6141         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6142         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6143         fg_red, fg_green, fg_blue, fg_alpha.
6144         (grub_video_adapter): Removed blit_glyph.
6145         (grub_video_blit_glyph): Removed.
6147         * font/manager.c: Removed file.
6149         * font/font.c: New file.
6151         * font/font_cmd.c: Likewise.
6153         * video/video.c (grub_video_blit_glyph): Removed.
6155         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6156         (grub_video_vbe_map_rgba): Likewise.
6157         (grub_video_vbe_unmap_color_int): Likewise.
6158         (grub_video_vbe_blit_glyph): Removed.
6159         (grub_video_vbe_adapter): Removed blit_glyph.
6161         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6162         (get_pixel): Likewise.
6163         (set_pixel): Likewise.
6165         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6167         * term/gfxterm.c: Adapted to new font engine.
6169         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6171         * term/i386/pc/vga.c: Likewise.
6173         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6175         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6177         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6179         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6181         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6183         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6185         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6187         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6189         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6191         * util/grub.d/00_header.in: Changed to use new loadfont command.
6193         * util/grub-mkconfig_lib.in: Changed font extension.
6195 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6197         * util/getroot.c (grub_util_get_grub_dev): Add support for
6198         /dev/md/dNNpNN style partitionable mdraid devices.
6200 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6202         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6203         at a time limit of the PXE TFTP API correctly.
6204         (grub_pxefs_close): Likewise.
6206 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6208         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6209         grub_ata_device_initialize() calls.
6211 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6213         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6214         iteration failed.
6215         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6217 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6219         Fix build on powerpc-ieee1275.  Based on patch created by
6220         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6221         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6222         `kern/ieee1275/mmap.c'.
6223         * include/grub/powerpc/ieee1275/memory.h: New file.
6225         Provide grub-install on coreboot.
6226         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6227         (grub_install_SOURCES): New variable.
6228         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6229         usable on coreboot.
6231 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6233         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6234         to `grub_term_input_t'.
6235         (grub_term_get_current_output): Change return type to
6236         `grub_term_output_t'.
6238 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6240         Fix breakage on coreboot due to declaration mismatch.
6241         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6242         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6243         grub_vga_text_cls().
6245         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6246         comments.  Avoid copying one more byte than necessary (just in case).
6248         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6249         to 0x200000 (avoids trouble with some OFW implementations, and matches
6250         with the one in Yaboot).
6251         Reported by Manoel Abranches
6253 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6255         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6256         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6258         * util/grub-mkconfig_lib.in (grub_warn): New function.
6259         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6260         warnings, to obtain consistent formatting.
6261         * util/grub.d/00_header.in: Likewise.
6262         * util/update-grub_lib.in: Likewise.
6264         * loader/i386/linux.c (allocate_pages): Fix a warning.
6265         Move comment text to `#error' stanza.
6267         Harmonize ieee1275's grub_available_iterate() with the generic
6268         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6269         build problem on i386-ieee1275):
6270         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6271         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6272         parameter `type'.  Update all users of this function.
6273         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6274         `kern/ieee1275/mmap.c'.
6275         * kern/ieee1275/init.c
6276         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6277         with ...
6278         (grub_machine_mmap_iterate): ... this.
6279         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6280         return type to `grub_err_t'.  Update all implementations of this
6281         function prototype.
6282         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6283         Likewise.
6285         Add `lsmmap' command (lists firmware-provided memory map):
6286         * commands/lsmmap.c: New file.
6287         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6288         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6289         variables.
6290         * conf/powerpc-ieee1275.rmk: Likewise.
6291         * conf/i386-coreboot.rmk: Likewise.
6292         * conf/i386-ieee1275.rmk: Likewise.
6294 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6296         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6297         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6298         constraints to initrd allocation (based on code from
6299         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6300         for Linux to find it.
6302 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6304         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6305         order to cope with duplicate slashes.
6307 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6309         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6310         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6311         don't want to mess with lower memory, because it is used in the Linux
6312         loader.
6314         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6315         an appropriate place in lower memory, between 0x10000 and 0x90000,
6316         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6317         is in our heap (probably as a result of it being corrupted during
6318         decompression).  Add #error instance with comment to explain why this
6319         loader isn't currently usable on PC/BIOS.
6321 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6323         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6324         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6326 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6328         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6330         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6331         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6332         from here ...
6333         * include/grub/i386/pc/memory.h: ... to here.
6335 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6337         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6338         split).
6340         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6341         (grub_console_cur_color, grub_console_real_putchar)
6342         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6343         (grub_console_setcolorstate, grub_console_setcolor)
6344         (grub_console_getcolor): Move from here ...
6345         * include/grub/i386/vga_common.h: ... to here (new file).
6347         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6348         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6349         `<grub/i386/io.h>'.
6350         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6351         `<grub/i386/vga_common.h>'.
6353 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6355         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6356         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6357         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6358         variables.
6359         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6360         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6362         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6363         grub_console_init() with call to grub_vga_text_init().
6364         (grub_machine_fini): Replace call to
6365         grub_console_fini() with call to grub_vga_text_fini() and
6366         grub_at_keyboard_fini().
6368         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6369         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6370         (grub_console_setcolorstate, grub_console_setcolor)
6371         (grub_console_getcolor): New function prototypes.
6373         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6374         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6375         (grub_vga_text_setcursor): Static-ize.
6376         (grub_vga_text_term): New structure.
6377         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6379         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6380         (grub_console_cur_color, grub_console_standard_color)
6381         (grub_console_normal_color, grub_console_highlight_color)
6382         (map_char, grub_console_putchar, grub_console_getcharwidth)
6383         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6384         (grub_console_getcolor): Move from here ...
6385         * term/i386/vga_common.c: ... to here (same function names).
6387 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6389         Use newly-added Multiboot support in coreboot.
6391         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6392         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6394         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6395         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6396         (codestart): Store the MBI in `startup_multiboot_info' when we're
6397         being loaded using Multiboot.
6399         * kern/i386/coreboot/init.c (grub_machine_init): Move
6400         grub_at_keyboard_init() call to beginning of function (useful for
6401         debugging).  Call grub_machine_mmap_init() before attempting to use
6402         grub_machine_mmap_iterate().
6403         (grub_lower_mem, grub_upper_mem): Move from here ...
6404         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6405         here (new file).
6407         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6408         function prototype.
6410 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6412         Fix a regression introduced by the at_keyboard.mod split.  Because
6413         some terminals are default on some platforms and non-default on
6414         others, the first terminal being registered determines which is
6415         going to be default.
6417         * kern/term.c (grub_term_register_input): If this is the first
6418         terminal being registered, set it as the current one.
6419         (grub_term_register_output): Likewise.
6421         * term/efi/console.c (grub_console_init): Do not call
6422         grub_term_set_current_output() or grub_term_set_current_input().
6423         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6424         * term/i386/pc/console.c (grub_console_init): Likewise.
6425         (grub_console_fini): Do not call grub_term_set_current_input()
6426         (but leave grub_term_set_current_output() to restore text mode).
6428 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6430         * util/grub.d/00_header.in: Add backward compatibility check for
6431         versions of terminal.mod that don't understand `terminal_input' or
6432         `terminal_output'.
6434 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6436         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6437         `terminal_input' / `terminal_output', not `terminal'.
6439 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6441         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6442         (DISTCLEANFILES): Add `build_env.mk'.
6444 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6446         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6447         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6448         members.  Update all users.
6449         * util/console.c (grub_ncurses_term): Split in ...
6450         (grub_ncurses_term_input): ... this, and ...
6451         (grub_ncurses_term_output): ... this.  Update all users.
6452         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6454 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6456         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6457         (PKGDATA): Add $(pkgdata_SRCDIR).
6458         (pkglib_BUILDDIR): New variable.
6459         (pkgdata_SRCDIR): New variable.
6460         (build_env.mk): New target.
6461         (include_DATA): New variable.
6462         (install-local): Install $(include_DATA) files in $(includedir).
6464 2008-11-07  Pavel Roskin  <proski@gnu.org>
6466         * gendistlist.sh: Use C locale for sorting to ensure consistent
6467         output on all systems.
6469         * util/grub.d/00_header.in: Remove incorrect space before
6470         "serial".
6472 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6474         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6475         per specification.
6476         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6477         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6478         (based on find_multi_boot1_header).
6479         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6480         using find_multi_boot2_header(), and abort if neither Multiboot or
6481         Multiboot headers were found.
6483 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6485         Modularize at_keyboard.mod:
6487         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6488         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6489         (at_keyboard_mod_LDFLAGS): New variables.
6491         Actual terminal split:
6493         * include/grub/term.h (struct grub_term): Split in ...
6494         (struct grub_term_input): ... this, and ...
6495         (struct grub_term_output): ... this.  Update all users.
6496         (grub_term_set_current): Split in ...
6497         (grub_term_set_current_input): ... this, and ...
6498         (grub_term_set_current_output): ... this.
6499         (grub_term_get_current): Split in ...
6500         (grub_term_get_current_input): ... this, and ...
6501         (grub_term_get_current_output): ... this.
6502         (grub_term_register): Split in ...
6503         (grub_term_register_input): ... this, and ...
6504         (grub_term_register_output): ... this.
6505         (grub_term_unregister): Split in ...
6506         (grub_term_unregister_input): ... this, and ...
6507         (grub_term_unregister_output): ... this.
6508         (grub_term_iterate): Split in ...
6509         (grub_term_iterate_input): ... this, and ...
6510         (grub_term_iterate_output): ... this.
6512         * kern/term.c (grub_term_list): Split in ...
6513         (grub_term_list_input): ... this, and ...
6514         (grub_term_list_output): ... this.  Update all users.
6515         (grub_cur_term): Split in ...
6516         (grub_cur_term_input): ... this, and ...
6517         (grub_cur_term_output): ... this.  Update all users.
6518         (grub_term_set_current): Split in ...
6519         (grub_term_set_current_input): ... this, and ...
6520         (grub_term_set_current_output): ... this.
6521         (grub_term_get_current): Split in ...
6522         (grub_term_get_current_input): ... this, and ...
6523         (grub_term_get_current_output): ... this.
6524         (grub_term_register): Split in ...
6525         (grub_term_register_input): ... this, and ...
6526         (grub_term_register_output): ... this.
6527         (grub_term_unregister): Split in ...
6528         (grub_term_unregister_input): ... this, and ...
6529         (grub_term_unregister_output): ... this.
6530         (grub_term_iterate): Split in ...
6531         (grub_term_iterate_input): ... this, and ...
6532         (grub_term_iterate_output): ... this.
6534         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6535         a check for input and one for output (and only attempt to get keys
6536         from user when input works).
6538         * util/grub-probe.c (grub_term_get_current): Split in ...
6539         (grub_term_get_current_input): ... this, and ...
6540         (grub_term_get_current_output): ... this.
6541         * util/grub-fstest.c: Likewise.
6542         * util/i386/pc/grub-setup.c: Likewise.
6543         * util/grub-editenv.c: Likewise.
6545         Portability adjustments:
6547         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6548         `term/i386/pc/at_keyboard.c'.
6549         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6550         grub_keyboard_controller_init() (now handled by terminal .init).
6551         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6552         grub_at_keyboard_init().
6553         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6554         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6555         at_keyboard.mod via input terminal interface).
6556         * include/grub/i386/coreboot/console.h: Convert into a stub for
6557         `<grub/i386/pc/console.h>'.
6559         Migrate full terminals to new API:
6561         * term/efi/console.c (grub_console_term): Split into ...
6562         (grub_console_term_input): ... this, and ...
6563         (grub_console_term_output): ... this.  Update all users.
6564         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6565         (grub_ofconsole_init): Split into ...
6566         (grub_ofconsole_init_input): ... this, and ...
6567         (grub_ofconsole_init_output): ... this.
6568         (grub_ofconsole_term): Split into ...
6569         (grub_ofconsole_term_input): ... this, and ...
6570         (grub_ofconsole_term_output): ... this.  Update all users.
6571         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6572         (grub_serial_term_input): ... this, and ...
6573         (grub_serial_term_output): ... this.  Update all users.
6574         * term/i386/pc/console.c (grub_console_term): Split into ...
6575         (grub_console_term_input): ... this, and ...
6576         (grub_console_term_output): ... this.  Update all users.
6577         (grub_console_term_input): Only enable it on PC/BIOS platform.
6578         (grub_console_init): Remove grub_keyboard_controller_init() call.
6580         Migrate input terminals to new API:
6582         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6583         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6584         i386-specific anyway).
6585         (grub_console_checkkey): Rename to ...
6586         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6587         users.
6588         (grub_keyboard_controller_orig): New variable.
6589         (grub_console_getkey): Rename to ...
6590         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6591         users.
6592         (grub_keyboard_controller_init): Static-ize.  Save original
6593         controller value so that it can be restored ...
6594         (grub_keyboard_controller_fini): ... here (new function).
6595         (grub_at_keyboard_term): New structure.
6596         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6597         functions.
6599         Migrate output terminals to new API:
6601         * term/i386/pc/vga.c (grub_vga_term): Change type to
6602         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6603         members.  Update all users.
6604         * term/gfxterm.c (grub_video_term): Change type to
6605         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6606         members.  Update all users.
6607         * include/grub/i386/pc/console.h (grub_console_checkkey)
6608         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6609         etc).
6611         Migrate `terminal' command and userland tools to new API:
6613         * commands/terminal.c (grub_cmd_terminal): Split into ...
6614         (grub_cmd_terminal_input): ... this, and ...
6615         (grub_cmd_terminal_output): ... this.
6616         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6617         `terminal_input' and `terminal_output'.
6618         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6619         `terminal_input' / `terminal_output' API.
6620         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6621         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6622         provided ${GRUB_TERMINAL}, convert it).
6624 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6626         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6627         for FreeBSD.
6628         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6630 2008-11-03  Bean  <bean123ch@gmail.com>
6632         * kern/elf.c (grub_elf32_load): Revert to previous code.
6633         (grub_elf64_load): Likewise.
6635         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6637 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6639         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6640         (TARGET_CPPFLAGS): Likewise.
6641         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6643 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6645         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6647 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6649         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6650         addition of objects until the code is not going to be able to fail.
6652 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6654         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6655         (add a missing NULL check, and correct them by moving the pointer
6656         operations after the actual check).
6658 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6660         * util/i386/pc/grub-install.in: Handle empty string as output from
6661         make_system_path_relative_to_its_root().
6663 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6665         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6666         circular metadata worst case scenario. If the metadata is circular
6667         then copy the wrap in place.
6668         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6669         project lib/format_text/layout.h
6670         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6672 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6674         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6676 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6678         * util/update-grub_lib.in: Mention filename in warning message.
6680 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6682         * NEWS: Update for rename of update-grub to grub-mkconfig.
6684 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6686         * util/update-grub_lib.in: Copy to ...
6687         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6688         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6689         * util/update-grub.in: Rename to ...
6690         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6691         option. Add `--output' option to allow users to specify the generated
6692         configuration file.  Default to stdout.
6693         (update_grub_dir): Rename to ...
6694         (grub_mkconfig_dir): ... this.
6695         (grub_cfg): Default to an empty string.
6696         * conf/common.rmk (update-grub): Rename to ...
6697         (grub-mkconfig): ... this.
6698         (update-grub_lib): Copy to ...
6699         (grub-mkconfig_lib): ... this.
6700         (update-grub_SCRIPTS): Copy to ...
6701         (grub-mkconfig_SCRIPTS): ... this. Update all users.
6702         (update-grub_DATA): Rename to ...
6703         (grub-mkconfig_DATA): ... this.
6705 2008-09-28  Robert Millan  <rmh@aybabtu.com>
6707         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6708         to `modified'.  Add the real `created' field.
6709         (grub_iso9660_uuid): Use `modified' rather than `created' for
6710         constructing the UUID.
6712 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
6714         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6715         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6717 2008-09-28  Bean  <bean123ch@gmail.com>
6719         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6720         Thanks to Christian Franke for finding this bug.
6722 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6724         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6725         instances of grub_util_get_disk_name() (see previous commit).
6727 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6729         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6730         `util/i386/get_disk_name.c'.
6731         * conf/i386-efi.rmk: Likewise.
6732         * conf/x86_64-efi.rmk: Likewise.
6733         * conf/i386-coreboot.rmk: Likewise.
6734         * conf/i386-ieee1275.rmk: Likewise.
6735         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6736         `util/ieee1275/get_disk_name.c'.
6737         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6738         * util/ieee1275/get_disk_name.c: Remove file.
6739         * util/i386/get_disk_name.c: Remove file.
6740         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6741         "hd%d" for device.map entries, rather than using
6742         grub_util_get_disk_name().
6744 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6746         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6747         warning.
6748         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6750 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6752         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6753         Changed to 0x5100.
6754         (GRUB_TERM_PPAGE): Changed to 0x4900.
6756 2008-09-24  Robert Millan  <rmh@aybabtu.com>
6758         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6759         macros (they were i386-pc specific).
6760         * include/grub/sparc64/ieee1275/console.h: Likewise.
6761         * include/grub/efi/console.h: Likewise.
6763 2008-09-22  Bean  <bean123ch@gmail.com>
6765         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6766         resident and in attribute list.
6768         * include/grub/ntfs.h (BMP_LEN): Removed.
6770 2008-09-22  Bean  <bean123ch@gmail.com>
6772         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6773         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6775         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6776         error occurs, as grub_disk_open will call grub_disk_close, which will
6777         call p->close (scsi).
6779 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6781         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6782         (AC_PREREQ): Bumped to 2.59.
6783         (AC_TRY_COMPILE): Replace obsolete macro with ...
6784         (AC_COMPILE_IFELSE): ... this.
6785         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6786         (AC_LINK_IFELSE): ... this.
6788 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6790         * autogen.sh: Add a call to `gendistlist.sh'.
6792 2008-09-19  Christian Franke  <franke@computer.org>
6794         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6795         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6796         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6797         Export __enable_execute_stack() to modules.
6798         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6799         New function.
6801 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6803         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6804         Sort the list.
6806 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6808         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6809         #include <grub/util/hostdisk.h>.
6811 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6813         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6814         segments when their filesz is zero (grub_file_read() interprets
6815         zero-size as "read until EOF", which results in memory corruption).
6816         Use `lowest_segment' rather than 0 for calculating the current
6817         segment load address.
6819 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6821         * util/hostdisk.c (open_device): Replace a grub_util_info() call
6822         with grub_dprintf("hostdisk", ...), as it was so verbose that it
6823         clobbered useful information.
6825 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6827         * include/grub/util/biosdisk.h: Move to ...
6828         * include/grub/util/hostdisk.h: ... here.  Update all users.
6829         * util/biosdisk.c: Move to ...
6830         * util/hostdisk.c: ... here.  Update all users.
6832 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6834         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6835         variables.
6836         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6837         and length can be stored directly in the `mbi->mmap_addr' and
6838         `mbi->mmap_length' struct fields.
6840 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6842         * conf/i386.rmk: New file.  Provides declaration for building
6843         `cpuid.mod'.
6844         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6845         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6846         variables.
6847         Include `conf/i386.mk'.
6848         * conf/i386-efi.rmk: Likewise.
6849         * conf/x86_64-efi.rmk: Likewise.
6850         * conf/i386-coreboot.rmk: Likewise.
6851         * conf/i386-ieee1275.rmk: Likewise.
6853 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
6855         Based on patch created by Colin D Bennett <colin@gibibit.com>.
6856         Adds optimization support for BGR based modes.
6858         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6859         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6860         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6861         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6862         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6863         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6864         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6865         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6866         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6867         (grub_video_i386_vbeblit_index_index): Likewise.
6868         (grub_video_i386_vbeblit_replace_directN): Added.
6869         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6870         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6871         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6872         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6873         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6874         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6875         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6876         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6877         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6878         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6879         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6880         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6881         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6883         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6884         (grub_video_i386_vbefill_R8G8B8): Likewise.
6885         (grub_video_i386_vbefill_index): Likewise.
6886         (grub_video_i386_vbefill_direct32): Added.
6887         (grub_video_i386_vbefill_direct24): Likewise.
6888         (grub_video_i386_vbefill_direct16): Likewise.
6889         (grub_video_i386_vbefill_direct8): Likewise.
6891         * include/grub/video.h (grub_video_blit_format): Removed
6892         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6893         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6894         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6895         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6896         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6898         * video/video.c (grub_video_get_blit_format): Updated to use new
6899         blit formats.  Added handling for 16 bit color modes.
6901         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6902         fillers.
6903         (common_blitter): Updated to use new blitters.
6905         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6906         Removed.
6907         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6908         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6909         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6910         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6911         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6912         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6913         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6914         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6915         (grub_video_i386_vbeblit_index_index): Likewise.
6916         (grub_video_i386_vbeblit_replace_directN): Added.
6917         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6918         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6919         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6920         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6921         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6922         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6923         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6924         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6925         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6926         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6927         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6928         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6929         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6931         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6932         (grub_video_i386_vbefill_R8G8B8): Likewise.
6933         (grub_video_i386_vbefill_index): Likewise.
6934         (grub_video_i386_vbefill_direct32): Added.
6935         (grub_video_i386_vbefill_direct24): Likewise.
6936         (grub_video_i386_vbefill_direct16): Likewise.
6937         (grub_video_i386_vbefill_direct8): Likewise.
6939         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6940         types.
6942         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6943         types.
6945         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6946         blitter types.
6948         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6949         types.
6951 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6953         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6954         RAID level 1.
6956 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6958         * fs/iso9660.c (grub_iso9660_date): New structure.
6959         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6960         (grub_iso9660_uuid): New function.
6962 2008-09-05  Bean  <bean123ch@gmail.com>
6964         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6966         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6967         insensitive bit for names in Win32 and Win32 & DOS namespace.
6969         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6971         * include/grub/types.h (LONG_MAX): Likewise.
6973 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6975         * util/getroot.c: Include <config.h>.
6976         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6977         add support for /dev/md/N devices and handle LVM double dash escaping.
6979 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6981         * config.guess: Update to latest version from config git.
6982         * config.sub: Likewise.
6984 2008-09-03  Robert Millan  <rmh@aybabtu.com>
6986         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6987         `disk->total_sectors'.
6989 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6991         * include/grub/normal.h: Fixed incorrect comment for
6992         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6994 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6996         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6997         values with defines.
6999         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
7000         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
7001         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
7002         (GRUB_VBE_MODEATTR_COLOR): Likewise.
7003         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
7004         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7005         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7006         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7007         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7008         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7009         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7010         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7011         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7012         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7013         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7014         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7015         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7016         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7017         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7019 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7021         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7022         declaration.
7023         (grub_multiboot): Fix a few warnings.
7025 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7027         * loader/i386/pc/multiboot.c: Update comment not to say that
7028         boot_device support is unimplemented.
7030 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7032         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7033         or memory map support are unimplemented.
7035 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7037         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7039 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7041         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7042         total video memory in 'vbeinfo' output; show color format details for
7043         each video mode.
7045 2008-08-30  Pavel Roskin  <proski@gnu.org>
7047         * util/genmoddep.c: Remove for real this time.
7048         * DISTLIST: Remove util/genmoddep.c.
7050 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7052         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7053         as required by Multiboot spec (it was already 4-byte aligned, but
7054         only by chance).
7056 2008-08-29  Pavel Roskin  <proski@gnu.org>
7058         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7059         * kern/powerpc/ieee1275/startup.S: ... this.
7060         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7061         * DISTLIST: Likewise.
7063         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7064         grub/cpu/kernel.h.  Add start label for consistency with other
7065         platforms.  Add grub_prefix immediately after start.  Add jump
7066         to the code after grub_prefix.
7067         * include/grub/powerpc/kernel.h: Provide valid values for
7068         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7070 2008-08-29  Bean  <bean123ch@gmail.com>
7072         * configure.ac: Change host_os to cygwin for mingw.
7073         (asprintf): New check for function.
7075         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7076         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7078         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7079         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7080         sync, sleep and grub_util_get_disk_size for mingw.
7082         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7083         to get size in mingw.
7084         (open_device): Use flag O_BINARY if it's defined.
7085         (find_root_device): Add dummy code for mingw.
7087         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7088         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7089         (get_scsi_disk_name): Return 0 for mingw.
7091         * util/hostfs.c: #include <grub/util/misc.h>.
7092         (grub_hostfs_open): Use "rb" flag to open file, use
7093         grub_util_get_disk_size to get disk size for mingw.
7095         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7096         (asprintf): New function if HAVE_ASPRINTF is not set.
7097         (sync): New function for mingw.
7098         (sleep): Likewise.
7099         (grub_util_get_disk_size): Likewise.
7101 2008-08-28  Pavel Roskin  <proski@gnu.org>
7103         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7104         kern/time.c.
7106 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7108         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7110 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7112         Change find_grub_drive() syntax so it doesn't prevent it from
7113         detecting NULL names as errors.
7115         * util/biosdisk.c (find_grub_drive): Move free slot search code
7116         from here ...
7117         (find_free_slot): ... to here.
7118         (read_device_map): Use find_free_slot() to search for free slots.
7120 2008-08-27  Marco Gerards  <marco@gnu.org>
7122         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7123         (scsi_mod_SOURCES): New variable.
7124         (scsi_mod_CFLAGS): Likewise
7125         (scsi_mod_LDFLAGS): Likewise.
7127         * disk/scsi.c: New file.
7129         * include/grub/scsi.h: Likewise.
7131         * include/grub/scsicmd.h: Likewise.
7133         * disk/ata.c: Include <grub/scsi.h>.
7134         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7135         instead.
7136         (grub_ata_iterate): Skip ATAPI devices.
7137         (grub_ata_open): Only handle ATAPI devices.
7138         (struct grub_atapi_read): Removed.
7139         (grub_atapi_readsector): Likewise.
7140         (grub_ata_read): No longer handle ATAPI devices.
7141         (grub_ata_write): Likewise.
7142         (grub_atapi_iterate): New function.
7143         (grub_atapi_read): Likewise.
7144         (grub_atapi_write): Likewise.
7145         (grub_atapi_open): Likewise.
7146         (grub_atapi_close): Likewise.
7147         (grub_atapi_dev): New variable.
7148         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7149         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7151         * include/grub/disk.h (enum grub_disk_dev_id): Add
7152         `GRUB_DISK_DEVICE_SCSI_ID'.
7154 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7156         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7157         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7158         descriptive.
7160 2008-08-23  Bean  <bean123ch@gmail.com>
7162         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7163         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7164         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7165         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7166         dm_nv.mod.
7167         (raid5rec_mod_SOURCES): New macro.
7168         (raid5rec_mod_CFLAGS): Likewise.
7169         (raid5rec_mod_LDFLAGS): Likewise.
7170         (raid6rec_mod_SOURCES): Likewise.
7171         (raid6rec_mod_CFLAGS): Likewise.
7172         (raid6rec_mod_LDFLAGS): Likewise.
7173         (mdraid_mod_SOURCES): Likewise.
7174         (mdraid_mod_CFLAGS): Likewise.
7175         (mdraid_mod_LDFLAGS): Likewise.
7176         (dm_nv_mod_SOURCES): Likewise.
7177         (dm_nv_mod_CFLAGS): Likewise.
7178         (dm_nv_mod_LDFLAGS): Likewise.
7180         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7181         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7182         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7184         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7185         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7187         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7189         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7191         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7193         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7195         * disk/raid5_recover.c: New file.
7197         * disk/raid6_recover.c: Likewise.
7199         * disk/mdraid_linux.c: Likewise.
7201         * disk/dmraid_nvidia.c: Likewise.
7203         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7204         ULONG_MAX.
7206         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7207         calculate the size of raid device.
7208         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7209         different layout of raid5.
7210         (grub_raid_scan_device): Remove code specific to mdraid.
7211         (grub_raid_list): New variable.
7212         (free_array): New function.
7213         (grub_raid_register): Likewise.
7214         (grub_raid_unregister): Likewise.
7215         (grub_raid_rescan): Likewise.
7216         (GRUB_MOD_INIT): Don't iterate device here.
7217         (GRUB_MOD_FINI): Use free_array to release resource.
7219         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7220         (grub_raid5_recover_func_t): New function variable type.
7221         (grub_raid6_recover_func_t): Likewise.
7222         (grub_raid5_recover_func): New variable.
7223         (grub_raid6_recover_func): Likewise.
7224         (grub_raid_register): New function.
7225         (grub_raid_unregister): Likewise.
7226         (grub_raid_rescan): Likewise.
7227         (grub_raid_block_xor): Likewise.
7229         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7230         (CMD_CRC): New macro.
7231         (part): Removed.
7232         (read_file): Handle device as well as file.
7233         (cmd_crc): New function.
7234         (fstest): Handle multiple disks.
7235         (options): Remove part, raw and long, add root and diskcount.
7236         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7237         (main): Find the first non option entry and ignore subsequent options,
7238         add handling for the new options, support multiple disks.
7240         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7242 2008-08-23  Bean  <bean123ch@gmail.com>
7244         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7246         * genfslist.sh: Ignore kernel.mod.
7248         * genpartmaplist.sh: Likewise.
7250 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7252         * util/getroot.c (find_root_device): Skip anything that starts with
7253         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7255 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7257         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7258         * util/grub.d/00_header.in: Allow the administrator to change default
7259         gfxmode via ${GRUB_GFXMODE}.
7261 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7263         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7265 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7267         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7268         loader.
7269         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7270         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7272 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7274         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7275         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7277 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7279         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7280         (struct grub_virtual_screen): Remove `cursor_color'.
7281         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7282         initialization.
7283         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7285 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7287         Unify (identical) linux_normal.c files.
7288         * loader/i386/efi/linux_normal.c: Move from here ...
7289         * loader/linux_normal.c: ... to here.  Update all users.
7290         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7291         * loader/i386/ieee1275/linux_normal.c: Likewise.
7293 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7295         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7296         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7297         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7298         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7299         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7300         New macros.
7301         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7302         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7303         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7304         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7305         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7306         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7307         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7308         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7309         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7310         portably using grub_getxy().
7311         Replace `-EFI' with `-bzImage' in boot message.
7313 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7315         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7317 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7319         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7321         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7322         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7323         (grub_machine_mmap_iterate): New function declaration.
7324         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7325         structure.
7326         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7327         macros.
7329         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7330         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7331         Move e820 parsing from here ...
7332         * kern/i386/pc/mmap.c: New file.
7333         (grub_machine_mmap_iterate): ... to here.
7335         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7336         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7337         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7338         (grub_available_iterate): Redeclare to return `void', and redeclare
7339         its hook to use grub_uint64_t as addr and size parameters, and rename
7340         to ...
7341         (grub_machine_mmap_iterate): ... this.  Update all users.
7343         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7344         to make it more readable.  Rename to ...
7345         (grub_machine_mmap_iterate): ... this.
7347         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7348         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7349         (grub_multiboot): Allocate an extra region after the payload, and fill
7350         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7351         with the extra space.
7352         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7353         with the extra space.
7355 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7357         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7359 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7361         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7362         mdate-sh to the list `find' searches for.
7363         * DISTLIST: Regenerated.
7365 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7367         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7368         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7369         genmoddep.awk, gensymlist.sh.in.
7370         (DISTDIRS): Add bus, docs, hook, lib.
7371         * DISTLIST: Regenerated.
7372         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7374 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7376         * disk/raid.c (grub_raid_init): Handle/report errors set by
7377         grub_device_iterate().
7378         * disk/lvm.c (grub_lvm_init): Likewise.
7380 2008-08-15  Bean  <bean123ch@gmail.com>
7382         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7383         and datehook.mod.
7384         (datetime_mod_SOURCES): New macro.
7385         (datetime_mod_CFLAGS): Likewise.
7386         (datetime_mod_LDFLAGS): Likewise.
7387         (date_mod_SOURCES): Likewise.
7388         (date_mod_CFLAGS): Likewise.
7389         (date_mod_LDFLAGS): Likewise.
7390         (datehook_mod_SOURCES): Likewise.
7391         (datehook_mod_CFLAGS): Likewise.
7392         (datehook_mod_LDFLAGS): Likewise.
7394         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7395         and datehook.mod.
7396         (datetime_mod_SOURCES): New macro.
7397         (datetime_mod_CFLAGS): Likewise.
7398         (datetime_mod_LDFLAGS): Likewise.
7399         (date_mod_SOURCES): Likewise.
7400         (date_mod_CFLAGS): Likewise.
7401         (date_mod_LDFLAGS): Likewise.
7402         (datehook_mod_SOURCES): Likewise.
7403         (datehook_mod_CFLAGS): Likewise.
7404         (datehook_mod_LDFLAGS): Likewise.
7406         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7407         and datehook.mod.
7408         (datetime_mod_SOURCES): New macro.
7409         (datetime_mod_CFLAGS): Likewise.
7410         (datetime_mod_LDFLAGS): Likewise.
7411         (date_mod_SOURCES): Likewise.
7412         (date_mod_CFLAGS): Likewise.
7413         (date_mod_LDFLAGS): Likewise.
7414         (datehook_mod_SOURCES): Likewise.
7415         (datehook_mod_CFLAGS): Likewise.
7416         (datehook_mod_LDFLAGS): Likewise.
7418         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7419         and datehook.mod.
7420         (datetime_mod_SOURCES): New macro.
7421         (datetime_mod_CFLAGS): Likewise.
7422         (datetime_mod_LDFLAGS): Likewise.
7423         (date_mod_SOURCES): Likewise.
7424         (date_mod_CFLAGS): Likewise.
7425         (date_mod_LDFLAGS): Likewise.
7426         (datehook_mod_SOURCES): Likewise.
7427         (datehook_mod_CFLAGS): Likewise.
7428         (datehook_mod_LDFLAGS): Likewise.
7430         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7431         and datehook.mod.
7432         (datetime_mod_SOURCES): New macro.
7433         (datetime_mod_CFLAGS): Likewise.
7434         (datetime_mod_LDFLAGS): Likewise.
7435         (date_mod_SOURCES): Likewise.
7436         (date_mod_CFLAGS): Likewise.
7437         (date_mod_LDFLAGS): Likewise.
7438         (datehook_mod_SOURCES): Likewise.
7439         (datehook_mod_CFLAGS): Likewise.
7440         (datehook_mod_LDFLAGS): Likewise.
7442         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7444         * commands/date.c: New file.
7446         * hook/datehook.c: Likewise.
7448         * include/grub/lib/datetime.h: Likewise.
7450         * include/grub/i386/cmos.h: Likewise.
7452         * lib/datetime.c: Likewise.
7454         * lib/i386/datetime.c: Likewise.
7456         * lib/efi/datetime.c: Likewise.
7458 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7460         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7461         (grub_mkelfimage_SOURCES): New variable.
7462         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7464         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7465         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7466         * conf/powerpc-ieee1275.rmk: Likewise.
7467         * conf/i386-ieee1275.rmk: Likewise.
7469         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7470         * kern/i386/coreboot/init.c: Likewise.
7472         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7473         with `<grub/cpu/kernel.h>'.
7474         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7475         to ...
7476         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7477         * kern/i386/coreboot/startup.S: Likewise.
7479         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7480         (GRUB_MOD_GAP): Remove.
7481         * include/grub/powerpc/kernel.h: New file.
7482         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7483         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7484         * include/grub/i386/kernel.h: New file.
7485         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7486         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7487         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7489         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7490         `grub-mkelfimage'.
7491         Use --directory when invoking grub_mkimage.
7493         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7494         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7495         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7496         and GRUB_KERNEL_CPU_PREFIX.
7498 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7500         * include/grub/err.h (grub_err_printf): New function prototype.
7501         * util/misc.c (grub_err_printf): New function.
7502         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7503         grub_printf.
7504         * kern/err.c (grub_print_error): Use grub_err_printf.
7506 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7508         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7510 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7512         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7513         boot entry.
7515 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7517         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7518         of the relocation code from here ...
7519         (grub_multiboot): ... to here.
7520         (forward_relocator, backward_relocator): Move from here ...
7521         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7522         (grub_multiboot_backward_relocator): ... to here.
7523         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7524         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7525         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7526         (grub_multiboot_forward_relocator_end)
7527         (grub_multiboot_backward_relocator)
7528         (grub_multiboot_backward_relocator_end): New variables.
7530 2008-08-12  Bean  <bean123ch@gmail.com>
7532         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7534 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7536         * kern/i386/linuxbios/startup.S: Move from here ...
7537         * kern/i386/coreboot/startup.S: ... to here.
7539         * kern/i386/linuxbios/init.c: Move from here ...
7540         * kern/i386/coreboot/init.c: ... to here.
7542         * kern/i386/linuxbios/table.c: Move from here ...
7543         * kern/i386/coreboot/mmap.c: ... to here.
7545         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7547 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7549         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7550         errors.  Leave it to the upper layer to handle them.
7552 2008-08-09  Christian Franke  <franke@computer.org>
7554         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7555         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7556         Install `grub.d/10_windows' only on Cygwin.
7557         * configure.ac: Add subst of `target_os'.
7558         Check `target_os' also before setting TARGET_OBJ2ELF.
7559         Add `--enable-grub-pe2elf'.
7561 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7563         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7564         (grub_last_time): Change type to grub_uint64_t.
7565         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7566         (grub_disk_close): Likewise.
7568         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7569         (run_menu): Migrate code from to using grub_get_time_ms().
7571         * util/misc.c (grub_get_time_ms): New function.
7573 2008-08-08  Marco Gerards  <marco@gnu.org>
7575         * disk/ata.c (grub_ata_regget): Change return type to
7576         `grub_uint8_t'.
7577         (grub_ata_regget2): Likewise.
7578         (grub_ata_wait_status): New function.
7579         (grub_ata_wait_busy): Removed function, updated all users to use
7580         `grub_ata_wait_status'.
7581         (grub_ata_wait_drq): Likewise.
7582         (grub_ata_cmd): New function.
7583         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7584         error handling.
7585         (grub_ata_pio_write): Add error handling.
7586         (grub_atapi_identify): Likewise.
7587         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7588         handling.
7589         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7590         handling.  Actually use the detected registers.  Reorder the
7591         detection logic such that it is easier to read.
7592         (grub_ata_pciinit): Do not assign the same ID to each controller.
7593         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7594         handling.
7595         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7597         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7599 2008-08-08  Marco Gerards  <marco@gnu.org>
7601         * NEWS: Update.
7603 2008-08-07  Bean  <bean123ch@gmail.com>
7605         * include/grub/x86_64/pci.h: New file.
7607 2008-08-07  Christian Franke  <franke@computer.org>
7609         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7610         (TIMER2_GATE): Likewise.
7611         (grub_pit_wait): Add enable/disable of the timer2 gate
7612         bit of port 0x61.  This fixes a possible infinite loop.
7614 2008-08-07  Bean  <bean123ch@gmail.com>
7616         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7617         kern/i386/tsc.c and kern/i386/pit.c.
7619         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7620         x86_64 platform.
7622         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7623         <grub/i386/tsc.h>.
7625         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7627 2008-08-07  Bean  <bean123ch@gmail.com>
7629         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7631         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7633         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7634         multiple inclusion. Add #include <grub/types.h>.
7636 2008-08-06  Christian Franke  <franke@computer.org>
7638         * conf/common.rmk: Build and install `10_windows'.
7639         * util/grub.d/10_windows.in: New script.
7641 2008-08-06  Pavel Roskin  <proski@gnu.org>
7643         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7645 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7647         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7648         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7650 2008-08-06  Bean  <bean123ch@gmail.com>
7652         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7653         (grub_pxefs_fs_int): Remove dummy definition.
7654         (grub_pxefs_open): Use data->block_size to store the current block
7655         size setting.
7656         (grub_pxefs_read): Use block size stored in data->block_size. As the
7657         value of grub_pxe_blksize can be changed after the file is opened.
7659 2008-08-06  Bean  <bean123ch@gmail.com>
7661         * fs/i386/pc/pxe.c (curr_file): new variable.
7662         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7663         require the dummy internal file system anymore.
7664         (grub_pxefs_read): Removed.
7665         (grub_pxefs_close): Likewise.
7666         (grub_pxefs_fs_int): Likewise.
7667         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7668         connection when we switch file.
7669         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7671 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7673         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7674         `halt.mod'.
7675         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7676         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7678         * kern/i386/halt.c: New file.
7679         * kern/i386/reboot.c: Likewise.
7680         * include/grub/i386/reboot.h: Likewise.
7681         * include/grub/i386/halt.h: Likewise.
7683         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7684         Include `<grub/cpu/halt.h>'.
7685         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7686         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7688         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7689         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7690         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7691         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7692         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7693         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7694         from here ...
7695         * include/grub/i386/at_keyboard.h: ... to here.
7697 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7699         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7700         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7701         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7702         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7703         `kern/generic/millisleep.c'.
7705         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7706         instead of grub_get_rtc().
7707         (grub_tsc_init): Initialize `tsc_boot_time'.
7709         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7710         (grub_machine_init): Use grub_tsc_init() rather than
7711         installing an RTC-based handler via grub_install_get_time_ms().
7713         * kern/i386/pit.c: New file.
7714         * include/grub/i386/pit.h: Likewise.
7716 2008-08-05  Bean  <bean123ch@gmail.com>
7718         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7720         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7721         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7722         (pxe_mod_SOURCES): New macro.
7723         (pxe_mod_CFLAGS): Likewise.
7724         (pxe_mod_LDFLAGS): Likewise.
7725         (pxecmd_mod_SOURCES): Likewise.
7726         (pxecmd_mod_CFLAGS): Likewise.
7727         (pxecmd_mod_LDFLAGS): Likewise.
7729         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7730         (grub_pxe_call): Likewise.
7732         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7734         * commands/i386/pc/pxecmd.c: New file.
7736         * fs/i386/pc/pxe.c: Likewise.
7738         * include/grub/i386/pc/pxe.h: Likewise.
7740 2008-08-05  Bean  <bean123ch@gmail.com>
7742         * util/console.c (grub_console_cur_color): New variable.
7743         (grub_console_standard_color): Likewise.
7744         (grub_console_normal_color): Likewise.
7745         (grub_console_highlight_color): Likewise.
7746         (color_map): Likewise.
7747         (use_color): Likewise.
7748         (NUM_COLORS): New macro.
7749         (grub_ncurses_setcolorstate): Handle color properly.
7750         (grub_ncurses_setcolor): Don't change color here, just remember the
7751         settings, color will be set in grub_ncurses_setcolorstate.
7752         (grub_ncurses_getcolor): New function.
7753         (grub_ncurses_init): Initialize color pairs.
7754         (grub_ncurses_term): New member grub_ncurses_getcolor.
7756 2008-08-05  Colin D Bennett  <colin@gibibit.com>
7758         High resolution timer support.  Implemented for x86 CPUs using TSC.
7759         Extracted generic grub_millisleep() so it's linked in only as needed.
7760         This requires a Pentium compatible CPU; if the RDTSC instruction is
7761         not supported, then it falls back on the generic grub_get_time_ms()
7762         implementation that uses the machine's RTC.
7764         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7765         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7766         `kern/generic/millisleep.c'.
7768         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7769         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7771         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7772         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7774         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7776         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7777         `kern/generic/millisleep.c'.
7779         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7781         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7783         * kern/generic/rtc_get_time_ms.c: New file.
7785         * kern/generic/millisleep.c: New file.
7787         * kern/misc.c: Don't include
7788         <kern/time.h> anymore.
7789         (grub_millisleep_generic): Removed.
7791         * commands/sleep.c (grub_interruptible_millisleep): Uses
7792         grub_get_time_ms() instead of grub_get_rtc().
7794         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
7795         function.
7796         (grub_cpu_is_cpuid_supported): New inline function.
7797         (grub_cpu_is_tsc_supported): New inline function.
7798         (grub_tsc_init): New function prototype.
7799         (grub_tsc_get_time_ms): New function prototype.
7801         * kern/i386/tsc.c (grub_get_time_ms): New file.
7803         * include/grub/time.h: Include <grub/types.h.
7804         (grub_millisleep_generic): Removed.
7805         (grub_get_time_ms): New prototype.
7806         (grub_install_get_time_ms): New prototype.
7807         (grub_rtc_get_time_ms): New prototype.
7809         * kern/time.c (grub_get_time_ms): New function.
7810         (grub_install_get_time_ms): New function.
7812         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
7813         <grub/time.h> anymore.
7814         (grub_millisleep): Removed.
7815         (grub_machine_init): Call grub_tsc_init.
7817         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7818         get_time_ms() implementation.
7820         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7821         (ieee1275_get_time_ms): New function.
7822         (grub_machine_init): Install get_time_ms() implementation.
7824         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7825         (grub_machine_init): Call grub_tsc_init().
7826         (grub_millisleep): Removed.
7828         * kern/ieee1275/init.c (grub_millisleep): Removed.
7829         (grub_machine_init): Install ieee1275_get_time_ms()
7830         implementation.
7831         (ieee1275_get_time_ms): New function.
7832         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7833         real work.
7835 2008-08-05  Marco Gerards  <marco@gnu.org>
7837         * disk/ata.c: Include <grub/pci.h>.
7838         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7839         (grub_ata_initialize): Rewritten.
7840         (grub_ata_device_initialize): New function.
7842 2008-08-04  Pavel Roskin  <proski@gnu.org>
7844         * kern/main.c: Include grub/mm.h.
7846 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7848         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7849         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7850         corruption problem).
7852 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7854         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7855         warnings introduced in my last commit.
7857 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7859         Make PCI available on all i386 architectures.
7861         * include/grub/i386/pc/pci.h: Move from here ...
7862         * include/grub/i386/pci.h: ... to here.
7864         * include/grub/i386/pc/pci.h: Remove.
7865         * include/grub/i386/efi/pci.h: Remove.
7866         * include/grub/x86_64/efi/pci.h: Remove.
7868         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7869         `<grub/cpu/pci.h>'.
7871         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7872         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7873         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7875         * conf/i386-ieee1275.rmk: Likewise.
7877 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7879         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7880         (grub_console_setcursor): Make it possible to set cursor off.
7882 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7884         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
7885         of modules instead of assuming which platform provides what.
7886         * util/update-grub.in: Likewise.
7888 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7890         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7891         instead of `grub_install_dos_part' to determine whether a drive needs
7892         to be prepended to prefix (`grub_install_dos_part' is not reliable,
7893         because it can be overridden when loading GRUB via Multiboot).
7895 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7897         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7899 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7901         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7902         of informational grub_dprintf() calls.
7904 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7906         * disk/memdisk.c (memdisk_size): Don't initialize.
7907         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7909         * include/grub/i386/pc/kernel.h
7910         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7911         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7912         (grub_memdisk_image_size, grub_arch_memdisk_addr)
7913         (grub_arch_memdisk_size): Remove.
7915         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7916         field (was only used to transfer a constant).  Add `type' field to
7917         support multiple module types.
7918         (grub_module_iterate): New function.
7920         * kern/device.c (grub_device_open): Do not hide error messages
7921         when grub_disk_open() fails.  Use grub_print_error() instead.
7923         * kern/i386/pc/init.c (grub_arch_modules_addr)
7924         (grub_arch_memdisk_size): Remove functions.
7925         (grub_arch_modules_addr): Return the module address in high memory
7926         (now that it isn't copied anymore).
7928         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7929         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7930         decompression routine (grub_total_module_size already includes that
7931         now).  Don't copy modules back to low memory.
7933         * kern/main.c: Include `<grub/mm.h>'.
7934         (grub_load_modules): Split out (and use) ...
7935         (grub_module_iterate): ... this function, which iterates through
7936         module objects and runs a hook.
7937         Comment out grub_mm_init_region() call, as it would cause non-ELF
7938         modules to be overwritten.
7940         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7941         the memdisk image in its own region, make it part of the module list.
7942         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7943         (main): Parse --memdisk|-m option, and pass user-provided path as
7944         parameter to generate_image().
7945         (add_segments): Pass `memdisk_path' down to load_modules().
7946         (load_modules): Embed memdisk image in module section when requested.
7947         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7948         `header.type' instead of `header.offset'.
7950         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7951         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7952         (memdisk_mod_LDFLAGS): New variables.
7953         * conf/i386-coreboot.rmk: Likewise.
7954         * conf/i386-ieee1275.rmk: Likewise.
7956 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7958         * loader/i386/pc/multiboot.c (playground, forward_relocator)
7959         (backward_relocator): New variables.  Used to allocate and relocate
7960         the payload, respectively.
7961         (grub_multiboot_load_elf32): Load into heap instead of requested
7962         address, install the appropriate relocator code in each bound of
7963         the payload, and set the entry point such that
7964         grub_multiboot_real_boot() will jump to one of them.
7966         * kern/i386/loader.S (grub_multiboot_payload_size)
7967         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7968         (grub_multiboot_payload_entry_offset): New variables.
7969         (grub_multiboot_real_boot): Set cpu context to what the relocator
7970         expects, and jump to the relocator instead of the payload.
7972         * include/grub/i386/loader.h (grub_multiboot_payload_size)
7973         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7974         (grub_multiboot_payload_entry_offset): Export.
7976 2008-08-01  Bean  <bean123ch@gmail.com>
7978         * normal/menu_entry.c (editor_getline): Don't return the original
7979         string as result, as it will be released by lexer once it has done
7980         using it.
7982 2008-08-01  Robert Millan  <rmh@aybabtu.com>
7984         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7985         within menuentries, not before them.
7986         util/grub.d/10_hurd.in: Likewise.
7988 2008-08-01  Bean  <bean123ch@gmail.com>
7990         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7991         (bufio_mod_SOURCES): New macro.
7992         (bufio_mod_CFLAGS): Likewise.
7993         (bufio_mod_LDFLAGS): Likewise.
7995         * include/grub/bufio.h: New file.
7997         * io/bufio.c: Likewise.
7999         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
8000         (grub_video_reader_png): Use grub_buffile_open to open file.
8002         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
8003         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8005         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8006         (grub_video_reader_tga): Use grub_buffile_open to open file.
8008         * font/manager.c: Include <grub/bufio.h>.
8009         (add_font): Use grub_buffile_open to open file.
8011 2008-07-31  Robert Millan  <rmh@aybabtu.com>
8013         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8014         ELF segments, use a macro for arbitrarily accessing any of them instead
8015         of preparing a pointer that allows access to one at a time.
8016         (grub_multiboot_load_elf64): Likewise.
8018 2008-07-31  Bean  <bean123ch@gmail.com>
8020         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8021         GRUB_KERNEL_MACHINE_DATA_END.
8023 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8025         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8026         Increase from 0x50 to 0x60.
8027         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8028         use UUIDs to identify the root drive for them.  If that's not
8029         possible, abort.
8030         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8031         check, for cross-disk installs.
8033 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8035         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8036         is non-empty, use it to set the `prefix' environment variable instead
8037         of the usual approach.
8038         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8039         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8040         environment variable instead of dummy make_install_device().
8042         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8043         (start): Insert a data section, with `grub_prefix' variable.
8044         * kern/i386/linuxbios/startup.S: Likewise.
8046         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8047         New variable reference.
8048         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8049         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8050         to `start').
8051         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8052         section within startup.S (relative to `start').
8053         * include/grub/i386/coreboot/kernel.h: Likewise.
8055         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8056         Overwrite grub_prefix with its contents, at the beginning of the
8057         first segment.
8058         (main): Understand -p|--prefix.
8060 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8062         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8064 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8066         * term/i386/pc/vga_text.c (grub_console_cls): Use
8067         grub_console_gotoxy() to go back to beginning of the screen.
8068         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8070 2008-07-29  Christian Franke  <franke@computer.org>
8072         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8073         Add conversion of emulated mount points on Cygwin.
8075 2008-07-29  Christian Franke  <franke@computer.org>
8077         * util/update-grub.in: Add a check for admin
8078         group on Cygwin.
8079         Remove old `grub.cfg.new' before creation.
8080         Add `-f' to `mv' to handle the different filesystem
8081         semantics of Windows.
8083 2008-07-29  Bean  <bean123ch@gmail.com>
8085         * normal/main.c (get_line): Fix buffer overflow bug.
8087 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8089         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8090         (struct grub_apple_header): New struct.  Describes the layout of
8091         the partmap header.
8092         (apple_partition_map_iterate): Check the header magic as well as the
8093         partition magic (which was already being checked).
8095 2008-07-28  Pavel Roskin  <proski@gnu.org>
8097         * genmk.rb: Add a warning to the beginning of the output that
8098         it's a generated file and should not be edited.
8100 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8102         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8103         with the same number are found, just use issue a warning with
8104         grub_dprintf(), as this error has been reported to be non-fatal.
8106 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8108         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8109         information.
8111 2008-07-27  Bean  <bean123ch@gmail.com>
8113         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8114         (grub_fat_find_dir): Ignore case when comparing filename.
8116 2008-07-27  Bean  <bean123ch@gmail.com>
8118         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8119         smallino, as it's more descriptive, and i8count can be confused with
8120         the other field count.
8121         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8122         inode type.
8124 2008-07-27  Bean  <bean123ch@gmail.com>
8126         * commands/crc.c: New file.
8128         * lib/crc.c: Likewise.
8130         * include/grub/lib/crc.h: Likewise.
8132         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8134         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8135         (hexdump): Move this function to ...
8137         * lib/hexdump.c: ... here.
8139         * include/grub/hexdump.h: Renamed to ...
8141         * include/grub/lib/hexdump.h: ... this.
8143         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8145         * util/grub-editenv.c: Likewise.
8147         * include/envblk.h: Renamed to ...
8149         * include/lib/envblk.h: ... this.
8151         * util/envblk.c: Renamed to ...
8153         * lib/envblk.c: ... this.
8155         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8156         lib/hexdump.c.
8157         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8158         (pkglib_MODULES): Add crc.mod.
8159         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8160         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8161         (crc_mod_SOURCES): New macro.
8162         (crc_mod_CFLAGS): Likewise.
8163         (crc_mod_LDFLAGS): Likewise.
8165         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8167         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8169         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8173         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8175 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8177         * commands/help.c: Include <grub/term.h>.
8178         (TERM_WIDTH): Removed.  Updated all users.
8180 2008-07-27  Pavel Roskin  <proski@gnu.org>
8182         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8183         spurious warnings about a comment within a comment.
8185 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8187         * util/getroot.c (find_root_device): Skip devices that match
8188         /dev/dm-[0-9].  This lets the real device be found for any type of
8189         abstraction (LVM, EVMS, RAID..).
8190         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8191         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8192         device is found first, find_root_device() will now skip it.
8194 2008-07-24  Pavel Roskin  <proski@gnu.org>
8196         * include/grub/types.h: Use __builtin_bswap32() and
8197         __builtin_bswap64() with gcc 4.3 and newer.
8199 2008-07-24  Christian Franke  <franke@computer.org>
8201         * util/i386/pc/grub-install.in: If `--debug' is specified,
8202         pass `--verbose' to grub-setup.
8203         Abort script if make_system_path_relative_to_its_root() fails.
8205 2008-07-24  Bean  <bean123ch@gmail.com>
8207         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8208         variable `target_platform' should be `platform'.
8210 2008-07-24  Bean  <bean123ch@gmail.com>
8212         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8213         (grub_png_init_fixed_block): New function.
8214         (grub_png_decode_image_data): Handle fixed huffman code compression.
8216 2008-07-24  Bean  <bean123ch@gmail.com>
8218         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8219         (grub_pe2elf_SOURCES): New macro.
8220         (CLEANFILES): Add grub-pe2elf.
8222         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8223         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8224         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8225         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8226         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8227         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8228         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8229         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8230         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8231         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8232         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8233         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8234         (GRUB_PE32_DT_FUNCTION): Likewise.
8235         (GRUB_PE32_REL_I386_DIR32): Likewise.
8236         (GRUB_PE32_REL_I386_REL32): Likewise.
8237         (grub_pe32_symbol): New structure.
8238         (grub_pe32_reloc): Likewise.
8240         * util/grub-pe2elf.c: New file.
8242         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8243         start symbol in non pc platform.
8245         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8247         The following patches are from Christian Franke.
8249         * include/grub/dl.h: Remove .previous, gas supports this only
8250         for ELF format.
8252         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8253         Remove .type, gas supports this only for ELF format.
8255         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8256         nullbytes in symbol table. This fixes an infinite loop if table is
8257         zero filled.
8259         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8260         TARGET_IMG_LDFLAGS and EXEEXT.
8262         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8263         TARGET_IMG_LDFLAGS_AC.
8264         (grub_CHECK_STACK_ARG_PROBE): New function.
8266         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8268         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8270         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8271         to set TARGET_IMG_LD* accordingly.
8272         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8273         Add call to grub_CHECK_STACK_ARG_PROBE.
8274         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8276         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8278         * genmk.rb: Add EXEEXT to CLEANFILES.
8280 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8282         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8283         define the codes for arrows and lines used for the menu).
8284         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8285         as well.
8287         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8288         fonts, because the latter are too slow.
8290 2008-07-21  Bean  <bean123ch@gmail.com>
8292         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8293         a20. Run keyboard test last, as it will cause macbook to halt.
8295 2008-07-18  Pavel Roskin  <proski@gnu.org>
8297         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8298         load foreign architecture modules correctly anyway.  Keep
8299         support for loading host architecture modules, whether we
8300         compile them or not.
8302 2008-07-17  Pavel Roskin  <proski@gnu.org>
8304         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8305         change target_cpu.  The compiler default can mismatch target_cpu
8306         in any case.
8308         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8309         * kern/efi/efi.c: Likewise.
8311         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8312         target compiler is functional.
8313         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8314         are set up.
8316         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8317         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8318         adjustments from the rest, only do them if target is not
8319         explicitly given.  Merge other adjustments with the final sanity
8320         check.  Remove an extraneous check for supported CPU.  Be
8321         specific which CPU and which platform is not supported.
8323         * configure.ac: Default to pc platform for x86_64.
8325 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8327         Partial LinuxBIOS -> Coreboot rename.
8329         * conf/i386-linuxbios.rmk: Renamed to ...
8330         * conf/i386-coreboot.rmk: ... this.
8331         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8332         * configure.ac: Accept "coreboot" as input platform (but maintain
8333         compatibility with "linuxbios").
8334         * include/grub/i386/linuxbios: Renamed to ...
8335         * include/grub/i386/coreboot: ... this.
8337 2008-07-17  Bean  <bean123ch@gmail.com>
8339         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8340         (appleldr_mod_SOURCE): New variable.
8341         (appleldr_mod_CFLAGS): Likewise.
8342         (appleldr_mod_LDFLAGS): Likewise.
8343         (pci_mod_SOURCES): Likewise.
8344         (pci_mod_CFLAGS): Likewise.
8345         (pci_mod_LDFLAGS): Likewise.
8346         (lspci_mod_SOURCES): Likewise.
8347         (lspci_mod_CFLAGS): Likewise.
8348         (lspci_mod_LDFLAGS): Likewise.
8350         * conf/x86_64-efi.rmk: New file.
8352         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8353         macro.
8354         (grub_efidisk_write): Likewise.
8356         * include/efi/api.h (efi_call_0): New macro.
8357         (efi_call_1): Likewise.
8358         (efi_call_2): Likewise.
8359         (efi_call_3): Likewise.
8360         (efi_call_4): Likewise.
8361         (efi_call_5): Likewise.
8362         (efi_call_6): Likewise.
8364         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8365         grub_rescue_cmd_chainloader.
8367         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8368         (grub_pe32_optional_header): Change some fields based on i386 or
8369         x86_64 platform.
8370         (GRUB_PE32_PE32_MAGIC): Likewise.
8372         * include/grub/efi/uga_draw.h: New file.
8374         * include/grub/elf.h (STN_ABS): New constant.
8375         (R_X86_64_NONE): Relocation constant for x86_64.
8376         (R_X86_64_64): Likewise.
8377         (R_X86_64_PC32): Likewise.
8378         (R_X86_64_GOT32): Likewise.
8379         (R_X86_64_PLT32): Likewise.
8380         (R_X86_64_COPY): Likewise.
8381         (R_X86_64_GLOB_DAT): Likewise.
8382         (R_X86_64_JUMP_SLOT): Likewise.
8383         (R_X86_64_RELATIVE): Likewise.
8384         (R_X86_64_GOTPCREL): Likewise.
8385         (R_X86_64_32): Likewise.
8386         (R_X86_64_32S): Likewise.
8387         (R_X86_64_16): Likewise.
8388         (R_X86_64_PC16): Likewise.
8389         (R_X86_64_8): Likewise.
8390         (R_X86_64_PC8): Likewise.
8392         * include/grub/i386/efi/pci.h: New file.
8394         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8395         Change it value based on platform.
8396         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8397         (GRUB_E820_RAM): Likewise.
8398         (GRUB_E820_RESERVED): Likewise.
8399         (GRUB_E820_ACPI): Likewise.
8400         (GRUB_E820_NVS): Likewise.
8401         (GRUB_E820_EXEC_CODE): Likewise.
8402         (GRUB_E820_MAX_ENTRY): Likewise.
8403         (grub_e820_mmap): New structure.
8404         (linux_kernel_header): Change the efi field according to different
8405         kernel version, also field from linux_kernel_header.
8407         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8409         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8410         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8411         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8412         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8413         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8414         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8415         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8416         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8417         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8418         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8420         * include/grub/x86_64/efi/kernel.h: New file.
8422         * include/grub/x86_64/efi/loader.h: Likewise.
8424         * include/grub/x86_64/efi/machine.h: Likewise.
8426         * include/grub/x86_64/efi/pci.h: Likewise.
8428         * include/grub/x86_64/efi/time.h: Likewise.
8430         * include/grub/x86_64/linux.h: Likewise.
8432         * include/grub/x86_64/setjmp.h: Likewise.
8434         * include/grub/x86_64/time.h: Likewise.
8436         * include/grub/x86_64/types.h: Likewise.
8438         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8439          GRUB_TARGET_SIZEOF_VOID_P.
8441         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8442         (grub_efi_locate_handle): Likewise.
8443         (grub_efi_open_protocol): Likewise.
8444         (grub_efi_set_text_mode): Likewise.
8445         (grub_efi_stall): Likewise.
8446         (grub_exit): Likewise.
8447         (grub_reboot): Likewise.
8448         (grub_halt): Likewise.
8449         (grub_efi_exit_boot_services): Likewise.
8450         (grub_get_rtc): Likewise.
8452         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8453         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8454         (grub_efi_allocate_pages): Wrap efi calls.
8455         (grub_efi_free_pages): Wrap efi calls.
8456         (grub_efi_get_memory_map): Wrap efi calls.
8458         * kern/x86_64/dl.c: New file.
8460         * kern/x86_64/efi/callwrap.S: Likewise.
8462         * kern/x86_64/efi/startup.S: Likewise.
8464         * loader/efi/appleloader.c: Likewise.
8466         * loader/efi/chainloader.c (cmdline): New variable.
8467         (grub_chainloader_unload): Wrap efi calls.
8468         (grub_chainloader_boot): Likewise.
8469         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8470         command line.
8472         * loader/efi/chainloader_normal.c (chainloader_command):
8473         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8474         command line.
8476         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8477         method.
8478         (grub_e820_add_region): New function.
8479         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8480         booting.
8481         (grub_find_video_card): New function.
8482         (grub_linux_setup_video): New function.
8483         (grub_rescue_cmd_linux): Probe for video information.
8485         * normal/x86_64/setjmp.S: New file.
8487         * term/efi/console.c (map_char): New function.
8488         (grub_console_putchar): Map unicode char.
8489         (grub_console_checkkey): Wrap efi calls.
8490         (grub_console_getkey): Likewise.
8491         (grub_console_getwh): Likewise.
8492         (grub_console_gotoxy): Likewise.
8493         (grub_console_cls): Likewise.
8494         (grub_console_setcolorstate): Likewise.
8495         (grub_console_setcursor): Likewise.
8497         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8499 2008-07-16  Pavel Roskin  <proski@gnu.org>
8501         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8502         format strings.
8504         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8505         pointer, not an integer.  This fixes a warning and prevents
8506         precision loss on 64-bit systems.
8507         (relocate_addresses): Remove unneeded cast.
8509 2008-07-15  Pavel Roskin  <proski@gnu.org>
8511         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8513         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8515         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8516         Fix comparison between signed and unsigned.
8518         * include/grub/i386/ieee1275/console.h: Declare
8519         grub_console_init() and grub_console_fini().
8521         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8522         It's empty and unused.
8524         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8525         beginning to avoid warnings with some compilers.
8527         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8528         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8530 2008-07-14  Pavel Roskin  <proski@gnu.org>
8532         * kern/env.c (grub_register_variable_hook): Don't copy empty
8533         string, it leaks memory.  Pass "" to grub_env_set(), it should
8534         handle constant strings.
8536         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8537         * commands/cmp.c (grub_cmd_cmp): Likewise.
8538         * kern/dl.c (grub_dl_flush_cache): Likewise.
8539         (grub_dl_load_core): Likewise.
8540         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8541         (grub_elf64_load_phdrs): Likewise.
8543 2008-07-13  Pavel Roskin  <proski@gnu.org>
8545         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8546         between signed and unsigned.
8547         (LzmaEnc_Finish): Fix warning about an unused parameter.
8549 2008-07-13  Bean  <bean123ch@gmail.com>
8551         * Makefile.in (enable_lzo): New rule.
8553         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8555         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8557         * boot/i386/pc/lnxboot.S: #include <config.h>.
8559         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8560         its value according to the compression algorithm used, lzo or lzma.
8562         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8563         compression algorithm according to configure macro.
8565         * kern/i386/pc/startup.S (codestart): Likewise.
8567         * kern/i386/pc/lzma_decode.S: New file.
8569         * include/grub/lib/LzFind.h: Likewise.
8571         * include/grub/lib/LzHash.h: Likewise.
8573         * include/grub/lib/LzmaDec.h: Likewise.
8575         * include/grub/lib/LzmaEnc.h: Likewise.
8577         * include/grub/lib/LzmaTypes.h: Likewise.
8579         * lib/LzFind.c: Likewise.
8581         * lib/LzmaDec.c: Likewise.
8583         * lib/LzmaEnc.c: Likewise.
8585 2008-07-13  Bean  <bean123ch@gmail.com>
8587         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8588         (grub_ext4_extent_header): New structure.
8589         (grub_ext4_extent): Likewise.
8590         (grub_ext4_extent_idx): Likewise.
8591         (grub_ext4_find_leaf): New function.
8592         (grub_ext2_read_block): Handle extents.
8594 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8596         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8598 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8600         * util/grub.d/40_custom.in: New file. Example on how to add custom
8601         entries to /etc/grub.d.
8602         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8603         40_custom (implicitly, by merging all the grub.d rules).
8605 2008-07-11  Pavel Roskin  <proski@gnu.org>
8607         * commands/read.c (grub_getline): Fix invalid memory access.
8608         Don't add newline to the variable value.
8610         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8611         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8612         (serial_hw_get_port): Check validity of the port number.
8613         (grub_cmd_serial): Check return value of serial_hw_get_port().
8615 2008-07-07  Pavel Roskin  <proski@gnu.org>
8617         * boot/i386/pc/diskboot.S (notification_string): Replace
8618         "Loading kernel" with just "loading".  This is shorter, less
8619         confusing and saves a few bytes for possible future changes.
8621 2008-07-05  Pavel Roskin  <proski@gnu.org>
8623         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8624         size for ATAPI devices, they are undefined.  Output sector
8625         number in decimal form.
8627         * disk/ata.c: Use named constants for status bits.
8629 2008-07-04  Pavel Roskin  <proski@gnu.org>
8631         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8632         grub_addr_t before casting it to the void pointer to fix a
8633         warning.  Non-addressable regions are discarded earlier.
8634         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8635         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8636         (check_signature): Don't shadow table_header.
8637         (grub_linuxbios_table_iterate): Cast numeric constants to
8638         grub_linuxbios_table_header_t.
8639         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8640         grub_stop().
8642         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8643         prevent warnings.
8645         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8646         pointer, which can cause warnings.  Support 64-bit addresses.
8648         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8649         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8651 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8653         This fixes a performance issue when pc & gpt partmap iterators
8654         didn't abort iteration even after our hook found what it was
8655         looking for (often causing expensive probes of non-existent drives).
8657         Some callers relied on previous buggy behaviour, since they would
8658         raise an error when their own hooks caused early abortion of its
8659         iteration.
8661         * kern/device.c (grub_device_open): Improve error message.
8662         * disk/lvm.c (grub_lvm_open): Likewise.
8663         * disk/raid.c (grub_raid_open): Likewise.
8665         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8666         when hook requests it, independently of grub_errno.
8667         (pc_partition_map_probe): Do not fail when find_func() caused
8668         early abortion of pc_partition_map_iterate().
8670         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8671         when hook requests it, independently of grub_errno.
8672         (gpt_partition_map_probe): Do not fail when find_func() caused
8673         early abortion of gpt_partition_map_iterate().
8675         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8676         when hook requests it, independently of grub_errno.  Do not fail when
8677         part_map_iterate_hook() caused early abortion of p->iterate().
8679         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8680         when grub_partition_iterate() returned with non-zero.
8682 2008-07-03  Pavel Roskin  <proski@gnu.org>
8684         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8685         like we do in grub_ata_pio_read().
8686         (grub_ata_readwrite): Always write individual sectors.  Fix the
8687         sector count for the remainder.
8688         (grub_ata_write): Enable writing to ATA devices.  Correctly
8689         report error for ATAPI devices.
8691 2008-07-02  Pavel Roskin  <proski@gnu.org>
8693         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8694         warning.
8696         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8697         for every read sector, we already increment it for the whole
8698         batch.  This fixes reading more than 256 sectors at once.
8700         * util/grub-editenv.c (cmd_info): Cast argument to long
8701         explicitly.  ptrdiff_t reduces to int on i386.
8703         * util/grub-editenv.c (main): Be specific which parameter is
8704         missing.
8706         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8707         (memdisk): Make memdisk_orig_addr a pointer.
8709         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8710         for file offsets, use grub_off_t instead.  Fix printf format
8711         warnings.
8713         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8714         there.  Real unexpected warnings should not drown in the noise
8715         about known problems.
8717         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8718         grub_disk_addr_t for memory addresses.
8720         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8721         explicitly to fix a warning.
8723         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8725         * Makefile.in (MODULE_LDFLAGS): New variable.
8726         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
8727         the linker accepts --build-id=none.
8728         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
8729         MODULE_LDFLAGS.
8730         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8732         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8733         those in Linux XFS code.  Provide a way to access 64-bit parent
8734         inode.
8735         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
8736         the end of struct grub_xfs_dir_header.
8738 2008-07-02  Bean  <bean123ch@gmail.com>
8740         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8741         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8742         and GRUB_IEEE1275_FLAG_NO_ANSI.
8744         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8745         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8746         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8748         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8749         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8751         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8752         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8754         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8755         esc sequence on non ANSI terminal.
8756         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8758         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8759         beginning of file.
8761 2008-07-02  Bean  <bean123ch@gmail.com>
8763         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8764         (grub_editenv_SOURCES): New variable.
8765         (pkglib_MODULES): Add loadenv.mod.
8766         (loadenv_mod_SOURCES): New variable.
8767         (loadenv_mod_CFLAGS): Likewise.
8768         (loadenv_mod_LDFLAGS): Likewise.
8770         * include/grub/envblk.h: New file.
8772         * util/envblk.c: New file.
8774         * util/grub-editenv.c: New file.
8776         * commands/loadenv.c: New file.
8778 2008-07-01  Pavel Roskin  <proski@gnu.org>
8780         * include/multiboot2.h (struct multiboot_tag_module): Use char,
8781         not unsigned char.  This fixes warnings and is consistent with
8782         other tags.
8784         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8786         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8788         * term/tparm.c (analyze): Always set *popcount.
8790         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8791         cast to fix a warning.
8793         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8794         cast to suppress a warning.
8796         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8797         grub_fshelp_read_file() expects.
8799         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
8800         write uuid as a 32-bit value in CPU byte order, so declare and
8801         use it as such.
8803         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8804         long if the format specifier expects it.
8805         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8806         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8807         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8808         long to fix a warning.
8809         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8810         grub_dprintf() arguments to fix warnings.
8812 2008-06-30  Pavel Roskin  <proski@gnu.org>
8814         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8815         install_bsd_part immediately before core.img is embedded or
8816         modified on disk.  This fixes core.img verification if core.img
8817         cannot be embedded.
8819         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8820         core_path to calculate the blocklist.
8821         Patch from Javier Martín <lordhabbit@gmail.com>
8823 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8825         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
8826         block to disk block.
8827         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8828         Patch from Niels Böhm <bitbucket@arcor.de>
8830 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8832         * util/update-grub_lib.in (font_path): Search for fonts in
8833         /boot/grub first, which is more likely to be readable (we aren't
8834         deciding where fonts live, just looking for them).
8836 2008-06-26  Pavel Roskin  <proski@gnu.org>
8838         * util/biosdisk.c (read_device_map): Don't leave dead map
8839         entries for devices failing stat() check.
8841         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8842         core_path_dev for the core.img path on the target device.
8844 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8846         * disk/fs_uuid.c: New file.
8847         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8848         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8849         (fs_uuid_mod_LDFLAGS): New variables.
8850         * include/grub/disk.h (grub_disk_dev_id): Add
8851         `GRUB_DISK_DEVICE_UUID_ID'.
8852         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8853         implement iterate().
8855 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8857         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8858         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8859         Linux image includes no initrd.
8861 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
8863         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8864         call to resolve the core image location that effectively appended the
8865         name twice.
8867 2008-06-21  Robert Millan  <rmh@aybabtu.com>
8869         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8870         call from here ...
8872         * util/grub.d/10_hurd.in: ... to here ...
8873         * util/grub.d/10_linux.in: ... and here.
8875 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8877         * kern/main.c (grub_main): Export `prefix' variable immediately
8878         after it has been set by grub_machine_set_prefix().
8880 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8882         * commands/search.c (search_label, search_fs_uuid, search_file): Print
8883         search result when not saving to variable, not the other way around.
8884         When saving to variable, abort iteration as soon as a match is found.
8886 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8888         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8889         check for partition that provides /boot/grub.  Its logic is flawed,
8890         as it prevents prepare_grub_to_access_device() from being called
8891         multiple times.
8893 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8895         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8896         "insmod" command directly when abstraction modules are needed,
8897         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8898         since it had already been processed).
8900 2008-06-19  Pavel Roskin  <proski@gnu.org>
8902         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8903         changed.  This is needed in case GRUB_LIBDIR changes.
8904         * conf/i386-ieee1275.rmk: Likewise.
8905         * conf/i386-linuxbios.rmk: Likewise.
8906         * conf/i386-pc.rmk: Likewise.
8907         * conf/powerpc-ieee1275.rmk: Likewise.
8909 2008-06-18  Pavel Roskin  <proski@gnu.org>
8911         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8912         kernel_elf_symlist.c to symlist.c for consistency with other
8913         architectures.  Update all users.
8914         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8916 2008-06-18  Robert Millan  <rmh@aybabtu.com>
8918         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8919         it in prefix.
8921         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
8922         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
8923         a RAID device, run setup() for all members independently on whether
8924         LVM abstraction is being used.
8925         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8926         If grub-mkimage has set `*install_dos_part == -2', don't override this
8927         value.
8928         Perform *install_dos_part adjustments independently on whether
8929         we're embedding or not.
8930         Clarify error message when image is too big for embedding.
8931         Remove duplicate *install_dos_part stanza.
8933 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8935         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8936         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8937         variables.
8938         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8939         values in grub_ofconsole_normal_color and
8940         grub_ofconsole_highlight_color (they're not directly related to
8941         background and foreground).
8942         (grub_ofconsole_setcolorstate): Extract background and foreground
8943         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8945 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8947         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8948         /boot/grub for the check in last commit, not /boot (they could be
8949         different partitions).
8951 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8953         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8954         asked to setup access for the same partition that provides /boot,
8955         don't bother using UUIDs since our root already has the value we
8956         want.
8958 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8960         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8961         I2O devices.
8962         Patch from Sven Mueller <sven@debian.org>.
8964 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8966         * util/update-grub.in: Check for $EUID instead of $UID.
8967         Reported by Vincent Zweije.
8969 2008-06-16  Bean  <bean123ch@gmail.com>
8971         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8972         (grub_ext2_read_block): Likewise.
8973         (grub_ext2_read_inode): Likewise.
8974         (grub_ext2_mount): Likewise.
8975         (grub_ext2_close): Likewise.
8976         (grub_ext3_get_journal): Removed.
8978         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8979         (grub_reiserfs_read_symlink): Likewise.
8980         (grub_reiserfs_mount): Likewise.
8981         (grub_reiserfs_open): Likewise.
8982         (grub_reiserfs_read): Likewise.
8983         (grub_reiserfs_close): Likewise.
8984         (grub_reiserfs_get_journal): Removed.
8986         * fs/fshelp.c (grub_fshelp_read): Removed.
8987         (grub_fshelp_map_block): Likewise.
8989         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8990         (grub_fshelp_journal): Likewise.
8991         (grub_fshelp_read): Likewise.
8992         (grub_fshelp_map_block): Likewise.
8994 2008-06-16  Pavel Roskin  <proski@gnu.org>
8996         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8997         floating point anymore.
8998         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
9000 2008-06-15  Pavel Roskin  <proski@gnu.org>
9002         * commands/ls.c (grub_ls_list_files): Use integer calculations
9003         for human readable format, avoid floating point use.
9004         * kern/misc.c (grub_ftoa): Remove.
9005         (grub_vsprintf): Remove floating point support.
9007 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9009         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
9010         devices.
9011         Reported by Max Vozeler.
9013 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9015         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9016         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9017         skipped later.
9018         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9019         the beginning of the prefix.
9021         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9022         It is assumed that if we have a memdisk, grub-mkimage has set
9023         grub_prefix to include the "(memdisk)" drive in it.
9025 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9027         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9028         Initialize keyboard controller after registering the terminal, so that
9029         grub_printf() can be called from grub_keyboard_controller_init().
9031 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9033         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9034         extent-btree which is written as big endian on disk.
9035         Reported by Alain Greppin  <al@chilibi.org>.
9037 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9039         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9040         * util/i386/pc/grub-install.in (modules): Likewise.
9042 2008-06-13  Pavel Roskin  <proski@gnu.org>
9044         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9046 2008-06-13  Bean  <bean123ch@gmail.com>
9048         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9050         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9052         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9053         to indicate sparse block.
9055 2008-06-12  Pavel Roskin  <proski@gnu.org>
9057         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9058         number, grub_fshelp_read() does it for us.
9060         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9061         linear disk read with journal translation.
9062         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9063         * include/grub/fshelp.h: Declare grub_fshelp_read().
9065 2008-06-09  Pavel Roskin  <proski@gnu.org>
9067         * fs/minix.c (grub_minix_mount): Handle error reading
9068         superblock.
9070 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9072         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9073         don't append the RAID prefix afterwards.
9074         Reported by Clint Adams.
9076 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9078         Based on description from Pavel:
9079         * kern/disk.c (grub_disk_check_range): Rename to ...
9080         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9081         tasks performed by this function.
9083 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9085         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9086         `num_serial' (for consistency with other variables).
9087         (struct grub_ntfs_data): Add `uuid' member.
9088         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9089         (grub_ntfs_uuid): New function.
9090         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9092 2008-06-07  Pavel Roskin  <proski@gnu.org>
9094         * util/biosdisk.c (open_device): Revert last change to the
9095         function, it broke installation.  The sector needs to be
9096         different dependent on which device is opened.
9098 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9100         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9101         rest of GRUB, and breakage doesn't happen if its value were modified.
9103         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9104         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9105         a constant (same value).
9106         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9107         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9109 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9111         * util/biosdisk.c (open_device): Do not modify sector offset when
9112         accessing a partition.  kern/disk.c already handles this for us.
9114 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9116         * util/grub-emu.c (grub_machine_init): Move code in this function from
9117         here ...
9118         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9119         segfault in case grub_printf() is called).
9121         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9122         grub_probe.  Update all users not to explicitly add it again.
9123         (grub_device): New variable; contains corresponding device for grubdir.
9124         (fs_module, partmap_module, devabstraction_module): Pass
9125         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9126         every time.
9128 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9130         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9131         is found, print it (same layout as with labels).
9133 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9135         * util/biosdisk.c (get_drive): Rename to ...
9136         (find_grub_drive): ... this.  Update all users.
9138         (get_os_disk): Rename to ...
9139         (convert_system_partition_to_system_disk): ... this.  Update all users.
9141         (find_drive): Rename to ...
9142         (find_system_device): ... this.  Update all users.
9144 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9146         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9147         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9148         (make_device_map): Likewise.
9150 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9152         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9153         before dereferencing it.
9155         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9156         union with fat12/fat16-specific ones.  Add some new fields, including
9157         `num_serial' for both versions.
9158         (struct grub_fat_data): Add `uuid' member.
9159         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9160         names.  Initialize `data->uuid' using `num_serial'.
9161         (grub_fat_uuid): New function.
9162         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9164         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9165         (grub_reiserfs_uuid): New function.
9166         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9167         member.
9169         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9170         (grub_xfs_uuid): New function.
9171         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9173 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9175         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9176         code that is backward compatible with pre-uuid search command.
9178 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9180         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9181         floppies after everything else, to ensure floppy drive isn't accessed
9182         unnecessarily (patch from Bean).
9184 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9186         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9187         not print device names when we were asked to set a variable.
9189 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9191         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9192         using "cursor-on" and "cursor-off" commands (understood at least by
9193         the Open Firmware flavour on OLPC).
9195 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9197         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9198         on and off sequences.
9200 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9202         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9203         * util/update-grub.in: Likewise.
9205 2008-05-30  Pavel Roskin  <proski@gnu.org>
9207         * util/biosdisk.c (linux_find_partition): Simplify logic and
9208         make the code more universal.  Keep special processing for
9209         devfs, but use a simple rule for all other devices.  If the
9210         device ends with a number, append 'p' and the partition number.
9211         Otherwise, append only the partition number.
9213 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9215         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9216         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9217         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9218         the `root' parameter to Linux.
9220 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9222         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9223         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9224         --fs_uuid with --fs-uuid.
9225         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9226         all filesystems support them).
9228 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9230         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9231         grub_printf() flags, since we're printing in units of 2 bytes.
9233 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9235         * util/grub.d/00_header.in: Remove obsolete comment referencing
9236         convert_system_path_to_grub_path().
9237         * util/update-grub.in: Likewise.
9238         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9239         (convert_system_path_to_grub_path): Add a warning message explaining
9240         that this function is deprecated.  Rely on is_path_readable_by_grub()
9241         for the readability checks.
9242         (font_path): Use is_path_readable_by_grub() for the readability
9243         check rather than convert_system_path_to_grub_path().
9245 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9247         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9248         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9249         converting it first.
9250         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9251         grub.cfg for access to font file, and afterwards call it again to set
9252         the root device.
9254 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9256         * commands/search.c (options): Add --fs_uuid option.
9257         (search_fs_uuid): New function.
9258         (grub_cmd_search): Fix --set argument passing.
9259         Use search_fs_uuid() when requested via --fs_uuid.
9260         (grub_search_init): Update help message.
9261         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9262         and redeclare it as an array of 16-bit words.
9263         (grub_ext2_uuid): New function.
9264         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9265         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9266         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9267         (GRUB_DEVICE_BOOT_UUID): New variables.
9268         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9269         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9270         whenever possible.
9271         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9272         just assume `root' variable has the right value.
9273         * util/grub.d/10_linux.in: Likewise.
9274         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9275         via PRINT_FS_UUID.
9276         (main): Recognise `-t fs_uuid' argument.
9278 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9280         * util/biosdisk.c (map): Redefine structure to hold information
9281         about GRUB drive name.
9282         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9283         drive names.
9284         (call_hook): Remove.
9285         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9286         member.  Assume drive has partitions.
9287         (grub_util_biosdisk_open): Access device names via `.device' struct
9288         member.
9289         (open_device): Likewise.
9290         (find_drive): Likewise.
9291         (read_device_map): Adjust map[] usage to match the new struct
9292         definition.  Don't check for duplicates (still possible, but not cheap
9293         anymore).
9294         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9295         (make_device_name): Remove assumption of BIOS-like drive names.
9297 2008-05-30  Pavel Roskin  <proski@gnu.org>
9299         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9300         compiling execute.c doesn't need grub_script.tab.h anymore.
9301         (normal/command.c_DEPENDENCIES): Likewise.
9302         (normal/function.c_DEPENDENCIES): Likewise.
9303         * conf/i386-ieee1275.rmk: Likewise.
9304         * conf/i386-linuxbios.rmk: Likewise.
9305         * conf/i386-pc.rmk: Likewise.
9306         * conf/powerpc-ieee1275.rmk: Likewise.
9307         * conf/sparc64-ieee1275.rmk: Likewise.
9309 2008-05-29  Pavel Roskin  <proski@gnu.org>
9311         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9312         when scanning metadata for volume group name.
9314         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9315         a generated file, which may only be included from the files with
9316         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9317         use union YYSTYPE, as the later allows forward declaration.
9318         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9320 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9322         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9323         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9324         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9325         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9326         scan codes.
9328 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9330         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9331         control key combinations.
9333 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9335         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9336         * util/ieee1275/grub-install.in: ... to here.
9337         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9338         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9339         (grub_install_SOURCES): Likewise.
9341 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9343         * fs/affs.c: Update copyright year.
9344         * fs/ext2.c: Likewise.
9345         * fs/fshelp.c: Likewise.
9346         * fs/hfsplus.c: Likewise.
9347         * fs/ntfs.c: Likewise.
9348         * fs/xfs.c: Likewise.
9349         * include/grub/fshelp.h: Likewise.
9350         * util/grub-mkdevicemap.c: Likewise.
9352 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9354         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9355         might need to be fatfs to support some firmware implementations
9356         (e.g. OFW or EFI).
9358 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9360         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9361         devices.
9362         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9363         (make_device_map): Likewise.
9365 2008-05-20  Bean  <bean123ch@gmail.com>
9367         * fs/fshelp.c (grub_fshelp_map_block): New function.
9368         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9369         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9371         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9372         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9373         (grub_fshelp_journal): New structure.
9374         (grub_fshelp_map_block): New function prototype.
9375         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9376         (grub_fshelp_map_block): Likewise.
9378         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9379         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9380         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9381         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9382         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9383         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9384         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9385         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9386         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9387         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9388         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9389         (grub_ext2_sblock): New members for journal support.
9390         (grub_ext3_journal_header): New structure.
9391         (grub_ext3_journal_revoke_header): Likewise.
9392         (grub_ext3_journal_block_tag): Likewise.
9393         (grub_ext3_journal_sblock): Likewise.
9394         (grub_fshelp_node): New members logfile and journal.
9395         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9396         grub_fshelp_map_block to get real block number.
9397         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9398         number.
9399         (grub_ext2_read_inode): Likewise.
9400         (grub_ext3_get_journal): New function.
9401         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9402         (grub_ext2_close): Release memory used by journal.
9404         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9405         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9406         (grub_reiserfs_transaction_header): Renamed to
9407         grub_reiserfs_description_block, replace field data with real_blocks.
9408         (grub_reiserfs_commit_block): New structure.
9409         (grub_reiserfs_data): New member journal.
9410         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9411         number.
9412         (grub_reiserfs_read_symlink): Likewise.
9413         (grub_reiserfs_iterate_dir): Likewise.
9414         (grub_reiserfs_open): Likewise.
9415         (grub_reiserfs_read): Likewise.
9416         (grub_reiserfs_get_journal): New function.
9417         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9418         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9419         using grub_reiserfs_get_journal.
9420         (grub_reiserfs_close): Release memory used by journal.
9422         * fs/affs.c (grub_affs_read_block): Change block type to
9423         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9425         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9427         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9429         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9431         * fs/udf.c (grub_udf_read_block): Change block type to
9432         grub_disk_addr_t. Use type cast to avoid warning.
9434         * fs/xfs.c (grub_xfs_read_block): Likewise.
9436 2008-05-16  Christian Franke  <franke@computer.org>
9438         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9439         to ensure that break with ESC will always work.
9440         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9441         Remove ESC from keyboard queue.
9443 2008-05-16  Christian Franke  <franke@computer.org>
9445         * util/biosdisk.c: [__CYGWIN__] Add includes.
9446         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9447         (get_os_disk): Move variable declarations to OS specific
9448         parts to avoid warning.
9449         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9450         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9451         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9452         Cygwin.
9453         * util/getroot.c: [__CYGWIN__] Add includes.
9454         (strip_extra_slashes): Fix "/" case.
9455         [__CYGWIN__] (get_win32_path): New function.
9456         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9457         [__CYGWIN__] (find_root_device): Disable.
9458         [__CYGWIN__] (get_bootsec_serial): New function.
9459         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9460         [__linux__] (grub_guess_root_device): Add early returns to simplify
9461         structure.
9462         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9463         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9464         check for Linux only.
9466 2008-05-15  Bean  <bean123ch@gmail.com>
9468         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9469         keyboard hang problem in apple's intel mac.
9471 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9473         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9474         devices.
9475         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9476         (make_device_map): Likewise.
9477         Reported by Aurelien Jarno <aurel32@debian.org>
9479 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9481         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9482         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9483         (make_device_map): Output entries for xvd type disks.
9485 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9487         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9488         devices.
9489         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9490         (make_device_map): Likewise.
9491         Reported by Roland Dreier <rdreier@cisco.com>
9493 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9495         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9496         grub_strstr() call.  Correct a few mistakes in failure path handling.
9498 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9500         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9501         Do not print a trailing slash (therefore, the root directory is an
9502         empty string).
9503         (convert_system_path_to_grub_path): Do not remove trailing slash
9504         from make_system_path_relative_to_its_root() output.
9506         * util/i386/pc/grub-install.in: Add trailing slash to output from
9507         make_system_path_relative_to_its_root().
9509 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9511         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9512         ensures that output lines aren't intermangled with those sent to
9513         stderr (via grub_util_info()).
9514         * util/grub-probe.c (grub_refresh): Likewise.
9515         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9517 2008-05-05  Christian Franke  <franke@computer.org>
9519         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9520         Add Cygwin device names.
9521         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9522         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9523         (check_device): Return error instead of success on empty name.
9524         (make_device_map): Move label inside linux specific code to
9525         prevent compiler warning.
9527 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9529         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9530         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9531         first boot option.
9532         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9534 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9536         * docs/grub.cfg: New file (example GRUB configuration).
9538 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9540         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9541         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9542         and `disk/ieee1275/nand.c'.
9544 2008-04-25  Bean  <bean123ch@gmail.com>
9546         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9547         i386-linuxbios.
9549         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9550         change the buffer size to 4096 for cdrom device.
9552         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9553         and nand.mod.
9554         (_linux_mod_SOURCES): New variable.
9555         (_linux_mod_CFLAGS): Likewise.
9556         (_linux_mod_LDFLAGS): Likewise.
9557         (linux_mod_SOURCES): Likewise.
9558         (linux_mod_CFLAGS): Likewise.
9559         (linux_mod_LDFLAGS): Likewise.
9560         (nand_mod_SOURCES): Likewise.
9561         (nand_mod_CFLAGS): Likewise.
9562         (nand_mod_LDFLAGS): Likewise.
9564         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9565         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9566         type property. (nand device in olpc don't have this property)
9568         * include/grub/disk.h (grub_disk_dev_id): New macro
9569         GRUB_DISK_DEVICE_NAND_ID.
9571         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9572         function prototype.
9573         (grub_rescue_cmd_initrd): Likewise.
9575         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9576         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9577         ofw_cif_handler and ofw_idt, adjust padding number.
9579         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9580         GRUB_MACHINE_IEEE1275 is defined.
9582         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9583         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9585         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9586         on nested function heap_init.
9587         (grub_upper_mem): New variable for i386-ieee1275.
9588         (grub_get_extended_memory): New function for i386-ieee1275.
9589         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9591         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9592         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9593         property.
9595         * loader/i386/ieee1275/linux.c: New file.
9597         * loader/i386/ieee1275/linux_normal.c: New file.
9599         * disk/ieee1275/nand.c: New file.
9601 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9603         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9604         value.
9605         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9607 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9609         Restructures early code path on ieee1275 to unify grub_main() as
9610         the first C function that is executed in every platform.
9612         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9613         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9614         cmain().
9615         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9616         * kern/ieee1275/cmain.c (cmain): Rename to ...
9617         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9618         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9619         at the beginning.
9621 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9623         * util/update-grub.in: Fix syntax error when setting
9624         `GRUB_PRELOAD_MODULES'.
9625         Reported by Stephane Chazelas <stephane@artesyncp.com>
9627 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9629         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9630         section into account, newer toolchains generate unique build ids
9631         * configure.ac: remove the test for --build-id=none acceptance,
9632         we want build ids to be preserved
9633         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9634         far from other sections don't cause the raw binary images grow
9635         size
9637 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9639         * disk/lvm.c: Update copyright year.
9640         * kern/misc.c: Likewise.
9642 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9644         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9645         there is no memory left for physical volume name.
9647 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9649         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9650         volume name mapping to support bigger than 9 character names properly.
9652 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9654         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9655         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9657 2008-04-13  Christian Franke  <franke@computer.org>
9659         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9660         to create a floppy emulation boot CD when non emulation mode
9661         does not work.
9662         Enable Joliet CD filesystem extension.
9664 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9666         * kern/misc.c (grub_strncat): Fix off-by-one error.
9667         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9669         * kern/env.c (grub_env_context_close): Clear current context, not
9670         previous one.
9671         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9673         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9675 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9677         Improve robustness when handling LVM.
9679         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9680         (and leave `*p' unmodified).
9681         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9682         through it.
9683         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9684         iterating through it.
9685         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9686         through it.
9687         (grub_lvm_scan_device): Check the return value (and fail gracefully
9688         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9689         Don't assume `vg->pvs != NULL' when iterating through it.
9691 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9693         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9694         * genmk.rb (partmap): New variable.
9695         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9696         (#{partmap}): New target rule.
9697         * genpartmaplist.sh: New file.
9698         * Makefile.in (pkglib_DATA): Add partmap.lst.
9699         (partmap.lst): New target rule.
9700         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9701         modules (including all partition maps), instead of preloading them.
9703 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
9705         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9706         `linux-boot-prober' (if installed) to detect other operating
9707         systems which are installed on the computer and add them to
9708         the boot menu.
9709         * conf/common.rmk: Build and install 30_os-prober.
9711 2008-04-12  Robert Millan  <rmh@aybabtu.com>
9713         * kern/powerpc/ieee1275/init.c: Move from here ...
9714         * kern/ieee1275/init.c: ... to here.  Update all users.
9716         * kern/powerpc/ieee1275/cmain.c: Move from here ...
9717         * kern/ieee1275/cmain.c: ... to here.  Update all users.
9719         * kern/powerpc/ieee1275/openfw.c: Move from here ...
9720         * kern/ieee1275/openfw.c: ... to here.  Update all users.
9722         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9723         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
9725 2008-04-10  Pavel Roskin  <proski@gnu.org>
9727         * configure.ac: Always use "_cv_" in cache variables for
9728         compatibility with Autoconf 2.62.
9730 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9732         Revert grub/machine/init.h addition by Pavel (since it breaks on
9733         i386-ieee1275 and others):
9734         * util/i386/pc/misc.c: Remove grub/machine/init.h.
9735         * util/powerpc/ieee1275/misc.c: Likewise.
9737 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9739         * util/grub-probe.c (probe): Improve error message.
9741 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9743         * util/biosdisk.c (read_device_map): Skip devices that don't exist
9744         (this prevents the presence of a bogus entry from ruining the whole
9745         thing).
9747 2008-04-06  Pavel Roskin  <proski@gnu.org>
9749         * util/biosdisk.c: Include grub/util/biosdisk.h.
9750         * util/grub-fstest.c (execute_command): Make static.
9751         * util/grub-mkdevicemap.c (check_device): Likewise.
9752         * util/i386/pc/misc.c: Include grub/machine/init.h.
9753         * util/powerpc/ieee1275/misc.c: Likewise.
9754         * util/lvm.c: Include grub/util/lvm.h.
9755         * util/misc.c: Include grub/kernel.h, grub/misc.h and
9756         grub/cache.h.
9757         * util/raid.c: Include grub/util/raid.h.
9758         (grub_util_getdiskname): Make static.
9760         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9761         grub_hostfs_fini(), as they are called from grub_init_all() and
9762         grub_fini_all() respectively.  This fixes an infinite loop in
9763         grub-fstest due to double registration of hostfs.
9764         Reported by Christian Franke <Christian.Franke@t-online.de>
9766 2008-04-05  Pavel Roskin  <proski@gnu.org>
9768         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9769         all 8 functions.  Otherwise, probe function 0 only.
9771 2008-04-04  Pavel Roskin  <proski@gnu.org>
9773         * commands/lspci.c (grub_lspci_iter): Print the bus number
9774         correctly.
9776         * commands/lspci.c (grub_pci_classes): Fix typos.
9777         (grub_lspci_iter): Don't print func twice.  Print vendor ID
9778         before device ID, as it's normally done.
9780         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9781         Fix signedness warnings.
9782         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9783         Likewise.
9784         * util/ieee1275/get_disk_name.c: Include config.h so that
9785         _GNU_SOURCE is defined and getline() is declared.  Mark an
9786         unused argument as such.  Fix a signedness warning.
9788 2008-04-02  Pavel Roskin  <proski@gnu.org>
9790         * genkernsyms.sh.in: Use more robust assignments for CC and
9791         srcdir.  Quote srcdir.
9792         * gensymlist.sh.in: Likewise.  Assert at the compile time that
9793         the symbol table is not empty.
9795         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9796         * fs/cpio.c (grub_cpio_read): Likewise.
9798 2008-04-01  Pavel Roskin  <proski@gnu.org>
9800         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9801         * disk/host.c (grub_host_open): Likewise.
9802         * disk/loopback.c (grub_loopback_open): Likewise.
9803         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9804         disk->id as in disk/host.c, not a multi-character constant.
9806         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
9807         later is obsolete, potentially dangerous and sets a bad example.
9808         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9809         * util/misc.c (grub_util_get_image_size): Likewise.
9811         * disk/loopback.c (options): Improve help for "--partitions".
9813         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9814         options to align them with the short options, e.g. "echo -e".
9816 2008-03-31  Bean  <bean123ch@gmail.com>
9818         * video/reader/png.c (grub_png_data): New member is_16bit and
9819         image_data.
9820         (grub_png_decode_image_header): Detect 16 bit png image.
9821         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9822         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9823         (grub_video_reader_png): Release memory occupied by image_data.
9825         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9826         4096 bytes.
9827         (grub_nfs_mount): Skip the test for sector per cluster.
9829         * include/grub/ntfs.h (MAX_SPC): Removed.
9831 2008-03-31  Bean  <bean123ch@gmail.com>
9833         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9834         (grub_probe_SOURCES): Add fs/afs.c.
9835         (grub_fstest_SOURCES): Likewise.
9836         (afs_mod_SOURCES): New variable.
9837         (afs_mod_CFLAGS): Likewise.
9838         (afs_mod_LDFLAGS): Likewise.
9840         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9841         (grub_emu_SOURCES): Likewise.
9843         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9845         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9847         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9849         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9851         * fs/afs.c: New file.
9853 2008-03-30  Pavel Roskin  <proski@gnu.org>
9855         * disk/host.c: Include grub/misc.h to fix a warning.
9856         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9857         warnings about implicit declarations.
9859         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9860         variable.
9861         * include/grub/i386/loader.h: Change declaration of
9862         grub_linux_boot() to match what grub_loader_set() expects.
9863         * util/getroot.c (grub_guess_root_device): Return const char* to
9864         fix a warning.
9865         * util/grub-probe.c (probe): Fix a warning about uninitialized
9866         abstraction_name variable.
9867         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9868         second argument as unused to fix a warning.
9870         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9871         missing grub_error() call.
9873         * util/update-grub_lib.in: Define datarootdir, since Autoconf
9874         2.60 and newer uses it to define datadir.
9876         * commands/sleep.c: Fix warning about implicit declaration.
9877         * disk/memdisk.c: Likewise.
9878         * loader/aout.c: Likewise.
9879         * loader/i386/bsd_normal.c: Likewise.
9880         * util/grub-probe.c: Likewise.
9882         * commands/i386/cpuid.c (has_longmode): Make static.
9883         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9884         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9886         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9887         GDT.  This is more robust, as %ds can change.
9888         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9889         calling real_to_prot().
9890         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9892 2008-03-28  Pavel Roskin  <proski@gnu.org>
9894         * kern/i386/pc/startup.S: Assert that uncompressed functions
9895         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9896         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9897         code, as they push parts of the code (error handlers) beyond
9898         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
9899         code as correctness and size.
9901 2008-03-28  Pavel Roskin  <proski@gnu.org>
9903         * kern/i386/pc/startup.S
9904         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9905         data block address to the real mode, keep offset minimal.  This
9906         works around a bug in AWARD BIOS on old Athlon systems, which
9907         makes CD detection hang.
9909 2008-03-26  Pavel Roskin  <proski@gnu.org>
9911         * normal/color.c (grub_parse_color_name_pair): Make `name' a
9912         const.
9913         * include/grub/normal.h: Add grub_parse_color_name_pair()
9914         declaration.
9916 2008-03-24  Bean  <bean123ch@gmail.com>
9918         * disk/i386/pc/biosdisk.c (cd_start): Removed.
9919         (cd_count): Removed.
9920         (cd_drive): New variable.
9921         (grub_biosdisk_get_drive): Don't check for (cdN) device.
9922         (grub_biosdisk_call_hook): Likewise.
9923         (grub_biosdisk_iterate): Change cdrom detection method.
9924         (grub_biosdisk_open): Replace cd_start with cd_drive.
9925         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9926         detect cdrom device.
9928         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9929         Removed.
9930         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9931         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9932         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9933         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9934         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9935         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9936         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9937         (grub_biosdisk_cdrp): New structure.
9938         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9940         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9942         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9943         device.
9945         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9946         New function.
9948 2008-03-20  Robert Millan  <rmh@aybabtu.com>
9950         Remove 2 TiB limit in ata.mod.
9951         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9952         (grub_ata_dumpinfo): Print sector count with 0x%llx.
9953         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9954         grub_uint64_t instead of grub_uint32_t.
9956 2008-03-05  Bean  <bean123ch@gmail.com>
9958         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9959         (grub_multiboot): Set boot device.
9961         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9963 2008-03-02  Bean  <bean123ch@gmail.com>
9965         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9966         symlink_buffer.
9968 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
9970         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9971         texinfo.tex.
9973         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9974         modified.
9976         * docs/fdl.texi: New file.
9978         * docs/mdate-sh: New file. Copied from gnulib.
9979         * docs/texinfo.tex: Likewise.
9981         * config.guess: Updated from gnulib.
9982         * install-sh: Likewise.
9984 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9986         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9987         (aout_mod_SOURCES): New variable.
9988         (aout_mod_CFLAGS): Likewise.
9989         (aout_mod_LDFLAGS): Likewise.
9991         * conf/i386-ieee1275.rmk: Likewise.
9993 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9995         * util/update-grub.in: Reorganise terminal validity check.  Accept
9996         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9997         Based on suggestion by Franklin PIAT.
9999 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
10001         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
10002         function.
10003         * util/getroot.c (grub_util_check_block_device): New function that
10004         returns the given argument if it is a block device and returns NULL else.
10005         * util/grub-probe.c (argument_is_device): New variable.
10006         (probe): Promote device_name from a variable to an argument. Receive
10007         device_name from grub_util_check_block_device() if path is NULL and from
10008         grub_guess_root_device() else. Do not free() device_name anymore.
10009         (options): Introduce new parameter '-d, --device'.
10010         (main): Add description of the new parameter to the help screen.
10011         Rename path variable to argument. Set argument_is_device if the '-d'
10012         option is given. Pass argument to probe() depending on
10013         argument_is_device.
10015 2008-02-24  Bean  <bean123ch@gmail.com>
10017         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10018         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10019         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10020         (GRUB_ISO9660_VOLDESC_PART): Likewise.
10021         (GRUB_ISO9660_VOLDESC_END): Likewise.
10022         (grub_iso9660_primary_voldesc): New member escape.
10023         (grub_iso9660_data): New member joliet.
10024         (grub_iso9660_convert_string): New function.
10025         (grub_iso9660_mount): Detect joliet extension.
10026         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10027         (grub_iso9660_iso9660_label): Likewise.
10029         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10030         (grub_setup_SOURCES): Add fs/udf.c.
10031         (grub_fstest_SOURCES): Likewise.
10032         (udf_mod_SOURCES): New variable.
10033         (udf_mod_CFLAGS): Likewise.
10034         (udf_mod_LDFLAGS): Likewise.
10036         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10037         (grub_emu_SOURCES): Likewise.
10039         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10041         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10043         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10045         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10047         * fs/udf.c: New file.
10049 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10051         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10052         (normal/lexer.c_DEPENDENCIES): New variables.
10053         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10054         (normal/lexer.c_DEPENDENCIES): Likewise.
10055         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10056         (normal/lexer.c_DEPENDENCIES): Likewise.
10057         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10058         (normal/lexer.c_DEPENDENCIES): Likewise.
10059         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10060         (normal/lexer.c_DEPENDENCIES): Likewise.
10061         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10062         (normal/lexer.c_DEPENDENCIES): Likewise.
10064 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10066         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10067         since they were intended to be in hex.  This didn't break previously
10068         because of a bug in gpt_partition_map_iterate() (see below).
10070         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10071         when checking the validity of GPT header.
10072         Remove `partno', since it always provides the same information as `i'.
10074 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10076         * include/grub/efi/time.h: Fix a wrong comment.
10078 2008-02-19  Pavel Roskin  <proski@gnu.org>
10080         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10081         message.
10083 2008-02-19  Bean  <bean123ch@gmail.com>
10085         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10086         (aout_mod_SOURCES): New variable.
10087         (aout_mod_CFLAGS): Likewise.
10088         (aout_mod_LDFLAGS): Likewise.
10089         (_bsd_mod_SOURCES): New variable.
10090         (_bsd_mod_CFLAGS): Likewise.
10091         (_bsd_mod_LDFLAGS): Likewise.
10092         (bsd_mod_SOURCES): New variable.
10093         (bsd_mod_CFLAGS): Likewise.
10094         (bsd_mod_LDFLAGS): Likewise.
10096         * include/grub/aout.h: New file.
10098         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10100         * include/grub/i386/bsd.h: New file.
10102         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10103         to make it public.
10105         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10106         function is called, so that it's possible to change it inside the hook.
10107         (grub_elf64_load): Likewise.
10108         (grub_elf_file): Don't close the file if elf header is not found.
10109         (grub_elf_close): Close the file if grub_elf_file fails (The new
10110         grub_elf_file won't close it).
10111         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10112         (grub_elf64_size): Likewise.
10114         * kern/i386/loader.S (grub_unix_real_boot): New function.
10116         * loader/aout.c: New file.
10118         * loader/i386/bsd.c: New file.
10120         * loader/i386/bsd_normal.c: New file.
10122         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10124         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10125         can test other formats.
10127 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10129         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10130         (grub_gpt_partition_type_empty): Redefine with macro from
10131         `<grub/gpt_partition.h>'.
10132         (gpt_partition_map_iterate): Adjust partition type comparison.
10134         Export `entry' as partmap-specific `part.data' struct.
10135         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10137         * include/grub/gpt_partition.h (grub_gpt_header)
10138         (grub_gpt_partentry): ... to here (new file).
10140         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10142         (grub_gpt_partition_type_bios_boot): New const variable, defined
10143         with macro from `<grub/gpt_partition.h>'.
10145         (setup): Replace `first_start' with `embed_region', which keeps
10146         track of the embed region (and is partmap-agnostic).
10148         Replace find_first_partition_start() with find_usable_region(),
10149         which finds a usable region for embedding using partmap-specific
10150         knowledge (supports PC/MSDOS and GPT).
10152         Fix all assumptions that the embed region start at sector 1, using
10153         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10154         rather than `first_start' to calculate available size.
10156         In grub_util_info() message, replace "into after the MBR" with an
10157         indication of the specific sector our embed region starts at.
10159 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10161         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10162         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10163         `commands/reboot.c'.
10164         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10165         (halt_mod_SOURCES): Likewise.
10166         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10167         (halt_mod_SOURCES): Likewise.
10169 2008-02-17  Christian Franke  <franke@computer.org>
10171         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10173 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10175         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10176         set `first_start' to 0 for non-PC/MSDOS partition maps.
10178 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10180         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10181         do not assume partition map is PC/MSDOS before performing checks that
10182         are specific to that layout.
10184 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10186         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10187         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10188         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10190 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10192         * configure.ac: Only a cosmetic change on the handling of
10193         -fno-stack-protector.
10195 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10197         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10198         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10199         reboot.c.
10200         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10201         (halt_mod_SOURCES): New variable.
10202         (halt_mod_CFLAGS): Likewise.
10203         (halt_mod_LDFLAGS): Likewise.
10204         (reboot_mod_SOURCES): Likewise.
10205         (reboot_mod_CFLAGS): Likewise.
10206         (reboot_mod_LDFLAGS): Likewise.
10208         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10209         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10210         reboot.c.
10211         (halt_mod_SOURCES): Likewise.
10212         (reboot_mod_SOURCES): Likewise.
10214         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10215         commands/i386/pc/reboot.c by commands/reboot.c.
10216         (reboot_mod_SOURCES): Likewise.
10218         * commands/i386/pc/reboot.c: merge this file ...
10220         * commands/ieee1275/reboot.c: ... and this file ...
10222         * commands/reboot.c: ... to this file.
10223         Add some precompiler directive to include the correct header for
10224         each machine.
10226         * commands/ieee1275/halt.c: move this file ...
10228         * commands/halt.c: ... to here.
10229         Add some precompiler directive to include the correct header for
10230         each machine.
10232         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10233         (grub_halt): Likewise.
10235         * kern/efi/efi.c (grub_reboot): New function.
10236         (grub_halt): Likewise.
10238 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10240         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10241         /dev (like it is done for /dev/mapper).  This doesn't provide support
10242         for EVMS, but at least it is now easy to identify the problem when it
10243         arises.
10245 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10247         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10248         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10249         comparing it with -1, not 0.
10251 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10253         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10254         `disk/lvm.c'.
10255         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10256         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10258         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10259         `disk/lvm.c' to the end of the list.
10260         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10261         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10263 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10265         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10266         grub_print_error() instead.  This will let user know why we're entering
10267         rescue mode.
10268         Based on suggestions from Sam Morris.
10270 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10272         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10273         on remaining N args, instead of "--" arg N times.
10275 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10277         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10278         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10279         pattern for unknown glyphs.
10281 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10283         * configure.ac: Probe for `help2man'.
10284         * Makefile.in (builddir): New variable.
10285         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10286         or otherwise add a few flags/options to it.
10287         (install-local): For every executable utility or script that is
10288         installed, invoke $(HELP2MAN) to install a manpage based on --help
10289         output.
10291         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10292         that it doesn't prevent --help from working in build tree.
10294         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10295         with `bug-grub@gnu.org'.
10296         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10297         * util/update-grub.in (usage): New function.
10298         Implement proper argument check, with support for --help and --version
10299         (as well as existing -y).
10301 2008-02-09  Christian Franke  <franke@computer.org>
10303         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10304         avoid overwriting previous output.
10305         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10307 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10309         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10310         drawing the menu.
10312 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10314         * commands/sleep.c: New file.
10315         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10316         (sleep_mod_SOURCES): New variable.
10317         (sleep_mod_CFLAGS): Likewise.
10318         (sleep_mod_LDFLAGS): Likewise.
10320 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10322         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10323         situations in which we can deduce the RAID size and the superblock
10324         doesn't match it.
10326 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10328         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10329         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10330         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10332         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10333         and return a grub_diskmemberlist_t composed of physical array members.
10334         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10336         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10337         prototype.
10338         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10339         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10340         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10342         * util/grub-probe.c (probe): Move partmap probing code from here ...
10343         (probe_partmap): ... to here.
10344         (probe): Use probe_partmap() once for the disk we're probing, and
10345         additionally, when such disk contains a memberlist() struct member,
10346         once for each disk that is contained in the structure returned by
10347         memberlist().
10349 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10351         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10352         environment variable to 'all' in order to obtain debug output from
10353         non-util/ code.
10354         * util/i386/pc/grub-setup.c (main): Likewise.
10356 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10358         * disk/raid.c (grub_raid_scan_device): Check for
10359         `array->device[sb.this_disk.number]' rather than for
10360         `array->device[sb.this_disk.number]->name', since the latter is not
10361         guaranteed to be accessible.
10363 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10365         * disk/raid.c: Update copyright.
10366         * fs/cpio.c: Likewise.
10367         * include/grub/raid.h: Likewise.
10368         * loader/i386/pc/multiboot.c: Likewise.
10369         * util/hostfs.c: Likewise.
10371 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10373         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10374         to a grub_disk_t array.
10375         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10376         `device[x]'.
10377         (grub_raid_scan_device): Replace `device[x].name' accesses with
10378         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10380 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10382         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10383         grub_dprintf() calls.
10384         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10385         error message.
10387 2008-02-07  Christian Franke  <franke@computer.org>
10389         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10390         instead of fseek and ftell to support large files.
10391         (grub_hostfs_read): Likewise.
10393 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10395         Patch from Jeroen Dekkers.
10396         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10397         failure, since successfully reading all array members might not be
10398         required.
10400 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10402         * util/grub-probe.c (probe): Simplify partmap probing (with the
10403         assumption that the first word up to the underscore equals to
10404         the module name).
10406 2008-02-06  Christian Franke  <franke@computer.org>
10408         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10409         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10410         last block of a cpio or tar stream.
10411         Check for "TRAILER!!!" instead of any empty data
10412         block to detect last block of a cpio stream.
10413         (grub_cpio_dir): Fix constness of variable np.
10414         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10415         cpio or tar trailer is detected.  This fixes a crash
10416         on open of a non existing file.
10418 2008-02-05  Bean  <bean123ch@gmail.com>
10420         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10421         address of entry.
10422         (grub_multiboot_load_elf64): Likewise.
10423         (grub_multiboot): Initialize mbi structure.
10425         * util/grub-fstest.c: Don't include unused header file script.h.
10427         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10428         of file.
10429         (grub_fstest_SOURCES): Likewise.
10431 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10433         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10434         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10435         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10436         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10438         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10439         (translation_table): Replace hardcoded values with macros
10440         provided by `<grub/term.h>'.
10442         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10443         (keyboard_map): Correct/add a few values, with macros provided
10444         by `<grub/term.h>'.
10445         (keyboard_map_shift): Zero values that don't differ from their
10446         `keyboard_map' equivalents.
10447         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10448         Discard the second scan code that is always sent by Caps lock.
10449         Only use `keyboard_map_shift' when it provides a non-zero value,
10450         otherwise fallback to `keyboard_map'.
10452 2008-02-04  Bean  <bean123ch@gmail.com>
10454         * Makefile.in (enable_grub_fstest): New variable.
10456         * conf/common.rmk (grub_fstest_init.lst): New rule.
10457         (grub_fstest_init.h): Likewise.
10458         (grub_fstest_init.c): Likewise.
10459         (util/grub-fstest.c_DEPENDENCIES): New variable.
10460         (grub_fstest_SOURCES): Likewise.
10462         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10464         * util/grub-fstest.c: New file.
10466 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10468         Make grub-setup handle a separate root device.
10470         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10471         so that the root device can be compared with the destination
10472         device.
10473         When embedding the core image, if the root and destination devices
10474         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10475         0xFF.
10476         When not embedding, set ROOT_DRIVE to 0xFF.
10478 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10480         Add support for having a grub directory in a different drive. This
10481         is still only the data handling part.
10483         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10484         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10485         (grub_root_drive): New variable.
10487         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10488         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10489         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10490         as it was.
10492         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10494         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10495         macro.
10496         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10498         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10499         is bogus, because PXE booting does not specify any drive
10500         correctly.
10502         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10503         am not sure if this is really correct.
10505         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10506         is always identical to the boot drive when booting from a CD.
10508         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10509         longer.
10510         (root_drive): New variable.
10511         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10512         (setup_sectors): Push %dx right after popping it, because %dh will
10513         be modified later.
10514         (copy_buffer): Restore %dx.
10516 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10518         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10519         use `cdboot.img' for cdrom images.
10521 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10523         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10524         only setup gfxterm when `font' command has succeeded.
10526 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10528         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10529         (grub_rescue_cmd_multiboot_loader)
10530         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10532 2008-02-03  Pavel Roskin  <proski@gnu.org>
10534         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10535         %edx and %esi from stack only after grub_gate_a20() is called.
10536         grub_gate_a20() clobbers %edx.
10538 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10540         * configure.ac (AC_INIT): Bumped to 1.96.
10542         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10543         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10544         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10545         video/readers/png.c.
10547 2008-02-03  Bean  <bean123ch@gmail.com>
10549         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10550         (cdboot_img_SOURCES): New variable.
10551         (cdboot_img_ASFLAGS): New variable.
10552         (cdboot_img_LDFLAGS): New variable.
10554         * boot/i386/pc/cdboot.S: New file.
10556         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10557         (cd_count): Likewise.
10558         (grub_biosdisk_get_drive): Add support for cd device.
10559         (grub_biosdisk_call_hook): Likewise.
10560         (grub_biosdisk_iterate): Likewise.
10561         (grub_biosdisk_open): Likewise.
10562         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10563         (grub_biosdisk_rw): Support reading from cd device.
10564         (GRUB_MOD_INIT): Iterate cd devices.
10566         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10567         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10568         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10570         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10572 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10574         * commands/read.c: New file.
10575         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10576         (read_mod_SOURCES): New variable.
10577         (read_mod_CFLAGS): Likewise.
10578         (read_mod_LDFLAGS): Likewise.
10580 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10582         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10583         determining whether menu has to be displayed.
10585 2008-02-02  Marco Gerards  <marco@gnu.org>
10587         * bus/pci.c: New file.
10589         * include/grub/pci.h: Likewise.
10591         * include/grub/i386/pc/pci.h: Likewise.
10593         * commands/lspci.c: Likewise.
10595         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10596         `lspci.mod'.
10597         (pci_mod_SOURCES): New variable.
10598         (pci_mod_CFLAGS): Likewise.
10599         (pci_mod_LDFLAGS): Likewise.
10600         (lspci_mod_SOURCES): Likewise.
10601         (lspci_mod_CFLAGS): Likewise.
10602         (lspci_mod_LDFLAGS): Likewise.
10604 2008-02-02  Bean  <bean123ch@gmail.com>
10606         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10607         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10609         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10610         (grub_xfs_btree_node): New structure.
10611         (grub_xfs_btree_root): New structure.
10612         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10613         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10614         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10615         (GRUB_XFS_EXTENT_SIZE): Likewise.
10616         (grub_xfs_read_block): Support btree format type.
10617         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10618         Use directory block as basic unit.
10620         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10622         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10623         __attribute__ ((__regparm__ (1))).
10625 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10627         Correct a mistake in previous commit.
10629         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10630         top.
10631         (normal/command.c_DEPENDENCIES): New variable.
10633 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10635         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10636         top.
10637         (normal/command.c_DEPENDENCIES): New variable.
10638         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10639         * conf/i386-ieee1275.rmk: Likewise.
10640         * conf/i386-linuxbios.rmk: Likewise.
10641         * conf/i386-pc.rmk: Likewise.
10642         * conf/sparc64-ieee1275.rmk: Likewise.
10643         * conf/powerpc-ieee1275.rmk: Likewise.
10644         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10646         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10648 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10650         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10651         call at beginning of function.
10653 2008-01-31  Pavel Roskin  <proski@gnu.org>
10655         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10656         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10657         (grub_mkrescue_SOURCES): Likewise.
10658         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10660 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10662         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10663         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10664         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10665         (grub_probe_SOURCES): ... to here.
10667         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10668         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10669         * conf/i386-ieee1275.rmk: Likewise.
10670         * conf/i386-linuxbios.rmk: Likewise.
10671         * conf/powerpc-ieee1275.rmk: Likewise.
10673 2008-01-30  Tristan Gingold  <gingold@free.fr>
10675         * kern/rescue.c: Silently accept empty lines.
10677 2008-01-29  Bean  <bean123ch@gmail.com>
10679         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10680         (real_code_2): Code cleanup and change comment style.
10681         (move_memory): Avoid using 32-bit address mode.
10683 2008-01-29  Bean  <bean123ch@gmail.com>
10685         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10686         (png_mod_SOURCES): New variable.
10687         (png_mod_CFLAGS): Likewise.
10688         (png_mod_LDFLAGS): Likewise.
10690         * video/readers/png.c: New file.
10692 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10694         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10695         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10696         `ifndef GRUB_MOD_GAP' hack.
10697         * util/elf/grub-mkimage.c (add_segments): Likewise.
10699 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10701         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10702         `GRUB_MOD_GAP' for platforms in which it's not defined.
10703         * util/elf/grub-mkimage.c (add_segments): Likewise.
10705 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10707         Get grub-emu to build again (including parallel builds).
10709         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10710         Split into ...
10711         (util/grub-emu.c_DEPENDENCIES): ... this, ...
10712         (normal/execute.c_DEPENDENCIES): ... this, ...
10713         (grub-emu_DEPENDENCIES): ... and this.
10715         * conf/i386-efi.rmk: Likewise.
10716         * conf/i386-linuxbios.rmk: Likewise.
10717         * conf/i386-ieee1275.rmk: Likewise.
10718         * conf/powerpc-ieee1275.rmk: Likewise.
10719         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10721 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10723         * NEWS: Add a few items.
10725 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10727         Fix parallel builds with grub-emu.  Based on earlier commit for
10728         grub-probe and grub-setup.
10730         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10731         (util/grub-emu.c_DEPENDENCIES): ... this.
10732         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10733         (util/grub-emu.c_DEPENDENCIES): ... this.
10734         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10735         (util/grub-emu.c_DEPENDENCIES): ... this.
10736         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10737         (util/grub-emu.c_DEPENDENCIES): ... this.
10738         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10739         (util/grub-emu.c_DEPENDENCIES): ... this.
10741 2008-01-27  Pavel Roskin  <proski@gnu.org>
10743         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10744         to create a gap between _end and the modules added to the image
10745         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
10746         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10747         * util/elf/grub-mkimage.c (add_segments): Likewise.
10749 2008-01-26  Pavel Roskin  <proski@gnu.org>
10751         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10752         just return an error.
10754 2008-01-26  Bean  <bean123ch@gmail.com>
10756         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10757         (grub_reiserfs_get_item): Save offset of the next item.
10758         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10760 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10762         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10763         make all filesystem sources appear together (possibly fixing omissions
10764         while at it).
10765         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10766         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10767         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10768         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10770         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
10771         add `kern/file.c'.
10772         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10773         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10774         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10775         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10777         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10778         (probe): Add a sanity check to make sure of our ability to read
10779         requested files when probing for filesystem type.
10781         * genmk.rb: Update copyright year (2007).
10783         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10784         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10785         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10786         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10787         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10788         : Remove function prototypes.
10790 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10792         Revert my previous commits (based on wrong assumption of how grub_errno
10793         works).
10795         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10796         * kern/file.c (grub_file_open): Likewise.
10798 2008-01-24  Pavel Roskin  <proski@gnu.org>
10800         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10801         that hang if GRUB tries to setup colors.
10802         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10803         colors for firmwares that don't support it.
10804         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10805         Recognize Open Hack'Ware, set flags to work around its
10806         limitations.
10808 2008-01-24  Robert Millan  <rmh@aybabtu.com>
10810         * kern/file.c (grub_file_open): Do not account previous failures of
10811         unrelated functions when grub_errno is checked for.
10812         Reported by Oleg Strikov.
10814 2008-01-24  Bean  <bean123ch@gmail.com>
10816         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10817         (grub_ufs_sblock): New member volume name.
10818         (grub_ufs_find_file): Fix string copy bug.
10819         (grub_ufs_label): Implement this function properly.
10821         * fs/hfs.c (grub_hfs_cnid_type): New enum.
10822         (grub_hfs_iterate_records): Use the correct file number for extents
10823         and catalog file. Fix problem in next index calculation.
10824         (grub_hfs_find_node): Replace recursive function call with loop.
10825         (grub_hfs_iterate_dir): Replace recursive function call with loop.
10827 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10829         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10830         `<grub/symbol.h>' and `<grub/multiboot.h>'.
10831         (grub_multiboot2_real_boot): New function prototype.
10833         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10834         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10836         * kern/i386/ieee1275/init.c (grub_os_area_addr)
10837         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10839 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10841         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10842         #ifdef'ed out grub_printf().
10844 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10846         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10847         grub_dprintf calls, since they make "debug=all" mode unusable.
10848         (grub_console_checkkey): Likewise.
10850 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10852         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10853         `term/i386/pc/at_keyboard.c'.
10854         (pkglib_MODULES): Add `serial.mod'.
10855         (serial_mod_SOURCES): New variable.
10856         (serial_mod_CFLAGS): Likewise.
10857         (serial_mod_LDFLAGS): Likewise.
10859         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
10860         `<grub/powerpc/ieee1275/console.h>'.
10861         (grub_keyboard_controller_init): New function prototype.
10862         (grub_console_checkkey): Likewise.
10863         (grub_console_getkey): Likewise.
10865         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10866         keyboard on i386.
10868         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10869         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10871 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10873         * kern/i386/pc/init.c (make_install_device): When memdisk image is
10874         present, "(memdisk)/boot/grub" becomes the default prefix.
10876         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10877         a memdisk tarball with all the modules.  Add --overlay=DIR option that
10878         allows users to overlay additional files into the image.
10880 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10882         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10883         and `machine/memory.h'.
10884         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10885         (_multiboot_mod_SOURCES): New variable.
10886         (_multiboot_mod_CFLAGS): Likewise.
10887         (_multiboot_mod_LDFLAGS): Likewise.
10888         (multiboot_mod_SOURCES): Likewise.
10889         (multiboot_mod_CFLAGS): Likewise.
10890         (multiboot_mod_LDFLAGS): Likewise.
10892         * include/grub/i386/ieee1275/loader.h: New file.
10894         * include/grub/i386/ieee1275/machine.h: Likewise.
10896         * include/grub/i386/ieee1275/memory.h: Likewise.
10898         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10899         variable declaration.
10900         (grub_os_area_size): Likewise.
10902         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10903         (grub_lower_mem, grub_upper_mem): New variables.
10904         (grub_stop_floppy): New function (just to make
10905         grub_multiboot2_real_boot() happy).
10907         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10908         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10909         (grub_stop): New function.
10910         Include `"../realmode.S"' and `"../loader.S"'.
10912         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10913         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10915         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10916         rely on grub_multiboot2_real_boot() for final boot.
10918 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10920         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10921         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10922         device that doesn't look like an SD card.
10923         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10924         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10925         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10926         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10927         found.
10929 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10931         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10932         avoid claiming over our own code.
10934 2008-01-22  Bean  <bean123ch@gmail.com>
10936         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10937         (jpeg_mod_SOURCES): New variable.
10938         (jpeg_mod_CFLAGS): Likewise.
10939         (jpeg_mod_LDFLAGS): Likewise.
10941         * video/readers/jpeg.c : New file.
10943 2008-01-22  Bean  <bean123ch@gmail.com>
10945         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10946         there are no more items.
10948 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10950         * kern/mm.c (grub_mm_init_region): Improve debug message.
10952 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10954         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10955         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10956         address.
10957         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10958         a C macro.
10959         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10960         Indicates start of upper memory.
10961         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10962         (generate_image): Abort when image size is big enough to corrupt
10963         upper memory.
10965         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10966         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10967         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10968         instead of hardcoding 0xA0000.
10969         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10970         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10971         instead of hardcoding 0xA0000.
10973 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10975         * disk/memdisk.c (memdisk_size): New variable.
10976         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10977         `memdisk_size'.
10978         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
10979         image to dynamic memory.
10980         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10981         `memdisk_size'.  Free memdisk block.
10983 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10985         Fix detection of very small filesystems (like tar).
10987         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10988         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10989         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10990         a problem with this disk).
10992 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10994         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10995         on grub_biosdisk_rw_standard() error.
10997 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10999         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
11000         recent changes.
11001         * kern/elf.c: Likewise.
11002         * kern/ieee1275/ieee1275.c: Likewise.
11003         * kern/powerpc/ieee1275/openfw.c: Likewise.
11004         * term/ieee1275/ofconsole.c: Likewise.
11006 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11008         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11010         * include/grub/kernel.h (grub_arch_memdisk_addr)
11011         (grub_arch_memdisk_size): Moved from here ...
11013         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11014         (grub_arch_memdisk_size): ... to here.
11016 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11018         Mostly based on bugfix from Bean.
11020         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11021         attribute with hook() parameter.
11022         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11023         declaration.
11024         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11025         attribute with hook() parameter.
11026         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11027         declaration.
11029 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11031         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11032         (pkglib_MODULES): Add `memdisk.mod'.
11033         (memdisk_mod_SOURCES): New variable.
11034         (memdisk_mod_CFLAGS): Likewise.
11035         (memdisk_mod_LDFLAGS): Likewise.
11037         * disk/memdisk.c: New file.
11039         * include/grub/disk.h (grub_disk_dev_id): Add
11040         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11042         * include/grub/i386/pc/kernel.h
11043         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11044         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11045         (grub_kernel_image_size): New variable declaration.
11046         (grub_total_module_size): Likewise.
11047         (grub_memdisk_image_size): Likewise.
11049         * include/grub/i386/pc/memory.h
11050         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11052         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11053         (grub_arch_memdisk_addr): New variable declaration.
11054         (grub_arch_memdisk_size): Likewise.
11056         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11057         (grub_arch_memdisk_size): Likewise.
11059         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11060         (codestart): Replace hardcoded `0x100000' with
11061         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11063         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11064         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11065         not NULL, append the contents of the file it refers to, at the end of
11066         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11067         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11068         (options): Add "memdisk"|'m' option.
11069         (main): Parse --memdisk|-m option, and pass user-provided path as
11070         parameter to generate_image().
11072 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11074         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11075         grub_dprintf() calls from here ...
11076         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11078 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11080         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11082         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11083         declaration.
11084         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11085         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11086         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11087         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11088         property).
11089         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11090         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11092 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11094         Get rid of confusing function (superseded by
11095         `grub_ieee1275_get_integer_property')
11096         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11097         prototype.
11098         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11099         function.
11100         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11101         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11102         in native endianness from grub_ieee1275_get_integer_property().
11104 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11106         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11107         command after "shut-down", since implementations differ on which
11108         the command for halt is.
11110 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11112         * include/grub/i386/linuxbios/console.h: Add header protection.
11113         (grub_keyboard_controller_init): New function prototype.
11114         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11115         (KEYBOARD_COMMAND_READ): Likewise.
11116         (KEYBOARD_COMMAND_WRITE): Likewise.
11117         (KEYBOARD_SCANCODE_SET1): Likewise.
11118         (grub_keyboard_controller_write): New function.
11119         (grub_keyboard_controller_read): Likewise.
11120         (grub_keyboard_controller_init): Likewise.
11122         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11123         (grub_console_init): On coreboot/LinuxBIOS, call
11124         grub_keyboard_controller_init().
11126 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11128         PowerPC changes provided by Pavel Roskin.
11130         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11131         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11132         don't rely on cmain() doing it.
11133         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11134         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11136 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11138         * include/grub/i386/linuxbios/memory.h
11139         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11140         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11141         receive `table_header' as argument.  Instead, probe for it in the
11142         known memory ranges where it can be present.
11143         (grub_available_iterate): Do not pass a fixed `table_header' address
11144         to grub_linuxbios_table_iterate().
11146 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11148         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11149         * conf/i386-ieee1275.rmk: New file.
11150         * include/grub/i386/ieee1275/console.h: Likewise.
11151         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11152         * include/grub/i386/ieee1275/kernel.h: Likewise.
11153         * include/grub/i386/ieee1275/time.h: Likewise.
11154         * kern/i386/ieee1275/init.c: Likewise.
11155         * kern/i386/ieee1275/startup.S: Likewise.
11157 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11159         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11160         when pointers are 32-bit (but still do set it to one when they are
11161         64-bit).
11163 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11165         * include/grub/ieee1275/ieee1275.h
11166         (grub_ieee1275_get_integer_property): New function prototype.
11168         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11169         (grub_ieee1275_get_integer_property): New function.  Wraps around
11170         grub_ieee1275_get_property() to handle endianness.
11172         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11173         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11174         where appropriate.
11175         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11176         (grub_map): Likewise.
11177         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11179 2008-01-15  Bean  <bean123ch@gmail.com>
11181         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11182         (grub_script_execute_cmdline): Reset grub_errno.
11184         * normal/main.c (read_config_file): Reset grub_errno.
11186         * normal/parse.y (script_init): New.
11187         (script): Move function and menuentry here.
11188         (delimiter): New.
11189         (command): Add delimiter at the end of command.
11190         (commands): Adjust to match the new command.
11191         (commandblock): Remove grub_script_lexer_record_start.
11192         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11193         (if): Use the new commands.
11195         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11197 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11199         * normal/menu.c (run_menu): Move timeout message from here ...
11200         (print_timeout): ... to here.
11201         (run_menu): Use print_timeout() once during initial draw to print
11202         the whole message, and again in every clock tick to update only
11203         the number of seconds.
11205 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11207         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11208         actual size of `available' from grub_ieee1275_get_property(), and
11209         restrict parsing to that bound.
11211 2008-01-15  Christian Franke  <franke@computer.org>
11213         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11214         (argp_program_version): Remove variable.
11215         (argp_program_bug_address): Likewise.
11216         (options): Convert from struct argp_option to struct option.
11217         (struct arguments): Remove.
11218         (parse_opt): Remove.
11219         (usage): New function.
11220         (main): Replace struct args members by simple variables.
11221         Replace argp_parse() by getopt_long().
11222         Add switch to evaluate options.
11223         Add missing "(...)" around root_dev in prefix string.
11225 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11227         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11228         for grub_ieee1275_exit(), in order to improve portability.
11230 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11232         * util/grub.d/10_linux.in (prefix): Define.
11233         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11235 2008-01-13  Pavel Roskin  <proski@gnu.org>
11237         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11238         grub_errno if no errors have been detected.
11240 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11242         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11243         (grub_util_get_dev_abstraction): New function prototype.
11245         * util/getroot.c: Include `<grub/util/getroot.h>'
11246         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11247         (grub_util_get_dev_abstraction): ... here (new function).
11249         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11250         `PRINT_ABSTRACTION'.
11251         (probe): Probe for abstraction type when requested.
11252         (main): Understand `--target=abstraction'.
11254         * util/i386/efi/grub-install.in: Add abstraction module to core
11255         image when it is found to be necessary.
11256         * util/i386/pc/grub-install.in: Likewise.
11257         * util/powerpc/ieee1275/grub-install.in: Likewise.
11259         * util/update-grub_lib.in (font_path): Return system path without
11260         converting to GRUB path.
11261         * util/update-grub.in: Convert system path returned by font_path()
11262         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11263         abstraction module is needed for loading fonts (if any).  Export
11264         that as `GRUB_PRELOAD_MODULES'.
11265         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11266         insmod commands).
11268 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11270         Remove some unused code from reiserfs.
11272         * fs/reiserfs.c (struct grub_reiserfs_key)
11273         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11274         (struct grub_reiserfs_node_body): Removed.
11275         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11276         Likewise.
11277         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11278         Likewise.
11279         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11280         Likewise.
11281         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11282         Likewise.
11283         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11284         Likewise.
11285         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11286         Likewise.
11287         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11288         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11289         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11291 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11293         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11294         Determines if a file is garbage left by packaging systems, etc.
11295         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11296         for processing /etc/grub.d scripts.
11297         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11298         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11299         as a condition for processing Linux images.
11301 2008-01-10  Pavel Roskin  <proski@gnu.org>
11303         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11304         to compile reiserfs.c on PowerPC.
11306 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11308         * kern/device.c (grub_device_iterate): Do not abort device iteration
11309         when one of the devices cannot be opened.
11310         * kern/disk.c (grub_disk_open): Do not account previous failures of
11311         unrelated functions when grub_errno is checked for.
11313 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11315         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11316         `! grub_linux_is_bzimage', change order of address comparison to make
11317         it more intuitive, and improve "too big zImage" error message.
11319 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11321         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11322         `$(update-grub_DATA)'.
11323         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11324         targets.
11326 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11328         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11329         which instruction is modified by grub-setup during installation
11330         (since it wasn't obvious by only looking at this file).
11332 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11334         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11335         listing actual TODO items.
11337 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11339         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11340         correctly.
11341         (grub_reiserfs_get_key_offset): Likewise.
11342         (grub_reiserfs_set_key_offset): Likewise.
11343         (grub_reiserfs_set_key_type): Likewise.
11344         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11346         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11347         better to remove the bitfield version completely.
11349 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11351         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11352         allocated from the heap, due to the fshelp implementation.
11353         (grub_reiserfs_dir): Free NODE, due to the same reason.
11355 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11357         Mostly from Vincent Pelletier:
11359         * fs/reiserfs.c: New file.
11361         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11362         (reiserfs_mod_SOURCES): New variable.
11363         (reiserfs_mod_CFLAGS): Likewise.
11364         (reiserfs_mod_LDFLAGS): Likewise.
11366         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11367         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11368         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11369         normal/color.c.
11371 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11373         * normal/color.c: Remove `<grub/env.h>'.
11375 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11377         * include/grub/normal.h: Include <grub/env.h>.
11379 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11381         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11382         usage example with `(hd0,1)'.
11383         Reported by Samuel Thibault.
11385 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11387         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11388         (grub_linux_boot_zimage): Rename to ...
11389         (grub_linux_boot): ... this.
11390         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11391         (grub_linux_boot_zimage): Conditionalize zImage copy.
11393         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11394         (grub_linux_boot_bzimage): Remove prototype.
11395         (grub_linux_boot_zimage): Rename to ...
11396         (grub_linux_boot): ... this.
11398         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11399         (grub_linux_boot): Remove function.
11401 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11403         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11404         (grub_env_write_color_highlight): Likewise.
11405         (grub_wait_after_message): Likewise.
11407         * normal/color.c: New file.
11409         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11410         (normal_mod_DEPENDENCIES): Likewise.
11412         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11413         (normal_mod_DEPENDENCIES): Likewise.
11415         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11416         (normal_mod_DEPENDENCIES): Likewise.
11418         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11419         (normal_mod_DEPENDENCIES): Likewise.
11421         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11422         for waiting after a message is printed.
11423         * normal/main.c (read_config_file): Likewise.
11424         (grub_normal_init): Register grub_env_write_color_normal() and
11425         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11426         `color_highlight' variables as global.
11428         * normal/menu.c (grub_wait_after_message): New function.
11429         (grub_color_menu_normal): New variable.  Replaces ...
11430         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11431         (grub_color_menu_highlight): New variable.  Replaces ...
11432         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11433         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11434         `GRUB_TERM_COLOR_STANDARD'.
11435         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11436         `normal_code' and `highlight_code' to `old_color_normal' and
11437         `old_color_highlight', respectively.
11438         (grub_menu_init_page): Update colors when drawing the menu, based on
11439         `menu_color_normal' and `menu_color_highlight' variables.
11440         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11441         a message is printed.
11443 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11445         * kern/env.c (grub_env_context_open): Propagate hooks for global
11446         variables to new context.
11448         * kern/main.c (grub_set_root_dev): Export `root' variable.
11450 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11452         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11453         discs unconditionally, since udev and others have options to provide
11454         them.
11456 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11458         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11460 2008-01-04  Christian Franke  <franke@computer.org>
11462         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11463         of eisa_mmap.
11465 2008-01-03  Pavel Roskin  <proski@gnu.org>
11467         * kern/i386/linuxbios/init.c: Put "void" to all function
11468         declarations with no arguments.
11469         * kern/powerpc/ieee1275/init.c: Likewise.
11470         * term/i386/pc/at_keyboard.c: Likewise.
11471         * term/i386/pc/vga_text.c: Likewise.
11472         * util/grub-mkdevicemap.c: Likewise.
11474 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11476         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11477         message when loaded image is out of bounds.
11478         (grub_multiboot_load_elf64): Likewise.
11480 2008-01-02  Pavel Roskin  <proski@gnu.org>
11482         * util/grub.d/10_linux.in: Try version without ".old" when
11483         looking for initrd.  It's better to use initrd from the newer
11484         kernel of the same version than no initrd at all.
11486 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11488         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11490 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11492         * include/grub/video.h: Added grub_video_unmap_color and
11493         grub_video_get_active_render_target.
11494         (grub_video_adapter): Added unmap_color and get_active_render_target.
11496         * video/video.c: Added grub_video_unmap_color and
11497         grub_video_get_active_render_target.
11498         (grub_video_get_info): Changed method to accept NULL pointer as an
11499         argument to allow detection of active video adapter.
11501         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11502         grub_video_vbe_unmap_color_int.
11503         Added grub_video_vbe_unmap_color and
11504         grub_video_vbe_get_active_render_target.
11505         (grub_video_vbe_adapter): Added unmap_color and
11506         get_active_render_target.
11508         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11509         with grub_video_vbe_unmap_color_int.
11511         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11512         (DEFAULT_NORMAL_COLOR): Likewise.
11513         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11514         (DEFAULT_FG_COLOR): Removed.
11515         (DEFAULT_BG_COLOR): Likewise.
11516         (DEFAULT_CURSOR_COLOR): Changed value.
11517         (grub_virtual_screen): Added standard_color_setting,
11518         normal_color_setting, highlight_color_setting and term_color.
11519         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11520         (bitmap_width): Added.
11521         (bitmap_height): Likewise.
11522         (bitmap): Likewise.
11523         (set_term_color): Likewise.
11524         (grub_virtual_screen_setup): Changed to use new terminal coloring
11525         settings.
11526         (grub_gfxterm_init): Added init for bitmap.
11527         (grub_gfxterm_fini): Added destroy for bitmap.
11528         (redraw_screen_rect): Updated to use background bitmap and new
11529         terminal coloring.
11530         (scroll_up): Added optimization for case when there is no bitmap.
11531         (grub_gfxterm_cls): Fixed to use correct background color.
11532         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11533         coloring.
11534         (grub_virtual_screen_setcolor): Likewise.
11535         (grub_virtual_screen_getcolor): Added.
11536         (grub_gfxterm_background_image_cmd): Likewise.
11537         (grub_video_term): Added setcolor and getcolor.
11538         (MOD_INIT): Added registration of background_image command.
11539         (MOD_TERM): Added unregistration for background_image command.
11541 2007-12-30  Pavel Roskin  <proski@gnu.org>
11543         * loader/multiboot_loader.c: Fix multiboot command
11544         unregistration.  Fix all typos in the word "multiboot".
11546 2007-12-29  Pavel Roskin  <proski@gnu.org>
11548         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11549         support for initrd names used in Fedora.
11551 2007-12-26  Bean  <bean123ch@gmail.com>
11553         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11554         (cpio_mod_SOURCES): New variable.
11555         (cpio_mod_CFLAGS): Likewise.
11556         (cpio_mod_LDFLAGS): Likewise.
11558         * fs/cpio.c: New file.
11560         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11562         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11564         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11566         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11568 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11570         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11571         (grub_getcolor): New function.
11573         * kern/term.c (grub_getcolor): New function.
11574         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11575         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11576         (print_entry): Set normal and highlight colors to
11577         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11578         respectively, before printing and restore them to old
11579         values afterwards.
11580         (grub_menu_init_page): Likewise.  Fill an additional colored space
11581         that would otherwise be left blank.
11583         * term/efi/console.c (grub_console_getcolor): New function.
11584         (struct grub_console_term.getcolor): New variable.
11585         * term/i386/pc/console.c (grub_console_getcolor): New function.
11586         (struct grub_console_term.getcolor): New variable.
11587         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11588         (struct grub_console_term.getcolor): New variable.
11590         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11591         (struct grub_console_term.setcolor): Remove variable.
11592         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11593         (struct grub_console_term.setcolor): Remove variable.
11594         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11595         (struct grub_console_term.setcolor): Remove variable.
11596         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11597         (struct grub_console_term.setcolor): Remove variable.
11599 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11601         * configure.ac: Search for possible unifont.hex locations, and
11602         define UNIFONT_HEX if found.
11604         * Makefile.in (UNIFONT_HEX): Define variable.
11605         (DATA): Rename to ...
11606         (PKGLIB): ... this.  Update all users.
11607         (PKGDATA): New variable.
11608         (pkgdata_IMAGES): Rename to ...
11609         (pkglib_IMAGES): ... this. Update all users.
11610         (pkgdata_MODULES): Rename to ...
11611         (pkglib_MODULES): ... this. Update all users.
11612         (pkgdata_PROGRAMS): Rename to ...
11613         (pkglib_PROGRAMS): ... this. Update all users.
11614         (pkgdata_DATA): Rename to ...
11615         (pkglib_DATA): ... this. Update all users.
11616         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11617         (unicode.pff, ascii.pff): New rules.
11618         (all-local): Add `$(PKGDATA)' dependency.
11619         (install-local): Process `$(PKGDATA)'.
11621         * util/update-grub_lib.in (font_path): Search for *.pff files in
11622         a few more locations, including `${pkgdata}'.
11624 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11626         Patch from Bean  <bean123ch@gmail.com>:
11627         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11628         `size'.
11630 2007-12-21  Bean  <bean123ch@gmail.com>
11632         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11633         (ntfscomp_mod_SOURCES): New variable.
11634         (ntfscomp_mod_CFLAGS): Likewise.
11635         (ntfscomp_mod_LDFLAGS): Likewise.
11637         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11638         (grub_probe_SOURCES): Likewise.
11639         (grub_emu_SOURCES): Likewise.
11641         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11642         (grub_emu_SOURCES): Likewise.
11644         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11645         (grub_emu_SOURCES): Likewise.
11647         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11648         (grub_emu_SOURCES): Likewise.
11650         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11651         (read_run_list): Renamed to grub_ntfs_read_run_list.
11652         (decomp_nextvcn): Moved to ntfscomp.c.
11653         (decomp_getch): Likewise.
11654         (decomp_get16): Likewise.
11655         (decomp_block): Likewise.
11656         (read_block): Likewise.
11657         (read_data): Partially moved to ntfscomp.c.
11658         (fixup): Change unsigned to grub_uint16_t.
11659         (read_mft): Change unsigned long to grub_uint32_t.
11660         (read_attr): Likewise.
11661         (read_data): Likewise.
11662         (read_run_data): Likewise.
11663         (read_run_list): Likewise.
11664         (read_mft): Likewise.
11666         * fs/ntfscomp.c: New file.
11668         * include/grub/ntfs.h: New file.
11670 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11672         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11673         IDE disk check, since Linux is known to support 20 IDE disks.
11674         Reported by Colin Watson.
11676 2007-12-15  Bean  <bean123ch@gmail.com>
11678         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11679         (lnxboot_img_SOURCES): New variable.
11680         (lnxboot_img_ASFLAGS): Likewise.
11681         (lnxboot_img_LDFLAGS): Likewise.
11683         * boot/i386/pc/lnxboot.S: New file.
11685 2007-11-24  Pavel Roskin  <proski@gnu.org>
11687         * configure.ac: Test if '--build-id=none' is supported by the
11688         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11689         objcopy to generate incorrect binary files (binutils
11690         2.17.50.0.18-1 as shipped by Fedora 8).
11691         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11692         linking, so that build ID doesn't break the test.
11694 2007-11-24  Pavel Roskin  <proski@gnu.org>
11696         * include/grub/i386/time.h: use "void" in the argument list
11697         of grub_cpu_idle().
11698         * include/grub/powerpc/time.h: Likewise.
11699         * include/grub/sparc64/time.h: Likewise.
11701 2007-11-18  Christian Franke  <franke@computer.org>
11703         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11704         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11705         This fixes the problem that function keys did not work in grub-emu.
11707 2007-11-18  Christian Franke  <franke@computer.org>
11709         * disk/host.c (grub_host_open): Remove attribute unused from
11710         name parameter. Add check for "host". This fixes the problem
11711         that grub-emu does not find partitions.
11713 2007-11-18  Christian Franke  <franke@computer.org>
11715         * util/hostfs.c (is_dir): New function.
11716         (grub_hostfs_dir):  Handle missing dirent.d_type case.
11717         (grub_hostfs_read): Add missing fseek().
11718         (grub_hostfs_label): Clear label pointer.  This fixes a crash
11719         of grub-emu on "ls (host)".
11721 2007-11-18  Christian Franke  <franke@computer.org>
11723         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11724         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11725         to 64 bit boundary by default.
11727 2007-11-18  Bean  <bean123ch@gmail.com>
11729         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11730         (hexdump_mod_SOURCES): New variable.
11731         (hexdump_mod_CFLAGS): Likewise.
11732         (hexdump_mod_LDFLAGS): Likewise.
11734         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11736         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11738         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11740         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11742         * include/grub/hexdump.h: New file.
11744         * commands/hexdump.c: New file.
11746 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11748         * commands/i386/pc/play.c (beep_off): Switch order of arguments
11749         in grub_outb() calls.
11750         (beep_on): Likewise.
11752 2007-11-10  Christian Franke  <franke@computer.org>
11754         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11755         (grub_menu_run): Likewise.
11757 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11759         * include/grub/i386/efi/machine.h: New file.
11760         * include/grub/i386/linuxbios/machine.h: Likewise.
11761         * include/grub/i386/pc/machine.h: Likewise.
11762         * include/grub/powerpc/ieee1275/machine.h: Likewise.
11763         * include/grub/sparc64/ieee1275/machine.h: Likewise.
11765         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11766         (serial_hw_io_addr): New variable.
11767         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11768         instead of `(unsigned short *) 0x400'.
11770 2007-11-10  Bean  <bean123ch@gmail.com>
11772         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11774 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11776         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11777         (vga_mod_SOURCES): Added.
11778         (vga_mod_CFLAGS): Likewise.
11779         (vga_mod_LDFLAGS): Likewise.
11781         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11782         grub_outb() calls.
11783         (set_map_mask): Likewise.
11784         (set_read_map): Likewise.
11785         (set_read_address): Likewise.
11786         (vga_font): Removed variable.
11787         (get_vga_glyph): Removed function.
11788         (invalidate_char): Likewise.
11789         (write_char): Changed to use grub_font_get_glyph() for font
11790         information.
11791         (grub_vga_putchar): Likewise.
11792         (grub_vga_getcharwidth): Likewise.
11794 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11796         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11797         flags.
11798         (pxeboot_img_LDFLAGS): Likewise.
11799         (diskboot_img_LDFLAGS): Likewise.
11800         (kernel_img_LDFLAGS): Likewise.
11802 2007-11-06  Robert Millan  <rmh@aybabtu.com>
11804         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11805         in grub_outb() calls.
11806         (serial_hw_init): Likewise.
11808 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11810         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11811         spaces.  Skip non-regular files.
11813 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11815         * kern/disk.c (grub_disk_firmware_fini)
11816         (grub_disk_firmware_is_tainted): New variables.
11818         * include/grub/disk.h (grub_disk_firmware_fini)
11819         (grub_disk_firmware_is_tainted): Likewise.
11821         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11822         (grub_disk_biosdisk_fini): ... to here.
11823         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11824         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11825         is set.  Register grub_disk_biosdisk_fini() in
11826         `grub_disk_firmware_fini'.
11828         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11829         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11830         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11831         to finish existing firmware disk interface.
11833         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11834         (ata_mod_SOURCES): New variable.
11835         (ata_mod_CFLAGS): Likewise.
11836         (ata_mod_LDFLAGS): Likewise.
11838 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11840         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
11841         (grub_ata_wait): Reimplement using grub_millisleep().
11843         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11844         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11846 2007-11-03  Marco Gerards  <marco@gnu.org>
11848         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11849         (CRTC_ADDR_PORT): New macro.
11850         (CRTC_DATA_PORT): Likewise.
11851         (CRTC_CURSOR): Likewise.
11852         (CRTC_CURSOR_ADDR_HIGH): Likewise.
11853         (CRTC_CURSOR_ADDR_LOW): Likewise.
11854         (update_cursor): New function.
11855         (grub_console_real_putchar): Call `update_cursor'.
11856         (grub_console_gotoxy): Likewise.
11857         (grub_console_cls): Set the default color when clearing the
11858         screen.
11859         (grub_console_setcursor): Implemented.
11861 2007-11-03  Marco Gerards  <marco@gnu.org>
11863         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11864         become activate.
11865         (grub_ata_pio_write): Likewise.
11867         (grub_atapi_identify): Wait after issuing an ATA command.
11868         (grub_atapi_packet): Likewise.
11869         (grub_ata_identify): Likewise.
11870         (grub_ata_readwrite): Likewise.
11872 2007-11-03  Marco Gerards  <marco@gnu.org>
11874         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11875         (grub_ata_pio_write): Likewise.
11876         (grub_ata_readwrite): Use `grub_error', instead of
11877         returning `grub_errno'.
11879 2007-11-03  Marco Gerards  <marco@gnu.org>
11881         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11882         grub_ata_pio_write once for every single sector, instead of for
11883         multiple sectors.
11885 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11887         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11889         * conf/i386-linuxbios.rmk: New file.
11891         * kern/i386/pc/hardware.c: Likewise.
11892         * term/i386/pc/at_keyboard.c: Likewise.
11893         * term/i386/pc/vga_text.c: Likewise.
11895         * include/grub/i386/linuxbios/boot.h: Likewise.
11896         * include/grub/i386/linuxbios/console.h: Likewise.
11897         * include/grub/i386/linuxbios/init.h: Likewise.
11898         * include/grub/i386/linuxbios/kernel.h: Likewise.
11899         * include/grub/i386/linuxbios/loader.h: Likewise.
11900         * include/grub/i386/linuxbios/memory.h: Likewise.
11901         * include/grub/i386/linuxbios/serial.h: Likewise.
11902         * include/grub/i386/linuxbios/time.h: Likewise.
11904         * kern/i386/linuxbios/init.c: Likewise.
11905         * kern/i386/linuxbios/startup.S: Likewise.
11906         * kern/i386/linuxbios/table.c: Likewise.
11908 2007-10-31  Marco Gerards  <marco@gnu.org>
11910         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11911         (ata_mod_SOURCES): New variable.
11912         (ata_mod_CFLAGS): Likewise.
11913         (ata_mod_LDFLAGS): Likewise.
11915         * disk/ata.c: New file.
11917         * include/grub/disk.h (grub_disk_dev_id): Add
11918         `GRUB_DISK_DEV_ATA_ID'.
11920 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11922         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11923         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11925         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11926         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11928         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11929         `<grub/types.h>'.
11931         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11933 2007-10-27  Robert Millan  <rmh@aybabtu.com>
11935         * include/grub/types.h (ULONG_MAX): Define macro.
11937 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11939         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
11940         `"../realmode.S"'.
11941         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
11943 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11945         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11946         (pkgdata_MODULES): Add `biosdisk.mod'.
11947         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11948         variables.
11950         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11951         (grub_biosdisk_init): Replace with ...
11952         (GRUB_MOD_INIT(biosdisk)): ... this.
11953         (grub_biosdisk_fini): Replace with ...
11954         (GRUB_MOD_FINI(biosdisk)): ... this.
11956         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11957         (grub_machine_init): Remove call to grub_biosdisk_init().
11958         (grub_machine_fini): Remove call to grub_machine_fini().
11960         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11962 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11964         * include/grub/time.h: New file.
11965         * include/grub/i386/time.h: Likewise.
11966         * include/grub/powerpc/time.h: Likewise.
11967         * include/grub/sparc64/time.h: Likewise.
11969         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11970         instances to ...
11971         (KERNEL_MACHINE_TIME_HEADER): ... this.
11972         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11973         instances to ...
11974         (KERNEL_MACHINE_TIME_HEADER): ... this.
11975         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11976         instances to ...
11977         (KERNEL_MACHINE_TIME_HEADER): ... this.
11979         * kern/i386/efi/init.c: Include `<grub/time.h>'.
11980         (grub_millisleep): New function.
11981         * kern/i386/pc/init.c: Include `<grub/time.h>'.
11982         (grub_millisleep): New function.
11983         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11984         Remove `grub/machine/time.h' include.
11985         (grub_millisleep): New function.
11986         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11987         Remove `grub/machine/time.h' include.
11988         (grub_millisleep): New function.
11990         * include/grub/misc.h (grub_div_roundup): New function.
11992         * kern/misc.c: Include `<grub/time.h>'.
11993         (grub_millisleep_generic): New function.
11995         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11996         Add `time.h'.
11997         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11998         Add `time.h'.
11999         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
12000         `machine/time.h'.  Add `time.h'.
12001         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12003 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12005         * include/grub/misc.h (grub_max): New function.
12007 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12009         * util/misc.c (grub_util_info): Call fflush() before returning.
12011 2007-10-20  Robert Millan  <rmh@aybabtu.com>
12013         * genmk.rb (Image): Copy `extra_flags' from here ...
12014         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
12016         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12017         to `argc' and `args' arguments.
12019 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12021         * kern/i386/loader.S: New file.
12023         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12024         * kern/i386/loader.S (grub_linux_prot_size)... to here.
12025         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12026         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12027         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12028         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12029         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12030         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12031         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12032         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12033         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12034         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12035         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12036         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12038         * kern/i386/realmode.S: New file.
12040         * kern/i386/pc/startup.S (protstack): Moved from here ...
12041         * kern/i386/realmode.S (protstack)... to here.
12042         * kern/i386/pc/startup.S (gdt): Moved from here ...
12043         * kern/i386/realmode.S (gdt)... to here.
12044         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12045         * kern/i386/realmode.S (prot_to_real)... to here.
12047         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12048         `kern/i386/realmode.S'.
12050 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12052         * include/grub/i386/loader.h: New file.
12054         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12055         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12056         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12057         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12058         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12059         * include/grub/i386/loader.h (grub_linux_prot_size)
12060         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12061         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12062         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12063         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12065         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12067 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12069         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12070         filesystem when dev->disk is unset.
12071         Do probe for filesystem even when dev->disk->has_partitions is set.
12072         In case a filesystem is found, always report it.
12073         In case it isn't, if dev->disk->has_partitions is set, report that
12074         a partition table was found instead of reporting that no filesystem
12075         could be identified.
12077 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12079         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12080         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12082         * include/grub/types.h (grub_host_to_target16): New macro.
12083         (grub_host_to_target32): Likewise.
12084         (grub_host_to_target64): Likewise.
12085         (grub_target_to_host16): Likewise.
12086         (grub_target_to_host32): Likewise.
12087         (grub_target_to_host64): Likewise.
12089         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12090         Renamed from to ...
12091         (GRUB_MOD_ALIGN): ...this.  Update all users.
12093         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12094         grub_host_to_target32.
12095         Replace grub_be_to_cpu32 with grub_target_to_host32.
12096         (load_modules): Likewise.
12097         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12098         Replace grub_be_to_cpu32 with grub_target_to_host32.
12099         Replace grub_cpu_to_be16 with grub_host_to_target16.
12100         Replace grub_cpu_to_be32 grub_host_to_target32.
12102 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12104         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12105         * util/elf/grub-mkimage.c: ... here.
12107         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12108         `util/powerpc/ieee1275/grub-mkimage.c'.
12110 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12112         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12113         and make it easier to figure out.
12114         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12115         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12116         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12117         leave us with less than HEAP_MIN_SIZE total heap.
12118         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12120 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12122         * include/grub/i386/io.h: New file.
12123         * commands/i386/pc/play.c (inb): Removed.
12124         (outb): Removed.
12125         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12126         with grub_outb().
12127         * term/i386/pc/serial.c  (inb): Removed.
12128         (outb): Removed.
12129         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12130         with grub_outb().
12131         * term/i386/pc/vga.c  (inb): Removed.
12132         (outb): Removed.
12133         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12134         with grub_outb().
12136 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12138         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12139         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12140         Reported by Marcin Kurek.
12142 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12144         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12145         SmartFirmware version updates (as released by Sven Luther), and avoid
12146         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12147         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12148         known broken.
12150 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12152         From Hitoshi Ozeki:
12153         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12154         when merging two regions.
12156 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12158         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12159         * normal/completion.c (grub_normal_do_completion): Likewise.
12160         Reported by Hitoshi Ozeki.
12162 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12164         Do not use devices at boot in chainloading.
12166         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12167         (boot_part_addr): Likewise.
12168         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12169         with BOOT_DRIVE and BOOT_PART_ADDR.
12170         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12171         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12173 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12175         Patch from Simon Peter <dn.tlp@gmx.net>:
12176         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12177         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12178         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12179         util/i386/pc/grub-setup.c_DEPENDENCIES.
12180         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12181         util/grub-probe.c_DEPENDENCIES.
12182         * conf/powerpc-ieee1275.rmk: Likewise.
12184 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12186         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12187         to tell grub-mkdevicemap how to name devices.
12188         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12189         feature).
12191         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12192         util/i386/get_disk_name.c.
12193         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12194         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12195         util/ieee1275/get_disk_name.c.
12197         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12199         * DISTLIST: Add util/i386/get_disk_name.c and
12200         util/ieee1275/get_disk_name.c.
12202         * util/grub-mkdevicemap.c: Replace device naming logic with
12203         grub_util_get_disk_name() calls.
12205 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12207         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12208         (so that it works for both plural and singular quantities).
12210 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12212         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12213         so that [xz] isn't taken into account when determining order.
12215 2007-08-02  Marco Gerards  <marco@gnu.org>
12217         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12218         `include/multiboot2.h', `include/grub/elfload.h',
12219         `include/multiboot.h', `include/grub/multiboot.h',
12220         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12221         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12222         `kern/elf.c', `loader/multiboot_loader.c',
12223         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12224         `loader/i386/pc/multiboot2.c',
12225         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12226         `util/i386/pc/grub-mkrescue.in'.  Remove
12227         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12228         `include/grub/i386/pc/util/biosdisk.h' and
12229         `include/grub/powerpc/ieee1275/multiboot.h'.
12231 2007-08-02  Bean  <bean123ch@gmail.com>
12233         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12234         (ntfs_mod_SOURCES): New variable.
12235         (ntfs_mod_CFLAGS): Likewise.
12236         (ntfs_mod_LDFLAGS): Likewise.
12238         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12239         (grub_probe_SOURCES): Likewise.
12240         (grub_emu_SOURCES): Likewise.
12242         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12243         (grub_emu_SOURCES): Likewise.
12245         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12246         (grub_emu_SOURCES): Likewise.
12248         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12250         * fs/ntfs.c: New file.
12252 2007-08-02  Bean  <bean123ch@gmail.com>
12254         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12256         * file.h (grub_file): Likewise.
12258         * fshelp.h (grub_fshelp_read_file): Likewise.
12260         * util/i386/pc/grub-setup.c (setup): Likewise.
12261         (save_first_sector): Likewise.
12262         (save_blocklists): Likewise.
12264         * fs/affs.c (grub_affs_read_file): Likewise.
12266         * fs/ext2.c (grub_ext2_read_file): Likewise.
12268         * fs/fat.c (grub_fat_read_data): Likewise.
12270         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12272         * fs/hfs.c (grub_hfs_read_file): Likewise.
12274         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12276         * fs/jfs.c (grub_jfs_read_file): Likewise.
12278         * fs/minix.c (grub_minix_read_file): Likewise.
12280         * fs/sfs.c (grub_sfs_read_file): Likewise.
12282         * fs/ufs.c (grub_ufs_read_file): Likewise.
12284         * fs/xfs.c (grub_xfs_read_file): Likewise.
12286         * command/blocklist.c (read_blocklist): Likewise.
12287         (print_blocklist): Likewise.
12289 2007-08-02  Marco Gerards  <marco@gnu.org>
12291         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12292         `util/hostfs.c'.
12294         * disk/host.c: New file.
12296         * util/hostfs.c: Likewise.
12298         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12299         return `GRUB_ERR_BAD_FS'.
12300         * fs/sfs.c (grub_sfs_mount): Likewise.
12301         * fs/xfs.c (grub_xfs_mount): Likewise.
12303         * include/grub/disk.h (enum grub_disk_dev_id): Add
12304         `GRUB_DISK_DEVICE_HOST_ID'.
12306         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12308 2007-07-24  Jerone Young  <jerone@gmail.com>
12310         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12311         modules for compilation.
12312         * conf/powerpc-ieee1275.rmk: Likewise.
12314         * include/multiboot.h: Move multiboot definitions to one file. Rename
12315         many definitions to not get grub specific.
12316         * include/multiboot2.h: Create header with multiboot 2 definitions.
12317         * include/grub/multiboot.h: Header for grub specific function
12318         prototypes and definitions.
12319         * include/grub/multiboot2.h: Likewise.
12320         * include/grub/multiboot_loader.h: Likewise.
12321         * include/grub/i386/pc/multiboot.h: Removed.
12322         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12324         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12325         and 2 to allow for one multiboot and module commands.
12326         * loader/multiboot2.c: Add multiboot2 functionality.
12327         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12328         and definition names.
12329         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12330         2 functions.
12331         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12332         ieee1275 specific multiboot2 code.
12334         * kern/i386/pc/startup.S: Change headers and definition names for
12335         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12337 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12339         * geninitheader.sh: Process file specified in first parameter rather
12340         than hardcoding grub_modules_init.lst.
12341         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12342         than hardcoding grub_modules_init.h.
12344         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12345         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12346         grub_probe_init.[ch] and grub_setup_init.[ch].
12348         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12349         grub_modules_init.h with grub_emu_init.h.
12350         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12351         grub_probe_init.[ch] files.
12352         * conf/i386-efi.rmk: Likewise.
12353         * conf/i386-pc.rmk: Likewise.
12354         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12355         grub_setup_init.[ch] files.
12357         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12358         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12359         to initialize modules rather than a list of hardcoded functions.
12360         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12361         grub_init_all() to initialize modules rather than a list of hardcoded
12362         functions.
12364 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12366         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12367         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12369 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12371         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12372         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12373         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12374         flag when running on SmartFirmware.
12375         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12376         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12377         was set.
12379         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12380         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12381         rather than decreasing it.
12383         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12384         there's not enough space to do it, fail in the same way as when it
12385         can't be done because there are no partitions.
12387         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12388         when nvsetenv failed.
12390 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12392         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12393         because this rule is automatically generated.
12394         (grub-mkrescue): Removed for the same reason as above.
12396 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12398         Migrate to GNU General Public License Version 3.
12400         * COPYING: Replaced with the plain text version of GPLv3.
12402         * config.guess: Updated from gnulib.
12403         * config.sub: Likewise.
12405         * geninit.sh: Output a GPLv3 copyright notice.
12406         * geninitheader.sh: Likewise.
12407         * genmodsrc.sh: Likewise.
12408         * gensymlist.sh.in: Likewise.
12410         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12411         * boot/i386/pc/diskboot.S: Likewise.
12412         * boot/i386/pc/pxeboot.S: Likewise.
12413         * commands/blocklist.c: Likewise.
12414         * commands/boot.c: Likewise.
12415         * commands/cat.c: Likewise.
12416         * commands/cmp.c: Likewise.
12417         * commands/configfile.c: Likewise.
12418         * commands/echo.c: Likewise.
12419         * commands/help.c: Likewise.
12420         * commands/ls.c: Likewise.
12421         * commands/search.c: Likewise.
12422         * commands/terminal.c: Likewise.
12423         * commands/test.c: Likewise.
12424         * commands/videotest.c: Likewise.
12425         * commands/i386/cpuid.c: Likewise.
12426         * commands/i386/pc/halt.c: Likewise.
12427         * commands/i386/pc/play.c: Likewise.
12428         * commands/i386/pc/reboot.c: Likewise.
12429         * commands/i386/pc/vbeinfo.c: Likewise.
12430         * commands/i386/pc/vbetest.c: Likewise.
12431         * commands/ieee1275/halt.c: Likewise.
12432         * commands/ieee1275/reboot.c: Likewise.
12433         * commands/ieee1275/suspend.c: Likewise.
12434         * disk/loopback.c: Likewise.
12435         * disk/lvm.c: Likewise.
12436         * disk/raid.c: Likewise.
12437         * disk/efi/efidisk.c: Likewise.
12438         * disk/i386/pc/biosdisk.c: Likewise.
12439         * disk/ieee1275/ofdisk.c: Likewise.
12440         * font/manager.c: Likewise.
12441         * fs/affs.c: Likewise.
12442         * fs/ext2.c: Likewise.
12443         * fs/fat.c: Likewise.
12444         * fs/fshelp.c: Likewise.
12445         * fs/hfs.c: Likewise.
12446         * fs/hfsplus.c: Likewise.
12447         * fs/iso9660.c: Likewise.
12448         * fs/jfs.c: Likewise.
12449         * fs/minix.c: Likewise.
12450         * fs/sfs.c: Likewise.
12451         * fs/ufs.c: Likewise.
12452         * fs/xfs.c: Likewise.
12453         * hello/hello.c: Likewise.
12454         * include/grub/acorn_filecore.h: Likewise.
12455         * include/grub/arg.h: Likewise.
12456         * include/grub/bitmap.h: Likewise.
12457         * include/grub/boot.h: Likewise.
12458         * include/grub/cache.h: Likewise.
12459         * include/grub/device.h: Likewise.
12460         * include/grub/disk.h: Likewise.
12461         * include/grub/dl.h: Likewise.
12462         * include/grub/elfload.h: Likewise.
12463         * include/grub/env.h: Likewise.
12464         * include/grub/err.h: Likewise.
12465         * include/grub/file.h: Likewise.
12466         * include/grub/font.h: Likewise.
12467         * include/grub/fs.h: Likewise.
12468         * include/grub/fshelp.h: Likewise.
12469         * include/grub/gzio.h: Likewise.
12470         * include/grub/hfs.h: Likewise.
12471         * include/grub/kernel.h: Likewise.
12472         * include/grub/loader.h: Likewise.
12473         * include/grub/lvm.h: Likewise.
12474         * include/grub/misc.h: Likewise.
12475         * include/grub/mm.h: Likewise.
12476         * include/grub/net.h: Likewise.
12477         * include/grub/normal.h: Likewise.
12478         * include/grub/parser.h: Likewise.
12479         * include/grub/partition.h: Likewise.
12480         * include/grub/pc_partition.h: Likewise.
12481         * include/grub/raid.h: Likewise.
12482         * include/grub/rescue.h: Likewise.
12483         * include/grub/script.h: Likewise.
12484         * include/grub/setjmp.h: Likewise.
12485         * include/grub/symbol.h: Likewise.
12486         * include/grub/term.h: Likewise.
12487         * include/grub/terminfo.h: Likewise.
12488         * include/grub/tparm.h: Likewise.
12489         * include/grub/types.h: Likewise.
12490         * include/grub/video.h: Likewise.
12491         * include/grub/efi/api.h: Likewise.
12492         * include/grub/efi/chainloader.h: Likewise.
12493         * include/grub/efi/console.h: Likewise.
12494         * include/grub/efi/console_control.h: Likewise.
12495         * include/grub/efi/disk.h: Likewise.
12496         * include/grub/efi/efi.h: Likewise.
12497         * include/grub/efi/pe32.h: Likewise.
12498         * include/grub/efi/time.h: Likewise.
12499         * include/grub/i386/linux.h: Likewise.
12500         * include/grub/i386/setjmp.h: Likewise.
12501         * include/grub/i386/types.h: Likewise.
12502         * include/grub/i386/efi/kernel.h: Likewise.
12503         * include/grub/i386/efi/loader.h: Likewise.
12504         * include/grub/i386/efi/time.h: Likewise.
12505         * include/grub/i386/pc/biosdisk.h: Likewise.
12506         * include/grub/i386/pc/boot.h: Likewise.
12507         * include/grub/i386/pc/chainloader.h: Likewise.
12508         * include/grub/i386/pc/console.h: Likewise.
12509         * include/grub/i386/pc/init.h: Likewise.
12510         * include/grub/i386/pc/kernel.h: Likewise.
12511         * include/grub/i386/pc/loader.h: Likewise.
12512         * include/grub/i386/pc/memory.h: Likewise.
12513         * include/grub/i386/pc/multiboot.h: Likewise.
12514         * include/grub/i386/pc/serial.h: Likewise.
12515         * include/grub/i386/pc/time.h: Likewise.
12516         * include/grub/i386/pc/vbe.h: Likewise.
12517         * include/grub/i386/pc/vbeblit.h: Likewise.
12518         * include/grub/i386/pc/vbefill.h: Likewise.
12519         * include/grub/i386/pc/vbeutil.h: Likewise.
12520         * include/grub/i386/pc/vga.h: Likewise.
12521         * include/grub/ieee1275/ieee1275.h: Likewise.
12522         * include/grub/ieee1275/ofdisk.h: Likewise.
12523         * include/grub/powerpc/libgcc.h: Likewise.
12524         * include/grub/powerpc/setjmp.h: Likewise.
12525         * include/grub/powerpc/types.h: Likewise.
12526         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12527         * include/grub/powerpc/ieee1275/console.h: Likewise.
12528         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12529         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12530         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12531         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12532         * include/grub/powerpc/ieee1275/time.h: Likewise.
12533         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12534         * include/grub/sparc64/libgcc.h: Likewise.
12535         * include/grub/sparc64/setjmp.h: Likewise.
12536         * include/grub/sparc64/types.h: Likewise.
12537         * include/grub/sparc64/ieee1275/console.h: Likewise.
12538         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12539         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12540         * include/grub/sparc64/ieee1275/time.h: Likewise.
12541         * include/grub/util/biosdisk.h: Likewise.
12542         * include/grub/util/getroot.h: Likewise.
12543         * include/grub/util/lvm.h: Likewise.
12544         * include/grub/util/misc.h: Likewise.
12545         * include/grub/util/raid.h: Likewise.
12546         * include/grub/util/resolve.h: Likewise.
12547         * io/gzio.c: Likewise.
12548         * kern/device.c: Likewise.
12549         * kern/disk.c: Likewise.
12550         * kern/dl.c: Likewise.
12551         * kern/elf.c: Likewise.
12552         * kern/env.c: Likewise.
12553         * kern/err.c: Likewise.
12554         * kern/file.c: Likewise.
12555         * kern/fs.c: Likewise.
12556         * kern/loader.c: Likewise.
12557         * kern/main.c: Likewise.
12558         * kern/misc.c: Likewise.
12559         * kern/mm.c: Likewise.
12560         * kern/parser.c: Likewise.
12561         * kern/partition.c: Likewise.
12562         * kern/rescue.c: Likewise.
12563         * kern/term.c: Likewise.
12564         * kern/efi/efi.c: Likewise.
12565         * kern/efi/init.c: Likewise.
12566         * kern/efi/mm.c: Likewise.
12567         * kern/i386/dl.c: Likewise.
12568         * kern/i386/efi/init.c: Likewise.
12569         * kern/i386/efi/startup.S: Likewise.
12570         * kern/i386/pc/init.c: Likewise.
12571         * kern/i386/pc/lzo1x.S: Likewise.
12572         * kern/i386/pc/startup.S: Likewise.
12573         * kern/ieee1275/ieee1275.c: Likewise.
12574         * kern/powerpc/cache.S: Likewise.
12575         * kern/powerpc/dl.c: Likewise.
12576         * kern/powerpc/ieee1275/cmain.c: Likewise.
12577         * kern/powerpc/ieee1275/crt0.S: Likewise.
12578         * kern/powerpc/ieee1275/init.c: Likewise.
12579         * kern/powerpc/ieee1275/openfw.c: Likewise.
12580         * kern/sparc64/cache.S: Likewise.
12581         * kern/sparc64/dl.c: Likewise.
12582         * kern/sparc64/ieee1275/init.c: Likewise.
12583         * kern/sparc64/ieee1275/openfw.c: Likewise.
12584         * loader/efi/chainloader.c: Likewise.
12585         * loader/efi/chainloader_normal.c: Likewise.
12586         * loader/i386/efi/linux.c: Likewise.
12587         * loader/i386/efi/linux_normal.c: Likewise.
12588         * loader/i386/pc/chainloader.c: Likewise.
12589         * loader/i386/pc/chainloader_normal.c: Likewise.
12590         * loader/i386/pc/linux.c: Likewise.
12591         * loader/i386/pc/linux_normal.c: Likewise.
12592         * loader/i386/pc/multiboot.c: Likewise.
12593         * loader/i386/pc/multiboot_normal.c: Likewise.
12594         * loader/powerpc/ieee1275/linux.c: Likewise.
12595         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12596         * normal/arg.c: Likewise.
12597         * normal/cmdline.c: Likewise.
12598         * normal/command.c: Likewise.
12599         * normal/completion.c: Likewise.
12600         * normal/execute.c: Likewise.
12601         * normal/function.c: Likewise.
12602         * normal/lexer.c: Likewise.
12603         * normal/main.c: Likewise.
12604         * normal/menu.c: Likewise.
12605         * normal/menu_entry.c: Likewise.
12606         * normal/misc.c: Likewise.
12607         * normal/parser.y: Likewise.
12608         * normal/script.c: Likewise.
12609         * normal/i386/setjmp.S: Likewise.
12610         * normal/powerpc/setjmp.S: Likewise.
12611         * normal/sparc64/setjmp.S: Likewise.
12612         * partmap/acorn.c: Likewise.
12613         * partmap/amiga.c: Likewise.
12614         * partmap/apple.c: Likewise.
12615         * partmap/gpt.c: Likewise.
12616         * partmap/pc.c: Likewise.
12617         * partmap/sun.c: Likewise.
12618         * term/gfxterm.c: Likewise.
12619         * term/terminfo.c: Likewise.
12620         * term/efi/console.c: Likewise.
12621         * term/i386/pc/console.c: Likewise.
12622         * term/i386/pc/serial.c: Likewise.
12623         * term/i386/pc/vesafb.c: Likewise.
12624         * term/i386/pc/vga.c: Likewise.
12625         * term/ieee1275/ofconsole.c: Likewise.
12626         * util/biosdisk.c: Likewise.
12627         * util/console.c: Likewise.
12628         * util/genmoddep.c: Likewise.
12629         * util/getroot.c: Likewise.
12630         * util/grub-emu.c: Likewise.
12631         * util/grub-mkdevicemap.c: Likewise.
12632         * util/grub-probe.c: Likewise.
12633         * util/lvm.c: Likewise.
12634         * util/misc.c: Likewise.
12635         * util/raid.c: Likewise.
12636         * util/resolve.c: Likewise.
12637         * util/update-grub.in: Likewise.
12638         * util/update-grub_lib.in: Likewise.
12639         * util/grub.d/00_header.in: Likewise.
12640         * util/grub.d/10_hurd.in: Likewise.
12641         * util/grub.d/10_linux.in: Likewise.
12642         * util/i386/efi/grub-install.in: Likewise.
12643         * util/i386/efi/grub-mkimage.c: Likewise.
12644         * util/i386/pc/grub-install.in: Likewise.
12645         * util/i386/pc/grub-mkimage.c: Likewise.
12646         * util/i386/pc/grub-mkrescue.in: Likewise.
12647         * util/i386/pc/grub-setup.c: Likewise.
12648         * util/i386/pc/misc.c: Likewise.
12649         * util/powerpc/ieee1275/grub-install.in: Likewise.
12650         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12651         * util/powerpc/ieee1275/misc.c: Likewise.
12652         * video/bitmap.c: Likewise.
12653         * video/video.c: Likewise.
12654         * video/i386/pc/vbe.c: Likewise.
12655         * video/i386/pc/vbeblit.c: Likewise.
12656         * video/i386/pc/vbefill.c: Likewise.
12657         * video/i386/pc/vbeutil.c: Likewise.
12658         * video/readers/tga.c: Likewise.
12660 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12662         * conf/i386-efi.rmk: Replace obsolete reference to
12663         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12664         with util/getroot.c.
12665         * conf/powerpc-ieee1275.rmk: Likewise.
12666         * conf/sparc64-ieee1275.rmk: Likewise.
12668         * util/grub-emu.c (main): Fix unchecked pointer handling.
12670 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12672         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12673         invocation to fail, in order to support partition-less media.
12675         * util/i386/pc/grub-install.in: Likewise.
12677         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12678         which fs or partmap modules are needed (akin to its sister scripts).
12680         Also use grub-probe to get rid of unportable /proc/mounts check.
12682         Print the same informational message that the other scripts do, before
12683         exiting.
12685 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12687         * util/update-grub_lib.in (font_path): New function.  Determine whether
12688         a font file can be found and, if so, echo the GRUB path to it.
12690         * util/update-grub.in: Handle multiple terminals depending on user
12691         input, platform availability and font file presence.  Propagate
12692         variables of our findings to /etc/grub.d/ children.
12694         * util/grub.d/00_header.in: Handle multiple terminals, based on
12695         environment setup by update-grub.
12697 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12699         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12701 2007-06-21  Robert Millan  <rmh@aybabtu.com>
12703         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12704         indicate end of data section in kernel image.
12705         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12706         GRUB_KERNEL_MACHINE_DATA_END.
12708         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12709         space for it.
12710         * kern/i386/efi/startup.S: Likewise.
12712         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12713         during image generation.  Implement --prefix option to override this
12714         patch.
12715         * util/i386/efi/grub-mkimage.c: Likewise.
12717         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12718         code to make path relative to its root into a separate function.
12720         * util/i386/pc/grub-install.in: Use newly provided
12721         make_system_path_relative_to_its_root() to convert ${grubdir}, then
12722         pass the result to grub-install --prefix.
12724 2007-06-13  Robert Millan  <rmh@aybabtu.com>
12726         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12727         DEFAULT_DEVICE_MAP.
12728         * util/grub-emu.c: Use above definitions from misc.h instead of
12729         defining them.
12730         * util/grub-mkdevicemap.c: Likewise.
12731         * util/i386/pc/grub-setup.c: Likewise.
12732         * util/grub-probe.c: Likewise.
12733         (probe): Abort with grub_util_error() when either
12734         grub_guess_root_device or grub_util_get_grub_dev fails.
12736 2007-06-12  Robert Millan  <rmh@aybabtu.com>
12738         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12739         "pager" assignment.
12740         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12741         "pcdata".
12742         * util/grub-probe.c (probe): Likewise for "drive_name".
12744 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12746         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12747         not just the cdrom one.
12749 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12751         * util/i386/pc/grub-mkrescue.in: Add "set -e".
12752         Add --pkglibdir=DIR option to override pkglibdir.
12753         Mention --image-type=TYPE in help output.
12754         Fix --grub-mkimage (it was a no-op).
12755         Abort gracefully when no parameter is given.
12757 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12759         * util/i386/pc/grub-mkrescue.in: New file.
12760         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
12761         * Makefile.in: Handle bin_SCRIPTS.
12763 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
12765         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12766         list of video modes.
12768 2007-06-06  Robert Millan  <rmh@aybabtu.com>
12770         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12771         file doesn't exist, or if it is in a filesystem grub can't read.
12773         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
12774         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
12775         header comment to fit in 80 columns when the variables are resolved.
12777         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12778         could be identified by update-grub.  Remove redundant check for
12779         unifont.pff existence (since convert_system_path_to_grub_path now
12780         handles that).
12782 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12784         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12786         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12788         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12790 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12792         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12794         * include/grub/partition.h: Declare grub_apple_partition_map_init and
12795         grub_apple_partition_map_fini.
12797         * util/biosdisk.c
12798         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12799         to access >2 TiB disks).
12801         Print disk->total_sectors with %llu instead of %lu, since this
12802         variable is always 64-bit (prevents wrong disk size from being displayed
12803         on either >2 TiB disk or big-endian CPU).
12805         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12806         into a generic case that supports all (sane) partition maps.
12808         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12809         breaks big-endian.
12811         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12812         and grub_apple_partition_map_fini() after that.
12814 2007-06-01  Robert Millan  <rmh@aybabtu.com>
12816         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12818         * util/grub.d/00_header.in: Only enable gfxterm when
12819         convert_system_path_to_grub_path() succeeds.
12821 2007-05-20  Robert Millan  <rmh@aybabtu.com>
12823         * util/update-grub_lib.in: New file.
12824         * DISTLIST: Add update-grub_lib.in.
12825         * conf/common.rmk: Generate update-grub_lib and install it in
12826         $(lib_DATA).
12827         * Makefile.in: Add install routine for $(lib_DATA).
12829         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12830         function provided by update-grub_lib to support arbitrary paths of
12831         unifont.pff.
12832         * util/update-grub.in: Use convert_system_path_to_grub_path() to
12833         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12835 2007-05-19  Robert Millan  <rmh@aybabtu.com>
12837         * commands/i386/cpuid.c: New module.
12838         * DISTLIST: Add it.
12839         * conf/i386-efi.rmk: Enable cpuid.mod.
12840         * conf/i386-pc.rmk: Likewise.
12842 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12844         * kern/disk.c (grub_disk_read): Check return value of
12845         grub_realloc().
12847 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12849         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12850         arrays.
12851         * disk/raid.c (grub_raid_open): Likewise.
12853 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12855         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12856         stack instead of on the heap.
12858         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12859         before doing a read on it.
12861         * configure.ac: Only use -fno-stack-protector for the target
12862         environment.
12864 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12866         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12867         __attribute_ ((unused)) to mode_type argument.
12869         * util/getroot.c (grub_guess_root_device): Fix #endif.
12871         * kern/misc.c (memcmp): Fix prototype.
12873         * include/grub/partition.h [GRUB_UTIL]
12874         (grub_gpt_partition_map_init): Add prototype.
12875         (grub_gpt_partition_map_fini): Likewise.
12877         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12878         at the right place.
12880         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12881         (grub_fat_read_data): Likewise.
12882         (grub_fat_find_dir): Likewise.
12884         * font/manager.c (find_glyph): Make table a const.
12885         (grub_font_get_glyph): Remove bitmap from if statement.
12887 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12889         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12890         code, first search for device in /dev/mapper, then in /dev.
12891         (grub_util_get_grub_dev): New function.
12892         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12893         prototype.
12894         * util/grub-probe.c (probe): Remove check for RAID, call
12895         grub_util_get_grub_dev() instead of
12896         grub_util_biosdisk_get_grub_dev().
12897         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12898         grub_util_biosdisk_get_grub_dev().
12899         * util/i386/pc/grub-setup.c (main): Likewise.
12901 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12903         * DISTLIST: Update for the latest changes.
12904         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12905         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12906         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12907         grub/util/biosdisk.h.
12908         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12909         grub/util/biosdisk.h.
12911 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12913         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12915 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12917         * util/i386/efi/grub-install.in: New.
12918         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12919         newly added grub-install.
12920         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12921         include.
12922         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12923         grub/util/biosdisk.h.
12924         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12925         grub/util/biosdisk.h.
12927 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12929         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12930         * include/grub/util/biosdisk.h: ... here.
12931         * util/i386/pc/biosdisk.c: Moved to ...
12932         * util/biosdisk.c: ... here.
12933         * util/i386/pc/getroot.c: Moved to ...
12934         * util/getroot.c: ... here.
12935         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12936         * util/grub-mkdevicemap.c: ... here.
12937         * util/i386/pc/grub-probe.c: Moved to ...
12938         * util/grub-probe.c: ... here.
12940 2007-05-15  Robert Millan  <rmh@aybabtu.com>
12942         * util/update-grub.in: Remove duplicated line in grub.cfg header
12943         message.
12945 2007-05-13  Robert Millan  <rmh@aybabtu.com>
12947         * util/update-grub.in: Fix a few assumptions about the devices holding
12948         /, /boot and /boot/grub being the same.
12949         * util/grub.d/00_header.in: Likewise.
12950         * util/grub.d/10_hurd.in: Likewise.
12951         * util/grub.d/10_linux.in: Likewise.
12953         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12954         patterns.  Use that to define the `.old' suffix as older than `'.
12956         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12958         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12959         the grub.cfg header message.
12961 2007-05-11  Robert Millan  <rmh@aybabtu.com>
12963         * util/update-grub.in: Create device.map if it doesn't already exist,
12964         before attempting to run grub-probe.
12965         Check for grub-probe and grub-mkdevicemap with the same code
12966         grub-install is using.
12967         Remove test mode.
12969 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12971         * Makefile.in: Add the datarootdir autoconf variable.
12973 2007-05-09  Robert Millan  <rmh@aybabtu.com>
12975         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12976         fail gracefully if dev->disk->partition == NULL.
12978 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12980         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12981         determine partition map module.
12982         * util/i386/pc/grub-install.in: Use this feature to decide which
12983         partition module to load, instead of hardcoding pc and gpt.
12985 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12987         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12988         source directory differs from build directory.
12990 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12992         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12993         initialisation.
12995 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12997         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12999 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13001         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
13002         command-line arguments via ${GRUB_CMDLINE_LINUX}.
13004 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13006         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13007         (grub_probe_SOURCES): Likewise.
13008         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13009         GPT and initialize dos_part and bsd_part accordingly.
13010         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13011         install_bsd_part.
13012         (main): Activate gpt module for use during partition identification,
13013         and deactivate it afterwards.
13014         * util/i386/pc/grub-install.in: Add gpt module to core.img.
13015         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13016         partition identification, and deactivate it afterwards.
13018 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13020         * term/i386/pc/console.c (grub_console_fini): Call
13021         grub_term_set_current() before grub_term_unregister().
13023 2007-05-04  Robert Millan  <rmh@aybabtu.com>
13025         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13026         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13027         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
13028         and update-grub_DATA.
13029         * conf/common.rmk: Build and install update-grub components.
13030         * conf/common.mk: Regenerate.
13031         * util/update-grub.in: New.  Core of update-grub.
13032         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13033         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13034         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13035         * util/grub.d/README: New.  Document grub.d directory layout.
13037 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13039         * util/grub-emu.c: Move initialization functions
13040         grub_util_biosdisk_init() and grub_init_all() before
13041         grub_util_biosdisk_get_grub_dev(), which relies on them.
13043 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13045         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13046         it is used later.
13048 2007-04-18  Jerone Young  <jerone@gmail.com>
13050         * kernel/elf.c: Add missing parenthesis for conditional statement
13051         stanza.
13053 2007-04-10  Jerone Young  <jerone@gmail.com>
13055         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13056         continue on and look for device node with real device name.
13058 2007-04-10  Jerone Young  <jerone@gmail.com>
13060         * configure.ac: Add argument for autoconf to use transformation
13061         ability.
13062         * Makefile.in: Add autoconf package transformation code.
13063         * util/i386/pc/grub-install.in: Likewise.
13064         * util/powerpc/ieee1275/grub-install.in: Likewise.
13066 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13068         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13069         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13070         (EXT2_REVISION): Likewise.
13071         (EXT2_INODE_SIZE): Likewise.
13072         (struct grub_ext2_block_group): Added a missing member
13073         "used_dirs".
13074         (grub_ext2_read_inode): Divide by the inode size in a superblock
13075         instead of 128 to obtain INODES_PER_BLOCK.
13076         Use the macro EXT2_INODE_SIZE instead of directly using
13077         SBLOCK->INODE_SIZE.
13079 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13081         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13082         superblock instead of the structure size to compute an
13083         offset. This fixes the problem that GRUB could not read a
13084         filesystem when inode size is different from 128-byte.
13086 2007-03-05  Marco Gerards  <marco@gnu.org>
13088         * normal/main.c (read_config_file): When "menu" is not set, create
13089         an initial context.
13091 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13093         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13094         (HEAP_LIMIT): New macro.
13095         (grub_claim_heap): Claim memory up to `heaplimit'.
13097 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13099         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13100         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13101         (_start): Likewise.
13102         (grub_arch_modules_addr): Return address after `_end'.
13103         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13104         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13105         (add_segments): Calculate `_end' from phdr size and location.
13106         (ALIGN_UP): Moved to ...
13107         * include/grub/misc.h: here.
13108         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13109         New macro.
13110         (GRUB_IEEE1275_MODULE_BASE): Removed.
13112 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13114         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13115         loop boundary.
13117 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13119         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13120         All users updated.
13121         (grub_elf64_load_hook_t): Likewise.
13122         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13123         debug output.
13125 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13127         * kern/mm.c: Update copyright.
13128         (grub_mm_debug): Correct syntax error.
13129         (grub_mm_dump_free): New function.
13130         (grub_debug_free): Call `grub_free'.
13131         * include/grub/mm.h: Update copyright.
13132         (grub_mm_dump_free): Add declaration.
13134 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13136         * include/grub/ieee1275/ieee1275.h: Update copyright.
13137         * kern/powerpc/ieee1275/init.c: Likewise.
13138         * kern/powerpc/ieee1275/openfw.c: Likewise.
13140         * loader/powerpc/ieee1275/linux.c: Likewise.
13141         * include/grub/elfload.h: Likewise.
13142         * kern/elf.c: Likewise.
13143         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13144         callers.
13145         (grub_elf64_load): Likewise.
13146         (grub_elf32_load_segment): Move to a nested function.
13147         (grub_elf64_load_segment): Likewise.
13149 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13151         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13152         prototype.
13153         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13154         (grub_heap_len): Likewise.
13155         (HEAP_SIZE): New macro.
13156         (grub_claim_heap): New function.
13157         (grub_machine_init): Don't claim heap directly.  Call
13158         `grub_claim_heap'.
13159         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13160         (grub_available_iterate): New function.
13162 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13164         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13165         * configure.ac: Use it for testing the HOST and TARGET compilers.
13167 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13169         * Makefile.in (enable_grub_emu): New variable.
13170         * configure.ac (--enable-grub-emu): New option.
13171         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13172         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13173         * conf/i386-pc.rmk: Likewise.
13174         * conf/powerpc-ieee1275.rmk: Likewise.
13175         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13177 2006-12-12  Marco Gerards  <marco@gnu.org>
13179         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13181         * kern/env.c (grub_env_unset): Don't free the member `value' when
13182         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13183         pointer.
13185         * normal/main.c (current_menu): Removed.
13186         (free_menu): Unset the `menu' environment variable.
13187         (grub_normal_menu_addentry): Make use of the environment variable
13188         `menu', instead of using the global `current_menu'.  Allocate
13189         memory for the sourcecode of this entry.
13190         (read_config_file): New argument `nested', changed all callers.
13191         Only in the case of a new context, initialize a new menu.  Set the
13192         `menu' environment variable.
13193         (grub_normal_execute): Don't set and unset the environment
13194         variable `menu' here anymore.  Only free the menu when leaving the
13195         context.
13197         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13198         leak.
13200 2006-12-11  Marco Gerards  <marco@gnu.org>
13202         * normal/menu_entry.c (run): Fix off by one bug so the last line
13203         is executed.  Move the loader check to outside the loop.
13205 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13207         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13209 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13211         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13212         the number of sectors.  Reported by Andrey Shuvikov
13213         <mr_hyro@yahoo.com>.
13215 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13217         * kern/disk.c (grub_disk_read): When there is a read error, always
13218         try to read only the necessary data.
13220         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13221         disk/raid.c.
13222         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13223         prototype.
13224         [GRUB_UTIL] (grub_raid_fini): Likewise.
13225         [GRUB_UTIL] (grub_lvm_init): Likewise.
13226         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13227         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13228         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13229         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13230         and grub_raid_fini().
13232 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13234         * include/grub/types.h (__unused): Rename to UNUSED.
13235         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13236         (grub_elf64_size): Likewise.
13238 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13240         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13241         grub_error_push and grub_error_pop in the error-handling path.
13242         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13243         length.
13245 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13247         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13248         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13249         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13250         (kernel_elf_SOURCES): Likewise.
13251         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13252         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13253         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13254         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13255         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13256         (elf_mod_SOURCES): New variable.
13257         (elf_mod_CFLAGS): Likewise.
13258         (elf_mod_LDFLAGS): Likewise.
13259         * include/grub/types.h (__unused): New macro.
13260         * include/grub/elfload.h: New file.
13261         * kern/elf.c: Likewise.
13262         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13263         (ELF32_LOADMASK): New macro.
13264         (ELF64_LOADMASK): Likewise.
13265         (vmlinux): Removed.
13266         (grub_linux_load32): New function.
13267         (grub_linux_load64): Likewise.
13268         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13269         Use grub_elf_t instead of grub_file_t.
13271 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13273         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13274         `catch_result' to struct set_color_args.
13276 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13278         * normal/menu.c: Include grub/script.h.
13279         * normal/menu_entry.c: Likewise.
13280         * include/grub/normal.h: Do not include grub/script.h.
13282 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13284         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13286 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13288         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13289         disk.
13290         (grub_disk_close): Print debug messages when closing a disk.
13291         (grub_disk_read): Print debug messages when disk read fails.
13292         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13293         filesystem type.
13294         * kern/partition.c: Include misc.h.
13295         (grub_partition_iterate): Print debug messages when detecting
13296         partition type.
13298 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13300         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13301         is negative.
13302         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13304 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13306         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13307         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13309 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13311         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13312         instead of sizeof(lv). Patch by Michael Guntsche.
13314 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13316         * disk/lvm.c: Rename VGS to VG_LIST.
13317         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13318         (grub_lvm_open): Likewise.
13319         Thanks to Michael Guntsche for finding this bug.
13321 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13323         * configure.ac (AC_INIT): Bumped to 1.95.
13325 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13327         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13328         with "/dev/.static/dev/md".
13330 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13332         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13333         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13334         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13335         DRIVE_NAME are always freed.
13337         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13338         DOS_PART, as a DOS partition is counted from one instead of zero
13339         now. Reported by Robert Millan.
13341 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13343         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13344         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13345         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13346         string returned by grub_guess_root_device.
13347         * util/i386/pc/grub-setup.c: Likewise.
13348         * util/i386/pc/grub-probefs.c: Likewise.
13350         * util/i386/pc/grub-probefs.c: Rename to ...
13351         * util/i386/pc/grub-probe.c: ... this.
13352         * DISTLIST: Remove grub-probefs, add grub-probe.
13353         * conf/i386-efi.rmk: Likewise.
13354         * conf/i386-pc.rmk: Likewise.
13355         * util/i386/pc/grub-install.in: Likewise.
13357         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13358         choose which information we want to print.
13360 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13362         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13363         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13364         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13365         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13366         video/readers/tga.c and video/i386/pc/vbeutil.c.
13368 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13370         Added support for RAID and LVM.
13372         * disk/lvm.c: New file.
13373         * disk/raid.c: Likewise.
13374         * include/grub/lvm.h: Likewise.
13375         * include/grub/raid.h: Likewise.
13376         * include/grub/util/lvm.h: Likewise.
13377         * include/grub/util/raid.h: Likewise.
13378         * util/lvm.c: Likewise.
13379         * util/raid.c: Likewise.
13381         * include/grub/disk.h (grub_disk_dev_id): Add
13382         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13383         (grub_disk_get_size): New prototype.
13384         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13385         returns a partition.
13386         (grub_disk_get_size): New function.
13388         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13389         verbatim if grub_install_dos_part is -2.
13391         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13392         and LVM devices.
13394         * util/i386/pc/grub-setup.c (setup): New argument
13395         MUST_EMBED. Force embedding of GRUB when the argument is
13396         true. Close FILE before returning.
13397         (main): Add support for RAID and LVM.
13399         * conf/common.rmk: Add RAID and LVM modules.
13400         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13401         util/lvm.c.
13402         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13404         * kern/misc.c (grub_strstr): New function.
13405         * include/grub/misc.h (grub_strstr): New prototype.
13407 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13409         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13411 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13413         * kern/misc.c (grub_strtoull): Guess the base only if not
13414         specified.
13416 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13418         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13419         PowerMac support.
13421 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13423         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13425         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13426         Remove `flags' argument.  All callers changed.
13427         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13428         (IEEE1275_IHANDLE_INVALID): New variable.
13429         (IEEE1275_CELL_INVALID): New variable.
13430         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13431         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13432         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13433         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13434         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13435         codes from Open Firmware.  All callers updated.
13436         (grub_ieee1275_next_property): Directly return Open Firmware return
13437         code.
13438         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13439         Standardize error checking from `grub_ieee1275_get_property'.
13440         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13441         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13443 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13445         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13446         `instance_to_package_args' to `instance_to_path_args'.
13448         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13449         `grub_ieee1275_chosen'.
13451         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13452         `grub_ieee1275_interpret'.
13454 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13456         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13458 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13460         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13461         (__cmpdi): Likewise.
13463         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13464         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13465         `grub_ssize_t'.
13467         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13469         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13470         to type `grub_ssize_t'.
13471         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13473 2006-09-22  Marco Gerards  <marco@gnu.org>
13475         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13476         newlines.
13478 2006-09-22  Marco Gerards  <marco@gnu.org>
13480         * commands/echo.c: New file.
13482         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13484         * conf/common.rmk (echo_mod_SOURCES): New variable.
13485         (echo_mod_CFLAGS): Likewise.
13486         (echo_mod_LDFLAGS): Likewise.
13488 2006-09-22  Marco Gerards  <marco@gnu.org>
13490         * normal/main.c (get_line): Malloc memory instead of using
13491         preallocated memory.  Removed the arguments `cmdline' and
13492         `max_len'.  Updated all callers.
13494 2006-09-22  Marco Gerards  <marco@gnu.org>
13496         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13497         (normal_mod_DEPENDENCIES): Likewise.
13499         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13500         (normal_mod_DEPENDENCIES): Likewise.
13502         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13504 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13506         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13507         programs.
13508         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13509         (normal_mod_DEPENDENCIES): Likewise.
13510         * conf/i386-pc.mk: Regenerate.
13511         * conf/i386-efi.mk: Likewise
13512         * conf/common.mk: Likewise.
13513         * conf/powerpc-ieee1275.mk: Likewise.
13514         * conf/sparc64-ieee1275.mk: Likewise.
13516 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13518         Sync with i386 version.
13519         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13520         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13522 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13524         Import from GRUB Legacy (lib/device.c):
13525         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13526         (init_device_map) [__linux__]: Add support for I2O devices.
13528 2006-09-14  Marco Gerards  <marco@gnu.org>
13530         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13531         `-melf_i386'.
13533 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13535         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13536         /boot/grub/*.lst.
13538         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13540         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13541         before adding it to device.map.
13543 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13545         * genmk.rb: Let GCC generate dependencies the first time it
13546         compiles a file; using the -MD option.
13547         * conf/common.mk: Regenerate.
13548         * conf/i386-pc.mk: Likewise.
13549         * conf/i386-efi.mk: Likewise.
13550         * conf/powerpc-ieee1275.mk: Likewise.
13551         * conf/sparc64-ieee1275.mk: Likewise.
13553 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13555         Move the prototypes of grub_setjmp and grub_longjmp to
13556         cpu/setjmp.h, so that each architecture may specify different
13557         attributes.
13559         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13560         (grub_longjmp): Likewise.
13561         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13562         (grub_longjmp): Likewise.
13563         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13564         (grub_longjmp): Likewise.
13566         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13567         [!GRUB_UTIL] (grub_longjmp): Removed.
13569 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13571         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13572         "color!" method does not return any value.
13574 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13576         * include/grub/bitmap.h: New file.
13578         * include/grub/i386/pc/vbeutil.h: Likewise.
13580         * video/bitmap.c: Likewise.
13582         * video/readers/tga.c: Likewise.
13584         * video/i386/pc/vbeutil.c: Likewise.
13586         * commands/videotest.c: Code cleanup and updated to reflect to new
13587         video API.
13589         * term/gfxterm.c: Likewise.
13591         * video/video.c: Likewise.
13593         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13594         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13595         (bitmap_mod_SOURCES): New entry.
13596         (bitmap_mod_CFLAGS): Likewise.
13597         (bitmap_mod_LDFLAGS): Likewise.
13598         (tga_mod_SOURCES): Likewise.
13599         (tga_mod_CFLAGS): Likewise.
13600         (tga_mod_LDFLAGS): Likewise.
13602         * include/grub/video.h (grub_video_blit_operators): New enum type.
13603         (grub_video_render_target): Changed as forward declaration and moved
13604         actual definition to be video driver specific.
13605         (grub_video_adapter.blit_bitmap): Added blitting operator.
13606         (grub_video_adapter.blit_render_target): Likewise.
13607         (grub_video_blit_bitmap): Likewise.
13608         (grub_video_blit_render_target): Likewise.
13610         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13611         driver specific render target definition.
13612         (grub_video_vbe_map_rgba): Added driver internal helper.
13613         (grub_video_vbe_unmap_color): Updated to use
13614         grub_video_i386_vbeblit_info.
13615         (grub_video_vbe_get_video_ptr): Likewise.
13617         * include/grub/i386/pc/vbeblit.h
13618         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13619         grub_video_i386_vbeblit_info.
13620         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13621         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13622         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13623         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13624         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13625         (grub_video_i386_vbeblit_index_index): Likewise.
13626         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13627         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13628         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13629         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13630         operator.
13631         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13632         operator.
13634         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13635         include/grub/i386/pc/vbeblit.h.
13637         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13638         Updated to use grub_video_i386_vbeblit_info.
13639         (grub_video_i386_vbefill_R8G8B8): Likewise.
13640         (grub_video_i386_vbefill_index): Likewise.
13641         (grub_video_i386_vbefill): Added generic filler.
13643         * video/i386/pc/vbefill.c: Updated to reflect changes on
13644         include/grub/i386/pc/vbefill.h.
13646         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13647         grub_video_i386_vbeblit_info.
13648         (grub_video_vbe_unmap_color): Likewise.
13649         (grub_video_vbe_blit_glyph): Likewise.
13650         (grub_video_vbe_scroll): Likewise.
13651         (grub_video_vbe_draw_pixel): Removed function.
13652         (grub_video_vbe_get_pixel): Likewise.
13653         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13654         updated code to use it.
13655         (common_blitter): Added common blitter for render target and bitmap.
13656         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13657         (grub_video_vbe_blit_render_target): Likewise.
13659 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13661         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13662         is in text mode if there is no console control protocol instance
13663         available.
13665 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13667         * include/grub/video.h: Code cleanup.
13669         * include/grub/i386/pc/vbe.h: Likewise.
13671         * video/i386/pc/vbe.c: Likewise.
13673         * video/i386/pc/vbeblit.c: Likewise.
13675         * video/i386/pc/vbefill.c: Likewise.
13677         * video/video.c: Likewise.  Also added more comments.
13679 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13681         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13682         (struct grub_biosdisk_dap): Likewise.
13684         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13685         linkage settings for all functions.
13687 2006-07-12  Marco Gerards  <marco@gnu.org>
13689         * configure.ac (--enable-mm-debug): Fix typo.
13691         * genkernsyms.sh.in: Use proper quoting for `CC'.
13693 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13695         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13696         (normal_mod_ASFLAGS): Remove "-m32".
13698 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13700         * util/misc.c: Include config.h.
13701         [!HAVE_MEMALIGN]: Do not include malloc.h.
13702         (grub_memalign): Use posix_memalign, if present. Then, use
13703         memalign, if present. Otherwise, emit an error.
13705         * util/grub-emu.c: Do not include malloc.h.
13707         * include/grub/util/misc.h: Include unistd.h. This is required for
13708         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13709         D. Eades III <hde@foobar-qux.org>.
13711         * configure.ac (AC_GNU_SOURCE): Added.
13712         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13713         type.
13715 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
13717         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13718         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13720 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
13722         * include/grub/types.h (grub_host_addr_t): Rename to
13723         grub_target_addr_t.
13724         (grub_host_off_t): Rename to grub_target_off_t.
13725         (grub_host_size_t): Rename to grub_target_size_t.
13726         (grub_host_ssize_t): Rename to grub_target_ssize_t.
13727         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13729         * include/grub/kernel.h (struct grub_module_header): Change type
13730         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13731         (grub_module_info): Likewise.
13733 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13735         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13736         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13737         Velazquez <jesus.velazquez@gmail.com>.
13739 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13741         Count partitions from 1 instead of 0 in the string representation
13742         of partitions. Still use 0-based internally.
13744         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13745         (sun_partition_map_iterate): Use grub_partition_t instead of
13746         struct grub_partition *. Cast DESC->START_CYLINDER to
13747         grub_uint64_t after converting the endian.
13748         (sun_partition_map_probe): Subtract 1 for PARTNUM.
13749         (sun_partition_map_get_name): Add 1 to P->INDEX.
13751         * partmap/pc.c (grub_partition_parse): Subtract 1 for
13752         PCDATA->DOS_PART.
13753         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13755         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13756         zero instead of one.
13757         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13758         (gpt_partition_map_get_name): Add 1 into P->INDEX.
13760         * partmap/apple.c (apple_partition_map_iterate): Change the type
13761         of POS to unsigned.
13762         (apple_partition_map_probe): Subtract 1 for PARTNUM.
13763         (apple_partition_map_get_name): Add 1 into P->INDEX.
13765         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13766         of POS to unsigned.
13767         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13768         calculate the offset of a partition.
13769         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13770         (amiga_partition_map_get_name): Add 1 into P->INDEX.
13772         * partmap/acorn.c (acorn_partition_map_find): Change the type of
13773         SECTOR to grub_disk_addr_t.
13774         (acorn_partition_map_iterate): Likewise.
13775         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13776         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13777         top.
13778         (acorn_partition_map_get_name): Add 1 into P->INDEX.
13780         * kern/i386/pc/init.c (make_install_device): Add 1 into
13781         GRUB_INSTALL_DOS_PART.
13783         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13784         conditional.
13786 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13788         Clean up the code to support 64-bit addressing in disks and
13789         files. This change is not enough for filesystems yet.
13791         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13792         type of "start" to grub_uint64_t.
13793         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13794         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13795         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13796         convert addresses.
13798         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13799         to grub_disk_addr_t.
13801         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13802         string.
13804         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13806         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13807         to char *.
13809         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13811         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13813         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13815         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13816         to grub_off_t, to detect an error from grub_file_seek.
13817         (grub_multiboot_load_elf32): Likewise.
13819         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13820         maximum unsigned long value when an overflow is detected.
13821         (grub_strtoull): New function.
13822         (grub_divmod64): Likewise.
13823         (grub_lltoa): use grub_divmod64.
13825         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13826         grub_disk_addr_t.
13827         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13828         the pointer to next character. Use grub_strtoull instead of
13829         grub_strtoul.
13830         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13831         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13832         respectively.
13834         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13835         return value is signed.
13836         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13837         test if OFFSET is less than zero, as OFFSET is unsigned now.
13839         * kern/disk.c (struct grub_disk_cache): Change the type of
13840         "sector" to grub_disk_addr_t.
13841         (grub_disk_cache_get_index): Change the type of SECTOR to
13842         grub_disk_addr_t. Calculate the hash with SECTOR casted to
13843         unsigned after shifting.
13844         (grub_disk_cache_invalidate): Change the type of SECTOR to
13845         grub_disk_addr_t.
13846         (grub_disk_cache_unlock): Likewise.
13847         (grub_disk_cache_store): Likewise.
13848         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13849         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13850         grub_disk_addr_t and grub_uint64_t, respectively.
13851         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13852         body, as the value of OFFSET is tweaked by
13853         grub_disk_check_range. Change the types of START_SECTOR, LEN and
13854         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13855         respectively.
13856         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13857         body, as the value of OFFSET is tweaked by
13858         grub_disk_check_range. Change the types of LEN and N to
13859         grub_size_t.
13861         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13862         and "saved_offset" to grub_off_t.
13863         (test_header): Cast BUF to char *.
13864         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13865         to char *.
13866         (grub_gzio_read): Change the types of OFFSET and SIZE to
13867         grub_off_t and grub_size_t, respectively.
13869         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13870         Removed.
13871         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13872         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13873         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13874         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13875         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13877         * include/grub/types.h (grub_off_t): Unconditionally set to
13878         grub_uint64_t.
13879         (grub_disk_addr_t): Changed to grub_uint64_t.
13881         * include/grub/partition.h (struct grub_partition): Change the
13882         types of "start", "len" and "offset" to grub_disk_addr_t,
13883         grub_uint64_t and grub_disk_addr_t, respectively.
13884         (grub_partition_get_start): Return grub_disk_addr_t.
13885         (grub_partition_get_len): Return grub_uint64_t.
13887         * include/grub/misc.h (grub_strtoull): New prototype.
13888         (grub_divmod64): Likewise.
13890         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13891         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13892         grub_off_t, respectively.
13893         All callers and references changed.
13895         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13896         grub_size_t in "read".
13897         All callers and references changed.
13899         * include/grub/file.h (struct grub_file): Change the types of
13900         "offset" and "size" to grub_off_t and grub_off_t,
13901         respectively. Change the type of SECTOR to grub_disk_addr_t in
13902         "read_hook".
13903         (grub_file_read): Change the type of LEN to grub_size_t.
13904         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13905         grub_off_t.
13906         (grub_file_size): Return grub_off_t.
13907         (grub_file_tell): Likewise.
13908         All callers and references changed.
13910         * include/grub/disk.h (struct grub_disk_dev): Change the types of
13911         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13912         "write".
13913         (struct grub_disk): Change the type of "total_sectors" to
13914         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13915         "read_hook".
13916         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13917         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13918         (grub_disk_write): Likewise.
13919         All callers and references changed.
13921         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13922         char * for grub_strncmp to silence gcc.
13923         (grub_iso9660_mount): Likewise.
13924         (grub_iso9660_mount): Likewise.
13925         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13926         return statement.
13927         (grub_iso9660_iterate_dir): Likewise.
13928         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13930         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13931         LEN to grub_disk_addr_t and grub_size_t, respectively.
13933         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13935         * fs/jfs.c (grub_jfs_read_file): Likewise.
13937         * fs/minix.c (grub_jfs_read_file): Likewise.
13939         * fs/sfs.c (grub_jfs_read_file): Likewise.
13941         * fs/ufs.c (grub_jfs_read_file): Likewise.
13943         * fs/xfs.c (grub_jfs_read_file): Likewise.
13945         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13946         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13947         respectively.
13949         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13950         BLKNR to -1 instead of returning GRUB_ERRNO.
13951         (grub_ext2_read_file): Change the types of SECTOR and
13952         LEN to grub_disk_addr_t and grub_size_t, respectively.
13954         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13955         LEN to grub_disk_addr_t and grub_size_t, respectively.
13957         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13958         grub_file_read.
13960         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13961         string. Do not cast SECTOR explicitly.
13963         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13964         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13965         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13966         grub_disk_addr_t and grub_size_t, respectively. If the sector is
13967         over 2TB and LBA mode is not supported, raise an error.
13968         (get_safe_sectors): New function.
13969         (grub_biosdisk_read): Use get_safe_sectors.
13970         (grub_biosdisk_write): Likewise.
13972         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13973         (grub_efidisk_write): Likewise.
13975         * disk/loopback.c (delete_loopback): Cosmetic changes.
13976         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13977         correctly.
13978         (grub_loopback_open): Likewise.
13979         (grub_loopback_read): Likewise. Also, change the type of POS to
13980         grub_off_t, and fix the usage of grub_memset.
13982         * commands/i386/pc/play.c: Include grub/machine/time.h.
13984         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13985         print FILE->SIZE.
13987         * commands/configfile.c: Include grub/env.h.
13989         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13990         GRUB_ERRNO directly instead. Change the type of POS to
13991         grub_off_t. Follow the coding standard.
13993         * commands/blocklist.c: Include grub/partition.h.
13994         (grub_cmd_blocklist): Return an error if the underlying device is
13995         not a disk. Take the starting sector of a partition into account,
13996         if a partition is used.
13998         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13999         a length field.
14000         (lba_mode): Support 64-bit addresses.
14001         (chs_mode): Likewise.
14002         (copy_buffer): Adapted to the new offsets of a length field and a
14003         segment field.
14004         (blocklist_default_start): Allocate 64-bit space.
14006         * boot/i386/pc/boot.S (force_lba): Removed.
14007         (boot_drive): Moved to under KERNEL_SECTOR.
14008         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
14009         space.
14010         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14011         is useless.
14012         (lba_mode): Refactored to support a 64-bit address. More size
14013         optimization.
14014         (setup_sectors): Likewise.
14016 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14018         * DISTLIST: Added include/grub/i386/linux.h. Removed
14019         include/grub/i386/pc/linux.h
14021         * configure.ac (AC_INIT): Bumped to 1.94.
14023         * config.guess: Updated from gnulib.
14024         * config.sub: Likewise.
14025         * install-sh: Likewise.
14026         * mkinstalldirs: Likewise.
14028 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14030         * conf/common.rmk (grub_modules_init.lst): Depended on
14031         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14032         MODSRCFILES.
14034         * genmk.rb (PModule::rule): Reverted the previous change.
14036 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14038         * conf/common.rmk (grub_modules_init.lst): Depends on
14039         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14040         that the target does not exist before producing.
14041         (grub_modules_init.h): Remove the target before generating.
14042         (grub_emu_init.c): Likewise.
14044         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14046 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14048         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14049         for the target-specific tests. Make sure that we also have the
14050         up-to-date target variables for those tests.
14052 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14054         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14055         (PModule::rule): Likewise.
14057 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14059         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14060         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14061         target-specific flags should be prefixed.
14062         (PModule::rule): Likewise.
14064 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14066         * configure.ac (CMP): Check if cmp is available explicitly.
14068 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14070         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14071         (target_cpu): New variable.
14072         (pkglibdir): Use target_cpu instead of host_cpu.
14074         * util/i386/pc/grub-install.in (host_cpu): Removed.
14075         (target_cpu): New variable.
14076         (pkglibdir): Use target_cpu instead of host_cpu.
14078         * util/genmoddep.c: Removed.
14080         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14081         instead of GRUB_HOST_SIZEOF_VOID_P.
14082         * kern/dl.c: Likewise.
14084         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14085         ...
14086         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14087         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14088         (GRUB_TARGET_SIZEOF_LONG): ... this.
14089         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14090         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14091         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14092         to ...
14093         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14094         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14095         (GRUB_TARGET_SIZEOF_LONG): ... this.
14096         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14097         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14098         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14099         to ...
14100         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14101         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14102         (GRUB_TARGET_SIZEOF_LONG): ... this.
14103         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14104         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14106         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14107         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14108         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14109         instead of GRUB_HOST_SIZEOF_LONG.
14110         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14111         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14112         GRUB_CPU_WORDS_BIGENDIAN.
14113         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14114         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14115         grub_host_ssize_t.
14117         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14118         (genmoddep_SOURCES): Likewise.
14119         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14120         (genmoddep_SOURCES): Likewise.
14121         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14122         (genmoddep_SOURCES): Likewise.
14123         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14124         Likewise.
14125         (genmoddep_SOURCES): Likewise.
14127         * genmoddep.awk: New file.
14129         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14130         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14131         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14132         (PModule::rule): Likewise.
14133         (Program::rule): Likewise.
14134         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14135         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14136         respectively.
14138         * configure.ac: Rewritten intensively to use host and target
14139         instead of build and host, respectively.
14141         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14142         (host_cpu): Removed.
14143         (target_cpu): New variable.
14144         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14145         (BUILD_CC): Removed.
14146         (BUILD_CFLAGS): Likewise.
14147         (BUILD_CPPFLAGS): Likewise.
14148         (TARGET_CC): New variable.
14149         (TARGET_CFLAGS): Likewise.
14150         (TARGET_CPPFLAGS): Likewise.
14151         (TARGET_LDFLAGS): Likewise.
14152         (AWK): Likewise.
14153         (include): Use target_cpu instead of host_cpu.
14154         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14156         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14158 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14160         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14161         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14162         field 'false' to 'exec_on_false'.
14163         (grub_script_create_cmdif): Renamed argument names to reflect above
14164         changes.
14166         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14168         * normal/script.c (grub_script_create_cmdif): Likewise.
14170 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14172         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14173         top.
14174         (grub_hfsplus_btree_recptr): Likewise.
14175         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14176         FILEBLOCK both to pass a block number and store next block
14177         number.
14178         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14179         overflow file correctly. Specify errors appropriately, because
14180         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14181         grub_hfsplus_btree_recptr to get the pointer to a found key.
14182         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14183         is found.
14185         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14186         linux.mod.
14187         (_linux_mod_SOURCES): New variable.
14188         (_linux_mod_CFLAGS): Likewise.
14189         (_linux_mod_LDFLAGS): Likewise.
14190         (linux_mod_SOURCES): Likewise.
14191         (linux_mod_CFLAGS): Likewise.
14192         (linux_mod_LDFLAGS): Likewise.
14194         * DISTLIST: Added loader/i386/efi/linux.c,
14195         loader/i386/efi/linux_normal.c and
14196         include/grub/i386/efi/loader.h.
14198         * loader/i386/efi/linux.c: New file.
14199         * loader/i386/efi/linux_normal.c: Likewise.
14200         * include/grub/i386/efi/loader.h: Likewise.
14202 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14204         * commands/blocklist.c: New file.
14206         * DISTLIST: Added commands/blocklist.c.
14208         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14209         color for the background, and a darker color for the foreground.
14210         (grub_console_checkkey): Return READ_KEY.
14211         (grub_console_cls): Set the background to
14212         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14214         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14216         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14217         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14219         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14220         prototype.
14222         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14223         BG. The spec is wrong again.
14225         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14226         prototype.
14227         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14229         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14230         commands/blocklist.c.
14231         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14233         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14234         (blocklist_mod_SOURCES): New variable.
14235         (blocklist_mod_CFLAGS): Likewise.
14236         (blocklist_mod_LDFLAGS): Likewise.
14238 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14240         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14241         duplication.
14242         (lba_mode): Use %eax more intensively to reduce the code size.
14244 2006-05-20  Marco Gerards  <marco@gnu.org>
14246         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14248         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14249         for `menuentry'.
14250         (script): Accept leading newlines.
14251         (newlines): New rule to describe 0 or more newlines.
14252         (commands): Accept `command' with trailing newline.  Fixed the
14253         order in which arguments were passed to `grub_script_add_cmd'.
14254         Accept commands separated by newlines.
14255         (function): Changed to accept newlines.
14256         (menuentry) Rewritten.
14258         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14259         front of the list, instead of to the end.
14261 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14263         * util/i386/pc/grub-install.in (bindir): New variable.
14264         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14265         Shaver <lbgwjl@gmail.com>.
14267 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14269         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14270         grub/machine/linux.h
14271         * loader/i386/pc/linux.c: Likewise.
14273         * include/grub/i386/pc/linux.h: Moved to ...
14274         * include/grub/i386/linux.h: ... here.
14276         * include/grub/i386/linux.h (struct linux_kernel_params): New
14277         struct.
14279 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14281         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14282         checking.
14283         (grub_video_vbe_blit_glyph): Likewise.
14284         (grub_video_vbe_blit_bitmap): Likewise.
14285         (grub_video_vbe_blit_render_target): Likewise.
14287 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14289         * configure.ac (--with-platform): Properly quote the square
14290         brackets.
14292 2006-05-08  Marco Gerards  <marco@gnu.org>
14294         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14295         this...
14296         (kernel_elf_HEADERS): ...to this.  Updated all users.
14297         (grubof_symlist.c): Renamed from this...
14298         (kernel_elf_symlist.c): ...to this.  Updated all users.
14299         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14300         (grubof_SOURCES): Renamed from this...
14301         (kernel_elf_SOURCES): ...to this.
14302         (grubof_HEADERS): Renamed from this...
14303         (kernel_elf_HEADERS): ...to this.
14304         (grubof_CFLAGS): Renamed from this...
14305         (kernel_elf_CFLAGS): ...to this.
14306         (grubof_ASFLAGS): Renamed from this...
14307         (kernel_elf_ASFLAGS): ...to this.
14308         (grubof_LDFLAGS): Renamed from this...
14309         (kernel_elf_LDFLAGS): ...to this.
14311         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14312         this...
14313         (kernel_elf_HEADERS): ...to this.  Updated all users.
14314         (grubof_symlist.c): Renamed from this...
14315         (kernel_elf_symlist.c): ...to this.  Updated all users.
14316         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14317         (grubof_SOURCES): Renamed from this...
14318         (kernel_elf_SOURCES): ...to this.
14319         (grubof_HEADERS): Renamed from this...
14320         (kernel_elf_HEADERS): ...to this.
14321         (grubof_CFLAGS): Renamed from this...
14322         (kernel_elf_CFLAGS): ...to this.
14323         (grubof_ASFLAGS): Renamed from this...
14324         (kernel_elf_ASFLAGS): ...to this.
14325         (grubof_LDFLAGS): Renamed from this...
14326         (kernel_elf_LDFLAGS): ...to this.
14328         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14329         `kernel.elf' instead of `grubof'.
14331 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14333         Add --with-platform to configure. Use pkglibdir instead of
14334         pkgdatadir. This is reported by Roger Leigh.
14336         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14337         (host_vendor): Likewise.
14338         (host_os): Likewise.
14339         (pkgdatadir): Likewise.
14340         (platform): New variable.
14341         (pkglibdir): Likewise.
14342         Use PKGLIBDIR instead of PKGDATADIR.
14344         * util/i386/pc/grub-install.in (datadir): Removed.
14345         (host_vendor): Likewise.
14346         (host_os): Likewise.
14347         (pkgdatadir): Likewise.
14348         (platform): New variable.
14349         (pkglibdir): Likewise.
14350         Use PKGLIBDIR instead of PKGDATADIR.
14352         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14353         instead of GRUB_DATADIR.
14354         (main): Likewise.
14355         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14356         (main): Likewise.
14357         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14358         (main): Likewise.
14360         * configure.ac (--with-platform): New option.
14361         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14363         * Makefile.in: Include a makefile based on PLATFORM instead of
14364         HOST_VENDOR.
14365         (pkgdatadir): Not appended by the machine type.
14366         (pkglibdir): Appended by the machine type.
14367         (host_vendor): Removed.
14368         (platform): New variable.
14369         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14370         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14371         (uninstall): Likewise.
14373 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14375         Use the environment context in the menu. Remove the commands
14376         "default" and "timeout", and use variables instead.
14378         * normal/menu.c: Include grub/env.h.
14379         (print_entry): Cast TITLE to silence gcc.
14380         (get_timeout): New function.
14381         (set_timeout): Likewise.
14382         (get_entry_number): Likewise.
14383         (run_menu): Use a default entry, a fallback entry and a timeout
14384         in the environment variables "default", "fallback" and
14385         "timeout". Also, tweak the default entry if it is not within the
14386         current menu entries.
14387         (grub_menu_run): Use a fallback entry in the environment variable
14388         "fallback".
14390         * normal/main.c (read_config_file): Do not initialize
14391         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14392         NEWMENU->TIMEOUT.
14393         (grub_normal_execute): Use a data slot to store the menu.
14395         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14396         fallback_entry and timeout.
14397         (struct grub_menu_list): Removed.
14398         (grub_menu_list_t): Likewise.
14399         (struct grub_context): Likewise.
14400         (grub_context_t): Likewise.
14401         (grub_context_get): Likewise.
14402         (grub_context_get_current_menu): Likewise.
14403         (grub_context_push_menu): Likewise.
14404         (grub_context_pop_menu): Likewise.
14405         (grub_default_init): Likewise.
14406         (grub_default_fini): Likewise.
14407         (grub_timeout_init): Likewise.
14408         (grub_timeout_fini): Likewise.
14410         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14411         and timeout.mod.
14412         (normal_mod_SOURCES): Removed normal/context.c.
14414         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14415         commands/default.c, commands/timeout.c and normal/context.c.
14416         (normal_mod_SOURCES): Removed normal/context.c.
14418         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14419         commands/timeout.c and normal/context.c.
14420         (normal_mod_SOURCES): Removed normal/context.c.
14422         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14423         commands/default.c, commands/timeout.c and normal/context.c.
14424         (normal_mod_SOURCES): Removed normal/context.c.
14426         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14427         timeout.mod.
14428         (default_mod_SOURCES): Removed.
14429         (default_mod_CFLAGS): Likewise.
14430         (default_mod_LDFLAGS): Likewise.
14431         (timeout_mod_SOURCES): Removed.
14432         (timeout_mod_CFLAGS): Likewise.
14433         (timeout_mod_LDFLAGS): Likewise.
14435         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14436         normal/context.c.
14438         * commands/default.c: Removed.
14439         * commands/timeout.c: Likewise.
14440         * normal/context.c: Likewise.
14442 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14444         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14446 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14448         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14449         "next" to "prev" for readability.
14450         (struct grub_env_sorted_var): New struct.
14451         (grub_env_context): Renamed to ...
14452         (initial_context): ... this.
14453         (grub_env_var_context): Renamed to ...
14454         (current_context): ... this.
14455         (grub_env_find): Look only at CURRENT_CONTEXT.
14456         (grub_env_context_open): Rewritten to copy exported variables from
14457         previous context.
14458         (grub_env_context_close): Rewritten according to the new
14459         scheme. Also, add an assertion to prevent the initial context from
14460         removed.
14461         (grub_env_insert): Removed the code for the sorted list.
14462         (grub_env_remove): Likewise.
14463         (grub_env_export): Simply mark the variable with
14464         GRUB_ENV_VAR_GLOBAL.
14465         (grub_env_set): A cosmetic change for naming consistency.
14466         (grub_env_get): Likewise.
14467         (grub_env_unset): Likewise.
14468         (grub_env_iterate): Rewritten to sort variables within this
14469         function.
14470         (grub_register_variable_hook): Fixed for naming consistency. Call
14471         grub_env_find again, only if NAME is not found at the first time.
14472         (mangle_data_slot_name): New function.
14473         (grub_env_set_data_slot): Likewise.
14474         (grub_env_get_data_slot): Likewise.
14475         (grub_env_unset_data_slot): Likewise.
14477         * include/grub/env.h (grub_env_var_type): New enum.
14478         (GRUB_ENV_VAR_LOCAL): New constant.
14479         (GRUB_ENV_VAR_GLOBAL): Likewise.
14480         (GRUB_ENV_VAR_DATA): Likewise.
14481         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14482         "type".
14483         (grub_env_set): Replace VAR with NAME for consistency.
14484         (grub_register_variable_hook): Likewise.
14485         (grub_env_export): Specify the name of the argument.
14486         (grub_env_set_data_slot): New prototype.
14487         (grub_env_get_data_slot): Likewise.
14488         (grub_env_unset_data_slot): Likewise.
14490 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14492         Extend the loader so that GRUB can accept a loader which comes
14493         back to GRUB when a loaded image exits. Also, this change adds
14494         support for a chainloader on EFI.
14496         * term/efi/console.c: Include grub/misc.h.
14497         (grub_console_checkkey): Display a scan code on the top for
14498         debugging. This will be removed once the EFI port gets stable.
14499         Correct the scan code mapping.
14501         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14502         allocate memory from larger regions, in order to reduce the number
14503         of allocated regions. Otherwise, the MacOSX loader panics.
14504         (filter_memory_map): Avoid less than 1MB for compatibility with
14505         other loaders.
14506         (add_memory_regions): Allocate from the tail of a region, if
14507         possible, to avoid allocating a region near to 1MB, for the MacOSX
14508         loader.
14510         * kern/efi/init.c (grub_efi_set_prefix): Specify
14511         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14513         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14514         argument IMAGE_HANDLE and specify it to get a loaded image.
14515         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14516         grub_efi_get_loaded_image.
14517         (grub_efi_get_filename): Divide the length by the size of
14518         grub_efi_char16_t.
14519         (grub_efi_get_device_path): New function.
14520         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14521         the length by the size of grub_efi_char16_t for a file path device
14522         path node.
14524         * kern/loader.c (grub_loader_noreturn): New variable.
14525         (grub_loader_set): Accept a new argument NORETURN. Set
14526         GRUB_LOADER_NORETURN to NORETURN.
14527         All callers changed.
14528         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14529         grub_machine_fini.
14531         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14532         prototype.
14533         (grub_efi_get_loaded_image): Take an argument to specify an image
14534         handle.
14536         * include/grub/loader.h (grub_loader_set): Added one more argument
14537         NORETURN.
14539         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14540         instead of grub_efi_open_protocol.
14541         (grub_efidisk_get_device_name): Likewise.
14542         (grub_efidisk_close): Print a newline.
14543         (grub_efidisk_get_device_handle): Fixed to use
14544         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14545         GRUB_EFI_DEVICE_PATH_TYPE.
14547         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14548         * kern/efi/efi.c (device_path_guid): ... here.
14550         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14551         chain.mod.
14552         (kernel_mod_HEADERS): Added efi/disk.h.
14553         (_chain_mod_SOURCES): New variable.
14554         (_chain_mod_CFLAGS): Likewise.
14555         (_chain_mod_LDFLAGS): Likewise.
14556         (chain_mod_SOURCES): Likewise.
14557         (chain_mod_CFLAGS): Likewise.
14558         (chain_mod_LDFLAGS): Likewise.
14560         * DISTLIST: Added include/grub/efi/chainloader.h,
14561         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14563         * include/grub/efi/chainloader.h: New file.
14564         * loader/efi/chainloader.c: Likewise.
14565         * loader/efi/chainloader_normal.c: Likewise.
14567 2006-04-30  Marco Gerards  <marco@gnu.org>
14569         * commands/configfile.c (grub_cmd_source): New function.
14570         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14571         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14573 2006-04-30  Marco Gerards  <marco@gnu.org>
14575         * normal/execute.c (grub_script_execute_cmd): Change the return
14576         type to `grub_err_t'.  Correctly return the error.
14577         (grub_script_execute_cmdline): In case a command line is not a
14578         command or a function, try to interpret it as an assignment.
14580 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14582         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14583         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14584         skip a node whose name is obviously invalid as UTF-16,
14585         i.e. contains a NUL character. Stop the iteration when the last
14586         directory entry is found. Instead of using the return value of
14587         grub_hfsplus_btree_iterate_node, store the value in RET and use
14588         it, because the iterator can be stopped by the last directory
14589         entry.
14591 2006-04-30  Marco Gerards  <marco@gnu.org>
14593         * include/grub/env.h (grub_env_export): New prototype.  Reported
14594         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14596 2006-04-30  Marco Gerards  <marco@gnu.org>
14598         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14599         size of the extents in a catalog file record.
14601 2006-04-29  Marco Gerards  <marco@gnu.org>
14603         * commands/configfile.c (grub_cmd_configfile): Execute the
14604         configfile within its own context.
14606         * include/grub/env.h (grub_env_context_open): New prototype.
14607         (grub_env_context_close): Likewise.
14609         * kern/env.c (grub_env): Removed.
14610         (grub_env_sorted): Likewise.
14611         (grub_env_context): New variable.
14612         (grub_env_var_context): Likewise.
14613         (grub_env_find): Search both the active context and the global
14614         context.
14615         (grub_env_context_open): New function.
14616         (grub_env_context_close): Likewise.
14617         (grub_env_insert): Likewise.
14618         (grub_env_remove): Likewise.
14619         (grub_env_export): Likewise.
14620         (grub_env_set): Changed to use helper functions to avoid code
14621         duplication.
14622         (grub_env_iterate): Rewritten so both the current context and the
14623         global context are being used.
14625         * normal/command.c (export_command): New function.
14626         (grub_command_init): Register the `export' function.
14628 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14630         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14631         explicitly to suppress gcc's warnings.
14632         * fs/fat.c (grub_fat_find_dir): Likewise.
14633         (grub_fat_label): Likewise.
14634         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14635         (grub_xfs_mount): Likewise.
14636         (grub_xfs_label): Likewise.
14637         * fs/affs.c (grub_affs_mount): Likewise.
14638         (grub_affs_label): Likewise.
14639         (grub_affs_iterate_dir): Likewise.
14640         * fs/sfs.c (grub_sfs_mount): Likewise.
14641         (grub_sfs_iterate_dir): Likewise.
14642         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14643         * fs/hfs.c (grub_hfs_mount): Likewise.
14644         (grub_hfs_cmp_catkeys): Likewise.
14645         (grub_hfs_find_dir): Likewise.
14646         (grub_hfs_dir): Likewise.
14647         (grub_hfs_label): Likewise.
14648         * fs/jfs.c (grub_jfs_mount): Likewise.
14649         (grub_jfs_opendir): Likewise.
14650         (grub_jfs_getent): Likewise.
14651         (grub_jfs_lookup_symlink): Likewise.
14652         (grub_jfs_label): Likewise.
14653         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14654         (grub_hfsplus_iterate_dir): Likewise.
14655         (grub_hfsplus_btree_iterate_node): Made static.
14657         * util/grub-emu.c (prefix): New variable.
14658         (grub_machine_set_prefix): New function.
14659         (main): Do not set the environment variable "prefix" here. Only
14660         set PREFIX, which is used later by grub_machine_set_prefix.
14662         * include/grub/video.h: Do not include grub/symbol.h.
14663         (grub_video_register): Not exported. This symbol is not defined in
14664         the kernel.
14665         (grub_video_unregister): Likewise.
14666         (grub_video_iterate): Likewise.
14667         (grub_video_setup): Likewise.
14668         (grub_video_restore): Likewise.
14669         (grub_video_get_info): Likewise.
14670         (grub_video_get_blit_format): Likewise.
14671         (grub_video_set_palette): Likewise.
14672         (grub_video_get_palette): Likewise.
14673         (grub_video_set_viewport): Likewise.
14674         (grub_video_get_viewport): Likewise.
14675         (grub_video_map_color): Likewise.
14676         (grub_video_map_rgb): Likewise.
14677         (grub_video_map_rgba): Likewise.
14678         (grub_video_fill_rect): Likewise.
14679         (grub_video_blit_glyph): Likewise.
14680         (grub_video_blit_bitmap): Likewise.
14681         (grub_video_blit_render_target): Likewise.
14682         (grub_video_scroll): Likewise.
14683         (grub_video_swap_buffers): Likewise.
14684         (grub_video_create_render_target): Likewise.
14685         (grub_video_delete_render_target): Likewise.
14686         (grub_video_set_active_render_target): Likewise.
14688         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14689         Undefined.
14690         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14692         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14693         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14694         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14695         instead of $(srcdir)/genkernsyms.sh.
14697         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14698         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14699         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14700         instead of $(srcdir)/genkernsyms.sh.
14702         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14703         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14704         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14705         instead of $(srcdir)/genkernsyms.sh.
14707         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14708         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14709         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14710         instead of $(srcdir)/genkernsyms.sh.
14712         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14713         genkernsyms.sh.
14715         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14716         genkernsyms.sh.
14717         (gensymlist.sh): New target.
14718         (genkernsyms.sh): Likewise.
14720         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14721         genkernsyms.sh.in and gensymlist.sh.in.
14723         * genkernsyms.sh: Removed.
14724         * gensymlist.sh: Likewise.
14726         * genkernsyms.sh.in: New file.
14727         * gensymlist.sh.in: Likewise.
14729 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14731         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14732         clobber "prefix", since we may have already set it manually.
14734 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14736         * kern/misc.c (abort): New alias for grub_abort.
14738 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
14740         A new machine-specific function "grub_machine_set_prefix" is
14741         defined. This is called after loading modules, so that a prefix
14742         initialization can use modules. Also, this change adds an
14743         intensive debugging feature for the memory manager via the
14744         configure option "--enable-mm-debug".
14746         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14747         PART.LEN.
14749         * kern/sparc64/ieee1275/init.c (abort): Removed.
14750         (grub_stop): Likewise.
14751         (grub_exit): New function.
14752         (grub_set_prefix): Renamed to ...
14753         (grub_machine_set_prefix): ... this.
14754         (grub_machine_init): Do not call grub_set_prefix.
14756         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14757         (grub_machine_set_prefix): ... this.
14758         (grub_machine_init): Do not call grub_set_prefix.
14760         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14761         (grub_machine_init): Do not set the prefix here.
14763         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14765         * kern/efi/init.c: Include grub/mm.h.
14766         (grub_efi_set_prefix): New function.
14768         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14769         (grub_efi_get_filename): New function.
14770         (grub_print_device_path): Renamed to ...
14771         (grub_efi_print_device_path): ... this.
14773         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14774         [MM_DEBUG] (grub_realloc): Likewise.
14775         [MM_DEBUG] (grub_free): Likewise.
14776         [MM_DEBUG] (grub_memalign): Likewise.
14777         [MM_DEBUG] (grub_mm_debug): New variable.
14778         [MM_DEBUG] (grub_debug_malloc): New function.
14779         [MM_DEBUG] (grub_debug_free): New function.
14780         [MM_DEBUG] (grub_debug_realloc): New function.
14781         [MM_DEBUG] (grub_debug_memalign): New function.
14783         * kern/misc.c (grub_abort): Print a newline to distinguish
14784         the message.
14786         * kern/main.c (grub_main): Call grub_machine_set_prefix and
14787         grub_set_root_dev after loading modules. This is necessary when
14788         setting a prefix depends on modules.
14790         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14791         (grub_efi_print_device_path): ... this.
14792         (grub_efi_get_filename): New prototype.
14793         (grub_efi_set_prefix): Likewise.
14795         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14796         and grub/disk.h.
14797         (grub_efidisk_get_device_handle): New prototype.
14798         (grub_efidisk_get_device_name): Likewise.
14800         * include/grub/mm.h: Include config.h.
14801         (MM_DEBUG): Removed.
14802         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14803         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14804         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14805         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14806         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14807         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14808         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14809         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14810         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14812         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14814         * disk/efi/efidisk.c: Include grub/partition.h.
14815         (iterate_child_devices): New function.
14816         (add_device): First, compare only last device path nodes, so that
14817         devices are sorted by the types.
14818         (grub_efidisk_get_device_handle): New function.
14819         (grub_efidisk_get_device_name): Likewise.
14821         * configure.ac (--enable-mm-debug): New option to enable the
14822         memory manager debugging feature. This makes the binary much
14823         bigger, so is disabled by default.
14825 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
14827         Use grub_abort instead of grub_stop, and grub_exit must be
14828         define in each architecture now. Also, this change adds support
14829         for EFI disks.
14831         * util/i386/pc/grub-probefs.c: Include grub/term.h.
14832         (grub_getkey): New function.
14833         (grub_term_get_current): Likewise.
14835         * util/i386/pc/grub-setup.c: Include grub/term.h.
14836         (grub_getkey): New function.
14837         (grub_term_get_current): Likewise.
14839         * util/misc.c (grub_stop): Renamed to ...
14840         (grub_exit): ... this.
14842         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14843         (grub_exit): ... this.
14844         (grub_machine_init): Use grub_abort instead of abort.
14845         (grub_stop): Removed.
14847         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14848         abort.
14850         * kern/i386/pc/startup.S (grub_exit): New function.
14851         (cold_reboot): New label.
14853         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14854         (grub_efi_init): Call grub_efidisk_init.
14855         (grub_efi_fini): Call grub_efidisk_fini.
14857         * kern/efi/efi.c: Include grub/mm.h.
14858         (grub_efi_console_control_guid): Renamed to ...
14859         (console_control_guid): ... this.
14860         (grub_efi_loaded_image_guid): Renamed to ...
14861         (loaded_image_guid): ... this.
14862         (grub_efi_locate_handle): New function.
14863         (grub_efi_open_protocol): Likewise.
14864         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14865         GRUB_EFI_CONSOLE_CONTROL_GUID.
14866         (grub_efi_exit): Removed.
14867         (grub_stop): Likewise.
14868         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14869         (grub_exit): New function.
14870         (grub_print_device_path): Likewise.
14872         * kern/rescue.c (grub_rescue_cmd_exit): New function.
14873         (grub_enter_rescue_mode): Register "exit".
14875         * kern/misc.c (grub_real_dprintf): A cosmetic change.
14876         (grub_abort): New function.
14878         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14880         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14882         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14884         * include/grub/efi/efi.h (grub_efi_exit): Removed.
14885         (grub_print_device_path): New prototype.
14886         (grub_efi_locate_handle): Likewise.
14887         (grub_efi_open_protocol): Likewise.
14889         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14890         * disk/efi/efidisk.c: Likewise.
14892         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14894         * include/grub/efi/console_control.h
14895         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14897         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14898         last 8 bytes as an array.
14899         (GRUB_EFI_DISK_IO_GUID): New macro.
14900         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14901         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14902         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14903         grub_uint8_t.
14904         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14905         (struct grub_efi_device_path): Rename the member "sub_type" to
14906         "subtype".
14907         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14908         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14909         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14910         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14911         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14912         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14913         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14914         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14915         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14916         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14917         (struct grub_efi_pci_device_path): New structure.
14918         (grub_efi_pci_device_path_t): New type.
14919         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14920         (struct grub_efi_pccard_device_path): New structure.
14921         (grub_efi_pccard_device_path_t): New type.
14922         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14923         (struct grub_efi_memory_mapped_device_path): New structure.
14924         (grub_efi_memory_mapped_device_path_t): New type.
14925         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14926         (struct grub_efi_vendor_device_path): New structure.
14927         (grub_efi_vendor_device_path_t): New type.
14928         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14929         (struct grub_efi_controller_device_path): New structure.
14930         (grub_efi_controller_device_path_t): New type.
14931         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14932         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14933         (struct grub_efi_acpi_device_path): New structure.
14934         (grub_efi_acpi_device_path_t): New type.
14935         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14936         (struct grub_efi_expanded_acpi_device_path): New structure.
14937         (grub_efi_expanded_acpi_device_path_t): New type.
14938         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14939         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14940         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14941         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14942         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14943         (struct grub_efi_atapi_device_path): New structure.
14944         (grub_efi_atapi_device_path_t): New type.
14945         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14946         (struct grub_efi_fibre_channel_device_path): New structure.
14947         (grub_efi_fibre_channel_device_path_t): New type.
14948         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14949         (struct grub_efi_1394_device_path): New structure.
14950         (grub_efi_1394_device_path_t): New type.
14951         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14952         (struct grub_efi_usb_device_path): New structure.
14953         (grub_efi_usb_device_path_t): New type.
14954         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14955         (struct grub_efi_usb_class_device_path): New structure.
14956         (grub_efi_usb_class_device_path_t): New type.
14957         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14958         (struct grub_efi_i2o_device_path): New structure.
14959         (grub_efi_i2o_device_path_t): New type.
14960         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14961         (struct grub_efi_mac_address_device_path): New structure.
14962         (grub_efi_mac_address_device_path_t): New type.
14963         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14964         (struct grub_efi_ipv4_device_path): New structure.
14965         (grub_efi_ipv4_device_path_t): New type.
14966         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14967         (struct grub_efi_ipv6_device_path): New structure.
14968         (grub_efi_ipv6_device_path_t): New type.
14969         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14970         (struct grub_efi_infiniband_device_path): New structure.
14971         (grub_efi_infiniband_device_path_t): New type.
14972         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14973         (struct grub_efi_uart_device_path): New structure.
14974         (grub_efi_uart_device_path_t): New type.
14975         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14976         (struct grub_efi_vendor_messaging_device_path): New structure.
14977         (grub_efi_vendor_messaging_device_path_t): New type.
14978         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14979         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14980         (struct grub_efi_hard_drive_device_path): New structure.
14981         (grub_efi_hard_drive_device_path_t): New type.
14982         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14983         (struct grub_efi_cdrom_device_path): New structure.
14984         (grub_efi_cdrom_device_path_t): New type.
14985         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14986         (struct grub_efi_vendor_media_device_path): New structure.
14987         (grub_efi_vendor_media_device_path_t): New type.
14988         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14989         (struct grub_efi_file_path_device_path): New structure.
14990         (grub_efi_file_path_device_path_t): New type.
14991         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14992         (struct grub_efi_protocol_device_path): New structure.
14993         (grub_efi_protocol_device_path_t): New type.
14994         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14995         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14996         (struct grub_efi_bios_device_path): New structure.
14997         (grub_efi_bios_device_path_t): New type.
14998         (struct grub_efi_disk_io): New structure.
14999         (grub_efi_disk_io_t): New type.
15000         (struct grub_efi_block_io_media): New structure.
15001         (grub_efi_block_io_media_t): New type.
15002         (struct grub_efi_block_io): New structure.
15003         (grub_efi_block_io_t): New type.
15005         * include/grub/misc.h (grub_stop): Removed.
15006         (grub_exit): New prototype.
15007         (grub_abort): Likewise.
15009         * include/grub/disk.h (enum grub_disk_dev_id): Added
15010         GRUB_DISK_DEVICE_EFIDISK_ID.
15012         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15013         disk/efi/efidisk.c.
15014         (kernel_syms.lst): Remove the target if an error occurs.
15016 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
15018         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15019         as it was simply too buggy.
15021 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
15023         * kern/misc.c (grub_lltoa): New function.
15024         (grub_vsprintf): Added support for the long long suffix,
15025         i.e. "ll".
15027 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15029         * Makefile.in (LDFLAGS): Add variable.
15030         (LD): Remove variable.
15031         * configure.ac: Add -m32 to LDFLAGS.
15032         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15033         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15034         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15035         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15036         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15037         variables.
15038         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15039         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15040         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15042 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15044         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15045         length for unknown glyph.
15047 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15049         Add support for pre-loaded modules into the EFI port.
15051         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15052         completely. Accept one more argument DIR. The caller has changed.
15054         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15056         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15057         (grub_efi_loaded_image_guid): New variable.
15058         (grub_efi_get_loaded_image): New function.
15059         (grub_arch_modules_addr): Likewise.
15061         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15062         prototype.
15064         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15065         (struct grub_efi_loaded_image): New structure.
15066         (grub_efi_loaded_image_t): New type.
15068 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15070         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15071         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15072         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15074 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15076         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15078 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15080         * DISTLIST: Added include/grub/efi/console.h,
15081         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15082         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15084         * include/grub/efi/console.h: New file.
15085         * include/grub/efi/time.h: Likewise.
15086         * include/grub/i386/efi/kernel.h: Likewise.
15087         * kern/efi/init.c: Likewise.
15088         * kern/efi/mm.c: Likewise.
15089         * term/efi/console.c: Likewise.
15091         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15092         (grub_stop): Removed.
15093         (grub_get_rtc): Likewise.
15094         (grub_machine_init): Simply call grub_efi_init.
15095         (grub_machine_fini): Call grub_efi_fini.
15097         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15098         (grub_efi_output_string): Removed.
15099         (grub_efi_stall): New function.
15100         (grub_stop): Likewise.
15101         (grub_get_rtc): Likewise.
15103         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15104         (grub_efi_stall): New prototype.
15105         (grub_efi_allocate_pages): Likewise.
15106         (grub_efi_free_pages): Likewise.
15107         (grub_efi_get_memory_map): Likewise.
15108         (grub_efi_mm_init): Likewise.
15109         (grub_efi_mm_fini): Likewise.
15110         (grub_efi_init): Likewise.
15111         (grub_efi_fini): Likewise.
15113         * include/grub/i386/efi/time.h: Do not include
15114         grub/symbol.h. Include grub/efi/time.h.
15115         (GRUB_TICKS_PER_SECOND): Removed.
15116         (grub_get_rtc): Likewise.
15118         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15119         Added padding. The EFI spec is buggy.
15120         (GRUB_EFI_BLACK): New macro.
15121         (GRUB_EFI_BLUE): Likewise.
15122         (GRUB_EFI_GREEN): Likewise.
15123         (GRUB_EFI_CYAN): Likewise.
15124         (GRUB_EFI_RED): Likewise.
15125         (GRUB_EFI_MAGENTA): Likewise.
15126         (GRUB_EFI_BROWN): Likewise.
15127         (GRUB_EFI_LIGHTGRAY): Likewise.
15128         (GRUB_EFI_BRIGHT): Likewise.
15129         (GRUB_EFI_DARKGRAY): Likewise.
15130         (GRUB_EFI_LIGHTBLUE): Likewise.
15131         (GRUB_EFI_LIGHTGREEN): Likewise.
15132         (GRUB_EFI_LIGHTCYAN): Likewise.
15133         (GRUB_EFI_LIGHTRED): Likewise.
15134         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15135         (GRUB_EFI_YELLOW): Likewise.
15136         (GRUB_EFI_WHITE): Likewise.
15137         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15138         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15139         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15140         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15141         (GRUB_EFI_BACKGROUND_RED): Likewise.
15142         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15143         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15144         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15145         (GRUB_EFI_TEXT_ATTR): Likewise.
15147         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15148         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15149         (kernel_mod_HEADERS): Added efi/time.h.
15151 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15153         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15154         include/grub/efi/api.h, include/grub/efi/console_control.h,
15155         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15156         include/grub/i386/efi/time.h, kern/efi/efi.c,
15157         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15158         and util/i386/efi/grub-mkimage.c.
15160         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15162         * genmk.rb (PModule#rule): Do not export symbols if
15163         #{prefix}_EXPORTS is set to "no".
15165         * conf/i386-efi.mk: New file.
15166         * conf/i386-efi.rmk: Likewise.
15167         * include/grub/efi/api.h: Likewise.
15168         * include/grub/efi/console_control.h: Likewise.
15169         * include/grub/efi/efi.h: Likewise.
15170         * include/grub/efi/pe32.h: Likewise.
15171         * include/grub/i386/efi/time.h: Likewise.
15172         * kern/efi/efi.c: Likewise.
15173         * kern/i386/efi/init.c: Likewise.
15174         * kern/i386/efi/startup.S: Likewise.
15175         * util/i386/efi/grub-mkimage.c: Likewise.
15177 2006-04-17  Marco Gerards  <marco@gnu.org>
15179         * include/grub/script.h: Include <grub/parser.h> and
15180         "grub_script.tab.h".
15181         (struct grub_lexer_param): New struct.
15182         (struct grub_parser_param): Likewise.
15183         (grub_script_create_arglist): Pass the state in an argument.
15184         (grub_script_add_arglist): Likewise.
15185         (grub_script_create_cmdline): Likewise.
15186         (grub_script_create_cmdblock): Likewise.
15187         (grub_script_create_cmdif): Likewise.
15188         (grub_script_create_cmdmenu): Likewise.
15189         (grub_script_add_cmd): Likewise.
15190         (grub_script_arg_add): Likewise.
15191         (grub_script_lexer_ref): Likewise.
15192         (grub_script_lexer_deref): Likewise.
15193         (grub_script_lexer_record_start): Likewise.
15194         (grub_script_lexer_record_stop): Likewise.
15195         (grub_script_mem_record): Likewise.
15196         (grub_script_mem_record_stop): Likewise.
15197         (grub_script_malloc): Likewise.
15198         (grub_script_yylex): Likewise.
15199         (grub_script_yyparse): Likewise.
15200         (grub_script_yyerror): Likewise.
15201         (grub_script_yylex): Likewise.
15202         (grub_script_lexer_init): Return the state.
15204         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15205         (grub_script_lexer_done): Likewise.
15206         (grub_script_lexer_getline): Likewise.
15207         (grub_script_lexer_refs): Likewise.
15208         (script): Likewise.
15209         (newscript): Likewise.
15210         (record): Likewise.
15211         (recording): Likewise.
15212         (recordpos): Likewise.
15213         (recordlen): Likewise.
15214         (grub_script_lexer_init): Return the state instead of setting
15215         global variables.
15216         (grub_script_lexer_ref): Use the newly added argument for state
15217         instead of globals.
15218         (grub_script_lexer_deref): Likewise.
15219         (grub_script_lexer_record_start): Likewise.
15220         (grub_script_lexer_record_stop): Likewise.
15221         (recordchar): Likewise.
15222         (nextchar): Likewise.
15223         (grub_script_yylex2): Likewise.
15224         (grub_script_yylex): Likewise.
15225         (grub_script_yyerror): Likewise.
15227         * normal/parser.y (func_mem): Removed variable.
15228         (menu_entry): Likewise.
15229         (err): Likewise.
15230         (%lex-param): New parser option.
15231         (%parse-param): Likewise.
15232         (script): Always return the AST.
15233         (argument): Pass the state around.
15234         (arguments): Likewise.
15235         (grubcmd): Likewise.
15236         (commands): Likewise.
15237         (function): Likewise.
15238         (menuentry): Likewise.
15239         (if_statement): Likewise.
15240         (if): Likewise.
15242         * normal/script.c (grub_script_memused): Removed variable.
15243         (grub_script_parsed): Likewise.
15244         (grub_script_malloc): Added a state argument.  Use that instead of
15245         global variables.
15246         (grub_script_mem_record): Likewise.
15247         (grub_script_mem_record_stop): Likewise.
15248         (grub_script_arg_add): Likewise.
15249         (grub_script_add_arglist): Likewise.
15250         (grub_script_create_cmdline): Likewise.
15251         (grub_script_create_cmdif): Likewise.
15252         (grub_script_create_cmdmenu): Likewise.
15253         (grub_script_add_cmd): Likewise.
15254         (grub_script_parse): Setup the state before calling the parser.
15256 2006-04-16  Marco Gerards  <marco@gnu.org>
15258         * normal/command.c (grub_command_init): Remove the title command.
15260         * normal/lexer.c (grub_script_yylex): Renamed from this...
15261         (grub_script_yylex2): ... to this.
15262         (grub_script_yylex): New function.  Temporary
15263         introduced to filter some tokens.
15264         (grub_script_yyerror): Print a newline.
15266         * normal/main.c (read_config_file): Output information about the
15267         lines that contain errors.  Wait for a key after all lines have
15268         been processed.  Don't return an empty menu.
15270         * normal/parser.y (func_mem): Don't initialize.
15271         (menu_entry): Likewise.
15272         (err): New variable.
15273         (script): Don't return anything when an error was encountered.
15274         (ws, returns): Removed rules.
15275         (argument): Disabled concatenated variable support.
15276         (arguments): Remove explicit separators.
15277         (grubcmd): Likewise.
15278         (function): Likewise.
15279         (menuentry): Likewise.
15280         (if): Likewise.
15281         (commands): Likewise.  Add error handling.
15283         * normal/script.c (grub_script_create_cmdline): If
15284         `grub_script_parsed' is 0, assume the parser encountered an error.
15286 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15288         * configure.ac: Add support for EFI. Fix the typo
15289         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15291 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15293         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15294         foreign multibyte characters should be shown correctly.
15296 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15298         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15299         calculation.
15300         (read_config_file): Made it to close file before returning.
15302 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15304         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15305         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15306         video/i386/pc/vbefill.c.
15308         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15309         video/i386/pc/vbefill.c.
15311         * include/grub/video.h (grub_video_blit_format): New enum.
15312         (grub_video_mode_info): Added new member blit_format.
15313         (grub_video_get_blit_format): New function prototype.
15315         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15316         function prototype.
15317         (grub_video_vbe_map_rgb): Likewise.
15318         (grub_video_vbe_unmap_color): Likewise.
15320         * include/grub/i386/pc/vbeblit.h: New file.
15322         * include/grub/i386/pc/vbefill.h: New file.
15324         * video/video.c (grub_video_get_blit_format): New function.
15325         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15326         (grub_video_vbe_map_rgb): Likewise.
15327         (grub_video_vbe_unmap_color): Likewise.
15329         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15330         optimized fills.
15331         (grub_video_vbe_blit_render_target): Changed to use more optimized
15332         blits.
15333         (grub_video_vbe_setup): Added detection for optimized settings.
15334         (grub_video_vbe_create_render_target): Likewise.
15336         * video/i386/pc/vbeblit.c: New file.
15338         * video/i386/pc/vbefill.c: New file.
15340 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15342         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15343         here...
15345         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15346         parsing to support both hex and dec ranges.  If filename was missing
15347         show usage information.
15349 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15351         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15352         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15354         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15355         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15356         (video_mod_SOURCES): Added.
15357         (video_mod_CFLAGS): Likewise.
15358         (video_mod_LDFLAGS): Likewise.
15359         (gfxterm_mod_SOURCES): Likewise.
15360         (gfxterm_mod_CFLAGS): Likewise.
15361         (gfxterm_mod_LDFLAGS): Likewise.
15362         (videotest_mod_SOURCES): Likewise.
15363         (videotest_mod_CFLAGS): Likewise.
15364         (videotest_mod_LDFLAGS): Likewise.
15365         (vesafb_mod_SOURCES): Removed.
15366         (vesafb_mod_CFLAGS): Likewise.
15367         (vesafb_mod_LDFLAGS): Likewise.
15368         (vga_mod_SOURCES): Likewise.
15369         (vga_mod_CFLAGS): Likewise.
15370         (vga_mod_LDFLAGS): Likewise.
15372         * commands/videotest.c: New file.
15374         * font/manager.c (fill_with_default_glyph): Modified to use
15375         grub_font_glyph.
15376         (grub_font_get_glyph): Likewise.
15377         (fontmanager): Renamed from this...
15378         (font_manager): ... to this.
15380         * include/grub/font.h (grub_font_glyph): Added new structure.
15381         (grub_font_get_glyph): Modified to use grub_font_glyph.
15383         * include/grub/misc.h (grub_abs): Added as inline function.
15385         * include/grub/video.h: New file.
15387         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15388         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15389         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15390         (grub_vbe_get_controller_info): Renamed from this...
15391         (grub_vbe_bios_get_controller_info): ... to this.
15392         (grub_vbe_get_mode_info): Renamed from this...
15393         (grub_vbe_bios_get_mode_info): ... to this.
15394         (grub_vbe_set_mode): Renamed from this...
15395         (grub_vbe_bios_set_mode): ... to this.
15396         (grub_vbe_get_mode): Renamed from this...
15397         (grub_vbe_bios_get_mode): ... to this.
15398         (grub_vbe_set_memory_window): Renamed from this...
15399         (grub_vbe_bios_set_memory_window): ... to this.
15400         (grub_vbe_get_memory_window): Renamed from this...
15401         (grub_vbe_bios_get_memory_window): ... to this.
15402         (grub_vbe_set_scanline_length): Renamed from this...
15403         (grub_vbe_set_scanline_length): ... to this.
15404         (grub_vbe_get_scanline_length): Renamed from this...
15405         (grub_vbe_bios_get_scanline_length): ... to this.
15406         (grub_vbe_set_display_start): Renamed from this...
15407         (grub_vbe_bios_set_display_start): ... to this.
15408         (grub_vbe_get_display_start): Renamed from this...
15409         (grub_vbe_bios_get_display_start): ... to this.
15410         (grub_vbe_set_palette_data): Renamed from this...
15411         (grub_vbe_bios_set_palette_data): ... to this.
15412         (grub_vbe_set_pixel_rgb): Removed.
15413         (grub_vbe_set_pixel_index): Likewise.
15415         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15416         from this...
15417         (grub_vbe_bios_get_controller_info): ... to this.
15418         (grub_vbe_get_mode_info): Renamed from this...
15419         (grub_vbe_bios_get_mode_info): ... to this.
15420         (grub_vbe_set_mode): Renamed from this...
15421         (grub_vbe_bios_set_mode): ... to this.
15422         (grub_vbe_get_mode): Renamed from this...
15423         (grub_vbe_bios_get_mode): ... to this.
15424         (grub_vbe_set_memory_window): Renamed from this...
15425         (grub_vbe_bios_set_memory_window): ... to this.
15426         (grub_vbe_get_memory_window): Renamed from this...
15427         (grub_vbe_bios_get_memory_window): ... to this.
15428         (grub_vbe_set_scanline_length): Renamed from this...
15429         (grub_vbe_set_scanline_length): ... to this.
15430         (grub_vbe_get_scanline_length): Renamed from this...
15431         (grub_vbe_bios_get_scanline_length): ... to this.
15432         (grub_vbe_set_display_start): Renamed from this...
15433         (grub_vbe_bios_set_display_start): ... to this.
15434         (grub_vbe_get_display_start): Renamed from this...
15435         (grub_vbe_bios_get_display_start): ... to this.
15436         (grub_vbe_set_palette_data): Renamed from this...
15437         (grub_vbe_bios_set_palette_data): ... to this.
15438         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15439         getting corrupted after calling it.  Added more pushes and pops.
15440         (grub_vbe_bios_set_mode): Likewise.
15441         (grub_vbe_bios_get_mode): Likewise.
15442         (grub_vbe_bios_get_memory_window): Likewise.
15443         (grub_vbe_bios_set_scanline_length): Likewise.
15444         (grub_vbe_bios_get_scanline_length): Likewise.
15445         (grub_vbe_bios_get_display_start): Likewise.
15446         (grub_vbe_bios_set_palette_data): Likewise.
15448         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15449         (cl_insert): Likewise.
15450         (cl_delete): Likewise.
15452         * term/gfxterm.c: New file.
15454         * term/i386/pc/vesafb.c: Removed file.
15456         * video/video.c: New file.
15458         * video/i386/pc/vbe.c (real2pm): Added new function.
15459         (grub_video_vbe_draw_pixel): Likewise.
15460         (grub_video_vbe_get_video_ptr): Likewise.
15461         (grub_video_vbe_get_pixel): Likewise
15462         (grub_video_vbe_init): Likewise.
15463         (grub_video_vbe_fini): Likewise.
15464         (grub_video_vbe_setup): Likewise.
15465         (grub_video_vbe_get_info): Likewise.
15466         (grub_video_vbe_set_palette): Likewise.
15467         (grub_video_vbe_get_palette): Likewise.
15468         (grub_video_vbe_set_viewport): Likewise.
15469         (grub_video_vbe_get_viewport): Likewise.
15470         (grub_video_vbe_map_color): Likewise.
15471         (grub_video_vbe_map_rgb): Likewise.
15472         (grub_video_vbe_map_rgba): Likewise.
15473         (grub_video_vbe_unmap_color): Likewise.
15474         (grub_video_vbe_fill_rect): Likewise.
15475         (grub_video_vbe_blit_glyph): Likewise.
15476         (grub_video_vbe_blit_bitmap): Likewise.
15477         (grub_video_vbe_blit_render_target): Likewise.
15478         (grub_video_vbe_scroll): Likewise.
15479         (grub_video_vbe_swap_buffers): Likewise.
15480         (grub_video_vbe_create_render_target): Likewise.
15481         (grub_video_vbe_delete_render_target): Likewise.
15482         (grub_video_vbe_set_active_render_target): Likewise.
15483         (grub_vbe_set_pixel_rgb): Remove function.
15484         (grub_vbe_set_pixel_index): Likewise.
15485         (index_color_mode): Remove static variable.
15486         (active_mode): Likewise.
15487         (framebuffer): Likewise.
15488         (bytes_per_scan_line): Likewise.
15489         (grub_video_vbe_adapter): Added new static variable.
15490         (framebuffer): Likewise.
15491         (render_target): Likewise.
15492         (initial_mode): Likewise.
15493         (mode_in_use): Likewise.
15494         (mode_list): Likewise.
15496 2006-03-10  Marco Gerards  <marco@gnu.org>
15498         * configure.ac (AC_INIT): Bumped to 1.93.
15500         * DISTLIST: Added `include/grub/hfs.h'.
15502 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15504         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15505         18H, which might help the BIOS falling back to next boot media.
15507 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15509         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15510         Poe Chen <poe.poechen@gmail.com>.
15512 2006-01-17  Marco Gerards  <marco@gnu.org>
15514         * include/grub/normal.h: Include <grub/script.h>.
15515         (grub_command_list): Removed struct.
15516         (grub_command_list_t): Removed type.
15517         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15518         members `commands' and `sourcecode'.
15519         * include/grub/script.h: Add inclusion guards.
15520         (grub_script_cmd_menuentry): New struct.
15521         (grub_script_execute_menuentry): New prototype.
15522         (grub_script_lexer_record_start): Likewise.
15523         (grub_script_lexer_record_stop): Likewise.
15524         * normal/execute.c (grub_script_execute_menuentry): New function.
15525         * normal/lexer.c (record, recording, recordpos, recordlen): New
15526         variables.
15527         (grub_script_lexer_record_start): New function.
15528         (grub_script_lexer_record_stop): Likewise.
15529         (recordchar): Likewise.
15530         (nextchar): Likewise.
15531         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15532         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15533         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15534         (current_menu): New variable.
15535         (free_menu): Mainly rewritten.
15536         (grub_normal_menu_addentry): New function.
15537         (read_config_file): Rewritten.
15538         * normal/menu.c (run_menu_entry): Mainly rewritten.
15539         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15540         the menu entry.
15541         (run): Mainly rewritten.
15542         * normal/parser.y (menu_entry): New variable.
15543         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15544         (menuentry): New rule.
15545         (command): Add `menuentry'.
15546         (if_statement): Allow additional returns before `fi'.
15547         * normal/script.c (grub_script_create_cmdmenu): New function.
15549 2006-01-03  Marco Gerards  <marco@gnu.org>
15551         * INSTALL: GNU Bison is required.
15552         * configure.ac: Rewritten the test to detect Bison.
15553         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15554         <xun.sun.cn@gmail.com>.
15556 2006-01-03  Marco Gerards  <marco@gnu.org>
15558         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15559         the HFS+ filesystem to filesystem blocks.
15560         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15561         GCC warning is silenced.
15563 2006-01-03  Marco Gerards  <marco@gnu.org>
15565         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15566         read from disk from big endian to host byte order.
15568 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15570         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15571         documentation.
15572         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15573         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15574         embedded HFS+ filesystem.
15575         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15576         (grub_hfs_sblock): Move from here...
15577         * include/grub/hfs.h: To here...  New file.
15578         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15579         documentation.
15580         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15581         New macros.
15582         (grub_hfsplus_volheader): Change type of member `magic' to
15583         `grub_uint16_t'.
15584         (grub_hfsplus_data): Add new member `embedded_offset'.
15585         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15586         returned block.
15587         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15588         Calculate the offset.
15590 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15592         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15593         Removed.
15594         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15596 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15598         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15599         ENV->NAME is NULL after allocating ENV->VALUE.
15601 2005-12-25  Marco Gerards  <marco@gnu.org>
15603         * kern/env.c (grub_env_set): Rewritten the error handling code.
15605 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15607         * geninit.sh: Made more robust, and more portable.
15609 2005-12-25  Marco Gerards  <marco@gnu.org>
15611         Add support for Apple HFS+ filesystems.
15613         * fs/hfsplus.c: New file.
15615         * DISTLIST: Added `fs/hfsplus.c'.
15617         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15618         (hfsplus_mod_SOURCES): New variable.
15619         (hfsplus_mod_CFLAGS): Likewise.
15620         (hfsplus_mod_LDFLAGS): Likewise.
15621         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15622         (grub_setup_SOURCES): Likewise.
15623         (grub_mkdevicemap_SOURCES): Likewise.
15624         (grub_emu_SOURCES): Likewise.
15625         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15627         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15629         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15631 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15633         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15634         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15635         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15636         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15637         normal/lexer.c, normal/parser.y, normal/script.c, and
15638         partmap/gpt.c.
15639         Removed kern/sparc64/cache.c.
15641         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15642         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15643         grub_emu_init.c.
15645         * configure.ac (AC_INIT): Bumped to 1.92.
15647 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15649         * kern/err.c (grub_error_push): Added new function to support error
15650         stacks.
15651         (grub_error_pop): Likewise.
15652         (grub_error_stack_items): New local variable to support error stacks.
15653         (grub_error_stack_pos): Likewise.
15654         (grub_error_stack_assert): Likewise.
15655         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15656         stack depth.
15657         (grub_print_error): Added support to print errors from error stack.
15659         * include/grub/err.h (grub_error_push): Added function prototype.
15660         (grub_error_pop): Likewise.
15662 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15664         * configure.ac: Accept `powerpc64' as host_cpu.
15665         (amd64): Rename to `biarch32'.
15667         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15668         non-cacheline-aligned addresses.
15670         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15671         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15672         if `size' is non-zero.
15674 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15676         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15677         and `cd' to make sure the filename is not prefixed with a
15678         directory name.
15679         (pkgdata_MODULES): Add `gpt.mod'.
15680         (gpt_mod_SOURCES): New variable.
15681         (gpt_mod_CFLAGS): Likewise.
15682         (gpt_mod_LDFLAGS): Likewise.
15684         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15686         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15687         New macro.
15689         * partmap/gpt.c: New file.
15691         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15692         GPT partition map is detected.
15694 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15696         * commands/i386/pc/play.c: New file.
15697         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15698         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15699         macros.
15701 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
15703         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15704         ((unused))' to silence gcc warning.
15706 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
15708         * configure.ac: Correct `AC_PROG_YACC' test.
15710 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15712         * util/powerpc/ieee1275/grub-install.in: Run the mount point
15713         check before installing files.
15715 2005-11-22  Mike Small  <smallm@panix.com>
15717         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15718         number regex so multidigit numbers are recognized correctly.
15720 2005-11-22  Mike Small  <smallm@panix.com>
15722         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15723         debugging message before attempting to claim memory.
15724         (grub_rescue_cmd_initrd): Add a claim debugging message and try
15725         multiple addresses in case of failure.
15727 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15729         * term/tparm.c (get_space): Remove empty `if' statement.
15731         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15733         * kern/parser.c (check_varstate): Rename `state' to 's'.
15735 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15737         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
15738         variable definitions to the beginning of each function.  Sort stack
15739         variables by size.
15740         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
15741         `buf' argument to `char *'.
15743 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15745         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15746         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15747         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15748         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15749         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15750         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15751         configfile.mod, search.mod, gzio.mod and test.mod.
15752         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15753         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15754         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15755         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15756         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15757         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15758         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15759         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15760         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15761         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15762         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15763         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15764         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15765         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15766         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15767         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15768         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15769         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15770         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15771         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15772         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15773         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15774         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15776         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15777         `grep --include'.
15778         (pkgdata_MODULES): Add test.mod.
15780 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15782         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
15783         appending to variables with "+=".
15784         (PModule): Use full pathname to generate *.lst filenames.
15786         * Makefile.in: Fixed list rules moved from genmk.rb.
15787         (.DELETE_ON_ERROR): New special target.
15788         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15790         * conf/i386-pc.rmk: Include conf/common.mk.
15791         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15792         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15793         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15794         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15795         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15796         configfile.mod, search.mod, gzio.mod and test.mod.
15797         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15798         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15799         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15800         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15801         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15802         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15803         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15804         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15805         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15806         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15807         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15808         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15809         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15810         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15811         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15812         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15813         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15814         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15815         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15816         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15817         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15818         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15819         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15820         here...
15821         * conf/common.rmk: ... to here.  New file.
15823         * conf/common.mk: New file.
15825 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
15827         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15828         (grub_script.tab.c): ... here.
15830         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15831         (grub_script.tab.c): ... here.
15833         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15834         (grub_script.tab.c): ... here.
15836         * normal/command.c (grub_command_find): Fixed a memory leak of
15837         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15839 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15841         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15842         "@" which marks the start of a comment on ARM.
15843         (VARIABLE): Likewise.
15845 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15847         Add support for Linux/ADFS partition tables.
15849         * partmap/acorn.c: New file.
15851         * include/grub/acorn_filecore.h: Likewise.
15853         * DISTLIST: Added `partmap/acorn.c' and
15854         `include/grub/acorn_filecore.h'.
15856         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15857         `partmap/acorn.c'.
15858         (pkgdata_MODULES): Add `acorn.mod'.
15859         (acorn_mod_SOURCES): New variable.
15860         (acorn_mod_CFLAGS): Likewise.
15862         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15863         `partmap/acorn.c'.
15864         (pkgdata_MODULES): Add `acorn.mod'.
15865         (acorn_mod_SOURCES): New variable.
15866         (acorn_mod_CFLAGS): Likewise.
15868         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15869         (pkgdata_MODULES): Add `acorn.mod'.
15870         (acorn_mod_SOURCES): New variable.
15871         (acorn_mod_CFLAGS): Likewise.
15872         (acorn_mod_LDFLAGS): Likewise.
15874         * include/types.h (grub_disk_addr_t): New typedef.
15876 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
15878         * geninit.sh: New file.
15880         * geninitheader.sh: Likewise.
15882         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15883         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15884         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15885         * commands/configfile.c (grub_configfile_init)
15886         (grub_configfile_fini): Likewise.
15887         * commands/default.c (grub_default_init, grub_default_fini):
15888         Likewise.
15889         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15890         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15891         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15892         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15893         Likewise.
15894         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15895         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15896         Likewise.
15897         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15898         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15899         Likewise.
15900         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15901         Likewise.
15902         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15903         Likewise.
15904         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15905         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15906         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15907         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15908         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15909         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15910         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15911         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15912         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15913         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15914         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15915         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15916         * partmap/amiga.c (grub_amiga_partition_map_init)
15917         (grub_amiga_partition_map_fini): Likewise.
15918         * partmap/apple.c (grub_apple_partition_map_init)
15919         (grub_apple_partition_map_fini): Likewise.
15920         * partmap/pc.c (grub_pc_partition_map_init)
15921         (grub_pc_partition_map_fini): Likewise.
15922         * partmap/sun.c (grub_sun_partition_map_init,
15923         grub_sun_partition_map_fini): Likewise.
15924         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15925         Likewise.
15927         * util/grub-emu.c: Include <grub_modules_init.h>.
15928         (main): Don't initialize and de-initialize any modules directly,
15929         use `grub_init_all' and `grub_fini_all' instead.
15931         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15932         `grub_vesafb_mod_init'.
15933         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
15934         all users.
15935         * term/i386/pc/vga.c (grub_vga_init): Renamed to
15936         `grub_vga_mod_init'.  Updated all users.
15937         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15939         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15940         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15941         rules.
15943         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15944         Generate a function to initialize the module in utilities.
15945         Updated all callers.
15946         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
15947         initialize the module in utilities.  Updated all callers.
15949 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15951         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15952         escape sequence and a literal ^L to clear the screen.
15954         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15955         when returning from Open Firmware.
15957 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15959         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15960         (grub_ofconsole_height): Likewise.
15961         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15962         manually insert a '\n'.
15963         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15964         `grub_ofconsole_height'.  Return early if these are already set.
15966 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
15968         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15969         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15970         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15971         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15972         and `normal/script.c'.
15973         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15974         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15975         (test_mod_SOURCES): New variable.
15976         (test_mod_CFLAGS): Likewise.
15977         (test_mod_LDFLAGS): Likewise.
15978         (pkgdata_MODULES): Add `test.mod'.
15979         (grub_script.tab.c): New rule.
15980         (grub_script.tab.h): Likewise.
15982 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
15984         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15985         `commands/test.c', `normal/execute.c', `normal/lexer.c',
15986         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15987         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15988         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15989         (test_mod_SOURCES): New variable.
15990         (test_mod_CFLAGS): Likewise.
15991         (pkgdata_MODULES): Add `test.mod'.
15992         (grub_script.tab.c): New rule.
15993         (grub_script.tab.h): Likewise.
15995 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
15997         Add initial scripting support.
15999         * commands/test.c: New file.
16000         * include/grub/script.h: Likewise.
16001         * normal/execute.c: Likewise.
16002         * normal/function.c: Likewise.
16003         * normal/lexer.c: Likewise.
16004         * normal/parser.y: Likewise.
16005         * normal/script.c: Likewise.
16007         * configure.ac: Add `AC_PROG_YACC' test.
16009         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16010         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16011         `normal/function.c' and `normal/script.c'.
16012         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16013         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16014         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16015         variables.
16016         (pkgdata_MODULES): Add `test.mod'.
16017         (grub_script.tab.c): New rule.
16018         (grub_script.tab.h): Likewise.
16020         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16022         * include/grub/normal.h (grub_test_init): New prototype.
16023         (grub_test_fini): Likewise.
16025         * normal/command.c: Include <grub/script.h>.
16026         (grub_command_execute): Rewritten.
16028         * util/grub-emu.c (main): Call `grub_test_init' and
16029         `grub_test_fini'.
16031 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16033         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16034         to 0.
16035         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16036         there are no pending characters.
16038 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16040         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16041         `grub_strndup' to drop device arguments. Replace unnecessary
16042         `grub_strndup' with `grub_strdup'.
16044 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16046         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16047         `debug' environment variable has been set.
16049 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16051         * Makefile.in (install-local): Use $(DATA).
16052         (uninstall): Likewise.
16053         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16054         (sbin_UTILITIES): ... to here.
16055         (sbin_SCRIPTS): New variable.
16056         (grub_install_SOURCES): New variable.
16057         * util/powerpc/ieee1275/grub-install.in: New file.
16058         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16059         variable.
16060         (add_segments): Call `grub_util_get_path'.
16062 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16064         From Timothy Baldwin:
16065         * commands/ls.c (grub_ls_list_files): Close FILE with
16066         grub_file_close.
16067         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16069 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16071         * include/grub/parser.h: New file.
16073         * kern/parser.c: Likewise.
16075         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16076         (grub_setup_SOURCES): Likewise.
16077         (grub_probefs_SOURCES): Likewise.
16078         (grub_emu_SOURCES): Likewise.
16079         (kernel_img_HEADERS): Add `parser.h'.
16081         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16082         (grub_emu_SOURCES): Add `kern/parser.c'.
16083         (grubof_SOURCES): Likewise.
16085         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16086         (grubof_SOURCES): Add `kern/parser.c'.
16088         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16090         * kern/misc.c (grub_split_cmdline): Removed function.
16092         * kern/rescue.c: Include <grub/parser.h>.
16093         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16094         of `grub_split_cmdline'.
16096         * normal/command.c: Include <grub/parser.h>.
16097         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16098         of `grub_split_cmdline'.
16100         * normal/completion.c: Include <grub/parser.h>.
16101         (cmdline_state): New variable.
16102         (iterate_dir): End the filename with a quote depending on the
16103         command line state.
16104         (get_state): new function.
16105         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16106         split the arguments and determine the current argument.  When the
16107         argument string is not quoted, escape all spaces.
16109 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16111         * normal/sparc64/setjmp.S: New file.
16113 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16115         * include/grub/sparc64/libgcc.h: New file.
16116         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16117         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16118         normal/sparc64/setjmp.c.
16120 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16122         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16123         * kern/sparc64/cache.S: New file.
16124         * kern/sparc64/cache.c: Removed.
16125         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16126         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16127         -mtune=ultrasparc.
16128         (COMMON_LDFLAGS): Add -melf64_sparc.
16129         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16130         (grubof_SOURCES): Use cache.S instead of cache.c.
16131         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16132         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16133         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16134         commented though.
16135         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16136         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16137         (linux_mod_CFLAGS): Commented out.
16138         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16139         out because module isn't built.
16140         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16141         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16142         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16143         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16144         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16145         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16146         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16147         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16148         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16149         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16150         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16151         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16152         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16153         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16155 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16157         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16158         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16159         longer, because HFS should not be used on PC.
16161 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16163         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16164         consistently within the loop.
16166 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16168         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16169         directory can not be read.
16171 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16173         * configure.ac (AC_INIT): Increase the version number to 1.91.
16175         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16176         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16177         term/i386/pc/serial.c.
16179 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16181         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16182         file size must be permitted.
16184         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16185         between %ah and %al.
16187 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16189         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16190         grub_uint64_t.
16191         Call the hook with a NUL-terminated filename.
16192         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16193         grub_cpu_to_be32.
16195         * kern/term.c (cursor_state): New variable.
16196         (grub_term_set_current): Reset the cursor state on a new
16197         terminal.
16198         (grub_setcursor): Rewritten to use CURSOR_STATE.
16199         (grub_getcursor): New function.
16201         * include/grub/term.h (grub_getcursor): New prototype.
16203         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16204         integers on ARM. Reported by Timothy Baldwin
16205         <T.E.Baldwin99@members.leeds.ac.uk>.
16207 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16209         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16210         allocated.
16211         (grub_sfs_dir): Likewise.
16213 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16215         Add support for the SFS filesystem.
16217         * fs/sfs.c: New file.
16219         * DISTLIST: Added `fs/sfs.c'.
16221         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16222         (grub_probefs_SOURCES): Likewise.
16223         (grub_emu_SOURCES): Likewise.
16224         (pkgdata_MODULES): Add `sfs.mod'.
16225         (sfs_mod_SOURCES): New variable.
16226         (sfs_mod_CFLAGS): Likewise.
16227         (sfs_mod_LDFLAGS): Likewise.
16229         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16230         (pkgdata_MODULES): Add `sfs.mod'.
16231         (sfs_mod_SOURCES): New variable.
16232         (sfs_mod_CFLAGS): Likewise.
16234         * util/grub-emu.c (main): Call `grub_sfs_init' and
16235         `grub_sfs_fini'.
16237         * include/grub/fs.h (grub_sfs_init): New prototype.
16238         (grub_sfs_fini): Likewise.
16240 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16242         Add support for the AFFS filesystem.
16244         * fs/affs.c: New file.
16246         * DISTLIST: Added `fs/affs.c'.
16248         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16249         (grub_probefs_SOURCES): Likewise.
16250         (grub_emu_SOURCES): Likewise.
16251         (pkgdata_MODULES): Add `affs.mod'.
16252         (affs_mod_SOURCES): New variable.
16253         (affs_mod_CFLAGS): Likewise.
16254         (affs_mod_LDFLAGS): Likewise.
16256         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16257         (pkgdata_MODULES): Add `affs.mod'.
16258         (affs_mod_SOURCES): New variable.
16259         (affs_mod_CFLAGS): Likewise.
16261         * util/grub-emu.c (main): Call `grub_affs_init' and
16262         `grub_affs_fini'.
16264         * include/grub/fs.h (grub_affs_init): New prototype.
16265         (grub_affs_fini): Likewise.
16267 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16269         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16271 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16273         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16274         `-m32' to CFLAGS.
16276         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16277         linking.
16279         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16280         (COMMON_LDFLAGS): New variable.
16281         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16282         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16283         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16284         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16285         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16286         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16287         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16288         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16289         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16290         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16291         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16292         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16293         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16294         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16295         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16296         variables.
16297         (normal_mod_ASFLAGS): Add `-m32'.
16299         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16300         (grub_host_size_t, grub_host_ssize_t): New types.
16301         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16302         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16303         `GRUB_HOST_SIZEOF_VOID_P'.
16305         * include/grub/kernel.h (struct grub_module_header): Type of
16306         member offset changed to `grub_host_off_t'.  Type of member size
16307         changed to `grub_host_size_t'.
16308         (struct grub_module_info): Type of member offset changed to
16309         `grub_host_off_t'.  Type of member size changed to
16310         `grub_host_size_t'.
16312 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16314         Make GRUB's kernel compliant to Multiboot Specification.
16316         * kern/i386/pc/startup.S (multiboot_header): New label.
16317         (multiboot_entry): Likewise.
16318         (multiboot_trampoline): Likewise.
16320         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16321         Increased to 0x4A0.
16323         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16324         put parentheses after a question mark.
16325         [!GRUB_UTIL] (my_mod): New variable.
16327         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16329 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16331         Adds support for the XFS filesystem.  Btrees are not supported
16332         yet.
16334         * fs/xfs.c: New file.
16336         * DISTLIST: Added `fs/xfs.c'.
16338         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16339         (grub_probefs_SOURCES): Likewise.
16340         (grub_emu_SOURCES): Likewise.
16341         (pkgdata_MODULES): Add `xfs.mod'.
16342         (xfs_mod_SOURCES): New variable.
16343         (xfs_mod_CFLAGS): Likewise.
16345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16346         (pkgdata_MODULES): Add `xfs.mod'.
16347         (xfs_mod_SOURCES): New variable.
16348         (xfs_mod_CFLAGS): Likewise.
16350         * util/grub-emu.c (main): Call `grub_xfs_init' and
16351         `grub_xfs_fini'.
16353         * include/grub/fs.h (grub_xfs_init): New prototype.
16354         (grub_xfs_fini): Likewise.
16357 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16359         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16360         color modes, allow greater than 16 colors to be configured as
16361         a default palette.
16363 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16365         * normal/completion.c (complete_arguments): Add the qualifier
16366         const into OPTIONS.
16368         From Omniflux <omniflux+lists@omniflux.com>:
16369         * include/grub/terminfo.h: New file.
16370         * include/grub/tparm.h: Likewise.
16371         * include/grub/i386/pc/serial.h: Likewise.
16372         * term/terminfo.c: Likewise.
16373         * term/tparm.c: Likewise.
16374         * term/i386/pc/serial.c: Likewise.
16375         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16376         serial.mod.
16377         (terminfo_mod_SOURCES): New variable.
16378         (terminfo_mod_CFLAGS): Likewise.
16379         (serial_mod_SOURCES): Likewise.
16380         (serial_mod_CFLAGS): Likewise.
16382 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16384         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16385         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16386         and kern/powerpc/ieee1275/cmain.c, respectively.
16388         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16389         * kern/powerpc/ieee1275/crt0.S: ... here.
16391         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16392         * kern/powerpc/ieee1275/cmain.c: ... here.
16394         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16395         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16396         instead of boot/powerpc/ieee1275/crt0.S and
16397         boot/powerpc/ieee1275/cmain.c, respectively.
16399         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16400         sectors. It was not used anyway.
16402 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16404         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16405         `unused parameter' warning.
16407 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16409         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16410         function.
16411         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16412         getcharwidth.
16414 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16416         * include/grub/normal.h (enum grub_completion_type): Added
16417         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16419         * normal/cmdline.c (print_completion): Handle
16420         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16421         * normal/menu_entry.c (store_completion): Likewise.
16423         * normal/completion.c (complete_arguments): New function.
16424         (grub_normal_do_completion): Call `complete_arguments' when the
16425         current words start with a dash.
16427 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16429         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16430         `gzio.mod' instead of `io.mod').
16432 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16434         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16435         (DISTDIRS): Added io and video.
16436         Rewrite the search routine to make an output consistently.
16438         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16439         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16440         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16441         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16442         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16443         util/powerpc/ieee1275/misc.c.
16445         * include/grub/gzio.h: New file.
16446         * io/gzio.c: Likewise.
16448         * kern/file.c (grub_file_close): Call grub_device_close only if
16449         FILE->DEVICE is not NULL.
16451         * include/grub/mm.h [!NULL] (NULL): New macro.
16453         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16455         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16456         (pkgdata_MODULES): Added gzio.mod.
16457         (gzio_mod_SOURCES): New variable.
16458         (gzio_mod_CFLAGS): Likewise.
16460         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16461         (pkgdata_MODULES): Added gzio.mod.
16462         (gzio_mod_SOURCES): New variable.
16463         (gzio_mod_CFLAGS): Likewise.
16465         * commands/cat.c: Include grub/gzio.h.
16466         (grub_cmd_cat): Use grub_gzfile_open instead of
16467         grub_file_open.
16469         * commands/cmp.c: Include grub/gzio.h.
16470         (grub_cmd_cmp): Use grub_gzfile_open instead of
16471         grub_file_open.
16473         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16474         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16475         grub_file_open.
16476         (grub_rescue_cmd_module): Likewise.
16478 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16480         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16481         kern/sparc64/ieee1275/init.c because it contains _start.
16482         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16484 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16486         * configure.ac: Add support for sparc64 host with ieee1275
16487         firmware.
16488         * configure: Generated from configure.ac.
16489         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16490         instead of int.
16491         (grub_ofdisk_read): Likewise.
16492         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16493         pointers as (void *) to remove a warning.
16494         (grub_ofdisk_close): Likewise.
16495         (grub_ofdisk_read): Likewise.
16496         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16497         returns, so make it return void to remove a warning.
16498         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16499         Corresponding prototype change.
16500         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16501         values, and cast the pointers as (void *) to remove a warning.
16502         (grub_mm_dump): Likewise.
16503         * conf/sparc64-ieee1275.mk: New file.
16504         * conf/sparc64-ieee1275.rmk: Likewise.
16505         * include/grub/sparc64/setjmp.h: Likewise.
16506         * include/grub/sparc64/types.h: Likewise.
16507         * include/grub/sparc64/ieee1275/console.h: Likewise.
16508         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16509         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16510         * include/grub/sparc64/ieee1275/time.h: Likewise.
16511         * kern/sparc64/cache.c: Likewise.
16512         * kern/sparc64/dl.c: Likewise.
16513         * kern/sparc64/ieee1275/init.c: Likewise.
16514         * kern/sparc64/ieee1275/openfw.c: Likewise.
16516 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16518         * util/console.c (grub_ncurses_putchar): If C is greater than
16519         0x7f, set C to a question mark.
16520         (grub_ncurses_getcharwidth): New function.
16521         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16522         getcharwidth.
16524         * normal/menu.c (print_entry): Made aware of Unicode. First,
16525         convert TITLE to UCS-4, and predict the cursor position by
16526         grub_getcharwidth.
16528         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16529         const to SRC.
16530         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16532 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16534         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16535         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16536         grub_strcat.
16538         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16539         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16540         grub_strcpy and grub_strlen. Take it into account that a space
16541         character is inserted as a delimiter.
16543 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16545         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16546         invalid magic in the error.
16548         * commands/search.c: New file.
16550         * util/grub-emu.c (main): Call grub_search_init and
16551         grub_search_fini.
16553         * kern/rescue.c (grub_rescue_print_disks): Removed.
16554         (grub_rescue_print_devices): New function.
16555         (grub_rescue_cmd_ls): Use grub_device_iterate with
16556         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16557         grub_rescue_print_disks.
16559         * kern/partition.c (grub_partition_iterate): Return the result of
16560         PARTMAP->ITERATE instead of GRUB_ERRNO.
16562         * kern/device.c: Include grub/partition.h.
16563         (grub_device_iterate): New function.
16565         * include/grub/partition.h (grub_partition_iterate): Return int
16566         instead of grub_err_t.
16568         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16569         prototype.
16570         [GRUB_UTIL] (grub_search_fini): Likewise.
16572         * include/grub/device.h (grub_device_iterate): New prototype.
16574         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16575         commands/search.c.
16576         (pkgdata_MODULES): Added search.mod.
16577         (search_mod_SOURCES): New variable.
16578         (search_mod_CFLAGS): Likewise.
16580         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16581         (pkgdata_MODULES): Added search.mod.
16582         (search_mod_SOURCES): New variable.
16583         (search_mod_CFLAGS): Likewise.
16585         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16586         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16587         All callers changed.
16589         * DISTLIST: Added commands/search.c.
16591 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16593         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16594         conversion.
16595         (grub_getcharwidth): New function.
16597         * kern/misc.c (grub_utf8_to_ucs4): New function.
16599         * include/grub/term.h (struct grub_term): Added a new member
16600         "getcharwidth".
16601         (grub_getcharwidth): New prototype.
16603         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16605         * term/i386/pc/console.c (map_char): New function. Segregated from
16606         grub_console_putchar.
16607         (grub_console_putchar): Use map_char.
16608         (grub_console_getcharwidth): New function.
16609         (grub_console_term): Specified grub_console_getcharwidth as
16610         getcharwidth.
16612         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16613         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16615         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16616         GRUB_ERRNO.
16617         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16618         on grub_strtoul completely.
16619         (write_char): Declare local variables in the beginning of the
16620         function.
16621         (grub_vesafb_getcharwidth): New function.
16622         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16623         getcharwidth.
16625 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16627         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16628         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16629         commands/i386/pc/vbetest.c.
16631         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16632         call grub_vbe_get_controller_info again, because the returned
16633         information is volatile.
16634         (grub_vbe_set_video_mode): Mostly rewritten.
16635         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16636         grub_vbe_status_t correctly.
16637         (grub_vbe_get_video_mode_info): Likewise.
16638         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16639         several if statements.
16641         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16642         * commands/i386/pc/vbeinfo.c: ... this.
16644         * commands/i386/pc/vbe_test.c: Renamed to ...
16645         * commands/i386/pc/vbetest.c: ... this.
16647         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16648         ...
16649         (grub_cmd_vbeinfo): ... this. Save video modes before
16650         iterating. Skip a video mode, if it is not available, not enough
16651         information is given or it is monochrome. Show the memory
16652         model. Leave the interpretation of MODEVAR to grub_strtoul
16653         completely.
16654         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16655         (GRUB_MOD_FINI): Likewise.
16657         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16658         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16659         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16660         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16661         grub_strtoul completely.
16662         (real2pm): Removed.
16663         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16664         (GRUB_MOD_FINI): Likewise.
16666         * normal/misc.c: Include grub/mm.h.
16668         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16669         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16670         (vbe_list_modes_mod_SOURCES): Removed.
16671         (vbe_list_modes_mod_CFLAGS): Likewise.
16672         (vbe_test_mod_SOURCES): Likewise.
16673         (vbe_test_mod_CFLAGS): Likewise.
16674         (vbeinfo_mod_SOURCES): New variable.
16675         (vbeinfo_mod_CFLAGS): Likewise.
16676         (vbetest_mod_SOURCES): Likewise.
16677         (vbetest_mod_CFLAGS): Likewise.
16679 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16681         * normal/misc.c: New file.
16683         * DISTLIST: Added normal/misc.c.
16685         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16686         DISK to HOOK. Call HOOK with DISK.
16687         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16688         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16689         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16691         * normal/menu_entry.c (struct screen): Added a new member
16692         "completion_shown".
16693         (completion_buffer): New global variable.
16694         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16695         (store_completion): New function.
16696         (complete): Likewise.
16697         (clear_completions): Likewise.
16698         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16699         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16700         a tab, call complete.
16702         * normal/completion.c (disk_dev): Removed.
16703         (print_simple_completion): Likewise.
16704         (print_partition_completion): Likewise.
16705         (print_func): New global variable.
16706         (add_completion): Do not take the arguments WHAT or PRINT any
16707         longer. Added a new argument TYPE. Instead of printing directly,
16708         call PRINT_FUNC if not NULL.
16709         All callers changed.
16710         (complete_device): Use a local variable DEV instead of
16711         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16712         (grub_normal_do_completion): Take a new argument HOOK. Do not
16713         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16714         empty string, return NULL instead.
16715         All callers changed.
16717         * normal/cmdline.c (print_completion): New function.
16719         * kern/partition.c (grub_partition_iterate): Add an argument DISK
16720         to HOOK.
16721         All callers changed.
16723         * kern/disk.c (grub_print_partinfo): Removed.
16725         * include/grub/partition.h (struct grub_partition_map): Add a new
16726         argument DISK into HOOK of ITERATE.
16727         (grub_partition_iterate): Add a new argument DISK to HOOK.
16729         * include/grub/normal.h (enum grub_completion_type): New enum.
16730         (grub_completion_type_t): New type.
16731         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16732         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16733         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16734         (GRUB_COMPLETION_TYPE_FILE): Likewise.
16735         (grub_normal_do_completion): Added a new argument HOOK.
16736         (grub_normal_print_device_info): New prototype.
16738         * include/grub/disk.h (grub_print_partinfo): Removed.
16740         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16741         (normal_mod_SOURCES): Likewise.
16742         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16743         (normal_mod_SOURCES): Likewise.
16745         * commands/ls.c (grub_ls_list_disks): Use
16746         grub_normal_print_device_info instead of grub_print_partinfo. Free
16747         PNAME.
16748         (grub_ls_list_files): Use grub_normal_print_device_info instead of
16749         duplicating the code.
16751 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16753         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16754         follow GCS more precisely.
16755         * commands/i386/pc/vbe_test.c: Likewise.
16756         * include/grub/i386/pc/vbe.h: Likewise.
16757         * term/i386/pc/vesafb.c: Likewise.
16758         * video/i386/pc/vbe.c: Likewise.
16760 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16762         * DISTLIST: Added term/i386/pc/vesafb.c
16763         DISTLIST: Added video/i386/pc/vbe.c
16764         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16765         DISTLIST: Added commands/i386/pc/vbe_test.c.
16766         * commands/i386/pc/vbe_list_modes.c: New file.
16767         * commands/i386/pc/vbe_test.c: Likewise.
16768         * term/i386/pc/vesafb.c: Likewise.
16769         * video/i386/pc/vbe.c: Likewise.
16770         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16771         (grub_vbe_probe) Added prototype.
16772         (grub_vbe_set_video_mode) Likewise.
16773         (grub_vbe_get_video_mode) Likewise.
16774         (grub_vbe_get_video_mode_info) Likewise.
16775         (grub_vbe_set_pixel_rgb) Likewise.
16776         (grub_vbe_set_pixel_index) Likewise.
16777         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16778         (pkgdata_MODULES): Added vesafb.mod.
16779         (pkgdata_MODULES): Added vbe_list_modes.mod.
16780         (pkgdata_MODULES): Added vbe_test.mod.
16781         (vbe_mod_SOURCES): Added.
16782         (vbe_mod_CFLAGS): Likewise.
16783         (vesafb_mod_SOURCES): Likewise.
16784         (vesafb_mod_CFLAGS): Likewise.
16785         (vbe_list_modes_mod_SOURCES): Likewise.
16786         (vbe_list_modes_mod_CFLAGS): Likewise.
16787         (vbe_test_mod_SOURCES): Likewise.
16788         (vbe_test_mod_CFLAGS): Likewise.
16790 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
16792         * normal/command.c (grub_command_execute): If INTERACTIVE is
16793         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16794         CMDLINE. Disable the pager if INTERACTIVE is true.
16795         All callers are changed.
16797         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16798         before reading a config file.
16799         * normal/main.c (read_config_file): Even if a command is not
16800         found, register it if it is within an entry.
16802         * util/grub-emu.c: Include sys/types.h and unistd.h.
16803         (options): Added --hold.
16804         (struct arguments): Added a new member "hold".
16805         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16806         missing.
16807         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16808         cleared by a debugger, if it is not zero.
16810         * include/grub/normal.h (grub_command_execute): Add an argument
16811         INTERACTIVE.
16813 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
16815         * DISTLIST: Added include/grub/i386/pc/vbe.h.
16817 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
16819         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16820         program with another one, because the old one didn't detect a bug
16821         in gcc-3.4. Always use regparm 2, because the new test is still
16822         not enough for gcc-4.0. Someone must investigate a simple test
16823         case which detects a bug in gcc-4.0.
16825 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
16827         * DISTLIST: Added normal/completion.c.
16829         * normal/completion.c: New file.
16831         * term/i386/pc/console.c (grub_console_getwh): New function.
16832         (grub_console_term): Assign grub_console_getwh to getwh.
16834         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16835         function is defined in normal/completion.c as
16836         grub_normal_do_completion.
16837         (grub_cmdline_get): Use grub_normal_do_completion instead of
16838         grub_tab_complete.
16840         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16841         returns non-zero, otherwise return 0.
16842         (grub_partition_iterate): First, probe the partition map. Then,
16843         call ITERATE only for this partition map.
16845         * kern/misc.c (grub_strncmp): Rewritten.
16847         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16848         returns non-zero. Otherwise return 0.
16850         * include/grub/partition.h (grub_partition_map_iterate): Return
16851         int instead of void.
16853         * include/grub/normal.h (grub_normal_do_completion): New prototype.
16855         * include/grub/misc.h (grub_strncmp): Change the type of N to
16856         grub_size_t.
16858         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16859         of void.
16861         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16862         unsigned explicitly before comparing it with I.
16864         * kern/main.c (grub_env_write_root): Add the attribute unused into
16865         VAR.
16867         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16868         normal/completion.c.
16869         (normal_mod_SOURCES): Likewise.
16870         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16871         (normal_mod_SOURCES): Likewise.
16873         * normal/command.c (grub_iterate_commands): If ITERATE returns
16874         non-zero, return one immediately.
16876 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
16878         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16879         * kern/i386/pc/startup.S: Updated Global Descriptor table's
16880         descriptions.
16881         (grub_vbe_get_controller_info): New function.
16882         (grub_vbe_get_mode_info): Likewise.
16883         (grub_vbe_set_mode): Likewise.
16884         (grub_vbe_get_mode): Likewise.
16885         (grub_vbe_set_memory_window): Likewise.
16886         (grub_vbe_get_memory_window): Likewise.
16887         (grub_vbe_set_scanline_length): Likewise.
16888         (grub_vbe_get_scanline_length): Likewise.
16889         (grub_vbe_set_display_start): Likewise.
16890         (grub_vbe_get_display_start): Likewise.
16891         (grub_vbe_set_palette_data): Likewise.
16892         * include/grub/i386/pc/vbe.h: New file.
16894 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16896         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16897         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16898         * DISTLIST: Likewise.
16899         * kern/ieee1275/of.c: Moved to ...
16900         * kern/ieee1275/ieee1275.c: ... here.
16902 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16904         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16905         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16906         Pass 0 as `end' parameter to grub_strtoul().
16908 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16910         * include/grub/powerpc/ieee1275/console.h: Do not include
16911         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
16912         ifdef.
16913         (grub_console_cur_color): Remove i386-specific prototype.
16914         (grub_console_real_putchar): Likewise.
16915         (grub_console_checkkey): Likewise.
16916         (grub_console_getkey): Likewise.
16917         (grub_console_getxy): Likewise.
16918         (grub_console_gotoxy): Likewise.
16919         (grub_console_cls): Likewise.
16920         (grub_console_setcursor): Likewise.
16921         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16922         Include <grub/machine/console.h>.
16923         * term/ieee1275/ofconsole.c: Likewise.
16925 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
16927         * Makefile.in (LIBLZO): New variable.
16929         * configure.ac: Check for LZO version 2.
16931         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16932         lzo/lzo1x.h instead of lzo1x.h.
16934         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16935         of -llzo.
16937         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16938         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16940         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16941         copying the data from PARTITION to P.
16943 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16945         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16946         negative, unload the module.
16948         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16949         map is "pc_partition_map" but not "pc".
16950         (usage): Fix the description. The options are --boot-image and
16951         --core-image but not --boot-file or --core-file.
16952         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16953         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16954         DEFAULT_DIRECTORY.
16956         * util/i386/pc/grub-install.in: Do not specify --boot-file or
16957         --core-file. Specify INSTALL_DEVICE as an argument.
16959         * util/console.c: Include config.h.
16960         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16961         [HAVE_NCURSES_H]: Include ncurses.h.
16962         [HAVE_CURSES_H]: Include curses.h.
16963         [!A_NORMAL] (A_NORMAL): Defined as zero.
16964         [!A_STANDOUT] (A_STANDOUT): Likewise.
16966         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16967         -lncurses.
16968         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16970         * configure.ac: Check for curses libraries and headers.
16972         * Makefile.in (LIBCURSES): New variable.
16974         * genmk.rb (Script::rule): Set the executable bits.
16976         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16977         name of the PC partition map is "pc_partition_map" but not "pc".
16979 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16981         * util/i386/pc/grub-install.in (grub_probefs): New variable.
16982         (modules): Likewise.
16983         (usage): Added descriptions for --modules and --grub-probefs.
16984         Handle --modules and --grub-probefs. Save the arguments in MODULES
16985         and GRUB_PROBEFS, respectively.
16986         Auto-detect a filesystem module against GRUBDIR. If the result is
16987         empty and modules are not specified explicitly, abort the
16988         installation. Add the result to MODULES.
16990         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16991         disk/powerpc/ieee1275/ofdisk.c,
16992         include/grub/powerpc/ieee1275/init.h and
16993         term/powerpc/ieee1275/ofconsole.c.
16994         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16995         term/ieee1275/ofconsole.c.
16997         * include/grub/powerpc/ieee1275/console.h: Resurrected.
16999         * COPYING: Upgraded to the latest version. Only the address of the
17000         FSF office has changed.
17002 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17004         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17005         kern/ieee1275.c with kern/ieee1275/of.c.
17007         * kern/ieee1275.c: Moved to ...
17008         * kern/ieee1275/of.c: ... here.
17010 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
17012         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
17013         readability.
17015         * config.guess: Updated to the latest version from gnulib.
17016         * config.sub: Likewise.
17017         * install.sh: Likewise.
17018         * mkinstalldirs: Likewise.
17020         * include/grub/console.h: Removed. This file is arch-specific. Do
17021         not put this in include/grub.
17023         * include/grub/i386/pc/console.h: Resurrected.
17025         * util/console.c: Include grub/machine/console.h instead of
17026         grub/console.h.
17027         * util/grub-emu.c: Likewise.
17029 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17031         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17032         hardcoded value.
17034         From Vincent Pelletier  <subdino2004@yahoo.fr>
17035         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17036         Redefined to use grub_getwh.
17037         (grub_term): New member named getwh.
17038         (grub_getwh): New prototype.
17039         * kern/term.c (grub_getwh): New function.
17040         * term/i386/pc/console.c (grub_console_getwh): New function.
17041         (grub_console_term): New member `getwh'.
17042         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17043         (grub_vga_term): New member `getwh'.
17044         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17045         grub_ssize_t.
17046         (grub_ofconsole_getw): New function.
17047         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17048         (grub_ofconsole_term): New field named getwh and new initial
17049         value.
17051 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17053         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17054         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17055         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17056         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17057         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17058         of <grub/machine/ieee1275.h>.
17059         * commands/ieee1275/reboot.c: Likewise.
17060         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17061         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17062         parameter structs to use new type `grub_ieee1275_cell_t'.
17063         * term/powerpc/ieee1275/ofconsole.c: Move ...
17064         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17065         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17066         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17067         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17068         to return int.
17069         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17070         Remove unused prototypes.  All users updated.
17071         * include/grub/powerpc/ieee1275/console.h: Removed.
17072         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17073         `grub_ieee1275_cell_t'.
17074         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17075         Cast comparisons with -1 to the correct type.
17076         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17077         type to match `grub_ieee1275_entry_fn'.
17079 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17081         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17083         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17084         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17085         partmap/sun.c.
17086         (grub_probefs_SOURCES): New variable.
17088         * util/i386/pc/grub-probefs.c: New file.
17090         * util/i386/pc/grub-setup.c (main): Call
17091         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17092         grub_hfs_init and grub_jfs_init to initialize the system. Call
17093         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17094         grub_pc_partition_map_fini to finish the system.
17096 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17098         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17099         function.
17100         (grub_multiboot_load_elf32): Likewise.
17101         (grub_multiboot_is_elf64): Likewise.
17102         (grub_multiboot_load_elf64): Likewise.
17103         (grub_multiboot_load_elf): Likewise.
17104         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17105         an ELF32 or ELF64 file.
17106         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17108         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17109         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17110         NULL before calling FS->LABEL.
17111         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17112         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17113         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17114         before calling FS->LABEL.
17116 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17118         * util/i386/pc/grub-install.in (datadir): New variable.
17119         (libdir): Removed.
17120         (pkgdatadir): New variable.
17121         (pkglibdir): Removed.
17123 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17125         * DISTLIST: Added util/i386/pc/grub-install.in.
17127         * util/i386/pc/grub-install.in: New file.
17129         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17130         (grub_install_SOURCES): Likewise.
17132         * genmk.rb: Added support for scripts.
17133         (Script): New class.
17134         (scripts): New variable.
17136         * Makefile.in (install-local): Install sbin_SCRIPTS by
17137         INSTALL_SCRIPT.
17138         (uninstall): Remove sbin_SCRIPTS.
17140         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17141         device, try to get a GRUB device by
17142         grub_util_biosdisk_get_grub_dev.
17143         Free DEST_DEV.
17145         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17146         description for --device-map.
17148 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17150         Change the semantics of variable hooks. They now return strings
17151         instead of error values.
17153         * util/i386/pc/grub-setup.c: Include grub/env.h.
17154         (setup): Use grub_device_set_root instead of grub_env_set.
17156         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17157         grub_env_get instead of grub_device_set_root and
17158         grub_device_get_root, respectively.
17160         * kern/main.c (grub_env_write_root): New function.
17161         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17162         grub_env_set instead of grub_device_set_root.
17164         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17165         many variables.
17166         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17167         rather than calling ENV->WRITE_HOOK afterwards.
17168         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17169         passing a pointer of a pointer.
17170         (grub_register_variable_hook): Change the types of "read_hook" and
17171         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17172         respectively.
17173         Allocate the default empty string on the heap, because this string
17174         may be freed later.
17176         * kern/device.c: Include grub/env.h.
17177         (grub_device_set_root): Removed.
17178         (grub_device_get_root): Likewise.
17179         (grub_device_open): Use grub_env_get instead of
17180         grub_device_get_root.
17182         * include/grub/env.h (grub_env_read_hook_t): New type.
17183         (grub_env_write_hook_t): Likewise.
17184         (grub_env_var): Change the types of "read_hook" and "write_hook"
17185         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17186         (grub_register_variable_hook): Likewise.
17188         * include/grub/device.h (grub_device_set_root): Removed.
17189         (grub_device_set_root): Likewise.
17191         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17192         make sure that DIRNAME terminates with '/', so that
17193         grub_fat_find_dir will fail if PATH is not a directory.
17195         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17196         from DIRNAME.
17197         Use the qualifier auto for print_files and print_files_long.
17198         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17199         as a regular file.
17200         Put a newline only if there is no error.
17201         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17202         used.
17204 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17206         * kern/partition.c (grub_partition_probe): Initialize PART to
17207         NULL. Otherwise, when no partition map is registered, this returns
17208         a garbage.
17210 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17212         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17213         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17214         valid.
17216 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17218         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17219         information on each device, if it does not have partitions. Print
17220         "Device" instead of "Disk", because this function is not specific
17221         to disk devices.
17223         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17224         static to ensure that it is put on the memory rather than a
17225         register.
17227 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17229         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17230         (grub_cat_init): Likewise.
17231         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17232         (options): Likewise.
17233         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17234         (grub_configfile_init): Likewise.
17235         * font/manager.c (GRUB_MOD_INIT): Likewise.
17236         * commands/help.c (GRUB_MOD_INIT): Likewise.
17237         (grub_help_init): Likewise.
17238         * normal/command.c (grub_command_init): Likewise.
17239         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17240         * disk/loopback.c (grub_loop_init): Likewise.
17241         (GRUB_MOD_INIT): Likewise.
17242         * commands/ls.c (grub_ls_init): Likewise.
17243         (GRUB_MOD_INIT): Likewise.
17244         (options): Likewise.
17245         * commands/boot.c (grub_boot_init): Likewise.
17246         (GRUB_MOD_INIT): Likewise.
17247         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17248         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17249         (GRUB_MOD_INIT): Likewise.
17250         * commands/cmp.c (grub_cmp_init): Likewise.
17251         (GRUB_MOD_INIT): Likewise.
17253         * normal/arg.c: Use <> instead of "" to include header files.
17254         (SHORT_ARG_HELP): New macro.
17255         (SHORT_ARG_USAGE): Likewise.
17256         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17257         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17258         descriptions.
17259         (find_short): Check if C is 'h' or 'u' explicitly.
17260         (grub_arg_show_help): Use space characters instead of tabs. Treat
17261         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17262         are shown with --help and --usage only if they are not used for
17263         the command itself.
17264         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17265         'h' and 'u'.
17267         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17268         const into "longarg". Change the type of "shortarg" to int.
17270 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17272         * boot/i386/pc/boot.S (boot_drive_check): New label.
17274         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17275         macro.
17277         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17278         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17280 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17282         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17283         When turning off Gate A20, skip the check and return immediately,
17284         because this is not fatal usually.
17286 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17288         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17289         be 0x7C00 instead of 0x8000.
17291         * boot/i386/pc/pxeboot.S: Rewritten.
17293         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17294         EXT_C.
17295         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17296         result.
17298 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17300         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17301         robustness. This routine now supports a BIOS call and System
17302         Control Port A to modify the gate A20.
17304         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17305         Increased to 0x440.
17307 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17309         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17310         device path and resulting ihandle.
17311         (grub_ofdisk_close): dprintf the ihandle being closed.
17312         (grub_ofdisk_read): dprintf function parameters.
17313         * kern/mm.c (grub_mm_init_region): Likewise.
17314         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17315         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17316         size, and boot arguments.
17317         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17318         before loading into memory.
17319         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17320         before loading into memory.
17322 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17324         * kern/mm.c: Added much documentation.
17325         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17326         8, set to 5 instead of 8.
17328 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17330         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17332         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17333         (grub_mkdevicemap_SOURCES): New variable.
17335         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17336         lib/device.c of GRUB Legacy.
17338 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17340         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17341         instead of PATH is NULL.
17343 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17345         * commands/cmp.c (BUFFER_SIZE): New macro.
17346         (grub_cmd_cmp): Close the right file at the right time.  Compare
17347         only data just read.  Don't report files of different  size as
17348         identical.  Dynamically allocate buffers.  Move variable
17349         declarations at the beginning of function.
17351 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17353         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17354         reverse.
17356 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17358         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17359         when backspace is pressed at beginning of line.
17361 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17363         * DISTLIST: Added genfslist.sh.
17365         * normal/main.c (fs_module_list): New variable.
17366         (autoload_fs_module): New function.
17367         (read_fs_list): Likewise.
17368         (grub_normal_execute): Call read_fs_list.
17370         * kern/fs.c (grub_fs_autoload_hook): New variable.
17371         (grub_fs_probe): Added support for auto-loading.
17373         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17374         (grub_fs_module_list_t): New type.
17376         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17377         (grub_fs_autoload_hook): New prototype.
17379         * genfslist.sh: New file.
17381         * genmk.rb: Added a rule to generate a filesystem list.
17383 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17385         * configure.ac: Fix the test for cross-compiling.
17387         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17388         define GRUB_UTIL anymore.
17390         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17391         so this function works on other systems than just big endian.
17392         (load_modules): Likewise.
17393         (add_segments): Likewise.
17395 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17397         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17398         contains `l' modifier, get a long from va_arg().
17400 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17402         * kern/mm.c (grub_free): If the next free block which is being
17403         merged is the first free block, set the first block to the block
17404         being freed.
17405         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17407 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17409         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17410         `grub_ieee1275_chosen'.
17412 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17414         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17415         (grub_ieee1275_chosen): New variable.
17416         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17417         `chosen'.
17418         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17419         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17420         Rename first argument to `phandle' for consistency.
17421         (grub_ieee1275_get_property_length): Likewise.
17422         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17423         to grub_ieee1275_phandle_t.
17424         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17425         Move export next to declaration.
17426         (grub_ieee1275_chosen): New variable.
17427         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17428         Correct cosmetic typo.
17429         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17430         `grub_ieee1275_chosen'.
17431         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17432         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17433         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17434         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17435         `grub_ieee1275_chosen'.
17437 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17439         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17440         /chosen/bootargs.
17441         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17442         /chosen/bootargs as "variable=value" pairs.
17444 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17446         * include/grub/misc.h (grub_dprintf): New macro.
17447         (grub_real_dprintf): New prototype.
17448         (grub_strword): Likewise.
17449         (grub_iswordseparator): Likewise.
17450         * kern/misc.c (grub_real_dprintf): New function.
17451         (grub_strword): Likewise.
17452         (grub_iswordseparator): Likewise.
17454 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17456         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17457         (roundup): Remove macro.
17458         (grub_ieee1275_flags): Make static.
17459         (grub_ieee1275_realmode): Remove.
17460         (grub_ieee1275_test_flag): New function.
17461         (grub_ieee1275_set_flag): Likewise.
17462         (find_options): Rename to `grub_ieee1275_find_options'; update
17463         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17464         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17465         (cmain): New prototype.
17466         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17467         `grub_ieee1275_flags' directly.
17468         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17469         machine/biosdisk.h.
17470         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17471         Don't include grub/machine/init.h.
17472         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17473         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17474         Remove prototype.
17475         (grub_ieee1275_realmode): Likewise.
17476         (grub_ieee1275_flag): New enum.
17477         (grub_ieee1275_test_flag): New prototype.
17478         (grub_ieee1275_set_flag): New prototype.
17479         * include/grub/powerpc/ieee1275/init.h: Remove file.
17480         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17481         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17482         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17483         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17484         comment.
17485         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17486         `grub_ieee1275_test_flag'.
17487         (grub_ieee1275_encode_devname): Likewise.
17489 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17491         * include/grub/powerpc/ieee1275/ieee1275.h
17492         (grub_ieee1275_encode_devname): New prototype.
17493         (grub_ieee1275_get_filename): Likewise.
17494         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17495         function.
17496         (grub_set_prefix): Likewise.
17497         (grub_machine_init): Call grub_set_prefix.
17498         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17499         (grub_parse_type): New enum.
17500         (grub_ieee1275_get_devargs): New function.
17501         (grub_ieee1275_get_devname): Likewise.
17502         (grub_ieee1275_parse_args): Likewise.
17503         (grub_ieee1275_get_filename): Likewise.
17504         (grub_ieee1275_encode_devname): Likewise.
17506 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17508         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17509         `grub_loader_unset'.
17511 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17513         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17514         instead of grub_ieee1275_interpret.
17515         (grub_halt_init): New function.
17516         (grub_halt_fini): Likewise.
17517         (GRUB_MOD_INIT): Correct message grammar.
17518         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17519         instead of grub_ieee1275_interpret.
17520         (grub_reboot_init): New function.
17521         (grub_reboot_fini): Likewise.
17522         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17523         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17524         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17525         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17526         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17527         function.
17528         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17529         Add prototype.
17530         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17531         prototype.
17532         (grub_halt): Likewise.
17533         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17534         (cmain): Remove __attribute__((unused)).
17535         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17536         (grub_heap_len): Likewise.
17537         (grub_machine_fini): New function.
17538         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17539         (grub_halt): Likewise.
17540         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17541         function.
17542         * util/powerpc/ieee1275/misc.c: New file.
17544 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17546         * DISTLIST: New file.
17547         * gendistlist.sh: Likewise.
17549         * Makefile.in (COMMON_DISTFILES): Removed.
17550         (BOOT_DISTFILES): Likewise.
17551         (CONF_DISTFILES): Likewise.
17552         (DISK_DISTFILES): Likewise.
17553         (FS_DISTFILES): Likewise.
17554         (INCLUDE_DISTFILES): Likewise.
17555         (KERN_DISTFILES): Likewise.
17556         (LOADER_DISTFILES): Likewise.
17557         (TERM_DISTFILES): Likewise.
17558         (UTIL_DISTFILES): Likewise.
17559         (DISTFILES): Likewise.
17560         (uninstall): Uninstall files in $(pkgdata_DATA).
17561         (DISTLIST): New target.
17562         (distdir): Use the contents of the file DISTLIST to get a list of
17563         distributed files.
17565 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17567         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17568         descriptor. This is ported from GRUB Legacy.
17570         * gencmdlist.sh: Added an extra semicolon to make it work with
17571         old sed versions. Reported by Robert Bihlmeyer
17572         <robbe@orcus.priv.at>.
17574 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17576         Automatic loading of commands is supported.
17578         * normal/main.c (read_command_list): New function.
17579         (grub_normal_execute): Call read_command_list.
17581         * normal/command.c (grub_register_command): Return zero or CMD.
17582         Allocate CMD->NAME from the heap.
17583         Initialize CMD->MODULE_NAME to zero.
17584         Find the same name as well. If the same command is found and it is
17585         a dummy command, overwrite members. If it is not a dummy command,
17586         return zero.
17587         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17588         (grub_command_find): If a dummy command is found, load a module
17589         and retry to find a command only once.
17591         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17592         make sure that each command is loaded.
17594         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17595         macro.
17596         (struct grub_command): Remove const from the member `name'.
17597         Add a new member `module_name'.
17598         (grub_register_command): Return grub_command_t.
17600         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17601         sure that each command is loaded.
17603         * genmk.rb (PModule::rule): Specify a module name without the
17604         suffix ".mod" to gencmdlist.sh.
17606 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17608         * gencmdlist.sh: New file.
17610         * genmk.rb (PModule::rule): Generate a rule for a command list.
17611         Clean command.lst.
17612         Generate command.lst from $(COMMANDFILES).
17614         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17615         (DATA): Added $(pkgdata_DATA).
17616         (install-local): Install files in $(pkgdata_DATA).
17618 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17620         * term/i386/pc/vga.c (debug_command): Removed.
17621         (GRUB_MOD_INIT): Do not register the command "debug".
17623         From Hollis Blanchard:
17624         * commands/configfile.c: New file.
17625         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17626         commands/configfile.c.
17627         (pkgdata_MODULES): Added configfile.mod.
17628         (configfile_mod_SOURCES): New variable.
17629         (configfile_mod_CFLAGS): Likewise.
17630         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17631         commands/configfile.c.
17632         (pkgdata_MODULES): Added configfile.mod.
17633         (configfile_mod_SOURCES): New variable.
17634         (configfile_mod_CFLAGS): Likewise.
17635         * util/grub-emu.c (main): Call grub_configfile_init and
17636         grub_configfile_fini.
17637         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17638         prototype.
17639         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17641 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17643         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17644         address.
17646         * commands/help.c (grub_cmd_help): Do not print newlines after
17647         the last command in print_command_help.
17649 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17651         * commands/default.h: New file.
17652         * commands/timeout.h: Likewise.
17653         * normal/context.c: Likewise.
17655         * util/misc.c: Do not include sys/times.h.
17656         Include sys/time.h and grub/machine/time.h.
17657         (grub_get_rtc): Rewritten with gettimeofday.
17659         * util/grub-emu.c (main): Call grub_default_init and
17660         grub_timeout_init before grub_normal_init, and call
17661         grub_timeout_fini and grub_default_fini after grub_main.
17663         * util/console.c (grub_ncurses_checkkey): Return the read
17664         character or -1.
17666         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17667         timeouts.
17669         * normal/main.c (read_config_file): Push MENU. If this fails,
17670         print an error and wait for a user input.
17671         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17672         If a menu is empty or an error occurs, pop MENU.
17673         (grub_normal_execute): Pop and free MENU after grub_menu_run
17674         returns.
17676         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17678         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17679         include time.h.
17680         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17681         without GRUB_UTIL.
17682         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17683         time.h.
17684         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17685         without GRUB_UTIL.
17687         * include/grub/normal.h (struct grub_menu_list): New struct.
17688         (grub_menu_list_t): New type.
17689         (struct grub_context): New struct.
17690         (grub_context_t): New type.
17691         (grub_register_command): Got rid of EXPORT_FUNC.
17692         (grub_unregister_command): Likewise.
17693         (grub_context_get): New prototype.
17694         (grub_context_get_current_menu): Likewise.
17695         (grub_context_push_menu): Likewise.
17696         (grub_context_pop_menu): Likewise.
17697         [GRUB_UTIL] (grub_default_init): Likewise.
17698         [GRUB_UTIL] (grub_default_fini): Likewise.
17699         [GRUB_UTIL] (grub_timeout_init): Likewise.
17700         [GRUB_UTIL] (grub_timeout_fini): Likewise.
17702         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17703         commands/timeout.c and normal/context.c.
17704         (pkgdata_MODULES): Added default.mod and timeout.mod.
17705         (normal_mod_SOURCES): Added normal/context.c.
17706         (default_mod_SOURCES): New variable.
17707         (default_mod_CFLAGS): Likewise.
17708         (timeout_mod_SOURCES): Likewise.
17709         (timeout_mod_CFLAGS): Likewise.
17710         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17711         conf/i386-pc.rmk.
17712         (pkgdata_MODULES): Added default.mod and timeout.mod.
17713         (normal_mod_SOURCES): Added normal/context.c.
17714         (default_mod_SOURCES): New variable.
17715         (default_mod_CFLAGS): Likewise.
17716         (timeout_mod_SOURCES): Likewise.
17717         (timeout_mod_CFLAGS): Likewise.
17719         * Makefile.in (all-local): Added $(MKFILES).
17721 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
17723         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17724         (grub_emu_SOURCES): Likewise.
17725         (pkgdata_MODULES): Add `sun.mod'.
17726         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17727         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17728         `partmap/sun.c'.
17729         (pkgdata_MODULES): Add `sun.mod'.
17730         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17731         * include/grub/partition.h (grub_sun_partition_map_init): New
17732         prototype.
17733         (grub_sun_partition_map_fini): Likewise.
17734         * partmap/sun.c: New file.
17735         * util/grub-emu.c (main): Initialize and de-initialize the sun
17736         partitionmap support.
17738 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
17740         This implements an Emacs-like menu entry editor.
17742         * normal/menu_entry.c: New file.
17744         * util/console.c (grub_ncurses_putchar): Translate some Unicode
17745         characters to ASCII.
17746         (saved_char): New variable.
17747         (grub_ncurses_checkkey): Rewritten completely.
17748         (grub_ncurses_getkey): Likewise.
17749         (grub_ncurses_init): Call raw instead of cbreak.
17751         * normal/menu.c (print_entry): Do not put a space.
17752         (init_page): Renamed to ...
17753         (grub_menu_init_page): ... this. All callers changed.
17754         (edit_menu_entry): Removed.
17755         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17757         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17759         * kern/misc.c (grub_vprintf): Call grub_refresh.
17761         * normal/menu.c (DISP_LEFT): Renamed to ...
17762         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17763         * normal/menu.c (DISP_UP): Renamed to ...
17764         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17765         * normal/menu.c (DISP_RIGHT): Renamed to ...
17766         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17767         * normal/menu.c (DISP_DOWN): Renamed to ...
17768         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17769         * normal/menu.c (DISP_HLINE): Renamed to ...
17770         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17771         * normal/menu.c (DISP_VLINE): Renamed to ...
17772         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17773         * normal/menu.c (DISP_UL): Renamed to ...
17774         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17775         * normal/menu.c (DISP_UR): Renamed to ...
17776         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17777         * normal/menu.c (DISP_LL): Renamed to ...
17778         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17779         * normal/menu.c (DISP_LR): Renamed to ...
17780         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17781         * normal/menu.c (TERM_WIDTH): Renamed to ...
17782         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17783         * normal/menu.c (TERM_HEIGHT): Renamed to ...
17784         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17785         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17786         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17787         * normal/menu.c (TERM_MARGIN): Renamed to ...
17788         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17789         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17790         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17791         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17792         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17793         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17794         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17795         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17796         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17797         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17798         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17799         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17800         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17801         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17802         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17803         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17804         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17805         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17806         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17807         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17808         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17809         All callers changed.
17811         * include/grub/normal.h: New prototype.
17813         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17814         normal/menu_entry.c.
17815         (normal_mod_SOURCES): Likewise.
17816         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17817         (normal_mod_SOURCES): Likewise.
17819 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
17821         * include/grub/normal.h (grub_halt_init): New prototype.
17822         (grub_halt_fini): Likewise.
17823         (grub_reboot_init): Likewise.
17824         (grub_reboot_fini): Likewise.
17826         * util/grub-emu.c: Include signal.h.
17827         (main_env): New global variable.
17828         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17829         catch C-c.
17830         (grub_machine_fini): New function.
17831         (main): Call grub_halt_init and grub_reboot_init before
17832         grub_main, and grub_reboot_fini and grub_halt_fini after it.
17833         Call setjmp with MAIN_ENV to go back afterwards.
17834         Call grub_machine_fini right before return.
17836         * include/grub/util/misc.h: Include setjmp.h.
17837         (main_env): New prototype.
17839         * include/grub/kernel.h (grub_machine_fini): New prototype.
17840         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17841         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17843         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17844         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17845         * term/i386/pc/console.c (grub_console_fini): Likewise.
17847         * util/i386/pc/misc.c: New file.
17849         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17850         util/i386/pc/misc.c, commands/i386/pc/halt.c and
17851         commands/i386/pc/reboot.c.
17853 2005-02-14  Guillem Jover  <guillem@hadrons.org>
17855         * include/grub/dl.h (grub_dl_check_header): New prototype.
17856         (grub_arch_dl_check_header): Change return type to grub_err_t,
17857         remove size parameter and export function.  Update all callers.
17858         * kern/dl.c (grub_dl_check_header): New function.
17859         (grub_dl_load_core): Use `grub_dl_check_header' instead of
17860         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
17861         are inside the core.
17862         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17863         independent ELF header checks.
17864         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17865         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17866         `grub_dl_check_header' instead of explicit checks.  Check for the
17867         ELF type.
17868         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17869         `grub_dl_check_header' instead of explicit checks.  Remove arch
17870         specific ELF header checks.
17872         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17873         argument SIZE.
17875 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
17877         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17878         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17880 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
17882         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17883         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17884         (part_map_iterate): Clear `grub_errno' and return 0 if
17885         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17886         * partmap/amiga.c (amiga_partition_map_iterate): Return
17887         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17888         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17890 2005-02-01  Guillem Jover  <guillem@hadrons.org>
17892         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17893         help info.
17895 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17897         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17898         Removed prototype.
17899         (grub_rescue_cmd_linux): New prototype.
17900         (grub_rescue_cmd_initrd): Likewise.
17901         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17902         `bi_rec'.
17903         (grub_linux_release_mem): Release the memory for the initrd.
17904         (grub_load_linux): Renamed from this...
17905         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
17906         Changed `entry' not to be static.  Loop over memory regions to
17907         find another one when the default fails.
17908         (grub_rescue_cmd_initrd): New function.
17909         (grub_linux_init): Remove function.
17910         (grub_linux_fini): Likewise.
17911         (GRUB_MOD_INIT): Register `initrd'.
17912         (GRUB_MOD_FINI): Unregister `initrd'.
17913         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17914         Function removed.
17915         (grub_linux_normal_fini): Likewise.
17916         (GRUB_MOD_INIT): Register `initrd'.
17917         (GRUB_MOD_FINI): Unregister `initrd'.
17919 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17921         * commands/help.c: New file.
17922         * normal/arg.c (show_help): Renamed to...
17923         (grub_arg_show_help): ... this.
17924         * commands/i386/pc/halt.c: New file.
17925         * commands/i386/pc/reboot.c: Likewise.
17926         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17927         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17928         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17929         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17930         variables.
17931         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17932         `commands/help.c'.
17933         (pkgdata_MODULES): Add `help.mod'.
17934         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17935         * grub/i386/pc/init.h (grub_reboot): New prototype.
17936         (grub_halt): Likewise.
17937         * include/grub/normal.h (grub_arg_show_help): New prototype.
17938         (grub_help_init): Likewise.
17939         (grub_help_fini): Likewise.
17940         * util/grub-emu.c (main): Initialize and deinitialize the help
17941         command.
17943         * normal/cmdline.c (grub_cmdline_get): Doc fix.
17945         * normal/command.c (grub_command_init): Fixed the description of
17946         the `set' and `unset' commands.
17948 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17950         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17951         function.
17952         * commands/ieee1275/halt.c: New file.
17953         * commands/ieee1275/reboot.c: Likewise.
17954         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17955         `__attribute__ ((unused))'.  Some GCS related fixed.
17956         (grub_suspend_init) [GRUB_UTIL]: Function removed.
17957         (grub_suspend_fini): Likewise.
17958         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17959         and `halt.mod'.
17960         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17961         (halt_mod_CFLAGS): New variables.
17962         * include/grub/powerpc/ieee1275/ieee1275.h
17963         (grub_ieee1275_interpret): New prototype.
17965 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
17967         * include/grub/misc.h (memmove): New prototype.
17968         (memcpy): Likewise.
17970 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
17972         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17973         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
17975 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
17977         * kern/misc.c (grub_strndup): Function rewritten.
17979 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
17981         * normal/menu.c (TERM_WIDTH): Macro redefined.
17982         (TERM_TOP_BORDER_Y): Likewise.
17983         (draw_border): Replaced while-loop by a for-loop.  Make the number
17984         of lines consistent with the number of lines displayed in
17985         print_entries.  Added a margin below the rectangle.
17986         (print_entry): Make the entry fit in the rectangle.
17987         (print_entries): Display the scroll arrows next to the right
17988         border.
17990 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17992         * fs/minix.c (grub_minix_find_file): Reserve more space for
17993         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
17994         `grub_strncpy' to copy `path' into it.
17996 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17998         Add the loopback device, a device via which files can be accessed
17999         as devices.
18001         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
18002         (pkgdata_MODULES): Add loopback.mod.
18003         (loopback_mod_SOURCES): New variable.
18004         (loopback_mod_CFLAGS): Likewise.
18005         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18006         `disk/loopback.c'.
18007         (pkgdata_MODULES): Add loopback.mod.
18008         (loopback_mod_SOURCES): New variable.
18009         (loopback_mod_CFLAGS): Likewise.
18010         * disk/loopback.c: new file.
18011         * include/grub/normal.h (grub_loop_init): New prototype.
18012         (grub_loop_fini): New prototype.
18013         * util/grub-emu.c (main): Initialize and de-initialize loopback
18014         support.
18015         * include/grub/disk.h (grub_disk_dev_id): Add
18016         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18018 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
18020         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18021         function.
18022         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18023         (suspend_mod_SOURCES): New variable.
18024         (suspend_mod_CFLAGS): Likewise.
18025         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18026         New prototype.
18027         * commands/ieee1275/suspend.c: New file.
18029 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18031         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18032         ((unused))' to `__attribute__ ((used))'.
18033         (GRUB_MOD_FINI): Likewise.
18034         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18035         * genmk.rb (PModule): Assign space to common symbols when linking
18036         modules.
18038 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18040         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18041         `unsigned' arguments to `grub_size_t'.
18042         (grub_malloc): Likewise.
18043         (grub_realloc): Likewise.
18044         (grub_memalign): Likewise.
18045         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18046         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18047         * util/misc.c (grub_malloc): Likewise.
18048         (grub_realloc): Likewise.
18049         * kern/mm.c (get_header_from_pointer): Change the casts to
18050         `unsigned' into a cast to `grub_size_t'.
18052         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18053         point to `currnode' when `currnode' is changed.
18055         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18056         Schottelius <nico-linux@schottelius.org>.
18058 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18060         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18061         (note_path): Remove variable.
18062         (GRUB_IEEE1275_NOTE_NAME): New macro.
18063         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18064         (grub_ieee1275_note_hdr): New structure.
18065         (grub_ieee1275_note_desc): Likewise.
18066         (grub_ieee1275_note): Likewise.
18067         (load_note): Remove `dir' argument.  All callers updated.  Remove
18068         `note_img' and `path'.  Do not load a file from `note_path'.
18069         Initialize a struct grub_ieee1275_note and write that to `out'.
18070         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18072 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18074         * util/misc.c (grub_util_read_image): Revert last change.  It
18075         called `grub_util_read_at', which seeks from the beginning of the
18076         file.
18078 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18080         * TODO: Add note about endianness in grub-mkimage.
18081         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18082         section.
18083         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18084         (grub_mkimage_SOURCES): New target.
18085         * include/grub/kernel.h (grub_start_addr): Remove variable.
18086         (grub_end_addr): Likewise.
18087         (grub_total_module_size): Likewise.
18088         (grub_kernel_image_size): Likewise.
18089         (GRUB_MODULE_MAGIC): New constant.
18090         (grub_module_info): New structure.
18091         (grub_arch_modules_addr): New prototype.
18092         (grub_get_end_addr): Remove prototype.
18093         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18094         * include/grub/powerpc/ieee1275/kernel.h: New file.
18095         * include/grub/util/misc.h (grub_util_get_fp_size): New
18096         prototype.
18097         (grub_util_read_at): Likewise.
18098         (grub_util_write_image_at): Likewise.
18099         * kern/main.c (grub_get_end_addr): Remove function.
18100         (grub_load_modules): Call grub_arch_modules_addr instead of using
18101         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18102         the grub_module_info fields instead of calling grub_get_end_addr
18103         as loop conditions.  Move grub_add_unused_region code here.
18104         (grub_add_unused_region): Remove function.
18105         * kern/i386/pc/init.c: Include grub/cache.h.
18106         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18107         one call to add_mem_region.
18108         (grub_arch_modules_addr): New function.
18109         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18110         (grub_total_module_size): Likewise.
18111         Include grub/machine/kernel.h.
18112         (grub_arch_modules_addr): New function.
18113         * util/grub-emu.c (grub_end_addr): Remove variable.
18114         (grub_total_module_size): Likewise.
18115         (grub_arch_modules_addr): New function.
18116         * util/misc.c: Include unistd.h.
18117         (grub_util_get_fp_size): New function.
18118         (grub_util_read_at): Likewise.
18119         (grub_util_write_image_at): Likewise.
18120         (grub_util_read_image): Call grub_util_read_at.
18121         (grub_util_write_image): Call grub_util_write_image_at.
18122         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18123         additional memory in kernel_img for a struct grub_module_info.
18124         Fill in that grub_module_info.
18125         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18127 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18129         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18130         New function.
18131         * include/grub/powerpc/ieee1275/ieee1275.h
18132         (grub_ieee1275_milliseconds): New prototype.
18133         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18134         Change to 1000.
18135         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18136         grub_ieee1275_milliseconds.
18138 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18140         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18141         variable.
18142         (find_options): New function.
18143         (cmain): Call find_options.
18144         * include/grub/powerpc/ieee1275/ieee1275.h
18145         (grub_ieee1275_realmode): New extern variable.
18146         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18147         grub_map if grub_ieee1275_realmode is false.
18149 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18151         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18152         lines are inserted and make it work like readline.  Reported by
18153         Vincent Pelletier <subdino2004@yahoo.fr>.
18155 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18157         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18159         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18160         `kern/powerpc/cache.S'.
18162 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18164         * genmk.rb: Handle the `Program' class in the main loop.  Written
18165         by Johan Rydberg <jrydberg@gnu.org>.
18166         (Program): New class.
18167         (programs): New variable.
18168         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18169         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18170         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18171         (help_arch): Function removed.
18172         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18173         `powerpc/libgcc.h' and `loader.h'.
18174         (pkgdata_PROGRAMS): New variable.
18175         (sbin_UTILITIES): Variable removed.
18176         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18177         (grubof_SOURCES): Variable re-defined so it only includes the
18178         core functionality.
18179         (grubof_CFLAGS): Remove `-DGRUBOF'.
18180         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18181         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18182         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18183         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18184         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18185         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18186         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18187         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18188         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18189         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18190         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18191         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18192         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18193         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18194         (pc_mod_CFLAGS): New variables.
18195         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18196         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18197         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18198         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18199         Moved from here...
18200         * include/grub/i386/pc/init.h (grub_os_area_addr)
18201         (rub_os_area_size): ... to here.
18202         * include/grub/powerpc/ieee1275/ieee1275.h
18203         (grub_ieee1275_entry_fn): Export symbol.
18204         * include/grub/powerpc/ieee1275/init.h: New file.
18205         * include/grub/powerpc/libgcc.h: Likewise.
18206         * include/grub/cache.h: Likewise.
18207         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18208         <hollis@penguinppc.org>.
18209         * kern/dl.c: Include <grub/cache.h>.
18210         (grub_dl_flush_cache): New function.
18211         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18212         for this module.
18213         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18214         (grub_console_init): Removed prototypes.
18215         (grub_machine_init): Don't initialize the modules anymore.
18216         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18217         static.
18218         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18219         Macro undef removed.
18220         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18221         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18222         relocation `R_PPC_REL32'.  Return an error when the relocation is
18223         unknown.
18224         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18225         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18226         * util/misc.c (grub_arch_sync_caches): Likewise.
18228 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18230         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18231         `symlist.c', add `grubof_symlist.c'.
18232         (symlist.c): Variable removed.
18233         (grubof_HEADERS): Variable added.
18234         (grubof_symlist.c): New target.
18235         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18236         `kernel_img_HEADERS'.
18237         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18238         * kern/powerpc/dl.c: New file.
18239         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18240         Function removed.
18241         (grub_arch_dl_relocate_symbols): Likewise.
18242         (grub_register_exported_symbols): Likewise.
18244 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18246         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18247         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18248         to fail instead.  Reported by Vincent Pelletier
18249         <subdino2004@yahoo.fr>.
18251         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18252         it is not allocated.  Reported by Vincent Pelletier
18253         <subdino2004@yahoo.fr>.
18255         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18256         output so the output looks better.
18258 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18260         Modulize the partition map support and add support for the amiga
18261         partition map.
18263         * commands/ls.c: Include <grub/partition.h> instead of
18264         <grub/machine/partition.h>.
18265         * kern/disk.c: Likewise.
18266         * kern/rescue.c: Likewise.
18267         * loader/i386/pc/chainloader.c: Likewise.
18268         * normal/cmdline.c: Likewise.
18269         * kern/powerpc/ieee1275/init.c: Likewise.
18270         (grub_machine_init): Call `grub_pc_partition_map_init',
18271         `grub_amiga_partition_map_init' and
18272         `grub_apple_partition_map_init'.
18273         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18274         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18275         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18276         `partition.h' and `pc_partition.h'.
18277         (grub_setup_SOURCES): Remove
18278         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18279         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18280         (grub_emu_SOURCES): Likewise.
18281         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18282         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18283         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18284         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18285         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18286         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18287         (grubof_SOURCES): Likewise.
18288         * disk/i386/pc/partition.c: File removed.
18289         * disk/powerpc/ieee1275/partition.c: Likewise.
18290         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18291         * include/grub/i386/pc/partition.h: Likewise.
18292         * kern/partition.c: New file.
18293         * partmap/amiga.c: Likewise.
18294         * partmap/apple.c: Likewise.
18295         * partmap/pc.c: Likewise.
18296         * include/grub/partition.h: Likewise..
18297         * include/grub/pc_partition.h: Likewise.
18298         * util/grub-emu.c: Include <grub/partition.h> instead of
18299         <grub/machine/partition.h>.
18300         (main): Call `grub_pc_partition_map_init',
18301         `grub_amiga_partition_map_init' and
18302         `grub_apple_partition_map_init' and deinitialize afterwards.
18303         * util/i386/pc/biosdisk.c: Include `#include
18304         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18305         `<grub/machine/partition.h>'.
18306         * util/i386/pc/grub-setup.c: Likewise.
18307         * util/i386/pc/biosdisk.c: Likewise.
18308         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18309         partition information in case of a PC partition.
18310         * util/i386/pc/grub-setup.c: Include `#include
18311         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18312         `<grub/machine/partition.h>'.
18313         (setup): Only access the PC specific partition information in case
18314         of a PC partition.
18316 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18318         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18319         (grub_longjmp): Likewise.
18320         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18321         20.
18322         * normal/powerpc/setjmp.S: New file.
18323         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18324         `normal/powerpc/setjmp.S'.
18325         (grubof_CFLAGS): Add `-DGRUBOF'.
18326         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18327         [GRUB_UTIL && !GRUBOF].
18329 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18331         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18332         property named `name'.  Correctly handle the error returned by
18333         `grub_ieee1275_finddevice' if a device can not be opened.
18335 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18337         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18338         `actual' for negativity.
18339         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18340         kern/fshelp.c.
18342 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18344         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18345         (PAGE_OFFSET): New macro.
18346         (CRTC_ADDR_PORT): Likewise.
18347         (CRTC_DATA_PORT): Likewise.
18348         (START_ADDR_HIGH_REGISTER): Likewise.
18349         (START_ADDR_LOW_REGISTER): Likewise.
18350         (GRAPHICS_ADDR_PORT): Likewise.
18351         (GRAPHICS_DATA_PORT): Likewise.
18352         (READ_MAP_REGISTER): Likewise.
18353         (INPUT_STATUS1_REGISTER): Likewise.
18354         (INPUT_STATUS1_VERTR_BIT): Likewise.
18355         (page): New variable.
18356         (wait_vretrace): New function.
18357         (set_read_map): Likewise.
18358         (set_start_address): Likewise.
18359         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18360         the right page.
18361         (check_vga_mem): Take the page into account.
18362         (write_char): Likewise.
18363         (write_cursor): Likewise.
18364         (scroll_up): Likewise.  Copy the page to the page that is not
18365         shown and switch between both pages.
18366         (grub_vga_putchar): Fix off by one error.
18367         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18368         account.
18370 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18372         Add support for iso9660 (including rockridge).
18374         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18375         (iso9660_mod_SOURCES): New variable.
18376         (iso9660_mod_CFLAGS): Likewise.
18377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18378         * include/grub/fs.h (grub_iso9660_init): New prototype.
18379         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18380         * fs/iso9660.c: New file.
18382         * include/grub/misc.h (grub_strncat): New prototype.
18383         * kern/misc.c (grub_strncat): New function.
18385         * fs/hfs.c (grub_hfs_mount): Translate the error
18386         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18387         * fs/jfs.c (grub_jfs_mount): Likewise.
18388         * fs/ufs.c (grub_ufs_mount): Likewise.
18390 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18392         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18393         which initialized BAT registers.
18394         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18395         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18396         Move from here...
18397         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18398         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18399         ... to here.
18400         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18401         (grub_mapclaim): Likewise.
18402         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18403         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18404         hand.
18406 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18408         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18409         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18410         -ffreestanding and -msoft-float.
18412 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18414         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18415         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18416         set in grub_ieee1275_flags.
18418 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18420         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18421         prototype.
18422         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18423         grub_console_init first.
18424         Change the memory range used for grub_ieee1275_claim and
18425         grub_mm_init_region.
18426         Print an error message if the claim fails.
18427         Include <grub/misc.h>.
18429 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18431         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18432         Call grub_children_iterate for device nodes of type `scsi',
18433         `ide', or `ata'.
18434         (grub_ofdisk_open): Remove manual device alias resolution.
18435         Fix memory leak when device cannot be opened.
18436         * include/grub/powerpc/ieee1275/ieee1275.h
18437         (grub_children_iterate): New prototype.
18438         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18439         New function.
18440         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18441         Return -1 if args.size was -1.
18443 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18445         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18446         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18447         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18448         Open Firmware's memory for it; claim memory from _start to _end.
18449         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18450         (_end): New extern.
18451         (_start): Zero BSS from __bss_start to _end.
18452         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18453         New extern.
18454         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18456 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18458         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18459         -1 if args.base was -1.
18461 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18463         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18464         escape sequence instead of a literal ^L. Also call
18465         grub_ofconsole_gotoxy.
18467 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18469         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18470         void *  arguments to grub_addr_t.  All callers updated.  Also make
18471         the `result' argument optional.
18472         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18473         All callers updated.
18475 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18477         * commands/ls.c (grub_ls_list_files): Use the string following the
18478         initial ')', if present, as the filesystem path.
18479         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18481         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18483 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18485         Make the source code of the menu interface more readable.
18487         * normal/menu.c: Include grub/mm.h.
18488         (TERM_WIDTH): New macro.
18489         (TERM_HEIGHT): Likewise.
18490         (TERM_INFO_HEIGHT): Likewise.
18491         (TERM_MARGIN): Likewise.
18492         (TERM_SCROLL_WIDTH): Likewise.
18493         (TERM_TOP_BORDER_Y): Likewise.
18494         (TERM_LEFT_BORDER_X): Likewise.
18495         (TERM_BORDER_WIDTH): Likewise.
18496         (TERM_MESSAGE_HEIGHT): Likewise.
18497         (TERM_BORDER_HEIGHT): Likewise.
18498         (TERM_NUM_ENTRIES): Likewise.
18499         (TERM_FIRST_ENTRY_Y): Likewise.
18500         (TERM_ENTRY_WIDTH): Likewise.
18501         (TERM_CURSOR_X): Likewise.
18502         (draw_border): Use macros instead of magic numbers.
18503         (print_entry): Likewise.
18504         (print_entries): Likewise.
18505         (run_menu): Likewise. Also, handle the key 'e'.
18506         (run_menu_entry): Ignore empty command lines.
18507         (print_message): Added a new argument EDIT. If EDIT is true,
18508         print a different message.
18509         (init_page): Likewise.
18510         (edit_menu_entry): New function. Not implemented yet.
18512 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18514         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18515         can be loaded from normal mode.
18517         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18518         `multiboot.mod'.
18519         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18520         (multiboot_mod_CFLAGS): New variables.
18521         * loader/i386/pc/linux_normal.c: New file.
18522         * loader/i386/pc/multiboot_normal.c: Likewise.
18524         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18525         attribute `unused'.
18527         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18528         `fdiro' to read the mode information from instead of `diro'.
18530         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18531         looking up a symlink.
18533         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18534         macro.
18535         * normal/command.c (grub_command_execute): Don't parse the
18536         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18537         flags of the command.
18539         * normal/menu.c (grub_menu_run): Fix typo.
18541 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18543         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18545         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18546         `y + 1' instead of `y - 1'.
18548         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18550 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18552         From Hollis Blanchard <hollis@penguinppc.org>:
18553         * kern/misc.c (memmove): New alias for grub_memmove.
18554         (memcmp): New alias for grub_memcmp.
18555         (memset): New alias for grub_memset.
18556         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18557         Change "int handle" to "grub_ieee1275_phandle_t handle".
18558         * include/grub/powerpc/ieee1275/ieee1275.h
18559         (grub_ieee1275_get_property): Likewise.
18561 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18563         Added normal mode command `chainloader' as module chain.mod, which
18564         depends on normal.mod and _chain.mod.
18566         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18567         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18568         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18569         Deleted prototype.
18570         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18571         but arguments parsing moved to ...
18572         (grub_chainloader_cmd): ... here.  New function.
18573         * include/grub/i386/pc/chainloader.h: New file.
18574         * loader/i386/pc/chainloader_normal.c: Likewise.
18576 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18578         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18579         (grub_mkimage_LDFLAGS): Likewise.
18580         (grub_emu_SOURCES): Likewise.
18581         (kernel_img_HEADERS): Added fshelp.h.
18582         * fs/ext2.c: Include <grub/fshelp.h>.
18583         (FILETYPE_REG): New macro.
18584         (FILETYPE_INO_REG): Likewise.
18585         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18586         Changed all users.
18587         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18588         all users.
18589         (grub_fshelp_node): New struct.
18590         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18591         to a pointer.
18592         (grub_ext2_get_file_block): Removed function.
18593         (grub_ext2_read_block): New function.
18594         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18595         This function was written.
18596         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18597         (grub_ext2_find_file): Removed function.
18598         (grub_ext2_read_symlink): New function.
18599         (grub_ext2_iterate_dir): Likewise.
18600         (grub_ext2_open): Rewritten.
18601         (grub_ext2_dir): Rewritten.
18602         * include/grub/fshelp.h: New file.
18603         * fs/fshelp.c: Likewise.
18605 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18607         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18608         (print_message): Add a missing newline.
18609         (run_menu): Added timeout support.
18610         (run_menu_entry): New local function.
18611         (grub_menu_run): Added support for booting.
18613         * kern/loader.c (grub_loader_is_loaded): New function.
18615         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18616         (grub_get_rtc): Exported.
18618         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18619         (grub_get_rtc): Exported.
18621         * include/grub/normal.h (struct grub_command_list): Remove
18622         constant from the member `command'.
18624         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18626         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18628         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18630 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18632         Add support for the JFS filesystem.
18634         * fs/jfs.c: New file.
18635         * include/grub/fs.h (grub_jfs_init): New prototype.
18636         (grub_jfs_fini): New prototype.
18637         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18638         (grub_emu_SOURCES): Likewise.
18639         (pkgdata_MODULES): Add jfs.mod.
18640         (jfs_mod_SOURCES): New variable.
18641         (jfs_mod_CFLAGS): Likewise.
18642         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18643         (grubof_SOURCES): Likewise.
18644         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18646         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18647         endian to the host endian.
18648         (grub_fat_utf16_to_utf8): Move function from there...
18649         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18650         the endianness of the source string anymore.
18651         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18653 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18655         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18656         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18657         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18658         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18660         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18661         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18662         for `node_found' and `it_dir'.
18663         (grub_hfs_dir): Add prototype for `dir_hook'.
18665         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18666         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18667         and `indir32' to silence a gcc warning.
18669         * include/grub/fs.h (grub_hfs_init): New prototype.
18670         (grub_hfs_fini): Likewise.
18673 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18675         Each disk device has its own id now. This is useful to make use
18676         of multiple disk devices.
18678         * include/grub/disk.h (grub_disk_dev_id): New enum.
18679         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18680         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18682         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18683         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18685         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18686         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18688         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18689         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18691         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18692         "id" which is used by the cache manager.
18694         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18695         of just "GRUB".
18697 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18699         * fs/hfs.c: New file.
18700         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18701         (grub_emu_SOURCES): Likewise.
18702         (pkgdata_MODULES): Add hfs.mod.
18703         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18704         (grubof_SOURCES): Likewise.
18705         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18707         * include/grub/misc.h (grub_strncasecmp): Add prototype.
18708         * kern/misc.c (grub_strncasecmp): Add function.
18710 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
18712         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18713         with parentheses.
18715         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18716         (grub_ext2_dir): In case the directory entry type is unknown, read
18717         it from the inode.
18719 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
18721         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18722         grub_load_linux instead of grub_rescue_cmd_linux as second
18723         argument of grub_rescue_register_command.
18725         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18727 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
18729         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18730         function.
18731         * commands/boot.c: Remove the check for `GRUB_UTIL'.
18732         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18733         `loader/powerpc/ieee1275/linux.c',
18734         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18735         * include/grub/powerpc/ieee1275/ieee1275.h
18736         (grub_ieee1275_release): New prototype.
18737         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18738         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18739         normal, boot, linux and linux_normal.
18740         * loader/powerpc/ieee1275/linux.c: New file.
18741         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18743 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
18745         * normal/arg.c (grub_arg_parse): Correct error handling after
18746         reallocating the argumentlist (check if `argl' is not null instead
18747         of checking if `args' is not null).
18748         * kern/mm.c (grub_realloc): Return the same pointer when using the
18749         same region, instead of returning the header address.
18751 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18753         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18754         one block instead of two when looking for the initial partition.
18755         (grub_partition_probe): Initialize the local variable `p' with 0.
18756         Use base 10 for the grub_strtoul call.
18757         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
18758         need for one local variable.
18759         (grub_strtoul): Don't add the new value to `num', instead of that
18760         just assign it.
18762 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18764         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18765         (pxeboot_img_SOURCES): New variable.
18766         (pxeboot_img_ASFLAGS): Likewise.
18767         (pxeboot_img_LDFLAGS): Likewise.
18768         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
18769         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
18770         <lode_leroy@hotmail.com>.
18772 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18774         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18775         there was no input.
18777 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18779         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
18780         the history buffer logic.
18782 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18784         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18785         (FILETYPE_INO_SYMLINK): New macros.
18786         (grub_ext2_find_file): Check if the node is a directory using the
18787         inode stat information instead of using the filetype in the
18788         dirent.  Exclude the first character of an absolute symlink.
18789         (grub_ext2_dir): Mask out the filetype part of the mode member of
18790         the inode.
18792 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
18794         Add support for UFS version 1 and 2.  Add support for the minix
18795         filesystem version 1 and 2, both the variants with 14 and 30 long
18796         filenames.
18798         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18799         fs/minix.c.
18800         (grub_emu_SOURCES): Likewise.
18801         (pkgdata_MODULES): Add ufs.mod and minix.mod.
18802         (ufs_mod_SOURCES): New variable.
18803         (ufs_mod_CFLAGS): Likewise.
18804         (minix_mod_SOURCES): Likewise.
18805         (minix_mod_CFLAGS): Likewise.
18806         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18807         fs/minix.c.
18808         (grubof_SOURCES): Likewise.
18809         * fs/ufs.c: New file.
18810         * fs/minix.c: New file.
18811         * include/grub/fs.h (grub_ufs_init): New prototype.
18812         (grub_ufs_fini): Likewise.
18813         (grub_minix_init): Likewise.
18814         (grub_minix_fini): Likewise.
18815         * util/grub-emu.c (main): Initialize and deinitialize UFS and
18816         minix fs.
18818 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
18820         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18821         commands/ls.c, commands/terminal.c, commands/boot.c,
18822         commands/cmp.c and commands/cat.c.
18823         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18825         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18826         "env.h"
18828 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18830         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18831         and grub_, respectively. Because the conversion is trivial and
18832         mechanical, I omit the details here. Please refer to the CVS
18833         if you need more information.
18835 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18837         * include/pupa: Renamed to ...
18838         * include/grub: ... this.
18839         * util/i386/pc/pupa-mkimage.c: Renamed to ...
18840         * util/i386/pc/grub-mkimage.c: ... this.
18841         * util/i386/pc/pupa-setup.c: Renamed to ...
18842         * util/i386/pc/grub-setup.c: ... this.
18843         * util/pupa-emu.c: Renamed to ...
18844         * util/grub-emu.c: ... this.
18846 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
18848         Add support for the newworld apple macintosh (PPC).  This has been
18849         tested on the powerbook 2000 only.  It only adds support for
18850         generic ieee1275 functions, console and disk support.  This should
18851         be easy to port to other architectures with support for Open
18852         Firmware.
18854         * configure.ac: Accept the powerpc as host_cpu.  In the case of
18855         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
18856         specific tests are only executed while building for the i386.
18857         Inverse test for crosscompile.
18858         * genmk.rb (Utility): Allow assembler files.
18859         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18860         * conf/powerpc-ieee1275.rmk: New file.
18861         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18862         * disk/powerpc/ieee1275/partition.c: Likewise.
18863         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18864         * include/pupa/powerpc/ieee1275/console.h: Likewise.
18865         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18866         * include/pupa/powerpc/ieee1275/time.h: Likewise.
18867         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18868         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18869         * include/pupa/powerpc/ieee1275/loader.h
18870         * include/pupa/powerpc/setjmp.h: Likewise.
18871         * include/pupa/powerpc/types.h: Likewise.
18872         * kern/powerpc/ieee1275/init.c: Likewise.
18873         * kern/powerpc/ieee1275/openfw.c: Likewise.
18874         * term/powerpc/ieee1275/ofconsole.c: Likewise.
18876         These files were written by Johan Rydberg
18877         (jrydberg@night.trouble.net) and I only modified them slightly.
18879         * boot/powerpc/ieee1275/cmain.c: New file.
18880         * boot/powerpc/ieee1275/crt0.S: Likewise.
18881         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18882         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18884 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
18886         * Makefile.in: Update copyright.
18887         * genmodsrc.sh: Likewise.
18888         * gensymlist.sh: Likewise.
18889         * term/i386/pc/vga.c: Indent correctly.
18891         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18892         bugreporting address.
18893         * util/i386/pc/pupa-setup.c (usage): Likewise,
18894         (main): Call pupa_ext2_init and pupa_ext2_fini.
18896         * fs/fat.c (log2): Renamed to ...
18897         (fat_log2): ... this.
18898         All callers changed.
18899         * kern/misc.c (memcpy): Alias to pupa_memmove.
18900         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18901         lvalue cast.
18902         * util/console.c (pupa_ncurses_fini): Return 0.
18904         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18905         Move fail label here.
18906         [__GNU__]: Don't warn when using stat.
18907         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18908         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18909         long int. Use strtol instead of strtoul.
18911 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
18913         * commands/boot.c: New file.
18914         * commands/cat.c: Likewise.
18915         * commands/cmp.c: Likewise.
18916         * commands/ls.c: Likewise.
18917         * commands/terminal.c: Likewise.
18918         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18919         (pupa_register_command): Changed interface to match the new
18920         argument parser.
18921         (pupa_command_execute): Changed (almost rewritten) so it uses
18922         pupa_split_command.  Added support for setting variables using the
18923         syntax `foo=bar'.
18924         (rescue_command): Changed to work with the new argument parser.
18925         (terminal_command): Moved from here to commands/terminal.c.
18926         (set_command): New function.
18927         (unset_command): New function.
18928         (insmod_command): New function.
18929         (rmmod_command): New function.
18930         (lsmod_command): New function.
18931         (pupa_command_init): Don't initialize the command terminal
18932         anymore.  Initialize the commands set, unset, insmod, rmmod and
18933         lsmod.
18934         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18935         (kernel_img_HEADERS): Add arg.h and env.h.
18936         (pupa_mkimage_LDFLAGS): Add kern/env.c.
18937         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18938         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18939         normal/arg.c.
18940         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18941         terminal.mod.
18942         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18943         (boot_mod_SOURCES): New variable.
18944         (terminal_mod_SOURCES): Likewise.
18945         (ls_mod_SOURCES): Likewise.
18946         (cmp_mod_SOURCES): Likewise.
18947         (cat_mod_SOURCES): Likewise.
18949         * normal/arg.c: New file.
18950         * kern/env.c: Likewise.
18951         * include/pupa/arg.h: Likewise.
18952         * include/pupa/env.h: Likewise.
18953         * font/manager.c (font_command): Changed to match argument parsing
18954         interface changes.
18955         (PUPA_MOD_INIT): Likewise.
18956         * hello/hello.c (pupa_cmd_hello): Likewise.
18957         (PUPA_MOD_INIT): Likewise.
18958         * include/pupa/disk.h: Include <pupa/device.h>.
18959         (pupa_print_partinfo): New prototype.
18960         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18961         (pupa_dl_get_prefix): Likewise.
18962         * include/pupa/misc.h: Include <pupa/err.h>.
18963         (pupa_isgraph): New prototype.
18964         (pupa_isdigit): Likewise.
18965         (pupa_split_cmdline): Likewise.
18966         * include/pupa/normal.h: Include <pupa/arg.h>.
18967         (pupa_command): Changed the prototype of the member `func' to
18968         match the argument parsing interface.  Added member `options'.
18969         (pupa_register_command): Updated to match function.
18970         (pupa_arg_parse): New prototype.
18971         (pupa_hello_init) [PUPA_UTIL]: New prototype.
18972         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18973         (pupa_ls_init) [PUPA_UTIL]: Likewise.
18974         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18975         (pupa_cat_init) [PUPA_UTIL]: Likewise.
18976         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18977         (pupa_boot_init) [PUPA_UTIL]: Likewise.
18978         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18979         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18980         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18981         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18982         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18983         * kern/disk.c: Include <pupa/file.h>.
18984         (pupa_print_partinfo): New function.
18985         * kern/dl.c: Include <pupa/env.h>.
18986         (pupa_dl_dir): Variable removed.
18987         (pupa_dl_load): Use the environment variable `prefix' instead of
18988         the variable pupa_dl_dir.
18989         (pupa_dl_set_prefix): Function removed.
18990         (pupa_dl_get_prefix): Likewise.
18991         * kern/i386/pc/init.c: Include <pupa/env.h>.
18992         (pupa_machine_init): Use the environment variable `prefix' instead of
18993         using pupa_dl_set_prefix to set the prefix.
18994         * kern/main.c: Include <pupa/env.h>.
18995         (pupa_set_root_dev): Use the environment variable `prefix' instead of
18996         using pupa_dl_get_prefix to get the prefix.
18997         * kern/misc.c: Include <pupa/env.h>.
18998         (pupa_isdigit): New function.
18999         (pupa_isgraph): Likewise.
19000         (pupa_ftoa): Likewise.
19001         (pupa_vsprintf): Added support for printing values of the type
19002         `double'.  Make it possible to format variable output when using
19003         formatting like `%1.2%f'.
19004         (pupa_split_cmdline): New function.
19005         * kern/rescue.c: Include <pupa/env.h>.
19006         (next_word): Removed function.
19007         (pupa_rescue_cmd_prefix): Likewise.
19008         (pupa_rescue_cmd_set): New function.
19009         (pupa_rescue_cmd_unset): New function.
19010         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19011         split the command line instead of splitting it here.  Added
19012         support for setting variables using the syntax `foo=bar'.  Don't
19013         initialize the prefix command anymore.  Initialized the set and
19014         unset commands.
19015         * normal/cmdline.c: Include <pupa/env.h>.
19016         (pupa_tab_complete): Added prototypes for print_simple_completion,
19017         print_partition_completion, add_completion, iterate_commands,
19018         iterate_dev, iterate_part and iterate_dir. Moved code to print
19019         partition information from here to kern/disk.c.
19020         (pupa_cmdline_run): Don't check if the function exists anymore.
19021         * normal/main.c: Include <pupa/env.h>.
19022         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19023         instead of using pupa_dl_get_prefix to get the prefix.
19024         * term/i386/pc/vga.c: Include <pupa/arg.h>.
19025         (check_vga_mem): Cast pointers to `void *' to silence a gcc
19026         warning.
19027         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19028         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19029         ((unused))' to silence a gcc warning.
19030         (pupa_vga_setcolor): Likewise.
19031         (debug_command): Changed to match argument parsing
19032         interface changes.
19033         * util/pupa-emu.c: Include <pupa/env.h>.
19034         (options): Added 0's for unused fields to silence a gcc warning.
19035         (argp): Likewise.
19036         (main): Use the environment variable `prefix' instead of using
19037         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19038         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19039         and terminal.
19041         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19042         * util/misc.c: Include <malloc.h>.
19043         (pupa_malloc): Rewritten so errors are correctly reported.
19044         (pupa_realloc): Likewise.
19045         (pupa_memalign): Likewise.
19046         (pupa_mm_init_region): Declare unused variables with
19047         `__attribute__ ((unused))' to silence a gcc warning.
19048         * normal/i386/setjmp.S: Remove tab at the end of the file to
19049         silence a gcc warning.
19050         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19051         variables with `__attribute__ ((unused))' to silence a gcc
19052         warning.
19053         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19054         local variable i unsigned to silence a gcc warning.
19056         * kern/term.c: Include <pupa/misc.h>.
19057         (pupa_more_lines): New variable.
19058         (pupa_more): Likewise.
19059         (pupa_putcode): When the pager is active pause at the end of every
19060         screen.
19061         (pupa_set_more): New function.
19062         * include/pupa/term.h (pupa_set_more): New prototype.
19065 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19067         Now this project is GRUB 2 rather than PUPA. The location of
19068         the CVS repository was moved to GRUB's.
19070         * configure.ac: Use bug-grub as the reporting address.
19071         Use GRUB instead of PUPA.
19072         Change the version number to 1.90.
19074 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19076         * genkernsyms.sh: Updated copyright information.
19077         * genmk.rb: Likewise.
19078         * genmodsrc.sh: Likewise.
19079         * gensymlist.sh: Likewise.
19080         * boot/i386/pc/boot.S: Likewise.
19081         * boot/i386/pc/diskboot.S: Likewise.
19082         * disk/i386/pc/biosdisk.c: Likewise.
19083         * disk/i386/pc/partition.c: Likewise.
19084         * font/manager.c: Likewise.
19085         * fs/ext2.c: Likewise.
19086         * fs/fat.c: Likewise.
19087         * include/pupa/boot.h: Likewise.
19088         * include/pupa/device.h: Likewise.
19089         * include/pupa/disk.h: Likewise.
19090         * include/pupa/dl.h: Likewise.
19091         * include/pupa/elf.h: Likewise.
19092         * include/pupa/err.h: Likewise.
19093         * include/pupa/file.h: Likewise.
19094         * include/pupa/font.h: Likewise.
19095         * include/pupa/fs.h: Likewise.
19096         * include/pupa/kernel.h: Likewise.
19097         * include/pupa/loader.h: Likewise.
19098         * include/pupa/misc.h: Likewise.
19099         * include/pupa/mm.h: Likewise.
19100         * include/pupa/net.h: Likewise.
19101         * include/pupa/normal.h: Likewise.
19102         * include/pupa/rescue.h: Likewise.
19103         * include/pupa/setjmp.h: Likewise.
19104         * include/pupa/symbol.h: Likewise.
19105         * include/pupa/term.h: Likewise.
19106         * include/pupa/types.h: Likewise.
19107         * include/pupa/i386/setjmp.h: Likewise.
19108         * include/pupa/i386/types.h: Likewise.
19109         * include/pupa/i386/pc/biosdisk.h: Likewise.
19110         * include/pupa/i386/pc/boot.h: Likewise.
19111         * include/pupa/i386/pc/console.h: Likewise.
19112         * include/pupa/i386/pc/init.h: Likewise.
19113         * include/pupa/i386/pc/kernel.h: Likewise.
19114         * include/pupa/i386/pc/linux.h: Likewise.
19115         * include/pupa/i386/pc/loader.h: Likewise.
19116         * include/pupa/i386/pc/memory.h: Likewise.
19117         * include/pupa/i386/pc/multiboot.h: Likewise.
19118         * include/pupa/i386/pc/partition.h: Likewise.
19119         * include/pupa/i386/pc/time.h: Likewise.
19120         * include/pupa/i386/pc/vga.h: Likewise.
19121         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19122         * include/pupa/util/getroot.h: Likewise.
19123         * include/pupa/util/misc.h: Likewise.
19124         * include/pupa/util/resolve.h: Likewise.
19125         * kern/device.c: Likewise.
19126         * kern/disk.c: Likewise.
19127         * kern/dl.c: Likewise.
19128         * kern/err.c: Likewise.
19129         * kern/file.c: Likewise.
19130         * kern/fs.c: Likewise.
19131         * kern/loader.c: Likewise.
19132         * kern/main.c: Likewise.
19133         * kern/misc.c: Likewise.
19134         * kern/mm.c: Likewise.
19135         * kern/rescue.c: Likewise.
19136         * kern/term.c: Likewise.
19137         * kern/i386/dl.c: Likewise.
19138         * kern/i386/pc/init.c: Likewise.
19139         * kern/i386/pc/lzo1x.S: Likewise.
19140         * kern/i386/pc/startup.S: Likewise.
19141         * loader/i386/pc/chainloader.c: Likewise.
19142         * loader/i386/pc/linux.c: Likewise.
19143         * loader/i386/pc/multiboot.c: Likewise.
19144         * normal/cmdline.c: Likewise.
19145         * normal/command.c: Likewise.
19146         * normal/main.c: Likewise.
19147         * normal/menu.c: Likewise.
19148         * normal/i386/setjmp.S: Likewise.
19149         * term/i386/pc/console.c: Likewise.
19150         * term/i386/pc/vga.c: Likewise.
19151         * util/console.c: Likewise.
19152         * util/genmoddep.c: Likewise.
19153         * util/misc.c: Likewise.
19154         * util/pupa-emu.c: Likewise.
19155         * util/resolve.c: Likewise.
19156         * util/unifont2pff.rb: Likewise.
19157         * util/i386/pc/biosdisk.c: Likewise.
19158         * util/i386/pc/getroot.c: Likewise.
19159         * util/i386/pc/pupa-mkimage.c: Likewise.
19160         * util/i386/pc/pupa-setup.c: Likewise.
19162 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19164         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19165         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19166         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19167         reading and reset it after reading.
19168         (pupa_ext2_close): Return PUPA_ERR_NONE.
19170         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19171         Correct value.
19172         (struct linux_kernel_header): Add kernel_version and
19173         initrd_addr_max.
19174         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19175         pupa_file_read succeeds.
19176         (pupa_rescue_cmd_initrd): Implement.
19178 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19180         * fs/ext2.c (pupa_ext2_label): New function.
19181         (pupa_ext2_fs): Added label.
19182         * fs/fat.c (pupa_fat_label): New function.
19183         (pupa_fat_fs): Added label.
19184         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19186         * kern/misc.c (pupa_strndup): New function.
19187         * include/pupa/misc.h (pupa_strndup): New prototype.
19189         * include/pupa/normal.h: Include <pupa/err.h>.
19190         (pupa_set_history): New prototype.
19191         (pupa_iterate_commands): New prototype.
19192         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19193         <pupa/disk.h>, <pupa/file.h>.
19194         (hist_size): New variable.
19195         (hist_lines): Likewise.
19196         (hist_end): Likewise.
19197         (hist_used): Likewise.
19198         (pupa_set_history): New function.
19199         (pupa_history_get): Likewise.
19200         (pupa_history_add): Likewise.
19201         (pupa_history_replace): Likewise.
19202         (pupa_tab_complete): Likewise.
19203         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19204         completion shows partitionnames while completing partitions, this
19205         feature was suggested by Jeff Bailey.
19206         * normal/command.c (pupa_iterate_commands): New function.
19207         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19208         (pupa_normal_init): Initialize history buffer.
19209         (PUPA_MOD_INIT): Likewise.
19210         (pupa_normal_fini): Free the history buffer.
19211         (PUPA_MOD_FINI): Likewise.
19213         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19214         key.
19216         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19217         * configure.ac [i386]: Check for regparam bug.
19218         (NESTED_FUNC_ATTR) [! i386]: Defined.
19220 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19222         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19223         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19224         (pupa_emu_SOURCES): New variable.
19225         (pupa_emu_LDFLAGS): Likewise.
19226         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19227         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19228         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19229         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19230         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19231         (pupa_jmp_buf): New typedef.
19232         (pupa_setjmp) [PUPA_UTIL]: New macro.
19233         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19234         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19235         (pupa_refresh): New prototype.
19236         * include/pupa/util/getroot.h: New file.
19237         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19238         it.
19239         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19240         (pupa_rescue_cmd_cat): Likewise.
19241         (pupa_rescue_cmd_ls): Likewise.
19242         (pupa_rescue_cmd_testload): Likewise.
19243         (pupa_rescue_cmd_lsmod): Likewise.
19244         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19245         * normal/menu.c (run_menu): Likewise.
19246         * kern/term.c (pupa_cls): Likewise.
19247         (pupa_refresh): New function.
19248         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19249         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19250         * util/console.c: New file.
19252         * util/i386/pc/getroot.c: New file.
19253         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19254         (pupa_putchar): New function.
19255         (pupa_refresh): Likewise.
19256         (xgetcwd): Function moved to ...
19257         (strip_extra_slashes): Likewise.
19258         (get_prefix): Likewise.
19259         * util/i386/pc/getroot.c: ... here.
19260         (find_root_device): Function moved and renamed to...
19261         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19262         Changed all callers.
19263         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19264         and renamed to...
19265         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19266         Changed all callers.
19267         * util/misc.c (pupa_memalign): New function.
19268         (pupa_mm_init_region): Likewise.
19269         (pupa_register_exported_symbols): Likewise.
19270         (pupa_putchar): Function removed.
19271         * util/pupa-emu.c: New file.
19273 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19275         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19276         (_multiboot_mod_SOURCES): New variable.
19277         (_multiboot_mod_CFLAGS): Likewise.
19278         * loader/i386/pc/multiboot.c: New file.
19279         * include/pupa/i386/pc/multiboot.h: Likewise.
19280         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19281         (pupa_multiboot_real_boot): New function.
19282         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19283         (pupa_multiboot_real_boot): New prototype.
19284         (pupa_rescue_cmd_multiboot): Likewise
19285         (pupa_rescue_cmd_module): Likewise.
19287         * kern/loader.c (pupa_loader_set): Continue when
19288         pupa_loader_unload_func() fails.
19289         (pupa_loader_unset): New function.
19290         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19292         * kern/misc.c (pupa_stpcpy): New function.
19293         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19295 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19297         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19298         for available extensions.
19300         * include/pupa/i386/pc/time.h: New file.
19301         * kern/disk.c: Include <pupa/machine/time.h>.
19302         (PUPA_CACHE_TIMEOUT): New macro.
19303         (pupa_last_time): New variable.
19304         (pupa_disk_open): Flush the cache when there was a timeout.
19305         (pupa_disk_close): Reset the timer.
19306         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19307         pupa_currticks.
19308         * util/misc.c: Include <sys/times.h>
19309         (pupa_get_rtc): New function.
19311 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19313         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19314         as blocks.
19315         (pupa_ext2_get_file_block): Use blocks member.
19317         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19318         first block. Return -1 instead of pupa_errno on error.
19320 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19322         * README: In the pupa-mkimage example use _chain instead of chain
19323         and ext2 instead of fat.
19324         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19325         adding journal playback for ext2fs.
19326         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19327         (pkgdata_MODULES): Added ext2.mod.
19328         (ext2_mod_SOURCES): New variable.
19329         (ext2_mod_CFLAGS): Likewise.
19330         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19331         * include/pupa/misc.h (pupa_strncpy): New prototype.
19332         (pupa_strcat): Likewise.
19333         (pupa_strncmp): Likewise.
19334         * kern/misc.c (pupa_strcat): Enable function.
19335         (pupa_strncpy): New function.
19336         (pupa_strncmp): Likewise.
19337         * fs/ext2.c: New file.
19339         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19340         when the read failed before retrying.
19341         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19342         (_FILE_OFFSET_BITS): Likewise.
19343         * configure.ac: Added AC_SYS_LARGEFILE.
19345 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19347         * genmk.rb (PModule#rule): Make sure to get only symbol names
19348         from the output of nm.
19349         Reported by Robert Millan <zeratul2@wanadoo.es>.
19351 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19353         I forgot to check in these changes for a long time. This adds
19354         incomplete support for VGA console, and this is still very
19355         buggy. Also, a lot of consideration is required for I18N,
19356         UNICODE, and VGA font issues. Therefore, assume that this is
19357         such that "better than nothing".
19359         * font/manager.c: New file.
19360         * include/pupa/font.h: Likewise.
19361         * include/pupa/i386/pc/vga.h: Likewise.
19362         * term/i386/pc/vga.c: Likewise.
19363         * util/unifont2pff.rb: Likewise.
19365         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19366         (pkgdata_MODULES): Added vga.mod and font.mod.
19367         (vga_mod_SOURCES): New variables.
19368         (vga_mod_CFLAGS): Likewise.
19369         (font_mod_SOURCES): Likewise.
19370         (font_mod_CFLAGS): Likewise.
19372         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19374         * include/pupa/term.h: Include pupa/err.h.
19375         (struct pupa_term): Added init and fini.
19376         Changed the argument of putchar to pupa_uint32_t.
19378         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19379         (pupa_console_real_putchar): New prototype.
19380         (pupa_console_putchar): Removed.
19381         (pupa_console_checkkey): Exported.
19382         (pupa_console_getkey): Likewise.
19384         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19385         characters.
19387         * kern/term.c (pupa_term_set_current): Rewritten.
19388         (pupa_putchar): Likewise.
19389         (pupa_putcode): New function.
19391         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19392         (pupa_console_real_putchar): ... this.
19393         (pupa_vga_set_mode): New function.
19394         (pupa_vga_get_font): Likewise.
19396         * normal/command.c: Include pupa/term.h.
19397         (terminal_command): New function.
19398         (pupa_command_init): Register the command "terminal".
19400         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19401         (DISP_UP): Likewise.
19402         (DISP_RIGHT): Likewise.
19403         (DISP_DOWN): Likewise.
19404         (DISP_HLINE): Likewise.
19405         (DISP_VLINE): Likewise.
19406         (DISP_UL): Likewise.
19407         (DISP_UR): Likewise.
19408         (DISP_LL): Likewise.
19409         (DISP_LR): Likewise.
19411         * term/i386/pc/console.c (pupa_console_putchar): New function.
19413 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19415         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19416         FIX. Reverse the path_list.
19418         * include/pupa/normal.h: Export pupa_register_command and
19419         pupa_unregister_command.
19421         * hello/hello.c (pupa_cmd_hello): New module.
19422         * conf/i386-pc.rmk: Added hello.mod.
19424 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19426         * kern/i386/pc/lzo1x.S: New file.
19428         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19429         (compress_kernel): New variable.
19430         (generate_image): Heavily modified to support compressing a
19431         large part of the core image.
19433         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19434         leak.
19435         (pupa_util_load_image): New function.
19437         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19438         (pupa_compressed_size): New variable.
19439         (codestart): Enable Gate A20 here.
19440         Decompress the compressed part of the core image.
19441         Rearrange the code to put functions and variables which are
19442         required for initialization in the non-compressed part.
19443         Include lzo1x.S.
19445         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19446         here.
19448         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19450         * include/pupa/i386/pc/kernel.h
19451         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19452         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19453         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19454         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19455         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19457         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19459         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19460         (Utility#rule): Likewise.
19462         * configure.ac: Check if LZO is available.
19464 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19466         * include/pupa/normal.h: New file.
19467         * include/pupa/setjmp.h: Likewise.
19468         * include/pupa/i386/setjmp.h: Likewise.
19469         * normal/cmdline.c: Likewise.
19470         * normal/command.c: Likewise.
19471         * normal/main.c: Likewise.
19472         * normal/menu.c: Likewise.
19473         * normal/i386/setjmp.S: Likewise.
19475         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19476         (pupa_rescue_cmd_initrd): Likewise.
19478         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19479         Likewise.
19481         * kern/i386/pc/startup.S (translation_table): New variable.
19482         (translate_keycode): New function.
19483         (pupa_console_getkey): Call translate_keycode.
19485         * kern/rescue.c (attempt_normal_mode): New function.
19486         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19487         it failed, print a message.
19489         * kern/mm.c (pupa_real_malloc): Print more information when a
19490         free magic is broken.
19491         (pupa_free): If the first free header is not free actually, set
19492         it to P.
19494         * kern/main.c (pupa_load_normal_mode): Just load the module
19495         "normal".
19496         (pupa_main): Don't print the message
19497         "Entering into rescue mode..." here.
19499         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19500         Declared.
19501         (pupa_rescue_cmd_initrd): Likewise.
19502         (pupa_rescue_cmd_initrd): Likewise.
19504         * include/pupa/symbol.h (FUNCTION): Specify the type.
19505         (VARIABLE): Likewise.
19507         * include/pupa/err.h (pupa_err_t): Added
19508         PUPA_ERR_UNKNOWN_COMMAND.
19510         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19511         (pupa_dl_get_prefix): Likewise.
19513         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19514         Added _chain.mod and _linux.mod instead of chain.mod and
19515         linux.mod.
19516         (chain_mod_SOURCES): Renamed to ...
19517         (_chain_mod_SOURCES): ... this.
19518         (chain_mod_CFLAGS): Renamed to ...
19519         (_chain_mod_CFLAGS): ... this.
19520         (linux_mod_SOURCES): Renamed to ...
19521         (_linux_mod_SOURCES): ... this.
19522         (linux_mod_CFLAGS): Renamed to ...
19523         (_linux_mod_CFLAGS): ... this.
19524         (normal_mod_SOURCES): New variable.
19525         (normal_mod_CFLAGS): Likewise.
19526         (normal_mod_ASFLAGS): Likewise.
19528 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19530         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19531         possible.
19533         * kern/dl.c (pupa_dl_ref): Refer depending modules
19534         recursively.
19535         (pupa_dl_unref): Unrefer depending modules recursively.
19536         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19537         a module is unloaded before one depending on that module is
19538         unloaded.
19539         (pupa_dl_unload): Unload depending modules explicitly,
19540         if possible.
19542 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19544         * include/pupa/i386/pc/linux.h: New file.
19545         * loader/i386/pc/linux.c: Likewise.
19547         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19548         Removed.
19549         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19550         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19551         of PUPA_CHAINLOADER_BOOT_SECTOR.
19553         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19554         (pupa_linux_prot_size): New variable.
19555         (pupa_linux_tmp_addr): Likewise.
19556         (pupa_linux_real_addr): Likewise.
19557         (pupa_linux_boot_zimage): New function.
19558         (pupa_linux_boot_bzimage): Likewise.
19560         * kern/i386/pc/init.c (struct mem_region): New structure.
19561         (MAX_REGIONS): New macro.
19562         (mem_regions): New variable.
19563         (num_regions): Likewise.
19564         (pupa_os_area_addr): Likewise.
19565         (pupa_os_area_size): Likewise.
19566         (pupa_lower_mem): Likewise.
19567         (pupa_upper_mem): Likewise.
19568         (add_mem_region): New function.
19569         (compact_mem_regions): Likewise.
19570         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19571         the size of the conventional memory and that of so-called upper
19572         memory (before the first memory hole).
19573         Instead of adding each found region to free memory, use
19574         add_mem_region and add them after removing overlaps.
19575         Also, add only 1/4 of the upper memory to free memory. The rest
19576         is used for loading OS images. Maybe this is ad hoc, but this
19577         makes it much easier to relocate OS images when booting.
19579         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19580         (pupa_enter_rescue_mode): Don't register initrd and module.
19582         * kern/mm.c: Include pupa/dl.h.
19584         * kern/main.c: Include pupa/file.h and pupa/device.h.
19586         * kern/loader.c (pupa_loader_load_module_func): Removed.
19587         (pupa_loader_load_module): Likewise.
19589         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19590         ``.o''.
19592         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19593         (pupa_linux_tmp_addr): Likewise.
19594         (pupa_linux_real_addr): Likewise.
19595         (pupa_linux_boot_zimage): Likewise.
19596         (pupa_linux_boot_bzimage): Likewise.
19598         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19599         (pupa_upper_mem): Likewise.
19600         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19601         module is too dangerous.
19603         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19604         (pupa_os_area_size): Likewise.
19605         (pupa_loader_set): Remove the first argument. Loader doesn't
19606         manage modules or initrd any longer.
19607         (pupa_loader_load_module): Removed.
19609         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19610         (linux_mod_SOURCES): New variable.
19611         (linux_mod_CFLAGS): Likewise.
19613 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19615         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19616         the length of a blocklist correctly.
19618         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19619         Use ioctl only if the OS file is a block device.
19620         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19621         not very useful for normal files.
19623         * kern/main.c (pupa_set_root_dev): New function.
19624         (pupa_load_normal_mode): Likewise.
19625         (pupa_main): Call those above.
19627         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19628         pupa_uint16_t.
19630         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19632 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19634         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19635         (setup): Configure the installed partition information and the
19636         dl prefix.
19638         * loader/i386/pc/chainloader.c (my_mod): New variable.
19639         (pupa_chainloader_unload): New function.
19640         (pupa_rescue_cmd_chainloader): Refer itself.
19641         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19643         * kern/i386/pc/startup.S (install_partition): Removed.
19644         (version_string): Likewise.
19645         (config_file): Likewise.
19646         (pupa_install_dos_part): New variable.
19647         (pupa_install_bsd_part): Likewise.
19648         (pupa_prefix): Likewise.
19649         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19651         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19652         and pupa/misc.h.
19653         (make_install_device): New function.
19654         (pupa_machine_init): Set the dl prefix.
19656         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19657         (buf): Renamed to ...
19658         (linebuf): ... this.
19659         (pupa_rescue_cmd_prefix): New function.
19660         (pupa_rescue_cmd_insmod): Likewise.
19661         (pupa_rescue_cmd_rmmod): Likewise.
19662         (pupa_rescue_cmd_lsmod): Likewise.
19663         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19664         rmmod and lsmod.
19666         * kern/mm.c (pupa_memalign): If failed even after invalidating
19667         disk caches, unload unneeded modules and retry.
19669         * kern/misc.c (pupa_memmove): New function.
19670         (pupa_memcpy): Removed.
19671         (pupa_strcpy): New function.
19672         (pupa_itoa): Made static.
19674         * kern/dl.c (pupa_dl_iterate): New function.
19675         (pupa_dl_ref): Likewise.
19676         (pupa_dl_unref): Likewise.
19677         (pupa_dl_unload): Return if succeeded or not.
19678         (pupa_dl_unload_unneeded): New function.
19679         (pupa_dl_unload_all): Likewise.
19680         (pupa_dl_init): Renamed to ...
19681         (pupa_dl_set_prefix): ... this.
19682         (pupa_dl_get_prefix): New function.
19684         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19685         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19686         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19687         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19688         (pupa_install_dos_part): Declared.
19689         (pupa_install_bsd_part): Likewise.
19690         (pupa_prefix): Likewise.
19691         (pupa_boot_drive): Likewise.
19693         * include/pupa/types.h: Fix a typo.
19695         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19696         pupa_memmove.
19697         (pupa_memmove): Declared.
19698         (pupa_strcpy): Likewise.
19700         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19701         pupa_mod_init takes one argument, its own module.
19702         (pupa_dl_unload_unneeded): Declared.
19703         (pupa_dl_unload_all): Likewise.
19704         (pupa_dl_ref): Likewise.
19705         (pupa_dl_unref): Likewise.
19706         (pupa_dl_iterate): Likewise.
19707         (pupa_dl_init): Renamed to ...
19708         (pupa_dl_set_prefix): ... this.
19709         (pupa_dl_get_prefix): Declared.
19711         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19712         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19713         unloaded.
19714         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19715         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19717         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19718         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19720 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19722         * util/i386/pc/pupa-setup.c (setup): Define the internal
19723         function find_first_partition_start at the top level, because GCC
19724         3.0.x cannot compile internal functions in deeper scopes
19725         correctly.
19726         (find_root_device): Use lstat instead of stat.
19727         Don't follow symbolic links.
19728         Fix the path-constructing code.
19730         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19731         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19732         by a BLKGETSIZE ioctl first, because block devices don't fill
19733         the member st_mode of the structure stat on Linux.
19734         [__linux__] (linux_find_partition): Use a temporary buffer
19735         REAL_DEV for the working space. Copy it to DEV before returning.
19736         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19737         buffer cache consistent.
19738         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19739         strncmp. The previous value was merely wrong.
19740         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19742         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19743         FAT size is 12. The previous value was merely wrong.
19745         * kern/main.c (pupa_main): Don't split the starting message from
19746         newlines.
19748         * kern/term.c (pupa_putchar): Put CR after LF instead of before
19749         LF, because BIOS goes crazy about character attributes in this
19750         case.
19752 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19754         * include/i386/pc/util/biosdisk.h: New file.
19755         * util/i386/pc/biosdisk.c: Likewise.
19756         * util/i386/pc/pupa-setup.c: Likewise.
19758         * Makefile.in (INCLUDE_DISTFILES): Added
19759         include/pupa/i386/pc/util/biosdisk.h.
19760         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19761         directory util/i386/pc.
19762         (install-local): Added a rule for sbin_UTILITIES.
19763         (uninstall): Likewise.
19765         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19767         * util/misc.c (xrealloc): New function.
19768         (pupa_malloc): Likewise.
19769         (pupa_free): Likewise.
19770         (pupa_realloc): Likewise.
19771         (pupa_stop): Likewise.
19772         (pupa_putchar): Likewise.
19774         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19776         * include/pupa/util/misc.h (xrealloc): Declared.
19778         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19779         macro.
19780         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19781         (PUPA_BOOT_MACHINE_BPB_END): ... this.
19783         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19784         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19786         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19787         way should be implemented.
19788         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19790         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19791         the size of NAME for safety.
19792         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19793         0x88.
19795         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19796         (pupa_setup_SOURCES): Likewise.
19798         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19800 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19802         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19803         bunch of pushl's from pusha, because this destroys the return
19804         value.
19806 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19808         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19809         This means that any missing prototypes could be fatal. Also, you
19810         must take care when writing assembly code. See the comments at
19811         the beginning of startup.S, for more details.
19813         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19814         compilation mechanism.
19815         (pupa_chainloader_real_boot): Likewise.
19816         (pupa_biosdisk_rw_int13_extensions): Likewise.
19817         (pupa_biosdisk_rw_standard): Likewise.
19818         (pupa_biosdisk_check_int13_extensions): Likewise.
19819         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19820         (pupa_biosdisk_get_diskinfo_standard): Likewise.
19821         (pupa_get_memsize): Likewise.
19822         (pupa_get_mmap_entry): Likewise.
19823         (pupa_console_putchar): Likewise.
19824         (pupa_console_setcursor): Likewise.
19825         (pupa_getrtsecs): Use pushl instead of push.
19827         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19828         memory instead of the stack for a mmap entry, because some
19829         BIOSes may ignore the maximum size and overflow.
19831         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19833         * genmk.rb (PModule#rule): Compile automatically generated
19834         sources with module-specific CFLAGS as well as other sources.
19836 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19838         * configure.ac: Check ld.
19839         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19840         respectively, before checking endianness and sizes.
19842         * Makefile.in (LD): New variable.
19844 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19846         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19848 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19850         * Changelog: New file.