2009-09-10 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob63924d91790e7f13ff1179f9eb42318233121541
1 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
3         * util/grub.d/40_custom.in: Ask user to type custom entries below
4         comment, rather than below 'exec tail' line.
6 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
8         * util/grub.d/40_custom.in: Make sure that the explanatory text is
9         visible in grub.cfg.
11 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
13         * util/grub.d/40_custom.in: Make it a little clearer how to use this
14         file.
16 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
18         * docs/grub.cfg: Add an example menu entry for memtest86+.
20 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
22         * config.guess: Update to latest version from config git.
23         * config.sub: Likewise.
25 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
27         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
28         unknown-command case.  Fixes bug #27320.
30 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
32         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
33         `help' if the command exists.
35 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
37         * INSTALL: Require GCC 4.1.3 or later.
39 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
41         * Makefile.in (RMKFILES): add i386-qemu.rmk
42         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
43         $(srcdir)/stamp-h.in
45 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
47         * util/grub-probe.c (probe): Comment out buggy codepath, which
48         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
49         should be re-enabled after 1.97.
51 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
53         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
54         find searches for.
56 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
58         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
59         unnecessary calls to grub_error.
61 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
63         * NEWS: Mention `keystatus' and Unicode fonts.
65 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
67         * configure.ac: Bump version to 1.97~beta2.
68         * docs/version.texi: Likewise.
70 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
72         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
73         containing unwind information in some cases where it previously did
74         not. Use -fno-dwarf2-cfi-asm if available to restore the old
75         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
76         discussion.
78 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
80         Embedding loadenv module into grub-emu
82         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
83         commands/loadenv.c
84         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
85         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
86         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
87         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
88         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
89         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
91 2009-09-03  Magnus Granberg  <zorry@ume.nu>
93         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
94         include -fPIE in the default specs.
95         * configure.ac: Check if pie_possible is yes and add -fno-PIE
96         to TARGET_CFLAGS.
98 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
100         * INSTALL: Note that GNU Bison 2.3 or later is required.
102 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
104         * kern/i386/pc/startup.S: Fix typo.
106 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
108         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
109         according to GCS.
111 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
113         * docs/grub.texi (Naming convention): Describe one-based partition
114         numbering.
115         (Device syntax): Likewise.
116         (File name syntax): Likewise.
117         (Block list syntax): Likewise.
118         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
119         menu.lst.
120         (File name syntax): Likewise.
121         (Command-line and menu entry commands): Document acpi, blocklist,
122         crc, export, insmod, keystatus, ls, set, and unset commands.
124 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
126         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
127         to avoid implying that only one of --shift, --ctrl, or --alt may be
128         used.
130 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
132         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
133         rather than comparing against S_IFREG, which will almost never work.
135 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
137         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
138         (write_blocklists): Likewise.
140 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
142         * script/lua/grub_lua.h (fputs): Supply a format string as the first
143         argument to grub_printf.
145 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
147         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
148          non GNU test.
150 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
152         * kern/file.c (grub_file_read): Spelling fix
154 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
156         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
157         loading of headers in some cases.
159 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
161         * configure.ac: Bump version to 1.97~beta1.
162         * docs/version.texi: Likewise.
164 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
166         * include/grub/i386/xnu.h: Add license header.
167         include grub/err.h explicitly.
169 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
171         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
172         to `ufs' in the vfs.root.mountfrom kernel parameter.
174 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
176         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
178         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
179         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
181         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
182         `ARRAY_SIZE' macro.
184 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
186         * kern/file.c (grub_file_read): Check offset.
187         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
188         * fs/jfs.c (grub_jfs_read_file): Likewise.
189         * fs/ntfs.c (grub_ntfs_read): Likewise.
190         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
191         * fs/minix.c (grub_minix_read_file): Correct offset check.
192         * fs/ufs.c (grub_ufs_read_file): Likewise.
194 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
196         * term/i386/pc/console.c (bios_data_area): Cast
197         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
199 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
201         1-bit optimised blitters.
203         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
204         prototype.
205         (grub_video_fbblit_replace_24bit_1bit): Likewise.
206         (grub_video_fbblit_replace_16bit_1bit): Likewise.
207         (grub_video_fbblit_replace_8bit_1bit): Likewise.
208         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
209         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
210         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
211         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
212         function.
213         (grub_video_fbblit_replace_24bit_1bit): Likewise.
214         (grub_video_fbblit_replace_16bit_1bit): Likewise.
215         (grub_video_fbblit_replace_8bit_1bit): Likewise.
216         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
217         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
218         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
219         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
220         when possible.
221         * video/video.c (grub_video_get_blit_format): Return
222         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
224 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
226         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
227         the first argument to grub_printf.
229 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
230 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
232         Add `getkeystatus' terminal method.  Add a new `keystatus' command
233         to query it.
235         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
236         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
237         modifier key bitmasks.
238         (struct grub_term_input): Add `getkeystatus' member.
239         (grub_getkeystatus): Add prototype.
240         * kern/term.c (grub_getkeystatus): New function.
242         * include/grub/i386/pc/memory.h
243         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
244         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
245         Data Area layout.
246         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
247         (grub_console_term_input): Set `getkeystatus' member.
248         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
249         constants.
250         (grub_usb_keyboard_getreport): Likewise.
251         (grub_usb_keyboard_checkkey): Likewise.
252         (grub_usb_keyboard_getkeystatus): New function.
253         (grub_usb_keyboard_term): Set `getkeystatus' member.
255         * commands/keystatus.c: New file.
256         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
257         (keystatus_mod_SOURCES): New variable.
258         (keystatus_mod_CFLAGS): Likewise.
259         (keystatus_mod_LDFLAGS): Likewise.
260         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
261         commands/keystatus.c.
262         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
263         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
264         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
265         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
266         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
267         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
269 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
271         Split befs.mod and afs.mod into *_be.mod and *.mod
273         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
274         (grub_fstest_SOURCES): Likewise.
275         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
276         (afs_be_mod_SOURCES): New variable.
277         (afs_be_mod_CFLAGS): Likewise.
278         (afs_be_mod_LDFLAGS): Likewise.
279         (befs_be_mod_SOURCES): Likewise.
280         (befs_be_mod_CFLAGS): Likewise.
281         (befs_be_mod_LDFLAGS): Likewise.
282         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
283         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
284         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
285         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
286         (grub_emu_SOURCES): Likewise.
287         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
288         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
289         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
290         * fs/afs_be.c: New file.
291         * fs/befs_be.c: New file.
292         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
293         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
294         (U16): Replaced with ...
295         (grub_afs_to_cpu16): ...this. All users updated.
296         (U32): Replaced with ...
297         (grub_afs_to_cpu32): ...this. All users updated.
298         (U64): Replaced with ...
299         (grub_afs_to_cpu64): ...this. All users updated.
300         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
301         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
302         (grub_afs_validate_sblock): Check only one endianness.
303         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
304         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
305         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
306         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
307         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
308         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
309         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
310         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
312 2009-08-26  Bean  <bean123ch@gmail.com>
314         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
315         64-bit number.
316         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
317         (grub_xfs_inode_block): Change return type to grub_uint64_t.
318         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
320 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
322         NetBSD memory map support.
324         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
325         (grub_netbsd_btinfo_mmap_header): New structure.
326         (grub_netbsd_btinfo_mmap_entry): Likewise.
327         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
329 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
331         Enable bsd.mod on coreboot.
333         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
334         (bsd_mod_SOURCES): New variable.
335         (bsd_mod_CFLAGS): Likewise.
336         (bsd_mod_LDFLAGS): Likewise.
337         (bsd_mod_ASFLAGS): Likewise.
338         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
339         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
341 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
343         Cleanup NetBSD root support.
345         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
346         grub_bsd_get_device.
347         Fix typo.
349 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
351         * util/grub.d/00_header.in: Move check for the video backend of
352         gfxterm from here ...
353         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
354         a suitable video backend.
356 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
358         Fix breakage in grub-setup.
360         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
361         "msdos_partition_map".
363 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
365         Fix breakage in normal/auth.c.
367         * normal/auth.c (grub_iswordseparator): New function.
369 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
371         Authentication support.
373         * commands/password.c: New file.
374         * conf/common.rmk (pkglib_MODULES): Add password.mod.
375         (password_mod_SOURCES): New variable.
376         (password_mod_CFLAGS): Likewise.
377         (password_mod_LDFLAGS): Likewise.
378         (normal_mod_SOURCES): Add normal/auth.c.
379         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
380         normal/auth.c.
381         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
382         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
383         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
384         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
385         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
386         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
387         * include/grub/auth.h: New file.
388         * include/grub/err.h (grub_err_t): New enum value
389         GRUB_ERR_ACCESS_DENIED.
390         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
391         'users'.
392         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
393         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
394         users updated.
395         * normal/auth.c: New file.
396         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
397         (grub_cmdline_run): Don't allow to go to command line without
398         authentication.
399         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
400         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
401         menuentry without superuser rights.
402         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
403         user isn't a superuser.
405 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
407         Save space by inlining misc.c functions.
409         * kern/misc.c (grub_iswordseparator): Made static.
410         * kern/misc.c (grub_strcat): Moved from here ...
411         * include/grub/misc.h (grub_strcat): ... here. Inlined.
412         * kern/misc.c (grub_strncat): Moved from here ...
413         * include/grub/misc.h (grub_strncat): ... here. Inlined.
414         * kern/misc.c (grub_strcasecmp): Moved from here ...
415         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
416         * kern/misc.c (grub_strncasecmp): Moved from here ...
417         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
418         * kern/misc.c (grub_isalpha): Moved from here ...
419         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
420         * kern/misc.c (grub_isdigit): Moved from here ...
421         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
422         * kern/misc.c (grub_isgraph): Moved from here ...
423         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
424         * kern/misc.c (grub_tolower): Moved from here ...
425         * include/grub/misc.h (grub_tolower): ... here. Inlined.
427 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
429         * script/sh/function.c (grub_script_function_find): Cut error message
430         not to flood terminal.
431         * script/sh/lexer.c (grub_script_yylex): Remove command line length
432         limit.
433         * script/sh/script.c (grub_script_arg_add): Duplicate string.
435 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
437         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
438         `report' grub_uint8_t *.
439         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
440         Use a 50-millisecond timeout rather than just repeating
441         grub_usb_keyboard_getreport 50 times.
442         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
444 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
446         Rename *_partition_map to part_*
448         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
449         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
450         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
451         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
452         All users updated.
453         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
454         All users updated.
455         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
456         * util/grub-probe.c (probe_partmap): Don't transform partition name
457         to get module name.
459 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
461         Fix OpenBSD and NetBSD support.
463         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
464         memory address conflict.
465         (OPENBSD_MMAP_ACPI): New definition.
466         (OPENBSD_MMAP_NVS): Likewise.
467         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
468         and OPENBSD_MMAP_NVS.
469         Add memory map terminator
470         Explicit cast when calling grub_unix_real_boot.
471         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
473 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
475         Let user specify NetBSD root device.
477         * loader/i386/bsd.c (netbsd_root): New variable.
478         (netbsd_opts): New option 'root'.
479         (NETBSD_ROOT_ARG): New macro.
480         (grub_netbsd_boot): Use 'netbsd_root'.
481         (grub_bsd_unload): Free 'netbsd_root'.
482         (grub_cmd_netbsd): Fill 'netbsd_root'.
484 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
486         Support for 64-bit NetBSD.
488         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
489         point when booting non-FreeBSD.
491 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
493         Support --no-smp and --no-acpi for NetBSD.
495         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
496         (NETBSD_AB_NOACPI): Likewise.
497         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
498         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
500 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
502         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
503         errors.
504         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
505         errors. Call grub_error when needed.
507 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
509         * commands/search.c (search_fs): Try searching without autoload first.
510         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
511         filesystem module explicitly for faster booting.
513 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
515         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
517 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
519         * util/grub.d/30_os-prober.in: Disable os-prober if
520         `GRUB_DISABLE_OS_PROBER' was set to true.
522 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
524         * partmap/pc.c: Rename to ...
525         * partmap/msdos.c: ... this.  Update all users.
526         (grub_pc_partition_map): Rename to ...
527         (grub_msdos_partition_map): ... this.  Update all users.
529         * parttool/pcpart.c: Rename to ...
530         * parttool/msdospart.c: ... this.  Update all users.
532         * include/grub/pc_partition.h: Rename to ...
533         * include/grub/msdos_partition.h: ... this.  Update all users.
534         (grub_pc_partition_bsd_entry): Rename to ...
535         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
536         (grub_pc_partition_disk_label): Rename to ...
537         (grub_msdos_partition_disk_label): ... this.  Update all users.
538         (grub_pc_partition_entry): Rename to ...
539         (grub_msdos_partition_entry): ... this.  Update all users.
540         (grub_pc_partition_mbr): Rename to ...
541         (grub_msdos_partition_mbr): ... this.  Update all users.
542         (grub_pc_partition): Rename to ...
543         (grub_msdos_partition): ... this.  Update all users.
544         (grub_pc_partition_is_empty): Rename to ...
545         (grub_msdos_partition_is_empty): ... this.  Update all users.
546         (grub_pc_partition_is_extended): Rename to ...
547         (grub_msdos_partition_is_extended): ... this.  Update all users.
548         (grub_pc_partition_is_bsd): Rename to ...
549         (grub_msdos_partition_is_bsd): ... this.  Update all users.
551         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
552         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
553         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
554         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
555         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
556         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
557         (gpt_mod_LDFLAGS): Rename to ...
558         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
559         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
560         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
561         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
562         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
563         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
564         (part_gpt_mod_LDFLAGS): ... this.
565         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
566         `pcpart.mod' to `msdospart.mod'.
567         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
568         to ...
569         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
570         (msdospart_mod_LDFLAGS): ... this.
572 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
574         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
575         (openbsd_opts): Likewise.
576         (netbsd_opts): Likewise.
577         (freebsd_flags): Added 0 terminator.
578         (openbsd_flags): Likewise.
579         (netbsd_flags): Likewise.
580         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
581         (grub_cmd_freebsd): Transformed into extended command.
582         (grub_cmd_openbsd): Likewise.
583         (grub_cmd_netbsd): Likewise.
584         (cmd_freebsd): Changed type to grub_extcmd_t.
585         (cmd_openbsd): Likewise.
586         (cmd_netbsd): Likewise.
587         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
588         grub_cmd_openbsd as extended commands.
589         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
590         cmd_netbsd and cmd_openbsd
592 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
594         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
596 2009-08-21  Pavel Roskin  <proski@gnu.org>
598         * Makefile.in (install-local): When checking if a file is in the
599         build directory, use "test -e" to detect symlinks.
601         * Makefile.in (install-local): Remove all files in
602         $(DESTDIR)$(pkglibdir) before installing new files there.
604 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
606         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
607         grub-mkelfimage.
609 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
611         * util/grub-mkconfig.in: Don't use gfxterm by default if not
612         explicitly specified by the user.
614 2009-08-18  Pavel Roskin  <proski@gnu.org>
616         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
617         grub_uint8_t pointer for data.
618         * include/grub/fbutil.h (struct grub_video_fbblit_info):
619         Likewise.
620         * video/fb/fbutil.c: Remove unnecessary casts.
622 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
624         VBE cleanup.
626         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
627         (grub_vbe_set_video_mode): Save active mode info
628         only after setting the mode.
629         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
630         second argument.
632 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
634         Rename variables for clarity.
636         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
637         (active_vbe_mode_info): ... this. All users updated.
638         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
639         All users updated.
640         (initial_mode): Rename to ...
641         (initial_vbe_mode): ... this. All users updated.
642         (mode_in_use): Rename to ..
643         (vbe_mode_in_use): ... this. All users updated.
644         (mode_list): Rename to ..
645         (vbe_mode_list): ... this. All users updated.
646         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
647         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
648         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
649         'mode_list_size' to 'vbe_mode_list_size'.
650         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
651         'best_mode_info' to 'best_vbe_mode_info' and
652         'best_mode' to 'best_vbe_mode'
654 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
656         Remove duplicate grub_video_fb_get_video_ptr.
658         * include/grub/fbutil.h (get_data_ptr): Rename to ...
659         (grub_video_fb_get_video_ptr): ... this.
660         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
661         * video/fb/fbutil.c: Add comment about addressing.
662         (get_data_ptr): Rename to ...
663         (grub_video_fb_get_video_ptr): ... this. All users updated.
664         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
666 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
668         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
669         grub_dprintf() that was just added.
671 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
673         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
674         (DEFAULT_VIDEO_MODE): Remove macros.
675         (grub_linux_boot): Remove assumption that Linux has FB support,
676         and use "text" as default video mode.
678 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
680         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
681         grub_dprintf.
682         * fs/fat.c (grub_fat_read_data): Likewise.
684 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
686         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
687         payload.
688         (grub_module): Likewise.
690 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
692         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
693         mbi->cmdline but free playground.
695 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
697         Handle group offset on UFS1.
699         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
700         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
702 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
704         Split ufs.mod into ufs1.mod and ufs2.mod.
706         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
707         (grub_fstest_SOURCES): Likewise.
708         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
709         (ufs_mod_SOURCES): Remove.
710         (ufs_mod_CFLAGS): Likewise.
711         (ufs_mod_LDFLAGS): Likewise.
712         (ufs1_mod_SOURCES): New variable.
713         (ufs1_mod_CFLAGS): Likewise.
714         (ufs1_mod_LDFLAGS): Likewise.
715         (ufs2_mod_SOURCES): New variable.
716         (ufs2_mod_CFLAGS): Likewise.
717         (ufs2_mod_LDFLAGS): Likewise.
718         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
719         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
720         Likewise.
721         (grub_emu_SOURCES): Likewise.
722         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
723         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
724         (grub_setup_SOURCES): Likewise.
725         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
726         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
727         (grub_setup_SOURCES): Likewise.
728         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
729         Likewise.
730         * fs/ufs2.c: New file.
731         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
733 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
735         Framebuffer split.
737         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
738         subsystem at the end.
739         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
740         (video_fb_mod_SOURCES): New variable.
741         (video_fb_mod_CFLAGS): Likewise.
742         (video_fb_mod_LDFLAGS): Likewise.
743         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
744         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
745         * video/i386/pc/vbeblit.c: Moved from here ...
746         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
747         * video/i386/pc/vbefill.c: Moved from here ...
748         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
749         * video/i386/pc/vbeutil.c: Moved from here ...
750         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
751         * include/grub/i386/pc/vbeblit.h: Moved from here ...
752         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
753         * include/grub/i386/pc/vbefill.h: Moved from here ...
754         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
755         * include/grub/i386/pc/vbeutil.h: Moved from here ...
756         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
757         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
758         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
759         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
760         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
761         (grub_video_adapter): Added 'get_info_and_fini'.
762         (grub_video_get_info_and_fini): New prototype.
763         (grub_video_set_mode): make modestring const char *.
764         * loader/i386/linux.c (grub_linux_setup_video): Use
765         grub_video_get_info_and_fini.
766         (grub_linux_boot): Move modesetting just before booting.
767         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
768         grub_video_get_info_and_fini.
769         * video/i386/pc/vbe.c: Moved framebuffer part ...
770         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
771         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
772         grub_video_fbstd_colors and grub_video_fb_set_palette.
773         (grub_video_vbe_init): Clear 'framebuffer' variable and use
774         grub_video_fb_init.
775         (grub_video_vbe_fini): Use grub_video_fb_fini.
776         (grub_video_vbe_setup): Use framebuffer.render_target instead of
777         render_target and use grub_video_fb_set_active_render_target and
778         grub_video_fb_set_palette.
779         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
780         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
781         (grub_video_vbe_adapter): Use framebuffer.
782         * video/video.c (grub_video_get_info_and_fini): New function.
783         (grub_video_set_mode): Make modestring const char *.
784         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
785         values are already initialised.
787 2009-08-14  Pavel Roskin  <proski@gnu.org>
789         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
790         ABS and APPLE_CC.
791         * boot/i386/pc/diskboot.S: Likewise.
792         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
793         sectors allow compilation on MacOSX.
794         * conf/i386-pc.rmk: Enable unconditional compilation of
795         lnxboot.img.
797 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
799         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
800         * util/grub.d/00_header.in: Enter interruptible sleep if
801         GRUB_HIDDEN_TIMEOUT is set.
803 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
805         * include/grub/symbol.h: Add the LOCAL macro.
806         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
807         starting with "L_".
809 2009-08-13  Pavel Roskin  <proski@gnu.org>
811         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
812         any modern compilers we support.
814         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
815         Use local labels starting with "L_" so that Apple assembler
816         knows they are local.
818 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
820         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
821         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
822         (bsd_kernel_types): ... this enum.
824         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
825         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
826         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
828         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
829         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
830         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
831         messages.
833 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
835         * util/grub-dumpdevtree: Moved from here ...
836         * util/i386/efi/grub-dumpdevtree: ... to here.
837         (hexify): New function.  Converts a string to its hex version.
838         Generate hex versions of "efi" and "device-properties" by calling
839         hexify() on the ASCII strings rather than by hardcoding numbers.
841 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
843         * fs/jfs.c: Update copyright year.
845 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
847         * util/grub.d/00_header.in: Fix a comment.
848         * util/grub.d/10_linux.in: Likewise.
849         * util/grub.d/10_windows.in: Likewise.
850         * util/grub.d/10_hurd.in: Likewise.
852 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
854         * util/grub-mkconfig.in: Allow the user to specify the used font
855         with GRUB_FONT.
857 2009-08-08  Pavel Roskin  <proski@gnu.org>
859         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
860         available, xfs.mod needs it now.
862         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
863         the "g" modifier in sed when the intention is to strip something
864         once.  This fixes comparison of kernels with multiple dashes.
866         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
867         on it.  Add missing space before closing bracket.  Fix
868         misleading formatting.
870 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
872         * docs/grub.texi: Major overhaul.  Remove all sections that are
873         specific to GRUB Legacy, or mostly composed of Legacy-specific
874         information.
876 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
878         * docs/version.texi: New file.  Provides version information for
879         grub.texi.
881 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
883         * docs/grub.texi: Update CVS information to SVN.
884         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
886 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
888         * util/grub-mkconfig.in: Remove a wrong `fi'.
890 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
892         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
893         (grub_jfs_uuid): New function.
894         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
896 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
898         * util/grub-mkconfig_lib.in (font_path): Move the functionality
899         of it to ...
900         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
901         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
903 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
905         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
906         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
907         Update all users.
909         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
910         not just "vmlinu[zx]".
911         Moved from here ...
912         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
913         all users.
915         * util/grub.d/10_linux.in (find_latest): Moved from here ...
916         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
917         all users.
919 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
921         * util/grub.d/10_freebsd.in: Use an absolute device path for
922         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
924 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
926         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
927         handling of multiple abstraction modules.
929 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
931         Fix a bug resulting in black screen when loading Linux using a
932         packed video mode.
934         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
935         function.
937         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
938         (grub_vbe_bios_getset_dac_palette_width): New function.
939         (grub_vbe_bios_get_dac_palette_width)
940         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
941         grub_vbe_bios_getset_dac_palette_width()).
943         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
944         check for return status.
945         (grub_vbe_get_video_mode_info): When getting information for a packed
946         mode (<= 8 bpp), obtain DAC palette width using
947         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
948         {red,green,blue}_mark_size.
950 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
952         * commands/search.c (options): Fix help output to match actual code.
954 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
956         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
957         of homegrown code.
959 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
961         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
962         on XFS or ReiserFS.
964 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
966         Support Apple partition map with sector size different from 512 bytes.
968         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
969         (apple_partition_map_iterate): Respect 'aheader.blocksize'
970         and 'apart.partmap_size'.
972 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
973 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
975         Fix cpuid command.
977         * commands/i386/cpuid.c (options): New variable.
978         (grub_cmd_cpuid): Return real error.
979         (GRUB_MOD_INIT(cpuid)): Declare options.
981 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
983         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
984         valid.
986 2009-07-31  Bean  <bean123ch@gmail.com>
988         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
989         log2_inode.
990         (grub_fshelp_node): Move inode field to the end.
991         (grub_xfs_data): Remove inode field.
992         (grub_xfs_inode_block): Calculate inode size using sblock.
993         (grub_xfs_inode_offset): Likewise.
994         (grub_xfs_read_inode): Calculate inode size using sblock.
995         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
996         (grub_xfs_iterate_dir): Calculate inode size using sblock.
997         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
998         to match inode size.
999         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1000         not accessible when data is null.
1001         (grub_xfs_open): Likewise.
1003 2009-07-31  Bean  <bean123ch@gmail.com>
1005         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1006         Don't change pv->disk if it's already set.
1008         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1009         (grub_raid_register): ... here.
1010         (grub_raid_rescan): Removed.
1012         * include/grub/raid.h (grub_raid_rescan): Removed.
1014         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1015         (fstest): Replace grub_raid_rescan with module fini function followed
1016         by init function.
1018         * util/grub-probe.c: Add include file <grub/raid.h>.
1019         (probe_raid_level): New function.
1020         (probe): Detect abstraction by walking the disk device, support two
1021         level of abstraction (LVM on RAID) when detecting partition map.
1023 2009-07-31  Pavel Roskin  <proski@gnu.org>
1025         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1026         to grub_zalloc(), it was erroneous.
1027         Reported by Bean <bean123ch@gmail.com>
1029 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1031         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1032         embedding zone, not only the first one.
1034 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1036         * term/gfxterm.c (clear_char): New function.
1037         (grub_virtual_screen_setup): Use clear_char.
1038         (scroll_up): Likewise.
1039         (grub_virtual_screen_cls): Likewise.
1041 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1043         * util/deviceiter.c (get_acceleraid_disk_name): New static
1044         function.
1045         (grub_util_iterate_devices): Handle Accelraid devices.
1046         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1048 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1050         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1051         separator for the suggested gfxpayload string (';' collides with the
1052         parser and needs escaping).
1054 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1056         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1057         Clear direction flag before jumping to OS.
1058         (grub_multiboot2_real_boot): Likewise.
1060 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1062         * util/i386/pc/grub-install: Fix parsing of --disk-module
1063         option.
1065 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1067         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1068         when embedding.
1070 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1072         * util/grub-mkconfig.in (package_version): New variable.
1073         Use it do display the version.
1075 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1077         * kern/file.c (grub_file_open): Revert to previous check with
1078         grub_errno.
1080 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1082         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1083         from help line. It's out of sync with code.
1085 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1087         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1088         entries on failed boot.
1090 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1092         * kern/file.c (grub_file_open): Fix an error check.
1094 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1096         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1097         partition map couldn't be identified.
1099 2009-07-23  Pavel Roskin  <proski@gnu.org>
1101         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1102         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1103         case of little endian words becomes just an optimization.
1104         Respect const modifier.
1105         (md5_final): Use code that doesn't depend on endianness.
1107         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1108         to avoid loss of upper bits if align is unsigned and shorter
1109         than addr.
1111 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1113         UUID support for UFS
1115         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1116         (grub_ufs_uuid): New function.
1117         (grub_ufs_fs): add .uuid
1119 2009-07-21  Pavel Roskin  <proski@gnu.org>
1121         * kern/dl.c (grub_dl_check_header): Make static.
1123 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1125         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1126         add drivemap for Vista.  It breaks Windows 7.
1128 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1130         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1131         128 bytes
1133 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1135         Add BFS support
1137         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1138         (grub_fstest_SOURCES): Likewise.
1139         (pkglib_MODULES): Add befs.mod.
1140         (befs_mod_SOURCES): New variable.
1141         (befs_mod_CFLAGS): Likewise.
1142         (befs_mod_LDFLAGS): Likewise.
1143         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1144         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1145         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1146         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1147         (grub_setup_SOURCES): Likewise.
1148         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1149         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1150         (grub_setup_SOURCES): Likewise.
1151         * fs/befs.c: New file.
1152         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1153         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1154         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1155         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1156         (B_KEY_INDEX_ALIGN): New declaration.
1157         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1158         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1159         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1160         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1161         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1162         (grub_afs_mount) [MODE_BFS]: Likewise.
1163         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1164         (grub_afs_fs): Use GRUB_AFS_FSNAME
1165         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1166         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1167         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1168         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1170 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1172         * util/getroot.c (find_root_device): Add support for MacOSX.
1173         * util/hostdisk.c: Likewise.
1175 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1177         * font/font.c (find_glyph): Check whether a font is present to avoid
1178         segmentation fault.
1180 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1182         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1184 2009-07-20  Pavel Roskin  <proski@gnu.org>
1186         * configure.ac: Trim excessively wordy excuses.
1188 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1190         Add symlink, mtime and label support to AtheFS.
1192         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1193         (grub_afs_iterate_dir): Handle symlinks.
1194         (grub_afs_open): Use grub_afs_read_symlink.
1195         (grub_afs_dir): Likewise.
1196         Pass mtime.
1197         (grub_afs_label): New function.
1198         (grub_afs_fs): Add grub_afs_label.
1199         (grub_afs_read_symlink): New function.
1201 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1203         Fix AtheFS support.
1205         * fs/afs.c: Fix comments style.
1206         (grub_afs_blockrun): Declare as packed.
1207         (grub_afs_datastream): Likewise.
1208         (grub_afs_bnode): Likewise.
1209         (grub_afs_btree): Likewise.
1210         (grub_afs_sblock): Likewise.
1211         Declare `name' as char.
1212         (grub_afs_inode): Declare as packed.
1213         Change void *vnode to grub_uint32_t unused.
1214         (grub_afs_iterate_dir): Check that key_size is positive.
1215         (grub_afs_mount): Don't read superblock twice.
1216         (grub_afs_dir): Don't free node in case of error,
1217         grub_fshelp_find_file already handles this.
1218         (grub_afs_open): Likewise.
1220 2009-07-19  Pavel Roskin  <proski@gnu.org>
1222         * Makefile.in: Remove LIBLZO and enable_lzo.
1223         * conf/i386-pc.rmk: Remove lzo support.
1224         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1225         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1226         support.
1227         * kern/i386/pc/lzo1x.S: Remove.
1228         * kern/i386/pc/startup.S: Remove lzo support.
1229         * util/i386/pc/grub-mkimage.c: Likewise.
1231 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1233         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1234         * fs/xfs.c (grub_xfs_dir): Likewise.
1235         * fs/afs.c (grub_afs_dir): Likewise.
1236         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1237         (grub_iso9660_open): Likewise.
1238         * fs/jfs.c (grub_jfs_open): Likewise.
1239         * fs/ext2.c (grub_ext2_dir): Likewise.
1240         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1241         * script/sh/lexer.c (grub_script_yylex): Likewise.
1243 2009-07-16  Pavel Roskin  <proski@gnu.org>
1245         * configure.ac: Never add "-c" to CFLAGS.
1247         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1249         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1250         grub_cv_cc_efiemu should be used.
1252         * configure.ac: Typo fixes.
1254         * kern/mm.c (grub_zalloc): New function.
1255         (grub_debug_zalloc): Likewise.
1256         * include/grub/mm.h: Declare grub_zalloc() and
1257         grub_debug_zalloc().
1258         * util/misc.c (grub_zalloc): New function.
1259         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1260         instead of grub_malloc(), remove unneeded initializations.
1261         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1262         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1263         * commands/parttool.c (grub_cmd_parttool): Likewise.
1264         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1265         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1266         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1267         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1268         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1269         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1270         (grub_cmd_efiemu_pnvram): Likewise.
1271         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1272         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1273         (grub_iso9660_iterate_dir): Likewise.
1274         * fs/jfs.c (grub_jfs_opendir): Likewise.
1275         * fs/ntfs.c (list_file): Likewise.
1276         (grub_ntfs_mount): Likewise.
1277         * kern/disk.c (grub_disk_open): Likewise.
1278         * kern/dl.c (grub_dl_load_core): Likewise.
1279         * kern/elf.c (grub_elf_file): Likewise.
1280         * kern/env.c (grub_env_context_open): Likewise.
1281         (grub_env_set): Likewise.
1282         (grub_env_set_data_slot): Likewise.
1283         * kern/file.c (grub_file_open): Likewise.
1284         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1285         * loader/i386/multiboot.c (grub_module): Likewise.
1286         * loader/xnu.c (grub_xnu_create_key): Likewise.
1287         (grub_xnu_create_value): Likewise.
1288         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1289         (read_config_file): Likewise.
1290         * normal/menu_entry.c (make_screen): Likewise.
1291         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1292         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1293         * script/sh/script.c (grub_script_parse): Likewise.
1294         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1295         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1296         * video/readers/png.c (grub_png_output_byte): Likewise.
1297         (grub_video_reader_png): Likewise.
1299 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1301         Enable all targets that can be built by default
1303         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1304         grub-mkfont and grub-fstest if they can be built
1306 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1308         Fix hang and segmentation fault in grub-emu-usb
1310         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1311         * util/usb.c (grub_libusb_devices): likewise
1312         (grub_libusb_init): rename to ...
1313         (GRUB_MOD_INIT (libusb)):...this
1314         (grub_libusb_fini): rename to ..
1315         (GRUB_MOD_FINI (libusb)):...this
1316         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1317         * include/grub/disk.h (grub_raid_init): removed, it's useless
1318         (grub_raid_fini): likewise
1319         (grub_lvm_init): likewise
1320         (grub_lvm_fini): likewise
1321         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1322         by grub_init_all
1324 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1326         Fix libusb
1328         * Makefile.in (LIBUSB): new macro
1329         * genmk.rb (Utility/print_tail): new method
1330         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1331         (top level): call util.print_tail at the end.
1333 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1335         Make FreeBSD accept zpool.cache
1337         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1338         type is /boot/zfs/zpool.cache
1340 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1342         Fix 64-bit efiemu
1344         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1345         correct wrong typedef
1346         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1348 2009-07-15  Pavel Roskin  <proski@gnu.org>
1350         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1351         * kern/disk.c (struct grub_disk_cache): Likewise.
1353         * commands/probe.c (options): Typo fix.
1355         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1356         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1357         accordingly.
1358         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1360         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1361         the end of "Error" to make the message more readable.
1363         * boot/i386/pc/boot.S (kernel_segment): Remove.
1364         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1365         for destination.
1367         * boot/i386/pc/boot.S (boot_version): Remove.
1368         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1369         Remove.
1371         * include/grub/i386/pc/boot.h: Sort all offsets.
1372         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1373         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1374         * boot/i386/pc/boot.S: Assert location of every offset listed in
1375         include/grub/i386/pc/boot.h.
1377 2009-07-13  Pavel Roskin  <proski@gnu.org>
1379         * include/grub/i386/coreboot/machine.h: Rename
1380         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1381         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1382         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1384         * kern/dl.c: Force native word size to suppress warnings when
1385         compiling grub-emu.
1387         * kern/device.c (grub_device_iterate): Change struct part_ent to
1388         hold the name, not a pointer to it.  Use one grub_malloc() per
1389         partition, not two.  Free partition_name if grub_malloc() fails.
1390         Set ents to NULL only before grub_partition_iterate() is called.
1392 2009-07-11  Bean  <bean123ch@gmail.com>
1394         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1395         childname.
1397 2009-07-10  Bean  <bean123ch@gmail.com>
1398 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1400         * kern/ieee1275/openfw.c (grub_children_iterate)
1401         (grub_devalias_iterate): Fix size evaluation for property or path
1402         strings, which was broken since r2132.
1404 2009-07-07  Pavel Roskin  <proski@gnu.org>
1406         * commands/search.c (search_file): Merge into ...
1407         (search_fs): ... this.  Accept search type as argument.
1408         (grub_cmd_search): Pass search type to search_fs().
1410         * include/grub/util/console.h: New file.
1411         * util/console.c: Use it instead of grub/machine/console.h.
1412         * util/grub-emu.c: Likewise.
1414         * lib/arg.c (find_long_option): Remove.
1415         (find_long): Add `len' argument, make `s' const char *.
1416         (grub_arg_parse): Parse long options in place, not in a
1417         temporary buffer.
1419 2009-07-06  Pavel Roskin  <proski@gnu.org>
1421         * commands/search.c (search_fs): Fix potential NULL pointer
1422         dereference.
1424         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1425         function pointer.
1427 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1429         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1430         comparison.
1432 2009-07-05  Pavel Roskin  <proski@gnu.org>
1434         * include/grub/i386/linux.h (struct linux_kernel_params):
1435         Restore padding3, it's still needed.
1437         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1438         FreeBSD.
1439         * util/osdetect.lua: Likewise.
1441 2009-07-05  Bean  <bean123ch@gmail.com>
1443         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1445         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1446         (grub_lua_getenv): Likewise.
1447         (grub_lua_setenv): Likewise.
1448         (save_errno): New function.
1449         (push_result): Likewise.
1450         (grub_lua_enum_device): Likewise.
1451         (grub_lua_enum_file): Likewise.
1452         (grub_lua_file_open): Likewise.
1453         (grub_lua_file_close): Likewise.
1454         (grub_lua_file_seek): Likewise.
1455         (grub_lua_file_read): Likewise.
1456         (grub_lua_file_getline): Likewise.
1457         (grub_lua_file_getsize): Likewise.
1458         (grub_lua_file_getpos): Likewise.
1459         (grub_lua_file_eof): Likewise.
1460         (grub_lua_file_exist): Likewise.
1461         (grub_lua_add_menu): Likewise.
1463         * script/lua/grub_lua.h (isupper): New inline function.
1464         (islower): Likewise.
1465         (ispunct): Likewise.
1466         (isxdigit): Likewise.
1467         (strcspn): Change to normal function.
1468         (strpbkr): New function declaration.
1469         (memchr): Likewise.
1471         * script/lua/grub_main.c (scan_str): New function.
1472         (strcspn): Likewise.
1473         (strpbrk): Likewise.
1474         (memchr): Likewise.
1476         * script/lua/linit.c (lualibs): Enable the string library.
1478         * util/osdetect.lua: New file.
1480 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1482         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1483         `capabilities' member.
1485 2009-07-02  Pavel Roskin  <proski@gnu.org>
1487         * genparttoollist.sh: Add missing newline at the end.
1489 2009-07-01  Pavel Roskin  <proski@gnu.org>
1491         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1493         * util/hostdisk.c (open_device): Remove `const' from
1494         `sysctl_size', as sysctlbyname() can change it (in this case it
1495         doesn't actually happen).
1497         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1498         using signed long int constants.
1500         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1501         constant to avoid a warning on FreeBSD.
1503         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1504         where it's needed.
1506         * Makefile.in: Install include/grub/machine symlink.
1508         * Makefile.in: When installing symlinks, use "cp -fR", which
1509         works on FreeBSD and MacOSX.
1510         From Yves Blusseau <cl7m42e02@sneakemail.com>
1512         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1513         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1515         * util/misc.c: Move grub_reboot() and grub_halt() ...
1516         * util/grub-emu.c: ... here.  Make main_env static.
1517         * include/grub/util/misc.h: Remove main_env.
1519         * kern/mm.c: Use correct format to print size_t.
1521         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1522         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1523         * kern/powerpc/dl.c: Likewise.
1524         * kern/sparc64/dl.c: Likewise.
1525         * kern/x86_64/dl.c: Likewise.
1527 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1529         Fix grub-emu build on sparc64-ieee1275.
1531         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1532         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1534 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1536         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1537         (grub_reboot, grub_halt): New functions.
1539         * util/i386/pc/misc.c: Delete.  Update all users.
1540         * util/sparc64/ieee1275/misc.c: Likewise.
1541         * util/powerpc/ieee1275/misc.c: Likewise.
1543 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1545         * conf/i386.rmk (setjmp_mod_SOURCES)
1546         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1547         * conf/common.rmk (setjmp_mod_SOURCES)
1548         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1549         to use $(target_cpu).
1550         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1551         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1552         * conf/powerpc-ieee1275.rmk: Likewise.
1553         * conf/sparc64-ieee1275.rmk: Likewise.
1555         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1556         $(target_cpu) for kern/$(target_cpu)/dl.c.
1557         * conf/i386-efi.rmk: Likewise.
1558         * conf/i386-ieee1275.rmk: Likewise.
1559         * conf/x86_64-efi.rmk: Likewise.
1560         * conf/i386-coreboot.rmk: Likewise.
1561         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1562         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1563         kern/$(target_cpu)/cache.S.
1564         * conf/sparc64-ieee1275.rmk: Likewise.
1566 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1568         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1569         type to `grub_uint8_t', and adjust `padding9' accordingly.
1571 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1573         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1575         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1576         assembly in final jump, using register constraints.
1578         (grub_linux_boot): For text mode, initialize `have_vga' using
1579         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1581         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1582         right before the final jump.
1584         Set `video_mode' to 0x3.
1586         Document initialization of `video_page', `video_mode' and
1587         `video_ega_bx'.
1589 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1591         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1592         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1593         and set GRUB_LINUX_FLAG_QUIET appropriately.
1595 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1597         Fix build on Debian / sparc.
1599         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1601 2009-06-28  Pavel Roskin  <proski@gnu.org>
1603         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1604         fix a warning.
1606         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1608 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1610         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1611         `err'.
1613 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1615         Revert r2338.
1617         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1618         file can't be opened.  grub_file_open() is already supposed to set
1619         grub_errno / grub_errmsg appropriately.
1620         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1622 2009-06-27  Pavel Roskin  <proski@gnu.org>
1623 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1625         * include/grub/dl.h: Include grub/elf.h.
1626         (struct grub_dl): Add symtab field.
1627         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1628         GRUB_MODULES_MACHINE_READONLY.
1629         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1630         of the header for read-only modules.
1631         (grub_dl_unload): Free mod->symtab for read-only modules.
1632         * kern/i386/dl.c: Use mod->symtab.
1633         * kern/powerpc/dl.c: Likewise.
1634         * kern/sparc64/dl.c: Likewise.
1635         * kern/x86_64/dl.c: Likewise.
1637         * conf/i386-qemu.rmk: New file.
1638         * kern/i386/qemu/startup.S: Likewise.
1639         * kern/i386/qemu/mmap.c: Likewise.
1640         * boot/i386/qemu/boot.S: Likewise.
1641         * include/grub/i386/qemu/time.h: Likewise.
1642         * include/grub/i386/qemu/serial.h: Likewise.
1643         * include/grub/i386/qemu/kernel.h: Likewise.
1644         * include/grub/i386/qemu/console.h: Likewise.
1645         * include/grub/i386/qemu/boot.h: Likewise.
1646         * include/grub/i386/qemu/init.h: Likewise.
1647         * include/grub/i386/qemu/machine.h: Likewise.
1648         * include/grub/i386/qemu/loader.h: Likewise.
1649         * include/grub/i386/qemu/memory.h: Likewise.
1651         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1652         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1653         [qemu] (pkglib_IMAGES): Add `boot.img'.
1654         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1655         [qemu] (boot_img_FORMAT): New variables.
1656         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1657         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1658         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1659         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1660         [qemu] (kernel_img_FORMAT): New variables.
1662         * configure.ac: Recognise `i386-qemu'.
1664         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1665         (for no compression).
1666         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1667         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1668         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1669         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1670         ifdefs).
1672 2009-06-27  Pavel Roskin  <proski@gnu.org>
1674         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1675         read.
1676         * efiemu/prepare32.c: Likewise.
1677         * efiemu/prepare64.c: Likewise.
1679 2009-06-26  Pavel Roskin  <proski@gnu.org>
1681         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1682         * include/grub/elf.h: Define symbols without "32" or "64" based
1683         on GRUB_TARGET_WORDSIZE.
1684         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1685         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1686         ELF definitions.
1687         * efiemu/loadcore64.c: Likewise.
1688         * loader/i386/bsd32.c: Likewise.
1689         * loader/i386/bsd64.c: Likewise.
1690         * kern/dl.c: Remove own ELF definitions.
1691         * util/i386/efi/grub-mkimage.c: Likewise.
1693 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
1695         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1696         segment 0x0 unconditionally, because the reference generated by
1697         GAS is an absolute address.
1699 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1701         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1702         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1704 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1706         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1707         indexes.  Check for -f explicitly.
1708         (search_file): Improve error message.
1709         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1711 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1713         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1714         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
1716 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1718         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1719         * conf/i386-ieee1275.rmk: Likewise.
1720         * conf/i386-coreboot.rmk: Likewise.
1722         * kern/i386/pc/startup.S (grub_stop): Remove function.
1723         * kern/i386/ieee1275/startup.S: Likewise.
1724         * kern/i386/coreboot/startup.S: Likewise.
1725         * kern/i386/misc.S (grub_stop): New function.
1727 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1729         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1730         * kern/i386/realmode.S (real_to_prot): ... to here.
1732 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1734         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1735         with `kernel.img'.
1736         (kernel_elf_SOURCES): Rename to ...
1737         (kernel_img_SOURCES): ... this.
1738         (kernel_elf_HEADERS): Rename to ...
1739         (kernel_img_HEADERS): ... this.  Update all users.
1740         (kernel_elf_ASFLAGS): Rename to ...
1741         (kernel_img_ASFLAGS): ... this.
1742         (kernel_elf_CFLAGS): Rename to ...
1743         (kernel_img_CFLAGS): ... this.
1744         (kernel_elf_LDFLAGS): Rename to ...
1745         (kernel_img_LDFLAGS): ... this.
1746         * conf/i386-coreboot.rmk: Likewise.
1747         * conf/powerpc-ieee1275.rmk: Likewise.
1749         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1750         with "kernel.img".
1752 2009-06-21  Pavel Roskin  <proski@gnu.org>
1754         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1755         to match nested functions.
1756         * loader/sparc64/ieee1275/linux.c: Likewise.
1758         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1760 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1762         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1763         all i386 platforms.
1765 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1767         Fix asm file handling on ELF, and remove workarounds.
1769         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1770         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1771         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1772         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1774 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
1776         Load BSD ELF modules
1778         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1779         and loader/i386/bsd64.c
1780         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1781         (FREEBSD_MODTYPE_ELF_MODULE): New definition
1782         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1783         (grub_freebsd_load_elfmodule32): New declaration
1784         (grub_freebsd_load_elfmoduleobj64): Likewise
1785         (grub_freebsd_load_elf_meta32): Likewise
1786         (grub_freebsd_load_elf_meta64): Likewise
1787         (grub_freebsd_add_meta): Likewise
1788         (grub_freebsd_add_meta_module): Likewise
1789         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1790         (grub_freebsd_add_meta_module): Likewise and move module-specific
1791         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1792         (grub_cmd_freebsd): Add elf-kernel specific parts
1793         based on grub_freebsd_add_meta_module
1794         (grub_cmd_freebsd_module): Add type parsing moved from
1795         grub_freebsd_add_meta_module
1796         (grub_cmd_freebsd_module_elf): New function
1797         (cmd_freebsd_module_elf): New variable
1798         (GRUB_MOD_INIT): Register freebsd_module_elf
1799         * loader/i386/bsd32.c: New file
1800         * loader/i386/bsd64.c: Likewise
1801         * loader/i386/bsdXX.c: Likewise
1802         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1803         (grub_elf64_load): Likewise
1804         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1805         All users updated
1806         (grub_elf64_load_hook_t): Likewise
1808 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
1810         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1811         variable.
1812         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1813         don't write a menu entry for recovery mode.
1815 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1817         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1818         after it's no longer needed.
1820 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1822         * include/grub/i386/loader.h (grub_linux_prot_size)
1823         (grub_linux_tmp_addr, grub_linux_real_addr)
1824         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1825         GRUB_MACHINE_PCBIOS.
1826         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1827         common grub_util_info() call to ...
1828         (generate_image): ... here.
1829         Fix use of uninitialized memory, comparison of signed with
1830         unsigned integers and memory leak.
1831         Remove bogus module address message.
1833 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
1835         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1836         grub_raid_register
1837         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1839 2009-06-19  Pavel Roskin  <proski@gnu.org>
1841         * configure.ac: Remove stray AC_MSG_CHECKING.
1843 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
1845         * disk/scsi.c (grub_scsi_open): use continue instead of big if
1847 2009-06-18  Pavel Roskin  <proski@gnu.org>
1849         * conf/common.rmk: Add fs_file.mod.
1850         * disk/fs_file.c: New file.
1851         * include/grub/disk.h (enum grub_disk_dev_id): Add
1852         GRUB_DISK_DEVICE_FILE_ID.
1854 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1856         Fix build with Apple's toolchain. Part 2
1858         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1859         a fake start
1861 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1863         Fix build with Apple's toolchain. Part 1
1865         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1866         for long calls
1867         * configure.ac: remove a leftover AC_MSG_RESULT
1868         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1869         Apple's toolchain
1871 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1873         Fix warnings
1875         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1876         (decomp_block): initialize ch
1877         use grub_memcpy instead of memcpy
1879 2009-06-17  Pavel Roskin  <proski@gnu.org>
1881         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1882         version, use declarations needed to use vga_text as the startup
1883         console.
1885         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1886         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1887         the kernel.
1888         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1889         and grub_at_keyboard_fini(), it's done on module load and
1890         unload.
1892 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
1894         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1895         file can't be found.
1896         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1898 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1900         Fix newline handling
1902         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1903         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1904         (grub_script_yylex): don't segfault on unterminated script
1905         newline terminates command and variable
1907 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1909         avoid double grub_adjust_range call. Bug reported by David Simner
1911         * kern/disk.c (grub_disk_write): change to raw disk access before
1912         calling disk_read
1914 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
1916         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1917         spaces, for the benefit of help2man.
1918         * util/i386/efi/grub-mkimage.c (usage): Likewise.
1920 2009-06-16  Pavel Roskin  <proski@gnu.org>
1922         * kern/i386/halt.c: Include grub/machine/init.h.
1923         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1925 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
1927         * util/grub.d/30_os-prober.in: Use ${root} in the generated
1928         drivemap menuentry.
1930 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
1932         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1933         `echo' command.
1935 2009-06-16  Pavel Roskin  <proski@gnu.org>
1937         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
1938         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
1939         save %dx, we only need %dl and we never change it.
1940         * boot/i386/pc/cdboot.S: Don't set the root drive.
1941         * boot/i386/pc/pxeboot.S: Likewise.
1942         * include/grub/i386/pc/boot.h: Remove
1943         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1944         GRUB_BOOT_MACHINE_DRIVE_CHECK.
1945         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1946         * kern/i386/pc/init.c (make_install_device): Remove references
1947         to grub_root_drive.
1948         * kern/i386/pc/startup.S: Likewise.
1949         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1951 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
1953         xnu_uuid command
1955         * commands/xnu_uuid.c: new file
1956         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
1957         (xnu_uuid_mod_SOURCES): new variable
1958         (xnu_uuid_mod_CFLAGS): likewise
1959         (xnu_uuid_mod_LDFLAGS): likewise
1960         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1961         * conf/i386-ieee1275.rmk: likewise
1962         * conf/i386-pc.rmk: likewise
1963         * conf/powerpc-ieee1275.rmk: likewise
1964         * conf/sparc64-ieee1275.rmk: likewise
1965         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1967 2009-06-16  Pavel Roskin  <proski@gnu.org>
1969         * configure.ac: Avoid '==' in test command, it's not portable.
1971 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
1973         Probe command
1975         * commands/probe.c: new file
1976         * conf/common.rmk (pkglib_MODULES): add probe.mod
1977         (probe_mod_SOURCES): new variable
1978         (probe_mod_CFLAGS): likewise
1979         (probe_mod_LDFLAGS): likewise
1980         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1981         * conf/i386-ieee1275.rmk: likewise
1982         * conf/i386-pc.rmk: likewise
1983         * conf/powerpc-ieee1275.rmk: likewise
1984         * conf/sparc64-ieee1275.rmk: likewise
1986 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
1988         Fix handling of string like \"hello\" and "a
1989         b"
1991         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1992         (grub_script_yylex): fix parsing of quoting, escaping and newline
1994 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
1996         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
1997         handling
1999 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2001         * util/grub-mkconfig.in: Fix parsing of --output option.
2003 2009-06-12  Pavel Roskin  <proski@gnu.org>
2005         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2006         genmk.rb don't need to be generated or installed.
2008 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2010         * commands/i386/pc/drivemap_int13h.S: add more comments
2012 2009-06-11  Pavel Roskin  <proski@gnu.org>
2014         * Makefile.in (uninstall): Uninstall manuals.
2016         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2017         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2018         and update-grub_lib in two places.
2019         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2021         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2022         a compiler warning.
2024         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2025         `entry_lo' to fix variable shadowing.
2027 2009-06-11  Christian Franke  <franke@computer.org>
2029         * kern/misc.c (__enable_execute_stack): Add missing return type
2030         to prevent gcc warning.
2032 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2034         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2036 2009-06-11  Pavel Roskin  <proski@gnu.org>
2038         * Makefile.in: Don't rely on any scripts being executable.
2039         Always use $(SHELL) to run shell scripts.
2041         * configure.ac: Always define ___main if using -nostdlib.  This
2042         fixes tests on Cygwin.
2044 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2046         UDF fix
2048         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2049         is in bytes and not in blocks
2051 2009-06-11  Pavel Roskin  <proski@gnu.org>
2053         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2054         warning.
2056 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2058         * util/grub.d/30_os-prober.in: Fix a comment. Source
2059         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2060         to set the root device.  Place drivemap command in the generated
2061         chain entry.
2063 2009-06-11  Pavel Roskin  <proski@gnu.org>
2065         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2066         have long been resolved.
2068 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2070         * util/grub.d/10_linux.in: Capitalise "Linux".
2072         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2074 2009-06-11  Pavel Roskin  <proski@gnu.org>
2076         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2077         fix a gcc warning and ensure that the function won't ever exit.
2079         * kern/i386/ieee1275/init.c: Add missing prototype for
2080         grub_stop_floppy().
2082         * loader/ieee1275/multiboot2.c [__i386__]: Include
2083         grub/cpu/multiboot.h.
2085         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2086         casts to short - they are not portable and cause warnings.  Fix
2087         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2089 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2091         Drivemap fixes
2093         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2094         new function
2095         (grub_get_root_biosnumber_saved): new variable
2096         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2097         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2098         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2099         %dx after the call if necessary
2100         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2101         (boot_mod_SOURCES): remove
2102         (boot_mod_CFLAGS): remove
2103         (boot_mod_LDFLAGS): remove
2104         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2105         (boot_mod_SOURCES): new variable
2106         (boot_mod_CFLAGS): likewise
2107         (boot_mod_LDFLAGS): likewise
2108         * conf/i386-efi.rmk: likewise
2109         * conf/i386-ieee1275.rmk: likewise
2110         * conf/i386-pc.rmk: likewise
2111         * conf/powerpc-ieee1275.rmk: likewise
2112         * conf/sparc64-ieee1275.rmk: likewise
2113         * conf/x86_64-efi.rmk: likewise
2114         * include/grub/i386/pc/biosnum.h: new file
2115         * lib/i386/pc/biosnum.c: likewise
2116         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2117         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2118         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2120 2009-06-10  Pavel Roskin  <proski@gnu.org>
2122         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2123         Use separate variables.  Read only the file size at the end, but
2124         not the checksum that we don't use.
2126         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2127         Adjust all callers.
2129         * kern/ieee1275/openfw.c: Remove libc includes.
2130         * kern/ieee1275/cmain.c: Likewise.
2131         * include/grub/ieee1275/ieee1275.h: Likewise.
2133         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2134         compiler warnings.
2136 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2138         * Makefile.in: Remove all trailing whitespace.
2139         * conf/i386-pc.rmk: Likewise.
2140         * conf/powerpc-ieee1275.rmk: Likewise.
2141         * conf/sparc64-ieee1275.rmk: Likewise.
2142         * docs/grub.texi: Likewise.
2143         * docs/texinfo.tex: Likewise.
2144         * disk/fs_uuid.c: Likewise.
2145         * disk/lvm.c: Likewise.
2146         * disk/scsi.c: Likewise.
2147         * disk/ata.c: Likewise.
2148         * disk/ieee1275/ofdisk.c: Likewise.
2149         * disk/i386/pc/biosdisk.c: Likewise.
2150         * disk/host.c: Likewise.
2151         * disk/raid.c: Likewise.
2152         * disk/efi/efidisk.c: Likewise.
2153         * disk/usbms.c: Likewise.
2154         * disk/memdisk.c: Likewise.
2155         * disk/loopback.c: Likewise.
2156         * kern/powerpc/dl.c: Likewise.
2157         * kern/device.c: Likewise.
2158         * kern/dl.c: Likewise.
2159         * kern/sparc64/dl.c: Likewise.
2160         * kern/ieee1275/ieee1275.c: Likewise.
2161         * kern/term.c: Likewise.
2162         * kern/fs.c: Likewise.
2163         * kern/i386/dl.c: Likewise.
2164         * kern/i386/pc/startup.S: Likewise.
2165         * kern/i386/pc/init.c: Likewise.
2166         * kern/i386/pc/mmap.c: Likewise.
2167         * kern/i386/pc/lzo1x.S: Likewise.
2168         * kern/i386/ieee1275/init.c: Likewise.
2169         * kern/i386/realmode.S: Likewise.
2170         * kern/i386/tsc.c: Likewise.
2171         * kern/partition.c: Likewise.
2172         * kern/corecmd.c: Likewise.
2173         * kern/file.c: Likewise.
2174         * kern/efi/efi.c: Likewise.
2175         * kern/efi/init.c: Likewise.
2176         * kern/efi/mm.c: Likewise.
2177         * kern/main.c: Likewise.
2178         * kern/err.c: Likewise.
2179         * kern/env.c: Likewise.
2180         * kern/disk.c: Likewise.
2181         * kern/generic/millisleep.c: Likewise.
2182         * kern/generic/rtc_get_time_ms.c: Likewise.
2183         * kern/misc.c: Likewise.
2184         * kern/parser.c: Likewise.
2185         * genmk.rb: Likewise.
2186         * configure.ac: Likewise.
2187         * boot/i386/pc/diskboot.S: Likewise.
2188         * boot/i386/pc/pxeboot.S: Likewise.
2189         * boot/i386/pc/boot.S: Likewise.
2190         * boot/i386/pc/lnxboot.S: Likewise.
2191         * boot/i386/pc/cdboot.S: Likewise.
2192         * parttool/pcpart.c: Likewise.
2193         * video/readers/tga.c: Likewise.
2194         * video/video.c: Likewise.
2195         * video/bitmap.c: Likewise.
2196         * lib/envblk.c: Likewise.
2197         * lib/i386/setjmp.S: Likewise.
2198         * fs/xfs.c: Likewise.
2199         * fs/afs.c: Likewise.
2200         * fs/fat.c: Likewise.
2201         * fs/ntfs.c: Likewise.
2202         * fs/udf.c: Likewise.
2203         * fs/affs.c: Likewise.
2204         * fs/iso9660.c: Likewise.
2205         * fs/hfs.c: Likewise.
2206         * fs/fshelp.c: Likewise.
2207         * fs/ext2.c: Likewise.
2208         * fs/jfs.c: Likewise.
2209         * fs/reiserfs.c: Likewise.
2210         * fs/hfsplus.c: Likewise.
2211         * fs/minix.c: Likewise.
2212         * fs/cpio.c: Likewise.
2213         * fs/sfs.c: Likewise.
2214         * fs/ufs.c: Likewise.
2215         * efiemu/prepare.c: Likewise.
2216         * efiemu/loadcore_common.c: Likewise.
2217         * efiemu/runtime/efiemu.sh: Likewise.
2218         * efiemu/runtime/efiemu.S: Likewise.
2219         * efiemu/runtime/efiemu.c: Likewise.
2220         * efiemu/pnvram.c: Likewise.
2221         * efiemu/main.c: Likewise.
2222         * efiemu/i386/pc/cfgtables.c: Likewise.
2223         * efiemu/i386/loadcore64.c: Likewise.
2224         * efiemu/i386/loadcore32.c: Likewise.
2225         * efiemu/loadcore.c: Likewise.
2226         * efiemu/symbols.c: Likewise.
2227         * efiemu/mm.c: Likewise.
2228         * include/grub/autoefi.h: Likewise.
2229         * include/grub/datetime.h: Likewise.
2230         * include/grub/term.h: Likewise.
2231         * include/grub/hfs.h: Likewise.
2232         * include/grub/lvm.h: Likewise.
2233         * include/grub/i386/tsc.h: Likewise.
2234         * include/grub/i386/linux.h: Likewise.
2235         * include/grub/i386/xnu.h: Likewise.
2236         * include/grub/i386/efiemu.h: Likewise.
2237         * include/grub/i386/pc/biosdisk.h: Likewise.
2238         * include/grub/i386/pc/memory.h: Likewise.
2239         * include/grub/i386/pc/vbe.h: Likewise.
2240         * include/grub/parttool.h: Likewise.
2241         * include/grub/video.h: Likewise.
2242         * include/grub/memory.h: Likewise.
2243         * include/grub/fs.h: Likewise.
2244         * include/grub/partition.h: Likewise.
2245         * include/grub/xnu.h: Likewise.
2246         * include/grub/efi/api.h: Likewise.
2247         * include/grub/efi/pe32.h: Likewise.
2248         * include/grub/efi/memory.h: Likewise.
2249         * include/grub/multiboot.h: Likewise.
2250         * include/grub/usbdesc.h: Likewise.
2251         * include/grub/multiboot2.h: Likewise.
2252         * include/grub/acpi.h: Likewise.
2253         * include/grub/efiemu/efiemu.h: Likewise.
2254         * include/grub/disk.h: Likewise.
2255         * include/grub/ieee1275/ieee1275.h: Likewise.
2256         * include/grub/net.h: Likewise.
2257         * include/grub/machoload.h: Likewise.
2258         * include/grub/macho.h: Likewise.
2259         * include/multiboot.h: Likewise.
2260         * genmoddep.awk: Likewise.
2261         * normal/main.c: Likewise.
2262         * normal/menu_entry.c: Likewise.
2263         * normal/menu_viewer.c: Likewise.
2264         * normal/completion.c: Likewise.
2265         * normal/cmdline.c: Likewise.
2266         * normal/misc.c: Likewise.
2267         * normal/datetime.c: Likewise.
2268         * bus/usb/usbtrans.c: Likewise.
2269         * bus/usb/ohci.c: Likewise.
2270         * bus/usb/uhci.c: Likewise.
2271         * bus/usb/usb.c: Likewise.
2272         * mmap/efi/mmap.c: Likewise.
2273         * mmap/i386/pc/mmap_helper.S: Likewise.
2274         * mmap/i386/pc/mmap.c: Likewise.
2275         * mmap/i386/mmap.c: Likewise.
2276         * mmap/i386/uppermem.c: Likewise.
2277         * mmap/mmap.c: Likewise.
2278         * commands/acpi.c: Likewise.
2279         * commands/echo.c: Likewise.
2280         * commands/blocklist.c: Likewise.
2281         * commands/loadenv.c: Likewise.
2282         * commands/usbtest.c: Likewise.
2283         * commands/boot.c: Likewise.
2284         * commands/parttool.c: Likewise.
2285         * commands/search.c: Likewise.
2286         * commands/cat.c: Likewise.
2287         * commands/i386/pc/play.c: Likewise.
2288         * commands/i386/pc/drivemap.c: Likewise.
2289         * commands/i386/pc/vbeinfo.c: Likewise.
2290         * commands/i386/pc/acpi.c: Likewise.
2291         * commands/i386/pc/vbetest.c: Likewise.
2292         * commands/ls.c: Likewise.
2293         * commands/cmp.c: Likewise.
2294         * commands/test.c: Likewise.
2295         * commands/efi/acpi.c: Likewise.
2296         * commands/gptsync.c: Likewise.
2297         * commands/help.c: Likewise.
2298         * partmap/amiga.c: Likewise.
2299         * partmap/apple.c: Likewise.
2300         * partmap/acorn.c: Likewise.
2301         * partmap/pc.c: Likewise.
2302         * partmap/sun.c: Likewise.
2303         * partmap/gpt.c: Likewise.
2304         * script/sh/lexer.c: Likewise.
2305         * script/sh/function.c: Likewise.
2306         * font/font.c: Likewise.
2307         * font/font_cmd.c: Likewise.
2308         * loader/powerpc/ieee1275/linux.c: Likewise.
2309         * loader/efi/chainloader.c: Likewise.
2310         * loader/multiboot_loader.c: Likewise.
2311         * loader/macho.c: Likewise.
2312         * loader/i386/multiboot.c: Likewise.
2313         * loader/i386/linux.c: Likewise.
2314         * loader/i386/pc/linux.c: Likewise.
2315         * loader/i386/pc/multiboot2.c: Likewise.
2316         * loader/i386/pc/chainloader.c: Likewise.
2317         * loader/i386/pc/xnu.c: Likewise.
2318         * loader/i386/bsd_trampoline.S: Likewise.
2319         * loader/i386/efi/linux.c: Likewise.
2320         * loader/i386/multiboot_elfxx.c: Likewise.
2321         * loader/i386/bsd_helper.S: Likewise.
2322         * loader/i386/bsd.c: Likewise.
2323         * loader/i386/linux_trampoline.S: Likewise.
2324         * loader/i386/xnu_helper.S: Likewise.
2325         * loader/i386/xnu.c: Likewise.
2326         * loader/i386/bsd_pagetable.c: Likewise.
2327         * loader/i386/multiboot_helper.S: Likewise.
2328         * loader/xnu.c: Likewise.
2329         * loader/xnu_resume.c: Likewise.
2330         * io/gzio.c: Likewise.
2331         * term/efi/console.c: Likewise.
2332         * term/terminfo.c: Likewise.
2333         * term/ieee1275/ofconsole.c: Likewise.
2334         * term/i386/pc/serial.c: Likewise.
2335         * term/i386/pc/vesafb.c: Likewise.
2336         * term/i386/pc/vga.c: Likewise.
2337         * term/usb_keyboard.c: Likewise.
2338         * term/gfxterm.c: Likewise.
2339         * aclocal.m4: Likewise.
2340         * util/lvm.c: Likewise.
2341         * util/grub.d/30_os-prober.in: Likewise.
2342         * util/grub.d/10_hurd.in: Likewise.
2343         * util/console.c: Likewise.
2344         * util/grub-macho2img.c: Likewise.
2345         * util/grub-probe.c: Likewise.
2346         * util/hostfs.c: Likewise.
2347         * util/i386/pc/grub-mkimage.c: Likewise.
2348         * util/i386/pc/grub-setup.c: Likewise.
2349         * util/i386/efi/grub-mkimage.c: Likewise.
2350         * util/grub-mkconfig.in: Likewise.
2351         * util/raid.c: Likewise.
2352         * util/resolve.c: Likewise.
2353         * util/grub-mkdevicemap.c: Likewise.
2354         * util/grub-emu.c: Likewise.
2355         * util/getroot.c: Likewise.
2356         * util/hostdisk.c: Likewise.
2357         * util/usb.c: Likewise.
2358         * util/grub-editenv.c: Likewise.
2359         * util/misc.c: Likewise.
2361 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2363         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2364         `genparttoollist.sh'.
2365         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2366         Add `*.sh' to the list find searches for and change `mdate.sh'
2367         to `mdate-sh'.
2369 2009-06-10  Pavel Roskin  <proski@gnu.org>
2371         * include/grub/multiboot2.h: Provide compatibility defines for
2372         multiboot2.h.
2373         * include/multiboot2.h: Include stdint.h only if needed, using
2374         angle brackets.
2375         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2376         grub/multiboot2.h.
2377         * loader/ieee1275/multiboot2.c: Likewise.
2378         * loader/multiboot2.c: Likewise.
2379         * loader/multiboot_loader.c: Likewise.
2381         * configure.ac: Use -nostdlib when probing for the target.  It
2382         should not be required to have libc for the target.
2384         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2385         they fail without libc headers for the target.
2386         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2387         exports.
2388         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2389         preprocessor conditionals.
2391         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2392         build system doesn't need to be aware of the tar.c internals.
2394 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2396         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2398 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2400         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2401         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2403 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2405         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2406         aren't available if ata.mod gets used.
2408 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2410         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2411         initialising controller.
2412         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2414 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2416         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2417         to choose between ata and biosdisk module on i386-pc.
2419 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2421         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2422         Subclass and Programming Interface fields in terms of the 3 byte
2423         Class Code register.
2424         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2426         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2427         interface is OHCI.  Add grub_dprintf for symmetry with
2428         bus/usb/uhci.c.
2429         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2430         interface is UHCI.  Add interf variable for programming
2431         interface.  Print interface with class/subclass.
2433         * bus/usb/ohci.c: Set interf with correct field.
2435         * bus/usb/uhci.c: Remove unneeded doubled lines.
2436         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2437         Remove whitespace inside comment.
2439 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2441         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2442         as fallback an equivalent option without depth.
2444 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2446         Not fail if unable to retrieve C/H/S on LBA disks
2448         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2449         if unable to retrieve C/H/S on LBA disks
2451 2009-06-08  Pavel Roskin  <proski@gnu.org>
2453         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2454         about aliasing.
2456 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2458         * Makefile.in (uninstall): Remove all $lib_DATA files.
2460 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2462         Bugfix: install on partitionless device
2464         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2465         is a whole disk
2467 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2469         * Makefile.in (uninstall): Remove all $include_DATA files.
2471 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2473         * commands/true.c: New file.  Implement the true and false commands.
2474         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2475         (true_mod_SOURCES): New variable.
2476         (true_mod_CFLAGS): Likewise.
2477         (true_mod_LDFLAGS): Likewise.
2479 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2481         Optimized font character lookup using binary search instead of linear
2482         search.  Fonts now are required to have the character index ordered by
2483         code point.
2485         * font/font.c (load_font_index): Verify that fonts have ordered
2486         character indices.
2487         (find_glyph): Use binary search instead of linear search to find a
2488         character in a font.
2490 2009-06-05  Michael Scherer  <misc@mandriva.org>
2492         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2493         uses case sensitive btree.
2494         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2495         only for case insensitive filesystems.
2497 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2499         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2500         * conf/common.rmk (search_mod_CFLAGS): likewise
2502 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2504         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2505         compensate a compiler bug
2507 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2509         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2510         instead of '\b'
2512 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2514         Definitions for creating asm symbols with Apple's CC
2516         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2517         [APPLE_CC] (VARIABLE): likewise
2519 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2521         Disable lnxboot.img when compiled
2522         with Apple's CC
2524         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2525         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2526         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2527         [! APPLE_CC] (CODE_LENG): skip
2528         [! APPLE_CC] (setup_sects): likewise
2529         [! APPLE_CC]: skip filling
2531 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2533         Address in trampolines based on 32-bit registers when compiled
2534         with Apple's CC
2536         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2537         for addresses
2538         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2540 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2542         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2544         * kern/misc.c [APPLE_CC] (memcpy): new function
2545         [APPLE_CC] (memmove): likewise
2546         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2547         (memcpy): define alias conditionally on !APPLE_CC
2548         (memset): likewise
2549         (abort): likewise
2550         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2551         APPLE_CC are defined
2552         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2553         (grub_assert_fail): make prototype conditional
2555 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2557         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2559         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2560         grub-macho2img
2561         (CLEANFILES): add grub-macho2img
2562         (grub_macho2img_SOURCES): new variable
2563         * kern/i386/pc/startup.S (bss_start): new variable
2564         (bss_end): likewise
2565         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2566         * util/grub-macho2img.c: new file
2568 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2570         Use objconv when compiling with Apple's CC
2572         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2573         (efiemu64.o): likewise
2574         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2575         when compiling with Apple's CC
2576         (efiemu64_s.o): likewise
2577         * configure.ac: check for objconv when compiling with Apple's CC
2578         * genmk.rb: use objconv for modules when compiled with Apple's CC
2580 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2582         Define segment as well as section when compiling with
2583         Apple's CC
2585         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2586         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2587         (efiemu_convert_pointer): likewise
2588         (efiemu_set_virtual_address_map): likewise
2589         (efiemu_convert_pointer): likewise
2590         (efiemu_getcrc32): likewise
2591         (init_crc32_table): likewise
2592         (reflect): likewise
2593         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2594         (GRUB_MOD_DEP): likewise
2596 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2598         Allow a compilation without -mcmodel=large
2600         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2601         when compiled without -mcmodel=large
2602         (filter_memory_map): remove memory post 4 GiB when compiled
2603         without -mcmodel=large
2604         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2605         TARGET_CFLAGS when -mcmodel=large isn't supported
2607 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2609         Remove nested functions in efiemu core
2611         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2613 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2615         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2617         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2618         temporary storage
2619         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2620         using Apple's CC
2621         (grub_cpu_is_tsc_supported): likewise
2622         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2624 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2626         Absolute addressing through constant with Apple's cc
2628         * kern/i386/pc/startup.S: Define necessary constants
2629         and address through it when using ABS with Apple's CC
2630         * boot/i386/pc/diskboot.S: likewise
2631         * boot/i386/pc/boot.S: likewise
2632         * boot/i386/pc/lnxboot.S: likewise
2633         * boot/i386/pc/cdboot.S: likewise
2634         * mmap/i386/pc/mmap_helper.S: likewise
2635         * commands/i386/pc/drivemap_int13h.S: likewise
2637 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2639         Check if compiler is apple cc
2641         * Makefile.in (ASFLAGS): new variable
2642         (TARGET_ASFLAGS): likewise
2643         (TARGET_MODULE_FORMAT): likewise
2644         (TARGET_APPLE_CC): likewise
2645         (OBJCONV): likewise
2646         (TARGET_IMG_CFLAGS): likewise
2647         (TARGET_CPPFLAGS): add includedir
2648         * configure.ac: call grub_apple_cc and grub_apple_target_cc
2649         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2650         Check for linker script only if compiler isn't Apple's CC
2651         (TARGET_MODULE_FORMAT): set
2652         (TARGET_APPLE_CC): likewise
2653         (TARGET_ASFLAGS): likewise
2654         (ASFLAGS): likewise
2655         Check for objcopy only if compiler isn't Apple's CC
2656         Check for BSS symbol only if compiler isn't Apple's CC
2657         * genmk.rb: adapt nm options if we use Apple's utils
2658         * aclocal.m4 (grub_apple_cc): new test
2659         (grub_apple_target_cc): likewise
2661 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2663         Simplify sed expressions and improve awk
2665         * Makefile.in (install-local): simplify sed expression
2666         * gencmdlist.sh: likewise
2667         * genmoddep.awk: avoid adding module as a dependency of itself
2669 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2671         Add missing start symbols
2673         * boot/i386/pc/boot.S: add start
2674         * boot/i386/pc/pxeboot.S: likewise
2676 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2678         Fix wrong assumptions with grub-mkimage on EFI
2680         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2681         (relocate_addresses): consider both r_addend and value at offset
2682         (make_mods_section): zerofill modinfo and header
2683         (convert_elf): write prefix here
2685 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2687         Use .asciz instead of .string
2689         * i386/pc/diskboot.S: use .asciz instead of .string
2690         * i386/pc/boot.S: likewise
2691         * include/grub/dl.h (GRUB_MOD_DEP): likewise
2692         (GRUB_MOD_NAME): likewise
2694 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2696         gfxpayload support
2698         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2699         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2700         (grub_video_setup): remove
2701         (grub_video_set_mode): new prototype
2702         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2703         (vid_mode): remove
2704         (linux_vesafb_res): compile only on PCBIOS
2705         (grub_linux_boot): support gfxpayload
2706         * loader/i386/pc/xnu.c (video_hook): new function
2707         (grub_xnu_set_video): support gfxpayload
2708         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2709         (DEFAULT_VIDEO_HEIGHT): likewise
2710         (DEFAULT_VIDEO_FLAGS): likewise
2711         (DEFAULT_VIDEO_MODE): new definition
2712         (video_hook): new function
2713         (grub_gfxterm_init): use grub_video_set_mode
2714         * util/grub.d/30_os-prober.in: remove explicit modesetting before
2715         loading xnu
2716         * video/video.c (grub_video_setup): removed
2717         (grub_video_set_mode): new function based on grub_gfxterm_init and
2718         grub_video_setup
2720 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2722         Avoid calling biosdisk in drivemap
2724         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2725         (revparse_biosdisk): likewise
2726         (list_mappings): derive name from id directly
2727         (grub_cmd_drivemap): use tryparse_diskstring
2729 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2731         Script fixes
2733         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2734         (grub_lexer_param): add tokenonhold
2735         (grub_script_create_cmdline): remove cmdline. All callers updated
2736         (grub_script_function_create): make functionname
2737         grub_script_arg. All callers updated
2738         (grub_script_execute_argument_to_string): new prototype
2739         * kern/parser.c (state_transitions): reorder
2740         (grub_parser_cmdline_state): fix a bug and make more compact
2741         * script/sh/execute.c (grub_script_execute_argument_to_string):
2742         make global
2743         (grub_script_execute_cmdline): use new format
2744         * script/sh/function.c (grub_script_function_create): make functionname
2745         grub_script_arg. All callers updated
2746         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2747         (grub_script_yylex): remove
2748         (grub_script_yylex2): renamed to ...
2749         (grub_script_yylex): ...renamed
2750         parse the expressions like a${b}c
2751         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2752         (GRUB_PARSER_TOKEN_VAR): remove
2753         (GRUB_PARSER_TOKEN_NAME): likewise
2754         ("if"): declare as typeless
2755         ("while"): likewise
2756         ("function"): likewise
2757         ("else"): likewise
2758         ("then"): likewise
2759         ("fi"): likewise
2760         (text): remove
2761         (argument): likewise
2762         (script): accept empty scripts and make exit on error
2763         (arguments): use GRUB_PARSER_TOKEN_ARG
2764         (function): likewise
2765         (command): move error handling to script
2766         (menuentry): move grub_script_lexer_ref before
2767         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2768         argument. All callers updated
2770 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2772         Prevent GRUB from probing floppies during boot.
2774         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2775         * commands/search.c (options): Add --no-floppy.
2776         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2777         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2778         --no-floppy when searching for UUIDs.
2780 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2782         Simplify the code duplication in commands/search.c.
2784         * commands/search.c (search_label, search_fs_uuid): Merge into ...
2785         (search_fs): ... this.  Update all users.
2787 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
2789         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2791 2009-05-28  Pavel Roskin  <proski@gnu.org>
2793         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2794         Remove the original symlink explicitly.
2796         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2797         just one slash.  That's how grub_fshelp_find_file() does it.
2799 2009-05-26  Pavel Roskin  <proski@gnu.org>
2801         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2802         to `str'.
2804         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2805         possibly unused.
2807 2009-05-25  Christian Franke  <franke@computer.org>
2809         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2810         register.
2811         (grub_atapi_identify): Add wait after drive select.
2812         (grub_ata_identify): Do more strict status register check before
2813         calling grub_atapi_identify ().  Suppress error message if status
2814         register is 0x00 after command failure.  Add status register
2815         check after PIO read to avoid bogus identify due to stuck DRQ.
2816         Thanks to Pavel Roskin for testing.
2817         (grub_device_initialize): Remove unsafe status register check.
2818         Thanks to 'phcoder' for problem report and patch.
2819         Prevent sign extension in debug message.
2821 2009-05-23  Colin D Bennett  <colin@gibibit.com>
2823         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
2824         definition file, and functions defined in `normal/menu.c' have had
2825         their prototypes moved to `include/grub/menu.h' for consistency.
2827         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2828         from normal.h.
2829         (grub_menu_get_entry): Likewise.
2830         (grub_menu_get_timeout): Likewise.
2831         (grub_menu_set_timeout): Likewise.
2832         (grub_menu_execute_entry): Likewise.
2833         (grub_menu_execute_with_fallback): Likewise.
2834         (grub_menu_entry_run): Likewise.
2836         * include/grub/normal.h: Re-ordered and grouped function
2837         prototypes by file that the function is defined in.
2838         (grub_menu_execute_callback): Removed; moved to menu.h.
2839         (grub_menu_get_entry): Likewise.
2840         (grub_menu_get_timeout): Likewise.
2841         (grub_menu_set_timeout): Likewise.
2842         (grub_menu_execute_entry): Likewise.
2843         (grub_menu_execute_with_fallback): Likewise.
2844         (grub_menu_entry_run): Likewise.
2845         (grub_menu_addentry): Renamed from this ...
2846         (grub_normal_add_menu_entry): ... to this.
2848         * normal/main.c (grub_menu_addentry): Renamed from this ...
2849         (grub_normal_add_menu_entry): ... to this.
2851         * script/sh/execute.c (grub_script_execute_menuentry): Update
2852         reference to renamed grub_menu_addentry function.
2854 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
2856         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2858 2009-05-22  Pavel Roskin  <proski@gnu.org>
2860         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2861         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
2862         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
2863         compiling for the i386 targets, but not for the utilities.
2865         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2866         to grub_uint8_t.
2867         (grub_root_drive): Likewise.
2868         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2869         remove alignment.
2870         (grub_root_drive): Change size to byte.
2871         (grub_start_addr): Remove.
2872         (grub_end_addr): Likewise.
2873         (grub_apm_bios_info): Likewise.
2875 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
2877         * normal/i386: Remove.
2878         * normal/powerpc: Likewise.
2879         * normal/sparc64: Likewise.
2880         * normal/x86_64: Likewise.
2882 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
2884         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2885         * loader/i386/linux_trampoline.S: Fix indentation
2886         * loader/i386/xnu_helper.S: Likewise
2888 2009-05-18  Colin D Bennett  <colin@gibibit.com>
2890         Display error messages when parsing a Lua statement fails.
2891         Previously, executing a syntactically invalid statement like
2892         ")foo" or "bar;" would silently fail.
2894         * script/lua/grub_main.c (handle_lua_error): New function.
2895         (grub_lua_parse_line): Improved reporting of Lua parser and
2896         execution errors.
2898 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2900         Remove -Werror which causes build to fail on some systems
2902         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2903         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2904         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2906 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2908         trampoline for linux on 64-bit platform
2910         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2911         loader/i386/efi/linux_trampoline.S
2912         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2913         declaration
2914         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2915         here
2916         * loader/i386/linux_trampoline.S: moved here
2917         * loader/i386/efi/linux.c (allocate_pages): reserve space for
2918         trampoline
2919         (jumpvector): removed
2920         (grub_linux_trampoline_start): new declaration
2921         (grub_linux_trampoline_end): likewise
2922         (grub_linux_boot): use trampoline when on 64-bit platform
2923         * loader/i386/linux.c: likewise
2925 2009-05-16  Pavel Roskin  <proski@gnu.org>
2927         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2928         const to avoid a warning.
2929         (grub_lua_setenv): Likewise.
2930         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2931         lmsg to fix a warning.
2933 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2935         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2936         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2937         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2938         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2939         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2940         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2941         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2942         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2944 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2946         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2948 2009-05-16  Bean  <bean123ch@gmail.com>
2950         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2951         (lua_mod_SOURCES): New variable.
2952         (lua_mod_CFLAGS): Likewise.
2953         (lua_mod_LDFLAGS): Likewise.
2955         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
2956         (setjmp_mod_SOURCES): New variable.
2957         (setjmp_mod_CFLAGS): Likewise.
2958         (setjmp_LDFLAGS): Likewise.
2960         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
2961         (setjmp_mod_SOURCES): New variable.
2962         (setjmp_mod_CFLAGS): Likewise.
2963         (setjmp_LDFLAGS): Likewise.
2965         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2966         (setjmp_mod_SOURCES): New variable.
2967         (setjmp_mod_CFLAGS): Likewise.
2968         (setjmp_LDFLAGS): Likewise.
2970         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2971         (setjmp_mod_SOURCES): New variable.
2972         (setjmp_mod_CFLAGS): Likewise.
2973         (setjmp_LDFLAGS): Likewise.
2975         * normal/i386/setjmp.S: Moved from here ...
2976         * lib/i386/setjmp.S: ... Moved here
2977         * normal/x86_64/setjmp.S: Moved from here ...
2978         * lib/x86_64/setjmp.S: ... Moved here
2979         * normal/powerpc/setjmp.S: Moved from here ...
2980         * lib/powerpc/setjmp.S: ... Moved here
2981         * normal/sparc64/setjmp.S: Moved from here ...
2982         * lib/sparc64/setjmp.S: ... Moved here
2984         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
2985         returns_twice in mingw.
2987         * script/lua/grub_lib.c: New file.
2988         * script/lua/grub_lib.h: Likewise.
2989         * script/lua/grub_lua.h: Likewise.
2990         * script/lua/grub_main.c: Likewise.
2991         * script/lua/lapi.c: Likewise.
2992         * script/lua/lapi.h: Likewise.
2993         * script/lua/lauxlib.c: Likewise.
2994         * script/lua/lauxlib.h: Likewise.
2995         * script/lua/lbaselib.c: Likewise.
2996         * script/lua/lcode.c: Likewise.
2997         * script/lua/lcode.h: Likewise.
2998         * script/lua/ldblib.c: Likewise.
2999         * script/lua/ldebug.c: Likewise.
3000         * script/lua/ldebug.h: Likewise.
3001         * script/lua/ldo.c: Likewise.
3002         * script/lua/ldo.h: Likewise.
3003         * script/lua/ldump.c: Likewise.
3004         * script/lua/lfunc.c: Likewise.
3005         * script/lua/lfunc.h: Likewise.
3006         * script/lua/lgc.c: Likewise.
3007         * script/lua/lgc.h: Likewise.
3008         * script/lua/linit.c: Likewise.
3009         * script/lua/liolib.c: Likewise.
3010         * script/lua/llex.c: Likewise.
3011         * script/lua/llex.h: Likewise.
3012         * script/lua/llimits.h: Likewise.
3013         * script/lua/lmathlib.c: Likewise.
3014         * script/lua/lmem.c: Likewise.
3015         * script/lua/lmem.h: Likewise.
3016         * script/lua/loadlib.c: Likewise.
3017         * script/lua/lobject.c: Likewise.
3018         * script/lua/lobject.h: Likewise.
3019         * script/lua/lopcodes.c: Likewise.
3020         * script/lua/lopcodes.h: Likewise.
3021         * script/lua/loslib.c: Likewise.
3022         * script/lua/lparser.c: Likewise.
3023         * script/lua/lparser.h: Likewise.
3024         * script/lua/lstate.c: Likewise.
3025         * script/lua/lstate.h: Likewise.
3026         * script/lua/lstring.c: Likewise.
3027         * script/lua/lstring.h: Likewise.
3028         * script/lua/lstrlib.c: Likewise.
3029         * script/lua/ltable.c: Likewise.
3030         * script/lua/ltable.h: Likewise.
3031         * script/lua/ltablib.c: Likewise.
3032         * script/lua/ltm.c: Likewise.
3033         * script/lua/ltm.h: Likewise.
3034         * script/lua/lua.h: Likewise.
3035         * script/lua/luaconf.h: Likewise.
3036         * script/lua/lualib.h: Likewise.
3037         * script/lua/lundump.c: Likewise.
3038         * script/lua/lundump.h: Likewise.
3039         * script/lua/lvm.c: Likewise.
3040         * script/lua/lvm.h: Likewise.
3041         * script/lua/lzio.c: Likewise.
3042         * script/lua/lzio.h: Likewise.
3044 2009-05-16  Bean  <bean123ch@gmail.com>
3046         * include/grub/kernel.h (grub_module_header_types): Add type
3047         OBJ_TYPE_CONFIG.
3049         * kern/main.c (grub_load_config): New function.
3050         (grub_main): Call grub_load_config to read boot config.
3052         * grub-mkimage (generate_image): New parameter config_path.
3053         (options): New option --config.
3054         (main): Parse --config option, and pass it to generate_image.
3056 2009-05-14  Christian Franke  <franke@computer.org>
3058         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3059         This fixes build on Cygwin.
3061 2009-05-14  Pavel Roskin  <proski@gnu.org>
3063         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3064         jump.  This saves two bytes, so the typical case of 2 swapped
3065         drives would fit 32 bytes.
3067 2009-05-13  Pavel Roskin  <proski@gnu.org>
3069         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3070         grub_uint32_t to avoid a warning.
3072         * loader/i386/linux.c (allocate_pages): When assigning
3073         real_mode_mem, cast through grub_size_t to fix a warning.  The
3074         code already makes sure that the value would fit a pointer.
3075         (grub_linux_setup_video): Cast render_target->data to
3076         grub_size_t to fix a warning.
3078 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3080         * commands/i386/pc/drivemap.c: New file - implement drivemap
3081         command.
3082         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3083         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3085 2009-05-13  Pavel Roskin  <proski@gnu.org>
3087         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3088         embedding_area_exists.
3090 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3092         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3093         it easier to understand / work with.
3094         Improve warning messages for cases where there's no embedding area,
3095         or when it is too small (or core.img too large).
3097 2009-05-13  Pavel Roskin  <proski@gnu.org>
3099         * loader/i386/pc/multiboot2.c: Add necessary includes for
3100         grub_multiboot2_real_boot().
3102         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3103         PX record is always little-endian.  We only need the lower 2
3104         bytes of the mode.
3106         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3107         facilitate code reuse.
3108         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3109         fixes a warning reported by gcc 4.4.
3111         * kernel/disk.c (grub_disk_read): Use void pointer for the
3112         buffer.
3113         (grub_disk_write): Use const void pointer for the buffer.
3114         Adjust all callers.  Remove unnecessary casts.
3116 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3118         * util/i386/pc/grub-install.in: Update copyright year.
3120 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3122         gptsync
3124         * commands/gptsync.c: new file
3125         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3126         (gptsync_mod_SOURCES): new variable
3127         (gptsync_mod_CFLAGS): likewise
3128         (gptsync_mod_LDFLAGS): likewise
3129         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3130         new definition
3131         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3132         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3133         * conf/i386-ieee1275.rmk: likewise
3134         * conf/i386-pc.rmk: likewise
3135         * conf/powerpc-ieee1275.rmk: likewise
3137 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3139         Fixed grub-emu
3141         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3142         (grub_dl_ref): likewise
3144 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3146         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3147         split in two functions (one for msdos and one for gpt).
3149 2009-05-08  Pavel Roskin  <proski@gnu.org>
3151         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3152         not modified.
3154         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3155         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3156         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3157         nerr variable.
3159 2009-05-08  David S. Miller  <davem@davemloft.net>
3161         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3163 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3165         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3166         existence.
3168 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3170         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3171         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3173 2009-05-05  David S. Miller  <davem@davemloft.net>
3175         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3177 2009-05-05  Pavel Roskin  <proski@gnu.org>
3179         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3180         of grub_dl_ref() and grub_dl_unref().
3181         * commands/parttool.c: Remove preprocessor conditionals around
3182         grub_dl_ref() and grub_dl_unref().
3183         * fs/affs.c: Likewise.
3184         * fs/afs.c: Likewise.
3185         * fs/cpio.c: Likewise.
3186         * fs/ext2.c: Likewise.
3187         * fs/fat.c: Likewise.
3188         * fs/hfs.c: Likewise.
3189         * fs/hfsplus.c: Likewise.
3190         * fs/iso9660.c: Likewise.
3191         * fs/jfs.c: Likewise.
3192         * fs/minix.c: Likewise.
3193         * fs/ntfs.c: Likewise.
3194         * fs/reiserfs.c: Likewise.
3195         * fs/sfs.c: Likewise.
3196         * fs/udf.c: Likewise.
3197         * fs/ufs.c: Likewise.
3198         * fs/xfs.c: Likewise.
3199         * include/grub/dl.h: Likewise.
3200         * loader/xnu.c: Likewise.
3202 2009-05-04  Pavel Roskin  <proski@gnu.org>
3204         * commands/acpi.c: Remove unused variable my_mod.
3205         * partmap/amiga.c: Likewise.
3206         * partmap/apple.c: Likewise.
3207         * partmap/gpt.c: Likewise.
3208         * partmap/pc.c: Likewise.
3209         * partmap/sun.c: Likewise.
3210         * term/gfxterm.c: Likewise.
3211         * term/i386/pc/vesafb.c: Likewise.
3212         * term/i386/pc/vga.c: Likewise.
3214 2009-05-04  David S. Miller  <davem@davemloft.net>
3216         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3217         pointer args to grub_ieee1275_get_property().
3219         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3221         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3222         devices, and do not traverse down under controller nodes.
3224         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3225         (grub_ofdisk_open): Use it to un-escape "," characters.
3226         * kern/disk.c (find_part_sep): New.
3227         (grub_disk_open): Use it to find the first non-escaped ','
3228         character in the disk name.
3229         * util/ieee1275/devicemap.c (escape_of_path): New.
3230         (grub_util_emit_devicemap_entry): Use it.
3231         * util/sparc64/ieee1275/grub-install.in: Update script to
3232         strip partition specifiers properly by not triggering on
3233         '\' escaped ',' characters.
3235 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3237         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3238         to 0x300.
3239         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3240         resolutions.
3241         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3242         on documentation from Wikipedia).
3244 2009-05-04  Pavel Roskin  <proski@gnu.org>
3246         * disk/ata.c: Spelling fixes.
3247         * disk/raid.c: Likewise.
3248         * disk/usbms.c: Likewise.
3249         * disk/dmraid_nvidia.c: Likewise.
3250         * kern/ieee1275/openfw.c: Likewise.
3251         * kern/ieee1275/init.c: Likewise.
3252         * kern/ieee1275/cmain.c: Likewise.
3253         * boot/i386/pc/cdboot.S: Likewise.
3254         * video/readers/png.c: Likewise.
3255         * video/i386/pc/vbe.c: Likewise.
3256         * fs/udf.c: Likewise.
3257         * fs/hfs.c: Likewise.
3258         * fs/reiserfs.c: Likewise.
3259         * efiemu/runtime/efiemu.c: Likewise.
3260         * efiemu/main.c: Likewise.
3261         * efiemu/mm.c: Likewise.
3262         * include/grub/elf.h: Likewise.
3263         * include/grub/xnu.h: Likewise.
3264         * include/grub/usbdesc.h: Likewise.
3265         * include/grub/usb.h: Likewise.
3266         * include/grub/script_sh.h: Likewise.
3267         * include/grub/lib/LzmaEnc.h: Likewise.
3268         * include/grub/efiemu/efiemu.h: Likewise.
3269         * include/grub/command.h: Likewise.
3270         * normal/menu.c: Likewise.
3271         * normal/main.c: Likewise.
3272         * normal/datetime.c: Likewise.
3273         * bus/usb/uhci.c: Likewise.
3274         * mmap/i386/uppermem.c: Likewise.
3275         * mmap/mmap.c: Likewise.
3276         * commands/acpi.c: Likewise.
3277         * commands/test.c: Likewise.
3278         * partmap/apple.c: Likewise.
3279         * font/font.c: Likewise.
3280         * loader/sparc64/ieee1275/linux.c: Likewise.
3281         * loader/macho.c: Likewise.
3282         * loader/i386/bsd_trampoline.S: Likewise.
3283         * loader/i386/bsd.c: Likewise.
3284         * loader/xnu.c: Likewise.
3285         * term/i386/pc/vesafb.c: Likewise.
3286         * term/usb_keyboard.c: Likewise.
3287         * util/resolve.c: Likewise.
3288         * util/getroot.c: Likewise.
3290 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3292         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3294 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3296         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3297         build error.
3299 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3301         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3302         parameter only available on BIOS.
3304 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3306         Removed wrong semicolon in declaration
3308         * grub/misc.h (grub_dprintf): remove semicolon
3310 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3312         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3313         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3314         is done by grub_cmd_linux() now).
3315         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3316         restore video to text mode.
3317         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3318         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3319         `GRUB_LINUX_VID_MODE_NORMAL'.
3321 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3323         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3324         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3325         and `normal/script.c'.  Add `kern/rescue_reader.c',
3326         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3327         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3328         `grub_script.tab.c'.
3330         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3331         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3332         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3333         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3334         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3336         * Makefile.in: Remove duplicated 2008 in Copyright line.
3338 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3340         * util/misc.c (grub_util_warn): New function.  Emits a warning
3341         unconditionally.
3342         * include/grub/util/misc.h (grub_util_warn): New declaration.
3344         * util/i386/pc/grub-install.in: Understand --force and pass it down
3345         to grub-setup.
3347         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3348         down to setup().
3349         (setup): Improve error messages and add warnings when requested to
3350         install in odd layouts.  Refuse to install using blocklists unless
3351         --force was set.
3353 2009-05-04  martin f. krafft  <madduck@madduck.net>
3355         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3357 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3359         Updated copyright year
3361         * fs/hfsplus.c: updated copyright year
3363 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3365         HFS+ UUID
3367         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3368         in the space previously used by unused3
3369         (grub_hfsplus_uuid): new function
3370         (grub_hfsplus_fs): added uuid field
3372 2009-05-03  Pavel Roskin  <proski@gnu.org>
3374         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3375         suppress warnings.  It's no longer needed.
3376         * disk/host.c: Likewise.
3377         * disk/ata_pthru.c: Likewise.
3378         * disk/loopback.c: Likewise.
3379         * hook/datehook.c: Likewise.
3380         * parttool/pcpart.c: Likewise.
3381         * fs/i386/pc/pxe.c: Likewise.
3382         * fs/ntfscomp.c: Likewise.
3383         * efiemu/main.c: Likewise.
3384         * mmap/mmap.c: Likewise.
3385         * commands/crc.c: Likewise.
3386         * commands/hexdump.c: Likewise.
3387         * commands/hdparm.c: Likewise.
3388         * commands/acpi.c: Likewise.
3389         * commands/echo.c: Likewise.
3390         * commands/minicmd.c: Likewise.
3391         * commands/blocklist.c: Likewise.
3392         * commands/memrw.c: Likewise.
3393         * commands/loadenv.c: Likewise.
3394         * commands/usbtest.c: Likewise.
3395         * commands/lsmmap.c: Likewise.
3396         * commands/boot.c: Likewise.
3397         * commands/parttool.c: Likewise.
3398         * commands/configfile.c: Likewise.
3399         * commands/search.c: Likewise.
3400         * commands/ieee1275/suspend.c: Likewise.
3401         * commands/cat.c: Likewise.
3402         * commands/i386/pc/pxecmd.c: Likewise.
3403         * commands/i386/pc/play.c: Likewise.
3404         * commands/i386/pc/halt.c: Likewise.
3405         * commands/i386/pc/vbeinfo.c: Likewise.
3406         * commands/i386/pc/vbetest.c: Likewise.
3407         * commands/lspci.c: Likewise.
3408         * commands/date.c: Likewise.
3409         * commands/handler.c: Likewise.
3410         * commands/ls.c: Likewise.
3411         * commands/test.c: Likewise.
3412         * commands/cmp.c: Likewise.
3413         * commands/efi/loadbios.c: Likewise.
3414         * commands/efi/fixvideo.c: Likewise.
3415         * commands/halt.c: Likewise.
3416         * commands/help.c: Likewise.
3417         * commands/reboot.c: Likewise.
3418         * hello/hello.c: Likewise.
3419         * script/sh/main.c: Likewise.
3420         * loader/xnu.c: Likewise.
3421         * term/terminfo.c: Likewise.
3422         * term/i386/pc/serial.c: Likewise.
3423         * term/usb_keyboard.c: Likewise.
3425 2009-05-03  David S. Miller  <davem@davemloft.net>
3427         * normal/menu.c: Include grub/parser.h
3429 2009-05-03  Pavel Roskin  <proski@gnu.org>
3431         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3432         not char*.
3433         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3434         Suggested by Javier Martín <lordhabbit@gmail.com>
3436         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3437         efiemu??.o doesn't exist.
3438         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3439         copying.
3441 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3443         FreeBSD 64-bit support
3445         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3446         and loader/i386/bsd_trampoline.S
3447         (bsd_mod_ASFLAGS): new variable
3448         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3449         (FREEBSD_MODTYPE_KERNEL64): likewise
3450         (grub_bsd64_trampoline_start): likewise
3451         (grub_bsd64_trampoline_end): likewise
3452         (grub_bsd64_trampoline_selfjump): likewise
3453         (grub_bsd64_trampoline_gdt): likewise
3454         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3455         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3456         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3457         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3458         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3459         of "attrib" member
3460         * loader/i386/bsd_pagetable.c: new file
3461         * loader/i386/bsd_trampoline.S: likewise
3462         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3463         (ALIGN_VAR): likewise
3464         (entry_hi): new variable
3465         (kern_end_mdofs): likewise
3466         (is_64bit): likewise
3467         (grub_freebsd_add_meta): use ALIGN_VAR
3468         (grub_e820_mmap): new declaration
3469         (grub_freebsd_add_mmap): new function
3470         (grub_freebsd_add_meta_module): support 64 bit kernels
3471         (grub_freebsd_list_modules): use ALIGN_VAR
3472         (gdt_descriptor): new declaration
3473         (grub_freebsd_boot): support 64 bit kernels
3474         (grub_bsd_elf64_hook): new function
3475         (grub_bsd_load_elf): support elf64
3477 2009-05-03  Bean  <bean123ch@gmail.com>
3479         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3480         after we get the result of if statement.
3482 2009-05-03  Bean  <bean123ch@gmail.com>
3484         * Makefile.in (enable_efiemu): New variable.
3486         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3487         set.
3488         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3489         path.
3490         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3491         path, add -mno-red-zone option.
3492         (efiemu64_s.o): Likewise.
3493         (efiemu64.o): Use macro $^ for source file.
3495         * configure.ac (--enable-efiemu): New option.
3497 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3499         xnu support
3501         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3502         (pkglib_MODULES): add xnu.mod
3503         (xnu_mod_SOURCES): new variable
3504         (xnu_mod_CFLAGS): likewise
3505         (xnu_mod_LDFLAGS): likewise
3506         (xnu_mod_ASFLAGS): likewise
3507         * conf/i386-pc.rmk: likewise
3508         * conf/x86_64-efi.rmk: likewise
3509         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3510         new declaration
3511         * include/grub/i386/macho.h: new file
3512         * include/grub/i386/xnu.h: likewise
3513         * include/grub/macho.h: likewise
3514         * include/grub/machoload.h: likewise
3515         * include/grub/x86_64/macho.h: likewise
3516         * include/grub/x86_64/xnu.h: likewise
3517         * include/grub/xnu.h: likewise
3518         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3519         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3520         * loader/i386/efi/xnu.c: new file
3521         * loader/i386/pc/xnu.c: likewise
3522         * loader/i386/xnu.c: likewise
3523         * loader/i386/xnu_helper.S: likewise
3524         * loader/macho.c: likewise
3525         * loader/xnu.c: likewise
3526         * loader/xnu_resume.c: likewise
3527         * util/grub-dumpdevtree: likewise
3528         * include/grub/i386/pit.h: include grub/err.h
3529         (grub_pit_wait): export
3530         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3532 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3534         Efiemu
3536         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3537         _linux_efi, linux_efi.
3538         new files in grub-emu
3539         new targets efiemu32.o and efiemu64.o
3540         * loader/linux_normal_efiemu.c: likewise
3541         * loader/i386/efi/linux.c: added preliminary efiemu support
3542         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3543         files to copy
3544         * include/grub/autoefi.h: new file
3545         * include/grub/i386/efiemu.h: likewise
3546         * include/grub/i386/pc/efiemu.h: likewise
3547         * include/grub/efi/api.h: add LL suffix when necessary
3548         new definitions relating to tables
3549         * include/grub/efiemu/efiemu.h: new file
3550         * include/grub/efiemu/runtime.h: likewise
3551         * efiemu/prepare.c: likewise
3552         * efiemu/loadcore_common.c: likewise
3553         * efiemu/loadcore64.c: likewise
3554         * efiemu/runtime/efiemu.sh: likewise
3555         * efiemu/runtime/efiemu.S: likewise
3556         * efiemu/runtime/efiemu.c: likewise
3557         * efiemu/runtime/config.h: likewise
3558         * efiemu/prepare32.c: likewise
3559         * efiemu/main.c: likewise
3560         * efiemu/modules/pnvram.c: likewise
3561         * efiemu/modules/i386: likewise
3562         * efiemu/modules/i386/pc: likewise
3563         * efiemu/modules/acpi.c: likewise
3564         * efiemu/i386/pc/cfgtables.c: likewise
3565         * efiemu/i386/loadcore64.c: likewise
3566         * efiemu/i386/loadcore32.c: likewise
3567         * efiemu/prepare64.c: likewise
3568         * efiemu/loadcore.c: likewise
3569         * efiemu/symbols.c: likewise
3570         * efiemu/mm.c: likewise
3571         * efiemu/loadcore32.c: likewise
3573 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3575         ACPI spoofing
3577         * commands/acpi.c: new file
3578         * commands/i386/pc/acpi.c: likewise
3579         * commands/efi/acpi.c: likewise
3580         * include/grub/acpi.h: likewise
3581         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3582         (acpi_mod_SOURCES): new variable
3583         (acpi_mod_CFLAGS): likewise
3584         (acpi_mod_LDFLAGS): likewise
3585         * conf/i386-efi.rmk: likewise
3586         * conf/x86_64-efi.rmk: likewise
3588 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3590         Missing part from mmap patch
3592         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3593         (grub_mmap_unregister)
3594         (grub_mmap_free_and_unregister): use grub_mmap_register
3596 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3598         Mmap services
3600         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3601         * loader/i386/linux.c (find_mmap_size): likewise
3602         (allocate_pages): likewise
3603         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3604         (grub_fill_multiboot_mmap): likewise
3605         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3606         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3607         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3608         (OPENBSD_MMAP_RESERVED): likewise
3609         * include/grub/i386/pc/memory.h: include grub/memory.h
3610         (grub_lower_mem): removed
3611         (grub_upper_mem): likewise
3612         (GRUB_MACHINE_MEMORY_ACPI): new definition
3613         (GRUB_MACHINE_MEMORY_NVS): likewise
3614         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3615         (GRUB_MACHINE_MEMORY_HOLE): likewise
3616         (grub_machine_mmap_register): likewise
3617         (grub_machine_mmap_unregister): likewise
3618         (grub_machine_get_upper): likewise
3619         (grub_machine_get_lower): likewise
3620         (grub_machine_get_post64): likewise
3621         * include/grub/i386/efi/memory.h: new file
3622         * include/grub/x86_64/efi/memory.h: likewise
3623         * include/grub/efi/memory.h: likewise
3624         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3625         (mmap_mod_SOURCES): new variable
3626         (mmap_mod_LDFLAGS): likewise
3627         (mmap_mod_ASFLAGS): likewise
3628         * conf/i386-coreboot.rmk: likewise
3629         * conf/i386-ieee1275.rmk: likewise
3630         * conf/i386-efi.rmk: likewise
3631         * conf/x86_64-efi.rmk: likewise
3632         * include/grub/types.h (UINT_TO_PTR): new macro
3633         (PTR_TO_UINT32): likewise
3634         (PTR_TO_UINT64): likewise
3635         * include/grub/memory.h: new file
3636         * mmap/i386/pc/mmap.c: likewise
3637         * mmap/i386/pc/mmap_helper.S: likewise
3638         * mmap/i386/uppermem.c: likewise
3639         * mmap/mmap.c: likewise
3640         * mmap/efi/mmap.c: likewise
3641         * kern/i386/coreboot/init.c (grub_machine_init): don't use
3642         grub_upper_mem
3643         * kern/i386/pc/init.c (grub_lower_mem): removed variable
3644         (grub_upper_mem): likewise
3645         (grub_machine_init): don't use grub_upper_mem,
3646         make grub_lower_mem local
3647         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3648         grub_mmap_iterate and grub_mmap_get_upper
3649         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3651 2009-05-02  Bean  <bean123ch@gmail.com>
3653         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3654         script/sh/parser.y.
3655         (pkglib_MODULES): Add normal.mod and sh.mod.
3656         (normal_SOURCES): New variable.
3657         (normal_mod_CFLAGS): Likewise.
3658         (normal_mod_LDFLAGS): Likewise.
3659         (sh_mod_SOURCES): Likewise.
3660         (sh_mod_CFLAGS): Likewise.
3661         (sh_mod_LDFLAGS): Likewise.
3663         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3664         script/sh/lexer.c_DEPENDENCIES.
3665         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3666         kern/rescue_reader.c and kern/rescue_parser.c.
3667         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3668         (grub_emu_SOURCES): Change source files.
3669         (pkglib_MODULES): Remove normal.mod.
3670         (normal_SOURCES): Removed.
3671         (normal_mod_CFLAGS): Likewise.
3672         (normal_mod_LDFLAGS): Likewise.
3673         * conf/i386-coreboot.rmk: Likewise.
3674         * conf/i386-efi.rmk: Likewise.
3675         * conf/i386-ieee1276.rmk: Likewise.
3676         * conf/powerpc-ieee1275.rmk: Likewise.
3677         * conf/sparc64-ieee1275.rmk: Likewise.
3678         * conf/x86_64-efi.rmk: Likewise.
3680         * include/grub/command.h (grub_command_execute): New inline function.
3682         * include/grub/menu.h (grub_menu_entry): Removed commands field.
3684         * include/grub/normal.h: Remove <grub/setjmp.h>.
3685         (grub_fs_module_list): Moved to normal/autofs.c.
3686         (grub_exit_env): Removed.
3687         (grub_command_execute): Likewise.
3688         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3689         parameter script.
3690         (read_command_list): New function declaration.
3691         (read_fs_list): Likewise.
3693         * include/parser.h: Include <grub/reader.h>.
3694         (grub_parser_split_cmdline): Change type of getline parameter.
3695         (grub_parser): New structure.
3696         (grub_parser_class): New variable.
3697         (grub_parser_execute): New function declaration.
3698         (grub_register_rescue_parser): Likewise.
3699         (grub_parser_register): New inline function.
3700         (grub_parser_unregister): Likewise.
3701         (grub_parser_get_current): Likewise.
3702         (grub_parser_set_current): Likewise.
3704         * include/grub/reader.h: New file.
3705         * kern/reader.c: Likewise.
3706         * kern/rescue_parser.c: Likewise.
3707         * kern/rescue_reader.c: Likewise.
3708         * normal/autofs.c: Likewise.
3709         * normal/dyncmd.c: Likewise.
3711         * include/grub/rescue.h: Removed.
3712         * normal/command.h: Likewise.
3714         * include/grub/script.h: Moved to ...
3715         * include/grub/script_sh.h: ... Moved here.
3716         * normal/execute.c: Moved to ...
3717         * script/sh/execute.c: ... Moved here.
3718         * normal/function.c: Moved to ...
3719         * script/sh/function.c: ... Moved here.
3720         * normal/lexer.c: Moved to ...
3721         * script/sh/lexer.c: ... Moved here.
3722         * normal/parser.y: Moved to ...
3723         * script/sh/parser.y: ... Moved here.
3724         * normal/script.c: Moved to ...
3725         * script/sh/script.c: ... Moved here.
3727         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3728         <grub/reader.h>.
3729         (grub_exit_env): Removed.
3730         (fs_module_list): Moved to normal/autofs.c.
3731         (grub_file_getline): Don't handle comment here.
3732         (free_menu): Skip removed field entry->commands.
3733         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3734         script parameter.
3735         (read_config_file): Removed nested parameter, change getline function.
3736         (grub_enter_normal_mode): Removed.
3737         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3738         (read_command_list): Likewise.
3739         (autoload_fs_module): Moved to normal/autofs.c.
3740         (read_fs_list): Likewise.
3741         (reader_nested): New variable.
3742         (grub_normal_execute): Run parser.sh to switch to sh parser.
3743         (grub_cmd_rescue): Removed.
3744         (cmd_normal): Removed.
3745         (grub_cmd_normal): Unregister itself at the beginning. Don't register
3746         rescue command.
3747         (grub_cmdline_run): New function.
3748         (grub_normal_reader_init): Likewise.
3749         (grub_normal_read_line): Likewise.
3750         (grub_env_write_pager): Likewise.
3751         (cmdline): New variable.
3752         (grub_normal_reader): Likewise.
3753         (GRUB_MOD_INIT): Register normal reader and set as current, register
3754         pager hook, register normal command with grub_register_command_prio,
3755         so that it won't show up in command.lst.
3756         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3757         grub_fs_autoload_hook.
3759         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3760         (grub_menu_execute_entry): Replace grub_script_execute with
3761         grub_parser_execute, change parameter to grub_command_execute.
3763         * normal/menu_text.c: Remove <grub/script.h>.
3765         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3766         and <grub/parser.h>.
3767         (run): Change editor_getline to use new parser interface. Change
3768         parameter to grub_command_execute.
3770         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3771         <grub/reader.h> and <grub/parser.h>.
3772         (grub_load_normal_mode): Execute normal command.
3773         (grub_main): Call grub_register_core_commands,
3774         grub_register_rescue_parser and grub_register_rescue_reader, use
3775         grub_reader_loop to enter input loop.
3777         * kern/parser.c (grub_parser_split_cmdline): Change type of
3778         getline parameter.
3779         (grub_parser_class): New variable.
3780         (grub_parser_execute): New function.
3782         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3783         * loader/multiboot2.c: Likewise.
3784         * loader/sparc64/ieee1275/linux.c: Likewise.
3786         * util/grub-emu.c (read_command_list): New dummy function.
3788 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3790         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3791         count to 16 for CCISS and IDA.
3793 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3795         * normal/menu_text.c  (grub_wait_after_message): Print a newline
3796         after waiting for user input.
3798         * loader/i386/linux.c: Include `<grub/normal.h>'.
3799         (grub_cmd_linux): Improve the error message about `ask' mode, by
3800         waiting for user input so it's not missed (we can do this, since
3801         user requested interaction).
3803 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3805         Added missing lst to grub-mkrescue
3807         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3808         and ${input_dir}/parttool.lst
3810 2009-04-30  David S. Miller  <davem@davemloft.net>
3812         * util/hostdisk.c (device_is_wholedisk): New function.
3813         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3814         zero only if device_is_wholedisk() returns true.
3816         * util/hostdisk.c (convert_system_partition_to_system_disk):
3817         Handle virtual disk devices named /dev/vdiskX as found on sparc
3818         and powerpc.
3820         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3821         lettered partition specifier is found, convert to numbered.
3823 2009-04-29  David S. Miller  <davem@davemloft.net>
3825         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3826         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3828         * normal/command.c: Add missing newline at end of file.
3830         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3831         warnings.
3832         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3833         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3834         grub_ofdisk_read): Likewise, and deal similarly with the fact that
3835         ihandles have a 32-bit type but need to be stored in a "void *".
3837 2009-04-28  Pavel Roskin  <proski@gnu.org>
3839         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3840         not disk.  Adjust all dependencies.
3841         (grub_fs_uuid_close): Use grub_device_close(), not
3842         grub_disk_close().
3844         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3845         parent's partition, don't copy it by reference, as it gets freed
3846         on close.
3848 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3850         Preboot hooks support
3852         * commands/boot.c (struct grub_preboot_t): new declaration
3853         (preboots_head): new variable
3854         (preboots_tail): likewise
3855         (grub_loader_register_preboot_hook): new function
3856         (grub_loader_unregister_preboot_hook): likewise
3857         (grub_loader_set): launch preboot hooks
3858         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3859         (grub_loader_register_preboot_hook): new declaration
3860         (grub_loader_unregister_preboot_hook): likewise
3862 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3864         Warning fix
3866         * disk/scsi.c (grub_scsi_open): added missing cast when
3867         calling grub_dprintf
3869 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
3871         Bug and warning fixes
3873         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3874         declaration
3875         * commands/test.c (test_parse): fixed bug with file tests and corrected
3876         declaration of find_file
3878 2009-04-26  Pavel Roskin  <proski@gnu.org>
3880         * Makefile.in: Don't install empty manual pages if help2man is
3881         missing.  Use help2man option for output, not shell redirection.
3883 2009-04-26  David S. Miller  <davem@davemloft.net>
3885         * util/grub-mkdevicemap.c (make_device_map): Add missing
3886         NESTED_FUNC_ATTR to process_device().
3888 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3890         Test command
3892         * commands/test.c: rewritten to use bash-like test
3894 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3896         Parttool autoloading and improvements
3898         * Makefile.in (pkglib_DATA): add parttool.lst
3899         (parttool.lst): new target
3900         * genmk.rb: generate parttool-*
3901         (CLEANFILES): add #{parttool}
3902         (PARTTOOLFILES): new variable
3903         * genparttoollist.sh: new file
3904         * parttool/pcpart.c (grub_pcpart_boot): more feedback
3905         (grub_pcpart_type): likewise
3906         * commands/parttool.c (helpmsg): new variable
3907         (grub_cmd_parttool): output help if not enough arguments are supplied
3908         autoload modules
3909         (GRUB_MOD_INIT(parttool)): use helpmsg
3911 2009-04-24  David S. Miller  <davem@davemloft.net>
3913         Avoiding opening same device multiple times in device iterator.
3915         * kern/device.c: (grub_device_iterate): Define struct part_ent,
3916         and use it to build a list of partitions in iterate_disk() and
3917         iterate_partition().
3919         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3920         on disk->data.
3922         * disk/ieee1275/nand.c (grub_nand_iterate): Return
3923         grub_devalias_iterate() result instead of unconditional 0.
3924         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3925         Also, capture hook return value, either directly or via
3926         grub_children_iterate(), and propagate to caller.
3927         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3928         grub_children_iterate): Return value is now 'int' instead of
3929         'grub_err_t'.
3930         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3931         like a proper iterator, stopping when hooks return non-zero.
3932         (grub_devalias_iterate): Likewise.
3934 2009-04-23  David S. Miller  <davem@davemloft.net>
3936         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3938 2009-04-22  David S. Miller  <davem@davemloft.net>
3940         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3941         is larger than address_cells, use that value for address_cells too.
3943         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3944         IEEE1275_MAX_PATH_LEN): Define.
3945         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3946         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3947         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3948         'devtype'.  Explicitly NULL terminate devalias expansion.
3950         * util/sparc64/ieee1275/misc.c: New file.
3951         * util/sparc64/ieee1275/grub-setup.c: New file.
3952         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3953         * util/sparc64/ieee1275/grub-mkimage.c: New file.
3954         * util/sparc64/ieee1275/grub-install.in: New file.
3955         * util/ieee1275/ofpath.c: New file.
3956         * util/ieee1275/devicemap.c: New file.
3957         * util/devicemap.c: New file.
3958         * util/deviceiter.c: New file.
3959         * kern/sparc64/ieee1275/init.c: New file.
3960         * include/grub/util/ofpath.h: New file.
3961         * include/grub/util/deviceiter.h: New file.
3962         * util/grub-mkdevicemap.c: Include deviceiter.h.
3963         Implement using grub_util_emit_devicemap_entry and
3964         grub_util_iterate_devices.
3965         * conf/i386-corebook.rmk: Build util/deviceiter.c and
3966         util/devicemap.c into grub-mkdevicemap
3967         * conf/i386-efi.rmk: Likewise.
3968         * conf/i386-ieee1275.rmk: Likewise.
3969         * conf/i386-pc.rmk: Likewise.
3970         * conf/powerpc-ieee1275.rmk: Likewise.
3971         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
3972         images and installation utilities.  Build kernel as image
3973         instead of as elf binary.  Use common rules as much as possible.
3975 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
3977         Correct GPT definition
3979         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3980         of "attrib" member
3982 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
3984         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
3986 2009-04-19  David S. Miller  <davem@davemloft.net>
3988         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
3989         (grub_rescue_cmd_linux): Rename to...
3990         (grub_cmd_linux): and fix prototype.
3991         (grub_rescue_cmd_initrd): Rename to...
3992         (grub_cmd_initrd): and fix prototype.
3993         (cmd_linux, cmd_initrd): New.
3994         (GRUB_MOD_INIT(linux)): Use grub_register_command().
3995         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
3997 2009-04-17  Pavel Roskin  <proski@gnu.org>
3999         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4000         format.
4001         (grub_ohci_transfer): Likewise.
4003         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4005         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4006         return without a value.  Fix inconsistent indentation.
4008         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4009         match struct grub_fs.
4011         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4012         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4013         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4014         * commands/lspci.c (grub_lspci_iter): Likewise.
4016 2009-04-16  Bean  <bean123ch@gmail.com>
4018         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4019         value.
4021 2009-04-15  Pavel Roskin  <proski@gnu.org>
4023         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4024         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4025         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4026         definitions.
4028 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4030         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4031         that no multiple data or metadata areas are supported and `Unknown
4032         metadata header'.
4034 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4036         Move loader out of the kernel
4038         * kern/loader.c: moved to ...
4039         * commands/boot.c: ... moved here
4040         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4041         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4042         * include/grub/kernel.h (grub_machine_fini): export
4043         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4044         (grub_loader_set): likewise
4045         (grub_loader_unset): likewise
4046         (grub_loader_boot): likewise
4047         * conf/common.rmk: new module boot.mod
4048         (pkglib_MODULES): add boot.mod
4049         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4050         (grub_emu_SOURCES): likewise
4051         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4052         (grub_emu_SOURCES): likewise
4053         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4054         (grub_emu_SOURCES): likewise
4055         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4056         (grub_emu_SOURCES): likewise
4057         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4058         (grub_emu_SOURCES): likewise
4059         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4060         (grub_emu_SOURCES): likewise
4061         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4062         (grub_emu_SOURCES): likewise
4064 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4066         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4068         * kern/misc.c (grub_itoa): Removed function
4069         (grub_ltoa): likewise
4070         (grub_vsprintf): use grub_lltoa
4072 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4074         Restore grub-emu
4076         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4077         * conf/i386-coreboot.rmk: likewise
4078         * conf/i386-ieee1275.rmk: likewise
4079         * conf/powerpc-ieee1275.rmk: likewise
4081 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4083         * INSTALL: Add that `./autogen.sh' needs to be run before
4084         `./configure.'.
4086 2009-04-14  Bean  <bean123ch@gmail.com>
4088         * Makefile.in (pkglib_DATA): Add handler.lst.
4089         (handler.lst): New rule.
4091         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4092         * conf/i386-coreboot.rmk: Likewise.
4093         * conf/i386-ieee1275.rmk: Likewise.
4094         * conf/i386-efi.rmk: Likewise.
4095         * conf/x86_64-efi.rmk: Likewise.
4096         * conf/powerpc-ieee1275.rmk: Likewise.
4097         * conf/sparc64-ieee1275.rmk: Likewise.
4099         * genhandlerlist.sh: New file.
4101         * genmk.rb: Add rules to generate handler.lst.
4103         * include/grub/normal.h (grub_file_getline): New function definition.
4104         (read_handler_list): Likewise.
4105         (free_handler_list): Likewise.
4107         * include/grub/term.h (grub_term_register_input): Add name parameter
4108         for auto generation of handler.lst.
4109         (grub_term_register_output): Likewise.
4111         * normal/handler.c: New file.
4113         * normal/main.c (get_line): Renamed to grub_file_getline.
4114         (read_config_file): Use the newly renamed grub_file_getline.
4115         (read_command_list): Likewise.
4116         (read_fs_list): Likewise.
4117         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4118         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4120         * term/efi/console.c (grub_console_init): Add name parameter for auto
4121         generation of handler.lst.
4122         * term/gfxterm.c: Likewise.
4123         * term/i386/pc/at_keyboard.c: Likewise.
4124         * term/i386/pc/console.c: Likewise.
4125         * term/i386/pc/serial.c: Likewise.
4126         * term/i386/pc/vesafb.c: Likewise.
4127         * term/i386/pc/vga.c: Likewise.
4128         * term/i386/pc/vga_text.c: Likewise.
4129         * term/ieee1275/ofconsole.c: Likewise.
4130         * term/usb_keyboard.c: Likewise.
4132 2009-04-14  Bean  <bean123ch@gmail.com>
4134         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4135         properly with null character.
4137 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4139         * configure: Remove.
4140         * config.h.in: Likewise.
4141         * stamp-h.in: Likewise.
4142         * DISTLIST: Likewise.
4143         * conf/common.mk: Likewise.
4144         * conf/i386-coreboot.mk: Likewise.
4145         * conf/i386-efi.mk: Likewise.
4146         * conf/i386-ieee1275.mk: Likewise.
4147         * conf/i386.mk: Likewise.
4148         * conf/i386-pc.mk: Likewise.
4149         * conf/powerpc-ieee1275.mk: Likewise.
4150         * conf/sparc64-ieee1275.mk: Likewise.
4151         * conf/x86_64-efi.mk: Likewise.
4153         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4154         develop on GRUB.
4156 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4157             David S. Miller  <davem@davemloft.net>
4159         * util/hostdisk.c (make_device_name): Fix buffer length
4160         calculations.
4162 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4164         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4165         <sys/param.h> and <sys/sysctl.h>.
4166         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4167         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4168         opening the device and reset them afterwards.
4170 2009-04-13  Pavel Roskin  <proski@gnu.org>
4172         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4173         Reported by John Stanley <jpsinthemix@verizon.net>
4175 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4177         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4178         that name for menuentries when appropriate.
4180 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4182         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4184 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4186         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4187         to Linux, simply abort telling the user it's no longer supported.
4189 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4191         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4192         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4193         `freebsd_loadenv' only when devices.hints exist.
4195 2009-04-13  Pavel Roskin  <proski@gnu.org>
4197         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4199 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4201         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4202         partition number.
4203         (grub_drive): Likewise.
4205 2009-04-13  David S. Miller  <davem@davemloft.net>
4207         * kern/sparc64/ieee1275/ieee1275.c: New file.
4208         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4209         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4210         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4211         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4212         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4213         grub_ieee1275_alloc_physmem): Declare new exported functions.
4215         * include/grub/sparc64/ieee1275/loader.h: New file.
4216         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4217         * include/grub/sparc64/kernel.h: Likewise.
4218         * loader/sparc64/ieee1275/linux.c: Likewise.
4220         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4221         (grub_fstest_SOURCES): Likewise.
4223         * util/hostdisk.c (make_device_name): Do not make any assumptions
4224         about the length of drive names.
4226         * kern/dl.c (grub_dl_load_file): Close file immediately when
4227         we are done using it.
4229 2009-04-12  David S. Miller  <davem@davemloft.net>
4231         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4232         values.  Noticed by Pavel Roskin.
4234         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4235         target compiler.
4237         * genmk.rb: Add more flexible image type specification, also
4238         pass --strip-unneeded to objcopy.
4239         * conf/i386-pc.rmk: Use *_FORMAT.
4240         * conf/i386-pc.mk: Rebuilt.
4242         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4243         (OFDISK_HASH_SZ): Define.
4244         (ofdisk_hash): New hash table.
4245         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4246         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4247         instead of device phandle which is not unique.
4249         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4250         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4251         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4252         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4253         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4254         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4255         GRUB_KERNEL_MACHINE_DATA_END): Define.
4256         (grub_kernel_image_size, grub_total_module_size): Declare.
4258 2009-04-12  Pavel Roskin  <proski@gnu.org>
4260          * configure.ac: Change the logic when we check for target tools.
4261          Do it when the target is specified and it's different from the
4262          specified value of the host.
4264 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4266         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4267         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4268         GNU/kFreeBSD. Check if a device is a character device. Use
4269         DIOCGMEDIASIZE to get the size.
4270         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4271         support for GNU/kFreeBSD.
4272         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4273         is a character device instead of a block device. Add support for
4274         FreeBSD device names.
4276         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4277         is a character device instead of a block device.
4279         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4280         is a character device instead of a block device.
4282 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4284         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4285         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4286         FreeBSD. Check if a device is a character device. Use
4287         DIOCGMEDIASIZE to get the size.
4288         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4289         support for FreeBSD.
4290         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4291         is a character device instead of a block device. Add support for
4292         FreeBSD device names.
4294         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4295         a character device instead of a block device.
4296         (grub_util_check_char_device): New function.
4298         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4299         a character device instead of a block device.
4301         * include/grub/util/getroot.h (grub_util_check_char_device): New
4302         prototype.
4304 2009-04-11  David S. Miller  <davem@davemloft.net>
4306         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4307         static libgcc.
4308         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4309         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4310         function, if present.
4311         (__bswapdi2): Likewise.
4313         * include/grub/sparc64/ieee1275/boot.h: New file.
4314         * boot/sparc64/ieee1275/boot.S: Likewise.
4315         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4317         * kern/misc.c (grub_ltoa): New function.
4318         (grub_vsprintf): Use it to format 'long' integers.
4320 2009-04-10  David S. Miller  <davem@davemloft.net>
4322         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4323         slots are of type grub_ieee1275_cell_t.
4324         (grub_nand_read): Likewise.
4325         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4326         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4327         macros are used to compare values in arg/ret block of the call.
4328         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4329         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4330         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4331         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4332         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4333         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4334         grub_ieee1275_close, grub_ieee1275_set_property,
4335         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4336         grub_ieee1275_cell_t.
4337         * kern/ieee1275/openfw.c (grub_map): Likewise.
4338         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4339         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4341         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4342         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4343         (grub_devalias_iterate): Likewise.
4345 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4347         UFS improvements
4349         * fs/ufs.c (INODE_NBLOCKS): new definition
4350         (struct grub_ufs_dirent): added fields for non-BSD dirents
4351         (grub_ufs_get_file_block): fixed double indirect handling
4352         (grub_ufs_lookup_symlink): use more robust way to determine whether
4353         symlink is inline
4354         (grub_ufs_find_file): support for non-BSD dirents
4355         (grub_ufs_dir): support for non-BSD dirents
4357 2009-04-10  Bean  <bean123ch@gnail.com>
4359         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4360         attribute, otherwise the size would be wrong for i386 platform.
4362         * include/grub/pci.h (grub_pci_read_word): New inline function.
4363         (grub_pci_read_byte): Likewise.
4364         (grub_pci_write): Likewise.
4365         (grub_pci_write_word): Likewise.
4366         (grub_pci_write_byte): Likewise.
4368         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4370         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4371         (find_framebuf): Scan pci to locate the frame buffer address.
4373         * commands/efi/fixvideo.c: New file.
4375         * commands/efi/loadbios.c: Likewise.
4377         * commands/memrw.c: Likewise.
4379         * util/grub-dumpbios.in: Likewise.
4381         * conf/common.rmk (grub-dumpbios): New utility.
4382         (pkglib_MODULES): New module memrw.mod.
4383         (memrw_mod_SOURCE): New macro.
4384         (memrw_mod_CFLAGS): Likewise.
4385         (memrw_mod_LDFLAGS): Likewise.
4387         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4388         fixvideo.mod.
4389         (loadbios_mod_SOURCE): New macro.
4390         (loadbios_mod_CFLAGS): Likewise.
4391         (loadbios_mod_LDFLAGS): Likewise.
4392         (fixvideo_mod_SOURCE): Likewise.
4393         (fixvideo_mod_CFLAGS): Likewise.
4394         (fixvideo_mod_LDFLAGS): Likewise.
4396         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4397         fixvideo.mod.
4398         (loadbios_mod_SOURCE): New macro.
4399         (loadbios_mod_CFLAGS): Likewise.
4400         (loadbios_mod_LDFLAGS): Likewise.
4401         (fixvideo_mod_SOURCE): Likewise.
4402         (fixvideo_mod_CFLAGS): Likewise.
4403         (fixvideo_mod_LDFLAGS): Likewise.
4405 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4407         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4409 2009-04-07  David S. Miller  <davem@davemloft.net>
4411         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4412         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4413         R_SPARC_WDISP30 case.
4414         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4416 2009-04-06  Pavel Roskin  <proski@gnu.org>
4418         * include/grub/misc.h (ARRAY_SIZE): New macro.
4419         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4420         New macro.
4421         * loader/i386/linux.c (allocate_pages): Use free_pages().
4422         (grub_linux_unload): Don't use free_pages().
4423         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4424         wrong index.  Treat all other modes as text modes.
4425         (grub_cmd_linux): Initialize vid_mode unconditionally to
4426         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4428         * commands/help.c (print_command_help): Use cmd->prio, not
4429         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4431 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4433         Parttool
4435         * parttool/pcpart.c: new file
4436         * commands/parttool.c: likewise
4437         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4438         (parttool_mod_SOURCES): new variable
4439         (parttool_mod_CFLAGS): likewise
4440         (parttool_mod_LDFLAGS): likewise
4441         (pcpart_mod_SOURCES): likewise
4442         (pcpart_mod_CFLAGS): likewise
4443         (pcpart_mod_LDFLAGS): likewise
4444         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4445         and parttool/pcpart.c
4446         * conf/i386-efi.rmk: likewise
4447         * conf/i386-ieee1275.rmk: likewise
4448         * conf/i386-pc.rmk: likewise
4449         * conf/powerpc-ieee1275.rmk: likewise
4450         * conf/sparc64-ieee1275.rmk: likewise
4451         * conf/x86_64-ieee1275.rmk: likewise
4453 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4455         Support for mtime and further expandability of dir command
4457         * include/grub/lib/datetime.h: moved to ...
4458         * include/grub/datetime.h: ... moved here and added
4459         declaration of grub_unixtime2datetime. All users updated
4460         * include/grub/fs.h: new syntax for dir and mtime functions in
4461         struct grub_fs
4462         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4463         and GRUB_FSHELP_FLAGS_MASK
4464         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4465         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4466         (grub_ext2_mtime): new function
4467         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4468         (grub_hfsplus_mtime): new function
4469         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4470         (GRUB_UFS_ATTR_FILE): likewise
4471         (GRUB_UFS_ATTR_LNK): likewise
4472         (struct grub_ufs_sblock): new fields mtime
4473         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4474         all users updated
4475         (grub_ufs_dir): mtime support
4476         (grub_ufs_mtime): new function
4477         * fs/affs.c (grub_affs_dir): use new dir syntax
4478         * fs/afs.c (grub_afs_dir): likewise
4479         * fs/cpio.c (grub_cpio_dir): likewise
4480         * fs/fat.c (grub_fat_find_dir): likewise
4481         * fs/hfs.c (grub_hfs_dir): likewise
4482         * fs/iso9660.c (grub_iso9660_dir): likewise
4483         * fs/jfs.c (grub_jfs_dir): likewise
4484         * fs/minix.c (grub_minix_dir): likewise
4485         * fs/ntfs.c (grub_ntfs_dir): likewise
4486         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4487         * fs/sfs.c (grub_sfs_dir): likewise
4488         * fs/xfs.c (grub_xfs_dir): likewise
4489         * util/hostfs.c (grub_hostfs_dir): likewise
4490         * lib/datetime.c: moved to ...
4491         * normal/datetime.c: ... moved here
4492         (grub_unixtime2datetime): new function
4493         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4494         * normal/completion.c (iterate_dir): use new dir syntax
4495         * normal/misc.c (grub_normal_print_device_info): tell the
4496         last modification time of a volume
4497         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4498         * conf/common.rmk: added lib/datetime.c to ls.mod
4499         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4500         (normal_mod_SOURCES): likewise
4501         (datetime_mod_SOURCES): Removed lib/datetime.c
4502         * conf/i386-efi.rmk: likewise
4503         * conf/i386-ieee1275.rmk: likewise
4504         * conf/i386-pc.rmk: likewise
4505         * conf/powerpc-ieee1275.rmk: likewise
4506         * conf/sparc64-ieee1275.rmk: likewise
4507         * conf/x86_64-efi.rmk: likewise
4509 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4511         Trim trailing spaces in FAT label and support mtools-like labels
4513         * fs/fat.c (grub_fat_iterate_dir): New function based
4514         on grub_fat_find_dir
4515         (grub_fat_find_dir): use grub_fat_iterate_dir
4516         (grub_fat_label): likewise
4518 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4520         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4521         and command.h
4522         remove extraneous kernel_elf_HEADERS
4524 2009-04-04  Bean  <bean123ch@gnail.com>
4526         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4528         * util/misc.c: Likewise.
4530 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4532         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4533         instead of grub_printf.
4535 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4537         * loader/i386/linux.c (grub_linux_setup_video): Fill
4538         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4539         values from `mode info' structure instead of hardcoded
4540         values.
4542 2009-04-01  Pavel Roskin  <proski@gnu.org>
4544         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4545         unused now.
4546         * genmk.rb: Likewise.
4547         * configure.ac: Likewise.
4549 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4551         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4552         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4554 2009-04-01  David S. Miller  <davem@davemloft.net>
4556         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4557         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4558         (grub_setjmp): Mark with 'returns_twice' attribute.
4559         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4560         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4561         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4563 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4565         Reapply fix from 2008-07-28 which was accidentally reverted; also
4566         perform the same fix to a similar check in same function.
4568         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4569         with the same number are found, just use issue a warning with
4570         grub_dprintf(), as this error has been reported to be non-fatal.
4572 2009-03-31  Pavel Roskin  <proski@gnu.org>
4574         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4575         for cross-compilation.
4577 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4579         Fix i386-ieee1275 build.
4581         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4582         Remove declaration.
4584 2009-03-30  Pavel Roskin  <proski@gnu.org>
4586         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4587         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4588         zero-terminated, rely only on the strlen value.  Fix comparison
4589         of strings differing in length.
4591 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4593         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4594         checking for abi version.  Improve error messages on BIOS to notify
4595         user about `linux16' command.
4597 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4599         Leak fixes
4601         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4602         in case of collision
4603         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4605 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4607         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4608         set `vid_mode' accordingly.
4609         (grub_linux_boot): Process `vid_mode' and set video mode.
4611 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4613         * util/grub.d/10_linux.in (linux_entry): New function.
4614         Factorize generation of Linux boot entries.
4616 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4618         Make the format of Environment Block plain text. The boot loader
4619         part is not tested well yet.
4621         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4622         (buffer): Removed.
4623         (envblk): Likewise.
4624         (usage): Remove "info" and "clear". Add "unset". Update the
4625         description of "set", as this does not delete variables any
4626         longer.
4627         (create_envblk_file): Complete rewrite.
4628         (open_envblk_file): Likewise.
4629         (cmd_info): Removed.
4630         (cmd_list): Likewise.
4631         (cmd_set): Likewise.
4632         (cmd_clear): Likewise.
4633         (list_variables): New function.
4634         (write_envblk): Likewise.
4635         (set_variables): Likewise.
4636         (unset_variables): Likewise.
4637         (main): Complete rewrite.
4639         * commands/loadenv.c (buffer): Removed.
4640         (envblk): Likewise.
4641         (open_envblk_file): New function.
4642         (read_envblk_file): Complete rewrite.
4643         (grub_cmd_load_env): Likewise.
4644         (grub_cmd_list_env): Likewise.
4645         (struct blocklist): New struct.
4646         (free_blocklists): New function.
4647         (check_blocklists): Likewise.
4648         (write_blocklists): Likewise.
4649         (grub_cmd_save_env): Complete rewrite.
4651         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4652         a plain text signature.
4653         (GRUB_ENVBLK_MAXLEN): Removed.
4654         (struct grub_envblk): Complete rewrite.
4655         (grub_envblk_find): Removed.
4656         (grub_envblk_insert): Likewise.
4657         (grub_envblk_open): New prototype.
4658         (grub_envblk_set): Likewise.
4659         (grub_envblk_delete): Put const to VALUE.
4660         (grub_envblk_iterate): Put const to NAME and VALUE.
4661         (grub_envblk_close): New prototype.
4662         (grub_envblk_buffer): New inline function.
4663         (grub_envblk_size): Likewise.
4665         * lib/envblk.c: Include grub/mm.h.
4666         (grub_env_find): Removed.
4667         (grub_envblk_open): New function.
4668         (grub_envblk_close): Likewise.
4669         (escaped_value_len): Likewise.
4670         (find_next_line): Likewise.
4671         (grub_envblk_insert): Removed.
4672         (grub_envblk_set): New function.
4673         (grub_envblk_delete): Complete rewrite.
4674         (grub_envblk_iterate): Likewise.
4676 2009-03-28  Robert Millan  <rmh@aybabtu.com>
4678         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4679         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4680         variables.  Use 16-bit loader.
4681         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4682         loader.
4683         * kern/i386/loader.S (grub_linux_boot): Rename to ...
4684         (grub_linux16_boot): ... this.  Update all users.
4685         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4686         (grub_linux_boot): ... this.  Update all users.
4688         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4689         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
4690         commands to `linux16' and `initrd16'.
4691         (GRUB_MOD_FINI(linux)): Rename to ...
4692         (GRUB_MOD_FINI(linux16)): ... this.
4694 2009-03-24  Pavel Roskin  <proski@gnu.org>
4696         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4697         not just for compilation.
4699 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
4701         Move multiboot helper out of kernel
4703         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4704         `loader/i386/multiboot_helper.S'.
4705         * conf/i386-coreboot.rmk: Likewise
4706         * conf/i386-ieee1275.rmk: Likewise
4708         * kern/i386/loader.S: Move multiboot helpers from here...
4709         * loader/i386/multiboot_helper.S: ...moved here
4710         * include/grub/i386/loader.h: Move declarations of multiboot
4711         helpers from here...
4712         * include/grub/i386/multiboot.h: ...moved here
4713         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4715 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4717         * kern/env.c (grub_env_context_open): Added an argument to specify
4718         whether a new context inherits exported variables from current
4719         one. This is useful when making a sandbox to interpret a config
4720         file.
4721         All callers updated.
4723         * include/grub/env.h (grub_env_context_open): Updated the prototype.
4725 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4727         * kern/env.c (grub_env_context_close): Fix memory leaks.
4729 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4731         * normal/main.c (grub_normal_execute): Added an argument
4732         BATCH to specify if an interactive interface should be provided
4733         after reading a config file.
4734         All callers updated.
4735         (read_command_list): Prevent being executed twice.
4736         (read_fs_list): Likewise.
4738         * include/grub/normal.h (grub_normal_execute): Updated the
4739         prototype.
4741 2009-03-22  Pavel Roskin  <proski@gno.org>
4743         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4744         _start.
4745         * kern/i386/pc/startup.S: Likewise.
4746         * kern/i386/efi/startup.S: Likewise.
4747         * kern/i386/ieee1275/startup.S: Likewise.
4748         * kern/i386/coreboot/startup.S: Likewise.
4749         * kern/x86_64/efi/startup.S: Likewise.
4751         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4752         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4753         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4755 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
4757         Bugfixes in multiboot for bugs uncovered by solaris kernel.
4759         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4760         limit detection.
4761         Use vaddr of correct segment for entry_point.
4763 2009-03-21  Bean  <bean123ch@gmail.com>
4765         * commands/blocklist.c: Add include file <grub/command.h>, remove
4766         <grub/normal.h> and <grub/arg.h>.
4767         (grub_cmd_blocklist): Use the new command interface.
4768         (GRUB_MOD_INIT): Likewise.
4769         (GRUB_MOD_FINI): Likewise.
4770         * commands/boot.c: Likewise.
4771         * commands/cat.c: Likewise.
4772         * commands/cmp.c: Likewise.
4773         * commands/configfile.c: Likewise.
4774         * commands/crc.c: Likewise.
4775         * commands/echo.c: Likewise.
4776         * commands/halt.c: Likewise.
4777         * commands/handler.c: Likewise.
4778         * commands/hdparm.c: Likewise.
4779         * commands/help.c: Likewise.
4780         * commands/hexdump.c: Likewise.
4781         * commands/loadenv.c: Likewise.
4782         * commands/ls.c: Likewise.
4783         * commands/lsmmap.c: Likewise.
4784         * commands/lspci.c: Likewise.
4785         * commands/loadenv.c: Likewise.
4786         * commands/read.c: Likewise.
4787         * commands/reboot.c: Likewise.
4788         * commands/search.c: Likewise.
4789         * commands/sleep.c: Likewise.
4790         * commands/test.c: Likewise.
4791         * commands/usbtest.c: Likewise.
4792         * commands/videotest.c: Likewise.
4793         * commands/i386/cpuid.c: Likewise.
4794         * commands/i386/pc/halt.c: Likewise.
4795         * commands/i386/pc/play.c: Likewise.
4796         * commands/i386/pc/pxecmd.c: Likewise.
4797         * commands/i386/pc/vbeinfo.c: Likewise.
4798         * commands/i386/pc/vbetest.c: Likewise.
4799         * commands/ieee1275/suspend.c: Likewise.
4800         * disk/loopback.c: Likewise.
4801         * font/font_cmd.c: Likewise.
4802         * hello/hello.c: Likewise.
4803         * loader/efi/appleloader.c: Likewise.
4804         * loader/efi/chainloader.c: Likewise.
4805         * loader/i386/bsd.c: Likewise.
4806         * loader/i386/efi/linux.c: Likewise.
4807         * loader/i386/ieee1275/linux.c: Likewise.
4808         * loader/i386/linux.c: Likewise.
4809         * loader/i386/pc/chainloader.c: Likewise.
4810         * loader/i386/pc/linux.c: Likewise.
4811         * loader/powerpc/ieee1275/linux.c: Likewise.
4812         * loader/multiboot_loader.c: Likewise.
4813         * term/gfxterm.c: Likewise.
4814         * term/i386/pc/serial.c: Likewise.
4815         * term/terminfo.c: Likewise.
4817         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4818         * term/i386/pc/vga.c: Likewise.
4819         * video/readers/jpeg.c: Likewise.
4820         * video/readers/png.c: Likewise.
4821         * video/readers/tga.c: Likewise.
4823         * util/grub-fstest (cmd_loopback): Removed.
4824         (cmd_blocklist): Likewise.
4825         (cmd_ls): Likewise.
4826         (grub_register_command): Likewise.
4827         (grub_unregister_command): Likewise.
4828         (execute_command): Use grub_command_find to locate command and execute
4829         it.
4831         * include/grub/efi/chainloader.h: Removed.
4832         * loader/efi/chainloader_normal.c: Likewise.
4833         * loader/i386/bsd_normal.c: Likewise.
4834         * loader/i386/pc/chainloader_normal.c: Likewise.
4835         * loader/i386/pc/multiboot_normal.c: Likewise.
4836         * loader/linux_normal.c: Likewise.
4837         * loader/multiboot_loader_normal.c: Likewise.
4838         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4840         * gencmdlist.sh: Scan new registration command grub_register_extcmd
4841         and grub_register_command_p1.
4843         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4844         kern/command.c, lib/arg.c and commands/extcmd.c.
4845         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4846         (minicmd_mod_SOURCES): New variable.
4847         (minicmd_mod_CFLAGS): Likewise.
4848         (minicmd_mod_LDFLAGS): Likewise.
4849         (extcmd_mod_SOURCES): Likewise.
4850         (extcmd_mod_CFLAGS): Likewise.
4851         (extcmd_mod_LDFLAGS): Likewise.
4852         (boot_mod_SOURCES): Removed.
4853         (boot_mod_CFLAGS): Likewise.
4854         (boot_mod_LDFLAGS): Likewise.
4856         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4857         kern/corecmd.c.
4858         (kernel_img_HEADERS): Add command.h.
4859         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4860         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4861         and lib/arg.c.
4862         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4863         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4864         remove the corresponding normal mode command.
4865         (normal_mod_SOURCES): Remove normal/arg.c.
4866         * conf/i386-coreboot.rmk: Likewise.
4867         * conf/i386-efi.rmk: Likewise.
4868         * conf/i386-ieee1275.rmk: Likewise.
4869         * conf/powerpc-ieee1275.rmk: Likewise.
4870         * conf/x86_64-efi.rmk: Likewise.
4872         * include/grub/arg.h: Move from here ...
4873         * include/grub/lib/arg.h: ... to here.
4875         * normal/arg.c: Move from here ...
4876         * lib/arg.c: ... to here.
4878         * commands/extcmd.c: New file.
4879         * commands/minicmd.c: Likewise.
4880         * include/grub/command.h: Likewise.
4881         * include/grub/extcmd.h: Likewise.
4882         * kern/command.c: Likewise.
4883         * kern/corecmd.c: Likewise.
4885         * kern/list.c (grub_list_iterate): Return int instead of void.
4886         (grub_list_insert): New function.
4887         (grub_prio_list_insert): Likewise.
4889         * kern/rescue.c (grub_rescue_command): Removed.
4890         (grub_rescue_command_list): Likewise.
4891         (grub_rescue_register_command): Likewise.
4892         (grub_rescue_unregister_command): Likewise.
4893         (grub_rescue_cmd_boot): Move to minicmd.c
4894         (grub_rescue_cmd_help): Likewise.
4895         (grub_rescue_cmd_info): Likewise.
4896         (grub_rescue_cmd_boot): Likewise.
4897         (grub_rescue_cmd_testload): Likewise.
4898         (grub_rescue_cmd_dump): Likewise.
4899         (grub_rescue_cmd_rmmod): Likewise.
4900         (grub_rescue_cmd_lsmod): Likewise.
4901         (grub_rescue_cmd_exit): Likewise.
4902         (grub_rescue_print_devices): Moved to corecmd.c.
4903         (grub_rescue_print_files): Likewise.
4904         (grub_rescue_cmd_ls): Likewise.
4905         (grub_rescue_cmd_insmod): Likewise.
4906         (grub_rescue_cmd_set): Likewise.
4907         (grub_rescue_cmd_unset): Likewise.
4908         (attempt_normal_mode): Use grub_command_find to get normal module.
4909         (grub_enter_rescue_mode): Use grub_register_core_commands to register
4910         commands, remove grub_rescue_register_command calls.
4912         * normal/command.c (grub_register_command): Removed.
4913         (grub_unregister_command): Likewise.
4914         (grub_command_find): Likewise.
4915         (grub_iterate_commands): Likewise.
4916         (rescue_command): Likewise.
4917         (export_command): Moved to corecmd.c.
4918         (set_command): Removed.
4919         (unset_command): Likewise.
4920         (insmod_command): Likewise.
4921         (rmmod_command): Likewise.
4922         (lsmod_command): Likewise.
4923         (grub_command_init): Likewise.
4925         * normal/completion.c (iterate_command): Use cmd->prio to check for
4926         active command.
4927         (complete_arguments): Use grub_extcmd_t structure to find options.
4928         (grub_normal_do_completion): Change function grub_iterate_commands to
4929         grub_command_iterate.
4931         * normal/execute.c (grub_script_execute_cmd): No need to parse
4932         argument here.
4934         * normal/main.c (grub_dyncmd_dispatcher): New function.
4935         (read_command_list): Register unload commands as dyncmd.
4936         (grub_cmd_normal): Use new command interface, register rescue,
4937         unregister normal at entry, register normal, unregister rescue at exit.
4939         * include/grub/list.h (grub_list_test_t): New type.
4940         (grub_list_iterate): Return int instead of void.
4941         (grub_list_insert): New function.
4942         (GRUB_AS_NAMED_LIST_P): New macro.
4943         (GRUB_AS_PRIO_LIST): Likewise.
4944         (GRUB_AS_PRIO_LIST_P): Likewise.
4945         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4946         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4947         (grub_prio_list): New structure.
4948         (grub_prio_list_insert): New function.
4949         (grub_prio_list_remove): New inline function.
4951         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4952         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4953         (GRUB_COMMAND_FLAG_MENU): Likewise.
4954         (GRUB_COMMAND_FLAG_BOTH): Likewise.
4955         (GRUB_COMMAND_FLAG_TITLE): Likewise.
4956         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
4957         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
4958         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
4959         (grub_command): Likewise.
4960         (grub_register_command): Likewise.
4961         (grub_command_find): Likewise.
4962         (grub_iterate_commands): Likewise.
4963         (grub_command_init): Likewise.
4964         (grub_arg_parse): Likewise.
4965         (grub_arg_show_help): Likewise.
4967         * include/grub/rescue.h (grub_rescue_register_command): Removed.
4968         (grub_rescue_unregister_command): Likewise.
4970         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
4971         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
4972         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
4974         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
4975         grub_rescue_cmd_initrd.
4976         * include/grub/i386/loader.h: Likewise.
4977         * include/grub/x86_64/loader.h: Likewise.
4979         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
4981 2009-03-21  Bean  <bean123ch@gmail.com>
4983         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4984         instead of stat in mingw environment.
4986         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
4988         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
4990         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
4991         AC_CONFIG_LINKS.
4993 2009-03-21  Bean  <bean123ch@gmail.com>
4995         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
4996         out of range error.
4998 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5000         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5001         checking inode flags for EXT4_EXTENTS_FLAG.
5003 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5005         * loader/i386/linux.c: Include `<grub/video.h>' and
5006         `<grub/i386/pc/vbe.h>'..
5007         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5008         (grub_linux32_boot): Attempt to configure video settings with
5009         grub_linux_setup_video().
5010         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5011         to avoid grub_console_fini() which would step out of graphical mode
5012         unconditionally.
5014 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5016         Fix build on powerpc.
5017         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5019 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5021         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5022         background image command.
5024 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5026         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5027         (grub_gfxterm_putchar): Extract pairs of identical calls to
5028         draw_cursor out of conditional blocks.
5030 2009-03-11  Pavel Roskin  <proski@gnu.org>
5032         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5033         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5035 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5037         * loader/i386/multiboot_elfxx.c
5038         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5040 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5042         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5043         `kern/handler.c'.
5045 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5047         * loader/i386/multiboot.c (code_size): New variable.
5048         (grub_multiboot): Define offsets by adding to `code_size' rather
5049         than subtracting from `grub_multiboot_payload_size'.  Provide
5050         4-byte alignment to MBI and others by increasing
5051         `boot_loader_name_length' appropriately.
5053         * loader/i386/multiboot_elfxx.c
5054         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5056 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5058         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5059         `fs/ext2.c'.
5061 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5063         Make loader/i386/linux.c usable on i386-pc again.
5065         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5066         memory to heap.
5067         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5068         `#error' stanza.
5070 2009-03-07  Bean  <bean123ch@gmail.com>
5072         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5073         allocation.
5075 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5077         Fix display issue on terminals with screen size other than 80x25
5078         (e.g. gfxterm with resolution higher than 640x480).
5080         * normal/main.c (grub_normal_init_page): Display title text in a
5081         position relative to the center of the terminal instead of relying
5082         on a hardcoded offset.
5084 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5086         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5087         installed.
5089         * Makefile.in (host_kernel): New variable.
5090         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5091         scripts instead of just the windows one.
5092         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5094 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5096         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5097         `kern/handler.c'.
5098         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5099         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5100         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5101         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5102         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5103         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5105 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5107         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5108         or if there's no space for the disk label and print the partition number on a
5109         invalid magic.
5111 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5113         * util/misc.c: Include <time.h>.
5114         (grub_millisleep): New function.
5116 2009-03-04  Bean  <bean123ch@gmail.com>
5118         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5119         another option -mno-red-zone.
5121         * commands/handler.c: Change module description.
5123         * kern/handler.c: Add missing space at the end of description line.
5125         * kern/list.c: Likewise.
5127 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5129         Move more components to the relocation area, and fix mbi pointer
5130         handling to use the destination rather than the origin (thanks to
5131         Vladimir Serbinenko for spotting).
5133         * loader/i386/multiboot.c (mbi_dest): New variable.
5134         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5135         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5136         relocation area.
5138 2009-03-01  Bean  <bean123ch@gmail.com>
5140         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5141         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5142         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5143         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5145         * loader/i386/efi/linux.c (acpi_guid): New variable.
5146         (acpi_guid): Likewise.
5147         (EBDA_SEG_ADDR): New constant.
5148         (LOW_MEM_ADDR): Likewise.
5149         (FAKE_EBDA_SEG): Likewise.
5150         (fake_bios_data): New function.
5151         (grub_linux_boot): Call fake_bios_data.
5153 2009-03-01  Bean  <bean123ch@gmail.com>
5155         * commands/terminal.c: Removed.
5157         * commands/handler.c: New file.
5159         * include/grub/list.h: Likewise.
5161         * include/grub/handler.h: Likewise.
5163         * kern/list.c: Likewise.
5165         * kern/handler.c: Likewise.
5167         * kern/term.h: Include header file <grub/handler.h>.
5168         (grub_term_input): Move next field to the beginning.
5169         (grub_term_output): Likewise.
5170         (grub_term_input_class): New variable.
5171         (grub_term_output_class): Likewise.
5172         (grub_term_register_input): Changed to inline function.
5173         (grub_term_register_output): Likewise.
5174         (grub_term_unregister_input): Likewise.
5175         (grub_term_unregister_output): Likewise.
5176         (grub_term_set_current_input): Likewise.
5177         (grub_term_set_current_output): Likewise.
5178         (grub_term_get_current_input): Likewise.
5179         (grub_term_get_current_output): Likewise.
5180         (grub_term_iterate_input): Removed.
5181         (grub_term_iterate_output): Likewise.
5183         * kern/term.c (grub_term_list_input): Removed.
5184         (grub_term_list_output): Likewise.
5185         (grub_term_input_class): New variable.
5186         (grub_term_output_class): Likewise.
5187         (grub_cur_term_input): Change variable as macro.
5188         (grub_cur_term_output): Likewise.
5189         (grub_term_register_input): Removed.
5190         (grub_term_register_output): Likewise.
5191         (grub_term_unregister_input): Likewise.
5192         (grub_term_unregister_output): Likewise.
5193         (grub_term_set_current_input): Likewise.
5194         (grub_term_set_current_output): Likewise.
5195         (grub_term_iterate_input): Likewise.
5196         (grub_term_iterate_output): Likewise.
5197         (grub_term_get_current_input): Likewise.
5198         (grub_term_get_current_output): Likewise.
5200         * util/grub-editenv.c: Include header file <grub/handler.h>.
5201         (grub_term_get_current_input): Removed.
5202         (grub_term_get_current_output): Likewise.
5203         (grub_term_input_class): New variable.
5204         (grub_term_output_class): Likewise.
5206         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5207         (grub_term_get_current_output): Likewise.
5208         (grub_term_input_class): New variable.
5209         (grub_term_output_class): Likewise.
5211         * util/grub-probe.c (grub_term_get_current_input): Removed.
5212         (grub_term_get_current_output): Likewise.
5213         (grub_term_input_class): New variable.
5214         (grub_term_output_class): Likewise.
5216         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5217         (grub_term_get_current_output): Likewise.
5218         (grub_term_input_class): New variable.
5219         (grub_term_output_class): Likewise.
5221         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5222         (terminal_mod_SOURCES): Likewise.
5223         (terminal_mod_CFLAGS): Likewise.
5224         (terminal_mod_LDFLAGS): Likewise.
5226         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5227         handler.c.
5228         (kernel_img_SOURCES): Add list.c and handler.c.
5229         (kernel_img_HEADERS): Add list.h and handler.h.
5231         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5232         handler.c.
5233         (kernel_mod_SOURCES): Add list.c and handler.c.
5234         (kernel_mod_HEADERS): Add list.h and handler.h.
5236         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5237         handler.c.
5238         (kernel_elf_SOURCES): Add list.c and handler.c.
5239         (kernel_elf_HEADERS): Add list.h and handler.h.
5241         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5242         handler.c.
5243         (kernel_elf_SOURCES): Add list.c and handler.c.
5244         (kernel_elf_HEADERS): Add list.h and handler.h.
5246         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5247         handler.c.
5248         (kernel_mod_SOURCES): Add list.c and handler.c.
5249         (kernel_mod_HEADERS): Add list.h and handler.h.
5251         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5252         handler.c.
5253         (kernel_elf_SOURCES): Add list.c and handler.c.
5254         (kernel_elf_HEADERS): Add list.h and handler.h.
5256 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5258         Factorize elf32 / elf64 code in Multiboot loader.  This will
5259         prevent it from getting out of sync again.
5261         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5262         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5263         grub_multiboot_load_elf64): Move from here ...
5264         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5265         grub_multiboot_load_elf): ... to here (new file).
5267 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5269         * util/grub.d/10_linux.in: Rename "single-user mode" to
5270         "recovery mode".
5272 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5274         Don't leak in SCSI code.
5275         * disk/scsi.c (grub_scsi_close): free `scsi'.
5277 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5279         * loader/i386/pc/multiboot.c: Move from here ...
5280         * loader/i386/multiboot.c: ... to here.  Update all users.
5282 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5284         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5285         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5287 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5289         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5290         b-tree.
5292 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5294         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5295         `0x' qualifier as 0 when base is specified as parameter).
5297 2009-02-24  Bean  <bean123ch@gmail.com>
5299         * configure.ac: Check for -mcmodel=large in x86_64 target.
5301         * include/grub/efi/api.h (efi_call_10): New macro.
5302         (efi_wrap_10): New function.
5304         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5305         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5306         (GRUB_PE32_REL_BASED_LOW): Likewise.
5307         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5308         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5309         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5310         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5311         (GRUB_PE32_REL_BASED_REL): Likewise.
5312         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5313         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5314         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5316         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5317         issue.
5319         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5320         (efi_wrap_10): New function.
5322         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5324         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5325         MB/MBP model (NV chipset).
5326         (devdata_devs): Add devpath_5 to the list.
5328         * load/i386/efi/linux.c (video_base): Remove variable.
5329         (RGB_MASK): New macro.
5330         (RGB_MAGIC): Likewise.
5331         (LINE_MIN): Likewise.
5332         (LINE_MAX): Likewise.
5333         (FBTEST_STEP): Likewise.
5334         (FBTEST_COUNT): Likewise.
5335         (fb_list): New variable.
5336         (grub_find_video_card): Remove function.
5337         (find_framebuf): New function.
5338         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5339         line length.
5341         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5342         problem for x86_64.
5344 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5346         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5348         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5349         coding tool name.
5351 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5353         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5354         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5355         in our relocation, instead of using it directly from heap.  Also
5356         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5358 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5360         Implement USB keyboard support (based on patch by Marco Gerards)
5362         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5363         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5364         (usb_keyboard_mod_LDFLAGS): New variables.
5366         * term/usb_keyboard.c: New file.
5368 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5370         Corrected wrong declaration
5372         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5374 2009-02-14  Christian Franke  <franke@computer.org>
5376         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5377         (grub_lspci_iter): Print class code and programming interface byte.
5379 2009-02-14  Christian Franke  <franke@computer.org>
5381         * gendistlist.sh: Ignore `.svn' directories.
5383 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5385         * fs/fat.c: Add 2009 to Copyright line.
5387 2009-02-14  Christian Franke  <franke@computer.org>
5389         * commands/hdparm.c: New file.  Provides `hdparm' command
5390         which sends ATA commands via grub_disk_ata_pass_through ().
5392         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5394         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5395         and <grub/cpu/io.h> to include/grub/ata.h.
5396         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5397         (GRUB_CDROM_SECTOR_SIZE): Remove.
5398         (GRUB_ATA_*): Move to include/grub/ata.h.
5399         (GRUB_ATAPI_*): Likewise.
5400         (enum grub_ata_commands): Likewise.
5401         (enum grub_ata_timeout_milliseconds): Likewise.
5402         (struct grub_ata_device): Likewise.
5403         (grub_ata_regset): Likewise.
5404         (grub_ata_regget): Likewise.
5405         (grub_ata_regset2): Likewise.
5406         (grub_ata_regget2): Likewise.
5407         (grub_ata_check_ready): Likewise.
5408         (grub_ata_wait_not_busy): Remove static, exported in
5409         include/grub/ata.h.
5410         (grub_ata_wait_drq): Likewise.
5411         (grub_ata_pio_read): Likewise.
5413         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5414         function for hdparm.mod.
5416         * include/grub/ata.h: New file, contains declarations from
5417         disk/ata.c.
5418         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5420         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5421         (grub_disk_ata_pass_through): New exported variable.
5423         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5425 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5427         Support multiple fallback entries, and provide an API to support
5428         executing default+fallback menu entries.  Renamed the `terminal' menu
5429         viewer to `text'.
5431         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5432         variable declaration.
5433         (grub_menu_execute_callback): New structure declaration.
5434         (grub_menu_execute_callback_t): New typedef.
5435         (grub_menu_execute_with_fallback): New function declaration.
5436         (grub_menu_get_entry): Likewise.
5437         (grub_menu_get_timeout): Likewise.
5438         (grub_menu_set_timeout): Likewise.
5440         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5442         * normal/menu.c (grub_wait_after_message): Moved to
5443         `normal/menu_text.c'.
5444         (draw_border): Likewise.
5445         (print_message): Likewise.
5446         (print_entry): Likewise.
5447         (print_entries): Likewise.
5448         (grub_menu_init_page): Likewise.
5449         (get_entry_number): Likewise.
5450         (print_timeout): Likewise.
5451         (run_menu): Likewise.
5452         (grub_menu_execute_entry): Likewise.
5453         (show_text_menu): Likewise.
5454         (get_and_remove_first_entry_number): New function.
5455         (grub_menu_execute_with_fallback): Likewise.
5456         (get_entry): Renamed to ...
5457         (grub_menu_get_entry): .. this and made it global.
5458         (get_timeout): Renamed to ...
5459         (grub_menu_get_timeout): ... this and made it global.
5460         (set_timeout): Renamed to ...
5461         (grub_menu_set_timeout): ... this and made it global.
5462         (grub_normal_terminal_menu_viewer): Renamed to ...
5463         (grub_normal_text_menu_viewer): ... this.
5465         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5466         from normal/menu.c.
5468         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5469         (normal_mod_SOURCES): Likewise.
5471         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5472         (normal_mod_SOURCES): Likewise.
5474         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5475         (normal_mod_SOURCES): Likewise.
5477         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5478         (normal_mod_SOURCES): Likewise.
5480         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5481         (normal_mod_SOURCES): Likewise.
5483         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5484         (normal_mod_SOURCES): Likewise.
5486         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5487         (normal_mod_SOURCES): Likewise.
5489 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5491         * util/grub.d/00_header.in: Update old reference to `font' command.
5493 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5495         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5497         Based on patch from Javier Martín.
5499 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5501         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5502         to avoid false positives with FAT.
5503         (grub_fstest_SOURCES): Likewise.
5504         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5505         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5506         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5507         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5508         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5509         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5511 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5513         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5514         bpb.version_specific.fat12_or_fat16.fstype and
5515         bpb.version_specific.fat32.fstype.
5517 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5519         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5521 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5523         * Makefile.in (host_os, host_cpu): New variables.
5524         (target_os): Remove.  Update all users.
5526 2009-02-08  Marco Gerards  <marco@gnu.org>
5528         * Makefile.in (enable_grub_emu_usb): New variable.
5529         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5530         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5531         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5532         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5533         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5534         `usbtest.mod' and `usbms.mod'.
5535         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5536         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5537         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5538         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5539         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5540         variables.
5542         * disk/usbms.c: New file.
5544         * include/grub/usb.h: Likewise.
5546         * include/grub/usbtrans.h: Likewise.
5548         * include/grub/usbdesc.h: Likewise.
5550         * bus/usb/usbtrans.c: Likewise.
5552         * bus/usb/ohci.c: Likewise.
5554         * bus/usb/uhci.c: Likewise.
5556         * bus/usb/usbhub.c: Likewise.
5558         * bus/usb/usb.c: Likewise.
5560         * commands/usbtest.c: Likewise.
5562         * util/usb.c: Likewise.
5564         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5566         * configure.ac: Test for libusb presence.
5568         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5570 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5572         * kern/mm.c: Add more comments.
5574 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5576         Patch from Javier Martín.
5577         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5578         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5580 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5582         * fs/cpio.c: Split tar functionality to ...
5583         * fs/tar.c: ... here (new file).  Update all users.
5585 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5587         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5588         backward-incompatible features.
5590         Based on patch from Javier Martín, with some adjustments.
5592 2009-02-07  Michael Scherer  <misc@mandriva.org>
5594         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5596 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5598         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5599         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5600         after the RAID stuff.
5602 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5604         Fixes problem when running vbetest command as reported by
5605         Vladimir Serbinenko <phcoder@gmail.com>.
5607         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5609 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5611         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5612         /dev/md/NpN style mdraid devices.
5614 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5616         * util/unifont2pff.rb: Remove.
5618 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5620         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5621         `#'.
5623 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5625         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5626         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5627         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5628         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5629         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5630         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5631         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5633 2009-02-02  Christian Franke  <franke@computer.org>
5635         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5637 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
5639         * INSTALL: Note that we now require at least autoconf 2.59 and
5640         that LZO is optional.
5642 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5644         Base on patch on bug #24154 created by Tomas Tintera
5645         <trosos@seznam.cz>.
5647         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5649 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5651         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5652         <bero@arklinux.org>.
5654         * normal/parser.y (script_init): Add missing semicolon.
5656 2009-01-31  Colin D Bennett  <colin@gibibit.com>
5658         * normal/main.c: Add include to grub/menu_viewer.h.
5659         (free_menu_entry_classes): Added.
5660         (grub_normal_menu_addentry): Added class property handling.
5661         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5662         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5664         * normal/menu_viewer.c: New file.
5666         * normal/menu.c (run_menu_entry): Renamed to ...
5667         (grub_menu_execute_entry): ... this and made it as global.
5668         (grub_menu_run): Renamed to ...
5669         (show_text_menu): ... this and made it local.
5670         (show_text_menu): Adapt to new function names.
5671         (grub_normal_terminal_menu_viewer): New global variable.
5673         * include/grub/menu.h: New file.
5675         * include/grub/menu_viewer.h: New file.
5677         * include/grub/normal.h: Added include to grub/menu.h.
5678         (grub_menu_entry): Moved to include/grub/menu.h.
5679         (grub_menu_entry_t): Likewise.
5680         (grub_menu): Likewise.
5681         (grub_menu_t): Likewise.
5682         (grub_normal_terminal_menu_viewer): Added.
5683         (grub_menu_execute_entry): Likewise.
5684         (grub_menu_run): Removed.
5686         * DISTLIST: Added include/grub/menu.h.
5687         Added include/grub/menu_viewer.h.
5688         Added normal/menu_viewer.c.
5690 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
5692         * normal/execute.c (grub_script_execute_menuentry): Changed to use
5693         arglist for menutitle arguments.
5695         * normal/main.c (grub_normal_menu_addentry): Likewise.
5697         * normal/parser.y (menuentry): Likewise.
5699         * normal/script.c (grub_script_create_cmdmenu): Likewise.
5701         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5702         (grub_script_create_cmdmenu): Likewise.
5704         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5706         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5707         changes.
5709         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5711         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5713         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5715         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5717         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5719         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5721 2009-01-30  Christian Franke  <franke@computer.org>
5723         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5724         in option help text.
5726 2009-01-27  Pavel Roskin  <proski@gnu.org>
5728         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5730 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5732         * commands/lsmmap.c: Add include to grub/machine/memory.h.
5734         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5736         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5737         unregister function.
5739 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5741         * disk/scsi.c (grub_scsi_read): Fix sign problem.
5743         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5745         * util/grub-mkfont.c (usage): Fix typo.
5747         * util/elf/grub-mkimage.c (load_modules): Fix warning.
5749 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
5751         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5753         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5755         * kern/misc.c (grub_strcasecmp): New function.
5756         (grub_strcasecmp): Use grub_size_t instead of int for length.
5757         Fix return value.
5758         * include/grub/misc.h: Update function prototypes.
5760 2009-01-26  Robert Millan  <rmh@aybabtu.com>
5762         * configure.ac: Fix cross-compilation check.
5764 2009-01-22  Christian Franke  <franke@computer.org>
5766         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5767         (precision) digit string.  Allow `.format2' without `format1' (width).
5768         Limit input chars for `%s' output to `format2' if specified.  This is
5769         compatible with standard printf ().
5771 2009-01-22  Christian Franke  <franke@computer.org>
5773         * disk/ata.c (grub_ata_wait_status): Replace by ...
5774         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
5775         other status bits may be invalid while BSY is asserted.
5776         (grub_ata_check_ready): New function.
5777         (grub_ata_cmd): Removed.
5778         (grub_ata_wait_drq): New function.
5779         (grub_ata_strncpy): Remove inline.
5780         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
5781         and error check now done by grub_ata_wait_drq ().
5782         (grub_ata_pio_write): Likewise.
5783         (grub_atapi_identify): Set DEV before check for !BSY.  Use
5784         grub_ata_wait_drq () to wait for data.
5785         (grub_ata_device_initialize): Add status register check to
5786         detect missing SATA slave devices.  Add debug messages.
5787         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5788         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
5789         transfer loop by grub_ata_pio_write ().
5790         (grub_ata_identify): Set DEV before check for !BSY. Use
5791         grub_ata_wait_drq () to wait for data.
5792         (grub_ata_setaddress): Set DEV before check for !BSY.
5793         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5794         read/write in one loop.  Fix invalid command on write.  Fix incomplete
5795         command on (size % batch) == 0.  Add missing error check after write of
5796         last block.  Add debug messages.
5797         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
5799 2009-01-19  Christian Franke  <franke@computer.org>
5801         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5802         (GRUB_ATAPI_IREASON_*): Likewise.
5803         (grub_ata_pio_write): Fix timeout error return.
5804         (grub_atapi_identify): Add grub_ata_wait () after cmd.
5805         (grub_atapi_wait_drq): New function.
5806         (grub_atapi_packet): New parameter `size'.
5807         Use grub_atapi_wait_drq () and direct write instead of
5808         grub_ata_pio_write ().
5809         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5810         reads the number of bytes requested by the device for each DRQ
5811         assertion.
5812         (grub_atapi_write): Remove old implementation, return not
5813         implemented instead.
5815 2009-01-19  Christian Franke  <franke@computer.org>
5817         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5818         of 512 to calculate data size.
5819         (grub_scsi_read12): Likewise.
5820         (grub_scsi_write10): Likewise.
5821         (grub_scsi_write12): Likewise.
5822         (grub_scsi_read): Adjust size according to blocksize.
5823         Add checks for invalid blocksize and unaligned transfer.
5825 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
5827         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5829         * term/gfxterm.c (write_char): Fix background rendering for wide
5830         width glyphs.
5832 2009-01-19  Robert Millan  <rmh@aybabtu.com>
5834         * config.guess: Update to latest version from config git.
5835         * config.sub: Likewise.
5837 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
5839         * Makefile.in: Change font compilation to use new grub-mkfont instead
5840         of java version.
5842         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5843         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5844         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5845         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5846         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5847         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5848         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5849         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5850         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5852 2009-01-16  Christian Franke  <franke@computer.org>
5854         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5855         (enum grub_ata_timeout_milliseconds): New enum.
5856         (grub_ata_wait_status): Add parameter milliseconds.
5857         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
5858         recovery from timed-out commands.
5859         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
5860         return grub_errno instead of REG_ERROR.
5861         (grub_ata_pio_write): Add parameter milliseconds.
5862         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5863         Pass milliseconds to grub_ata_wait_status () and
5864         grub_ata_pio_read ().
5865         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5866         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
5867         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
5868         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5869         It is not suitable for device detection, because DEV bit is ignored,
5870         the command may run too long, and not all devices set the signature
5871         properly.
5872         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5873         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5874         Fix device selection, DEV bit must be set first to address the registers
5875         of the correct device.
5876         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5877         grub_ata_pio_read/write ().
5878         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5879         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5881 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
5883         * util/grub-editenv.c (main): Use fseeko(), not fseek().
5885 2009-01-13  Bean  <bean123ch@gmail.com>
5887         * util/grub-mkfont.c (write_font): forget to remove some debug code.
5889 2009-01-13  Bean  <bean123ch@gmail.com>
5891         * Makefile.in: (enable_grub_mkfont): New variable.
5892         (freetype_cflags): Likewise.
5893         (freetype_libs): Likewise.
5895         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5896         (grub_mkfont_SOURCES): New variable.
5897         (grub_mkfont_CFLAGS): Likewise.
5898         (grub_mkfont_LDFLAGS): Likewise.
5900         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5901         library if `--enable-grub-mkfont' is requested.
5902         (enable_grub_mkfont): New variable.
5903         (freetype_cflags): Likewise.
5904         (freetype_libs): Likewise.
5906         * util/grub-mkfont.c: New file.
5908 2009-01-12  Christian Franke  <franke@computer.org>
5910         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5911         mode check.  Fix setting of compat_use[].
5913 2009-01-10  Robert Millan  <rmh@aybabtu.com>
5915         Update a few copyright years which we forgot to do in 2008 (only for
5916         files whose changes made in 2008 were copyright-significant)
5918         * Makefile.in: Add 2008 to Copyright line.
5919         * disk/ieee1275/ofdisk.c: Likewise.
5920         * disk/efi/efidisk.c: Likewise.
5921         * kern/dl.c: Likewise.
5922         * kern/sparc64/ieee1275/init.c: Likewise.
5923         * kern/mm.c: Likewise.
5924         * kern/efi/mm.c: Likewise.
5925         * boot/i386/pc/boot.S: Likewise.
5926         * genfslist.sh: Likewise.
5927         * fs/iso9660.c: Likewise.
5928         * fs/hfs.c: Likewise.
5929         * fs/jfs.c: Likewise.
5930         * fs/minix.c: Likewise.
5931         * fs/ufs.c: Likewise.
5932         * gensymlist.sh.in: Likewise.
5933         * genkernsyms.sh.in: Likewise.
5934         * include/grub/misc.h: Likewise.
5935         * include/grub/types.h: Likewise.
5936         * include/grub/symbol.h: Likewise.
5937         * include/grub/elf.h: Likewise.
5938         * include/grub/kernel.h: Likewise.
5939         * include/grub/disk.h: Likewise.
5940         * include/grub/dl.h: Likewise.
5941         * include/grub/i386/linux.h: Likewise.
5942         * include/grub/i386/pc/biosdisk.h: Likewise.
5943         * include/grub/efi/api.h: Likewise.
5944         * include/grub/efi/pe32.h: Likewise.
5945         * include/grub/util/misc.h: Likewise.
5946         * normal/execute.c: Likewise.
5947         * normal/arg.c: Likewise.
5948         * normal/completion.c: Likewise.
5949         * normal/lexer.c: Likewise.
5950         * normal/parser.y: Likewise.
5951         * normal/misc.c: Likewise.
5952         * commands/i386/pc/vbeinfo.c: Likewise.
5953         * commands/hexdump.c: Likewise.
5954         * commands/terminal.c: Likewise.
5955         * commands/ls.c: Likewise.
5956         * commands/help.c: Likewise.
5957         * partmap/pc.c: Likewise.
5958         * loader/efi/chainloader.c: Likewise.
5959         * loader/multiboot_loader.c: Likewise.
5960         * loader/i386/pc/multiboot2.c: Likewise.
5961         * term/efi/console.c: Likewise.
5962         * term/i386/pc/serial.c: Likewise.
5963         * util/lvm.c: Likewise.
5964         * util/console.c: Likewise.
5965         * util/i386/efi/grub-mkimage.c: Likewise.
5966         * util/raid.c: Likewise.
5968 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
5970         * commands/videotest.c: Removed include to grub/machine/memory.h.
5972         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
5973         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
5974         (video_mod_SOURCES): Removed.
5975         (video_mod_CFLAGS): Likewise.
5976         (video_mod_LDFLAGS): Likewise.
5977         (gfxterm_mod_SOURCES): Likewise.
5978         (gfxterm_mod_CFLAGS): Likewise.
5979         (gfxterm_mod_LDFLAGS): Likewise.
5980         (videotest_mod_SOURCES): Likewise.
5981         (videotest_mod_CFLAGS): Likewise.
5982         (videotest_mod_LDFLAGS): Likewise.
5983         (bitmap_mod_SOURCES): Likewise.
5984         (bitmap_mod_CFLAGS): Likewise.
5985         (bitmap_mod_LDFLAGS): Likewise.
5986         (tga_mod_SOURCES): Likewise.
5987         (tga_mod_CFLAGS): Likewise.
5988         (tga_mod_LDFLAGS): Likewise.
5989         (jpeg_mod_SOURCES): Likewise.
5990         (jpeg_mod_CFLAGS): Likewise.
5991         (jpeg_mod_LDFLAGS): Likewise.
5992         (png_mod_SOURCES): Likewise.
5993         (png_mod_CFLAGS): Likewise.
5994         (png_mod_LDFLAGS): Likewise.
5996         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
5997         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
5998         (video_mod_SOURCES): Added.
5999         (video_mod_CFLAGS): Likewise.
6000         (video_mod_LDFLAGS): Likewise.
6001         (videotest_mod_SOURCES): Likewise.
6002         (videotest_mod_CFLAGS): Likewise.
6003         (videotest_mod_LDFLAGS): Likewise.
6004         (bitmap_mod_SOURCES): Likewise.
6005         (bitmap_mod_CFLAGS): Likewise.
6006         (bitmap_mod_LDFLAGS): Likewise.
6007         (tga_mod_SOURCES): Likewise.
6008         (tga_mod_CFLAGS): Likewise.
6009         (tga_mod_LDFLAGS): Likewise.
6010         (jpeg_mod_SOURCES): Likewise.
6011         (jpeg_mod_CFLAGS): Likewise.
6012         (jpeg_mod_LDFLAGS): Likewise.
6013         (png_mod_SOURCES): Likewise.
6014         (png_mod_CFLAGS): Likewise.
6015         (png_mod_LDFLAGS): Likewise.
6016         (gfxterm_mod_SOURCES): Likewise.
6017         (gfxterm_mod_CFLAGS): Likewise.
6018         (gfxterm_mod_LDFLAGS): Likewise.
6020         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6021         grub/machine/console.h.
6023 2009-01-04  Jerone Young  <jerone@gmail.com>
6025         Make on screen instructions clearer
6027         Based on patch created by Jidanni <jidanni@jidanni.org>
6029         * normal/menu.c: print clearer instructions on the screen
6031 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6033         New font engine.
6035         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6036         build system and fixed gfxterm.c to work with different sized fonts.
6038         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6040         * configure: Re-generated.
6042         * DISTLIST: Removed font/manager.c.
6043         Added font/font.c.
6044         Added font/font_cmd.c.
6046         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6047         compilation.
6049         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6051         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6053         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6055         * normal/menu.c: Likewise.
6057         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6058         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6060         * include/grub/font.h: Replaced with new file.
6062         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6063         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6064         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6065         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6066         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6067         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6068         fg_red, fg_green, fg_blue, fg_alpha.
6069         (grub_video_adapter): Removed blit_glyph.
6070         (grub_video_blit_glyph): Removed.
6072         * font/manager.c: Removed file.
6074         * font/font.c: New file.
6076         * font/font_cmd.c: Likewise.
6078         * video/video.c (grub_video_blit_glyph): Removed.
6080         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6081         (grub_video_vbe_map_rgba): Likewise.
6082         (grub_video_vbe_unmap_color_int): Likewise.
6083         (grub_video_vbe_blit_glyph): Removed.
6084         (grub_video_vbe_adapter): Removed blit_glyph.
6086         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6087         (get_pixel): Likewise.
6088         (set_pixel): Likewise.
6090         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6092         * term/gfxterm.c: Adapted to new font engine.
6094         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6096         * term/i386/pc/vga.c: Likewise.
6098         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6100         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6102         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6104         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6106         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6108         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6110         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6112         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6114         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6116         * util/grub.d/00_header.in: Changed to use new loadfont command.
6118         * util/grub-mkconfig_lib.in: Changed font extension.
6120 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6122         * util/getroot.c (grub_util_get_grub_dev): Add support for
6123         /dev/md/dNNpNN style partitionable mdraid devices.
6125 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6127         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6128         at a time limit of the PXE TFTP API correctly.
6129         (grub_pxefs_close): Likewise.
6131 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6133         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6134         grub_ata_device_initialize() calls.
6136 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6138         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6139         iteration failed.
6140         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6142 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6144         Fix build on powerpc-ieee1275.  Based on patch created by
6145         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6146         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6147         `kern/ieee1275/mmap.c'.
6148         * include/grub/powerpc/ieee1275/memory.h: New file.
6150         Provide grub-install on coreboot.
6151         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6152         (grub_install_SOURCES): New variable.
6153         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6154         usable on coreboot.
6156 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6158         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6159         to `grub_term_input_t'.
6160         (grub_term_get_current_output): Change return type to
6161         `grub_term_output_t'.
6163 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6165         Fix breakage on coreboot due to declaration mismatch.
6166         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6167         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6168         grub_vga_text_cls().
6170         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6171         comments.  Avoid copying one more byte than necessary (just in case).
6173         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6174         to 0x200000 (avoids trouble with some OFW implementations, and matches
6175         with the one in Yaboot).
6176         Reported by Manoel Abranches
6178 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6180         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6181         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6183         * util/grub-mkconfig_lib.in (grub_warn): New function.
6184         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6185         warnings, to obtain consistent formatting.
6186         * util/grub.d/00_header.in: Likewise.
6187         * util/update-grub_lib.in: Likewise.
6189         * loader/i386/linux.c (allocate_pages): Fix a warning.
6190         Move comment text to `#error' stanza.
6192         Harmonize ieee1275's grub_available_iterate() with the generic
6193         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6194         build problem on i386-ieee1275):
6195         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6196         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6197         parameter `type'.  Update all users of this function.
6198         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6199         `kern/ieee1275/mmap.c'.
6200         * kern/ieee1275/init.c
6201         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6202         with ...
6203         (grub_machine_mmap_iterate): ... this.
6204         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6205         return type to `grub_err_t'.  Update all implementations of this
6206         function prototype.
6207         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6208         Likewise.
6210         Add `lsmmap' command (lists firmware-provided memory map):
6211         * commands/lsmmap.c: New file.
6212         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6213         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6214         variables.
6215         * conf/powerpc-ieee1275.rmk: Likewise.
6216         * conf/i386-coreboot.rmk: Likewise.
6217         * conf/i386-ieee1275.rmk: Likewise.
6219 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6221         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6222         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6223         constraints to initrd allocation (based on code from
6224         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6225         for Linux to find it.
6227 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6229         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6230         order to cope with duplicate slashes.
6232 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6234         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6235         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6236         don't want to mess with lower memory, because it is used in the Linux
6237         loader.
6239         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6240         an appropriate place in lower memory, between 0x10000 and 0x90000,
6241         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6242         is in our heap (probably as a result of it being corrupted during
6243         decompression).  Add #error instance with comment to explain why this
6244         loader isn't currently usable on PC/BIOS.
6246 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6248         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6249         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6251 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6253         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6255         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6256         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6257         from here ...
6258         * include/grub/i386/pc/memory.h: ... to here.
6260 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6262         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6263         split).
6265         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6266         (grub_console_cur_color, grub_console_real_putchar)
6267         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6268         (grub_console_setcolorstate, grub_console_setcolor)
6269         (grub_console_getcolor): Move from here ...
6270         * include/grub/i386/vga_common.h: ... to here (new file).
6272         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6273         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6274         `<grub/i386/io.h>'.
6275         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6276         `<grub/i386/vga_common.h>'.
6278 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6280         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6281         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6282         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6283         variables.
6284         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6285         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6287         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6288         grub_console_init() with call to grub_vga_text_init().
6289         (grub_machine_fini): Replace call to
6290         grub_console_fini() with call to grub_vga_text_fini() and
6291         grub_at_keyboard_fini().
6293         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6294         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6295         (grub_console_setcolorstate, grub_console_setcolor)
6296         (grub_console_getcolor): New function prototypes.
6298         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6299         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6300         (grub_vga_text_setcursor): Static-ize.
6301         (grub_vga_text_term): New structure.
6302         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6304         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6305         (grub_console_cur_color, grub_console_standard_color)
6306         (grub_console_normal_color, grub_console_highlight_color)
6307         (map_char, grub_console_putchar, grub_console_getcharwidth)
6308         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6309         (grub_console_getcolor): Move from here ...
6310         * term/i386/vga_common.c: ... to here (same function names).
6312 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6314         Use newly-added Multiboot support in coreboot.
6316         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6317         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6319         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6320         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6321         (codestart): Store the MBI in `startup_multiboot_info' when we're
6322         being loaded using Multiboot.
6324         * kern/i386/coreboot/init.c (grub_machine_init): Move
6325         grub_at_keyboard_init() call to beginning of function (useful for
6326         debugging).  Call grub_machine_mmap_init() before attempting to use
6327         grub_machine_mmap_iterate().
6328         (grub_lower_mem, grub_upper_mem): Move from here ...
6329         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6330         here (new file).
6332         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6333         function prototype.
6335 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6337         Fix a regression introduced by the at_keyboard.mod split.  Because
6338         some terminals are default on some platforms and non-default on
6339         others, the first terminal being registered determines which is
6340         going to be default.
6342         * kern/term.c (grub_term_register_input): If this is the first
6343         terminal being registered, set it as the current one.
6344         (grub_term_register_output): Likewise.
6346         * term/efi/console.c (grub_console_init): Do not call
6347         grub_term_set_current_output() or grub_term_set_current_input().
6348         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6349         * term/i386/pc/console.c (grub_console_init): Likewise.
6350         (grub_console_fini): Do not call grub_term_set_current_input()
6351         (but leave grub_term_set_current_output() to restore text mode).
6353 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6355         * util/grub.d/00_header.in: Add backward compatibility check for
6356         versions of terminal.mod that don't understand `terminal_input' or
6357         `terminal_output'.
6359 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6361         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6362         `terminal_input' / `terminal_output', not `terminal'.
6364 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6366         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6367         (DISTCLEANFILES): Add `build_env.mk'.
6369 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6371         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6372         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6373         members.  Update all users.
6374         * util/console.c (grub_ncurses_term): Split in ...
6375         (grub_ncurses_term_input): ... this, and ...
6376         (grub_ncurses_term_output): ... this.  Update all users.
6377         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6379 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6381         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6382         (PKGDATA): Add $(pkgdata_SRCDIR).
6383         (pkglib_BUILDDIR): New variable.
6384         (pkgdata_SRCDIR): New variable.
6385         (build_env.mk): New target.
6386         (include_DATA): New variable.
6387         (install-local): Install $(include_DATA) files in $(includedir).
6389 2008-11-07  Pavel Roskin  <proski@gnu.org>
6391         * gendistlist.sh: Use C locale for sorting to ensure consistent
6392         output on all systems.
6394         * util/grub.d/00_header.in: Remove incorrect space before
6395         "serial".
6397 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6399         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6400         per specification.
6401         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6402         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6403         (based on find_multi_boot1_header).
6404         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6405         using find_multi_boot2_header(), and abort if neither Multiboot or
6406         Multiboot headers were found.
6408 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6410         Modularize at_keyboard.mod:
6412         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6413         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6414         (at_keyboard_mod_LDFLAGS): New variables.
6416         Actual terminal split:
6418         * include/grub/term.h (struct grub_term): Split in ...
6419         (struct grub_term_input): ... this, and ...
6420         (struct grub_term_output): ... this.  Update all users.
6421         (grub_term_set_current): Split in ...
6422         (grub_term_set_current_input): ... this, and ...
6423         (grub_term_set_current_output): ... this.
6424         (grub_term_get_current): Split in ...
6425         (grub_term_get_current_input): ... this, and ...
6426         (grub_term_get_current_output): ... this.
6427         (grub_term_register): Split in ...
6428         (grub_term_register_input): ... this, and ...
6429         (grub_term_register_output): ... this.
6430         (grub_term_unregister): Split in ...
6431         (grub_term_unregister_input): ... this, and ...
6432         (grub_term_unregister_output): ... this.
6433         (grub_term_iterate): Split in ...
6434         (grub_term_iterate_input): ... this, and ...
6435         (grub_term_iterate_output): ... this.
6437         * kern/term.c (grub_term_list): Split in ...
6438         (grub_term_list_input): ... this, and ...
6439         (grub_term_list_output): ... this.  Update all users.
6440         (grub_cur_term): Split in ...
6441         (grub_cur_term_input): ... this, and ...
6442         (grub_cur_term_output): ... this.  Update all users.
6443         (grub_term_set_current): Split in ...
6444         (grub_term_set_current_input): ... this, and ...
6445         (grub_term_set_current_output): ... this.
6446         (grub_term_get_current): Split in ...
6447         (grub_term_get_current_input): ... this, and ...
6448         (grub_term_get_current_output): ... this.
6449         (grub_term_register): Split in ...
6450         (grub_term_register_input): ... this, and ...
6451         (grub_term_register_output): ... this.
6452         (grub_term_unregister): Split in ...
6453         (grub_term_unregister_input): ... this, and ...
6454         (grub_term_unregister_output): ... this.
6455         (grub_term_iterate): Split in ...
6456         (grub_term_iterate_input): ... this, and ...
6457         (grub_term_iterate_output): ... this.
6459         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6460         a check for input and one for output (and only attempt to get keys
6461         from user when input works).
6463         * util/grub-probe.c (grub_term_get_current): Split in ...
6464         (grub_term_get_current_input): ... this, and ...
6465         (grub_term_get_current_output): ... this.
6466         * util/grub-fstest.c: Likewise.
6467         * util/i386/pc/grub-setup.c: Likewise.
6468         * util/grub-editenv.c: Likewise.
6470         Portability adjustments:
6472         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6473         `term/i386/pc/at_keyboard.c'.
6474         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6475         grub_keyboard_controller_init() (now handled by terminal .init).
6476         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6477         grub_at_keyboard_init().
6478         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6479         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6480         at_keyboard.mod via input terminal interface).
6481         * include/grub/i386/coreboot/console.h: Convert into a stub for
6482         `<grub/i386/pc/console.h>'.
6484         Migrate full terminals to new API:
6486         * term/efi/console.c (grub_console_term): Split into ...
6487         (grub_console_term_input): ... this, and ...
6488         (grub_console_term_output): ... this.  Update all users.
6489         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6490         (grub_ofconsole_init): Split into ...
6491         (grub_ofconsole_init_input): ... this, and ...
6492         (grub_ofconsole_init_output): ... this.
6493         (grub_ofconsole_term): Split into ...
6494         (grub_ofconsole_term_input): ... this, and ...
6495         (grub_ofconsole_term_output): ... this.  Update all users.
6496         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6497         (grub_serial_term_input): ... this, and ...
6498         (grub_serial_term_output): ... this.  Update all users.
6499         * term/i386/pc/console.c (grub_console_term): Split into ...
6500         (grub_console_term_input): ... this, and ...
6501         (grub_console_term_output): ... this.  Update all users.
6502         (grub_console_term_input): Only enable it on PC/BIOS platform.
6503         (grub_console_init): Remove grub_keyboard_controller_init() call.
6505         Migrate input terminals to new API:
6507         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6508         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6509         i386-specific anyway).
6510         (grub_console_checkkey): Rename to ...
6511         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6512         users.
6513         (grub_keyboard_controller_orig): New variable.
6514         (grub_console_getkey): Rename to ...
6515         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6516         users.
6517         (grub_keyboard_controller_init): Static-ize.  Save original
6518         controller value so that it can be restored ...
6519         (grub_keyboard_controller_fini): ... here (new function).
6520         (grub_at_keyboard_term): New structure.
6521         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6522         functions.
6524         Migrate output terminals to new API:
6526         * term/i386/pc/vga.c (grub_vga_term): Change type to
6527         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6528         members.  Update all users.
6529         * term/gfxterm.c (grub_video_term): Change type to
6530         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6531         members.  Update all users.
6532         * include/grub/i386/pc/console.h (grub_console_checkkey)
6533         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6534         etc).
6536         Migrate `terminal' command and userland tools to new API:
6538         * commands/terminal.c (grub_cmd_terminal): Split into ...
6539         (grub_cmd_terminal_input): ... this, and ...
6540         (grub_cmd_terminal_output): ... this.
6541         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6542         `terminal_input' and `terminal_output'.
6543         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6544         `terminal_input' / `terminal_output' API.
6545         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6546         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6547         provided ${GRUB_TERMINAL}, convert it).
6549 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6551         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6552         for FreeBSD.
6553         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6555 2008-11-03  Bean  <bean123ch@gmail.com>
6557         * kern/elf.c (grub_elf32_load): Revert to previous code.
6558         (grub_elf64_load): Likewise.
6560         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6562 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6564         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6565         (TARGET_CPPFLAGS): Likewise.
6566         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6568 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6570         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6572 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6574         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6575         addition of objects until the code is not going to be able to fail.
6577 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6579         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6580         (add a missing NULL check, and correct them by moving the pointer
6581         operations after the actual check).
6583 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6585         * util/i386/pc/grub-install.in: Handle empty string as output from
6586         make_system_path_relative_to_its_root().
6588 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6590         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6591         circular metadata worst case scenario. If the metadata is circular
6592         then copy the wrap in place.
6593         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6594         project lib/format_text/layout.h
6595         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6597 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6599         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6601 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6603         * util/update-grub_lib.in: Mention filename in warning message.
6605 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6607         * NEWS: Update for rename of update-grub to grub-mkconfig.
6609 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6611         * util/update-grub_lib.in: Copy to ...
6612         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6613         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6614         * util/update-grub.in: Rename to ...
6615         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6616         option. Add `--output' option to allow users to specify the generated
6617         configuration file.  Default to stdout.
6618         (update_grub_dir): Rename to ...
6619         (grub_mkconfig_dir): ... this.
6620         (grub_cfg): Default to an empty string.
6621         * conf/common.rmk (update-grub): Rename to ...
6622         (grub-mkconfig): ... this.
6623         (update-grub_lib): Copy to ...
6624         (grub-mkconfig_lib): ... this.
6625         (update-grub_SCRIPTS): Copy to ...
6626         (grub-mkconfig_SCRIPTS): ... this. Update all users.
6627         (update-grub_DATA): Rename to ...
6628         (grub-mkconfig_DATA): ... this.
6630 2008-09-28  Robert Millan  <rmh@aybabtu.com>
6632         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6633         to `modified'.  Add the real `created' field.
6634         (grub_iso9660_uuid): Use `modified' rather than `created' for
6635         constructing the UUID.
6637 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
6639         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6640         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6642 2008-09-28  Bean  <bean123ch@gmail.com>
6644         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6645         Thanks to Christian Franke for finding this bug.
6647 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6649         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6650         instances of grub_util_get_disk_name() (see previous commit).
6652 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6654         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6655         `util/i386/get_disk_name.c'.
6656         * conf/i386-efi.rmk: Likewise.
6657         * conf/x86_64-efi.rmk: Likewise.
6658         * conf/i386-coreboot.rmk: Likewise.
6659         * conf/i386-ieee1275.rmk: Likewise.
6660         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6661         `util/ieee1275/get_disk_name.c'.
6662         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6663         * util/ieee1275/get_disk_name.c: Remove file.
6664         * util/i386/get_disk_name.c: Remove file.
6665         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6666         "hd%d" for device.map entries, rather than using
6667         grub_util_get_disk_name().
6669 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6671         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6672         warning.
6673         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6675 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6677         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6678         Changed to 0x5100.
6679         (GRUB_TERM_PPAGE): Changed to 0x4900.
6681 2008-09-24  Robert Millan  <rmh@aybabtu.com>
6683         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6684         macros (they were i386-pc specific).
6685         * include/grub/sparc64/ieee1275/console.h: Likewise.
6686         * include/grub/efi/console.h: Likewise.
6688 2008-09-22  Bean  <bean123ch@gmail.com>
6690         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6691         resident and in attribute list.
6693         * include/grub/ntfs.h (BMP_LEN): Removed.
6695 2008-09-22  Bean  <bean123ch@gmail.com>
6697         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6698         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6700         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6701         error occurs, as grub_disk_open will call grub_disk_close, which will
6702         call p->close (scsi).
6704 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6706         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6707         (AC_PREREQ): Bumped to 2.59.
6708         (AC_TRY_COMPILE): Replace obsolete macro with ...
6709         (AC_COMPILE_IFELSE): ... this.
6710         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6711         (AC_LINK_IFELSE): ... this.
6713 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6715         * autogen.sh: Add a call to `gendistlist.sh'.
6717 2008-09-19  Christian Franke  <franke@computer.org>
6719         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6720         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6721         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6722         Export __enable_execute_stack() to modules.
6723         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6724         New function.
6726 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6728         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6729         Sort the list.
6731 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6733         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6734         #include <grub/util/hostdisk.h>.
6736 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6738         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6739         segments when their filesz is zero (grub_file_read() interprets
6740         zero-size as "read until EOF", which results in memory corruption).
6741         Use `lowest_segment' rather than 0 for calculating the current
6742         segment load address.
6744 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6746         * util/hostdisk.c (open_device): Replace a grub_util_info() call
6747         with grub_dprintf("hostdisk", ...), as it was so verbose that it
6748         clobbered useful information.
6750 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6752         * include/grub/util/biosdisk.h: Move to ...
6753         * include/grub/util/hostdisk.h: ... here.  Update all users.
6754         * util/biosdisk.c: Move to ...
6755         * util/hostdisk.c: ... here.  Update all users.
6757 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6759         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6760         variables.
6761         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6762         and length can be stored directly in the `mbi->mmap_addr' and
6763         `mbi->mmap_length' struct fields.
6765 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6767         * conf/i386.rmk: New file.  Provides declaration for building
6768         `cpuid.mod'.
6769         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6770         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6771         variables.
6772         Include `conf/i386.mk'.
6773         * conf/i386-efi.rmk: Likewise.
6774         * conf/x86_64-efi.rmk: Likewise.
6775         * conf/i386-coreboot.rmk: Likewise.
6776         * conf/i386-ieee1275.rmk: Likewise.
6778 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
6780         Based on patch created by Colin D Bennett <colin@gibibit.com>.
6781         Adds optimization support for BGR based modes.
6783         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6784         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6785         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6786         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6787         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6788         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6789         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6790         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6791         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6792         (grub_video_i386_vbeblit_index_index): Likewise.
6793         (grub_video_i386_vbeblit_replace_directN): Added.
6794         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6795         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6796         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6797         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6798         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6799         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6800         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6801         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6802         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6803         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6804         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6805         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6806         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6808         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6809         (grub_video_i386_vbefill_R8G8B8): Likewise.
6810         (grub_video_i386_vbefill_index): Likewise.
6811         (grub_video_i386_vbefill_direct32): Added.
6812         (grub_video_i386_vbefill_direct24): Likewise.
6813         (grub_video_i386_vbefill_direct16): Likewise.
6814         (grub_video_i386_vbefill_direct8): Likewise.
6816         * include/grub/video.h (grub_video_blit_format): Removed
6817         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6818         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6819         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6820         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6821         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6823         * video/video.c (grub_video_get_blit_format): Updated to use new
6824         blit formats.  Added handling for 16 bit color modes.
6826         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6827         fillers.
6828         (common_blitter): Updated to use new blitters.
6830         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6831         Removed.
6832         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6833         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6834         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6835         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6836         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6837         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6838         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6839         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6840         (grub_video_i386_vbeblit_index_index): Likewise.
6841         (grub_video_i386_vbeblit_replace_directN): Added.
6842         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6843         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6844         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6845         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6846         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6847         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6848         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6849         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6850         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6851         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6852         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6853         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6854         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6856         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6857         (grub_video_i386_vbefill_R8G8B8): Likewise.
6858         (grub_video_i386_vbefill_index): Likewise.
6859         (grub_video_i386_vbefill_direct32): Added.
6860         (grub_video_i386_vbefill_direct24): Likewise.
6861         (grub_video_i386_vbefill_direct16): Likewise.
6862         (grub_video_i386_vbefill_direct8): Likewise.
6864         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6865         types.
6867         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6868         types.
6870         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6871         blitter types.
6873         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6874         types.
6876 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6878         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6879         RAID level 1.
6881 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6883         * fs/iso9660.c (grub_iso9660_date): New structure.
6884         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6885         (grub_iso9660_uuid): New function.
6887 2008-09-05  Bean  <bean123ch@gmail.com>
6889         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6891         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6892         insensitive bit for names in Win32 and Win32 & DOS namespace.
6894         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6896         * include/grub/types.h (LONG_MAX): Likewise.
6898 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6900         * util/getroot.c: Include <config.h>.
6901         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6902         add support for /dev/md/N devices and handle LVM double dash escaping.
6904 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6906         * config.guess: Update to latest version from config git.
6907         * config.sub: Likewise.
6909 2008-09-03  Robert Millan  <rmh@aybabtu.com>
6911         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6912         `disk->total_sectors'.
6914 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6916         * include/grub/normal.h: Fixed incorrect comment for
6917         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6919 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6921         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6922         values with defines.
6924         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6925         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6926         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6927         (GRUB_VBE_MODEATTR_COLOR): Likewise.
6928         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6929         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6930         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6931         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6932         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6933         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6934         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6935         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6936         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6937         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6938         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6939         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6940         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6941         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6942         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6944 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6946         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6947         declaration.
6948         (grub_multiboot): Fix a few warnings.
6950 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6952         * loader/i386/pc/multiboot.c: Update comment not to say that
6953         boot_device support is unimplemented.
6955 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6957         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
6958         or memory map support are unimplemented.
6960 2008-08-31  Colin D Bennett  <colin@gibibit.com>
6962         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
6964 2008-08-31  Colin D Bennett  <colin@gibibit.com>
6966         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
6967         total video memory in 'vbeinfo' output; show color format details for
6968         each video mode.
6970 2008-08-30  Pavel Roskin  <proski@gnu.org>
6972         * util/genmoddep.c: Remove for real this time.
6973         * DISTLIST: Remove util/genmoddep.c.
6975 2008-08-30  Robert Millan  <rmh@aybabtu.com>
6977         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
6978         as required by Multiboot spec (it was already 4-byte aligned, but
6979         only by chance).
6981 2008-08-29  Pavel Roskin  <proski@gnu.org>
6983         * kern/powerpc/ieee1275/crt0.S: Rename to ...
6984         * kern/powerpc/ieee1275/startup.S: ... this.
6985         * conf/powerpc-ieee1275.rmk: Adjust for the above.
6986         * DISTLIST: Likewise.
6988         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
6989         grub/cpu/kernel.h.  Add start label for consistency with other
6990         platforms.  Add grub_prefix immediately after start.  Add jump
6991         to the code after grub_prefix.
6992         * include/grub/powerpc/kernel.h: Provide valid values for
6993         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
6995 2008-08-29  Bean  <bean123ch@gmail.com>
6997         * configure.ac: Change host_os to cygwin for mingw.
6998         (asprintf): New check for function.
7000         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7001         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7003         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7004         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7005         sync, sleep and grub_util_get_disk_size for mingw.
7007         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7008         to get size in mingw.
7009         (open_device): Use flag O_BINARY if it's defined.
7010         (find_root_device): Add dummy code for mingw.
7012         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7013         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7014         (get_scsi_disk_name): Return 0 for mingw.
7016         * util/hostfs.c: #include <grub/util/misc.h>.
7017         (grub_hostfs_open): Use "rb" flag to open file, use
7018         grub_util_get_disk_size to get disk size for mingw.
7020         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7021         (asprintf): New function if HAVE_ASPRINTF is not set.
7022         (sync): New function for mingw.
7023         (sleep): Likewise.
7024         (grub_util_get_disk_size): Likewise.
7026 2008-08-28  Pavel Roskin  <proski@gnu.org>
7028         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7029         kern/time.c.
7031 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7033         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7035 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7037         Change find_grub_drive() syntax so it doesn't prevent it from
7038         detecting NULL names as errors.
7040         * util/biosdisk.c (find_grub_drive): Move free slot search code
7041         from here ...
7042         (find_free_slot): ... to here.
7043         (read_device_map): Use find_free_slot() to search for free slots.
7045 2008-08-27  Marco Gerards  <marco@gnu.org>
7047         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7048         (scsi_mod_SOURCES): New variable.
7049         (scsi_mod_CFLAGS): Likewise
7050         (scsi_mod_LDFLAGS): Likewise.
7052         * disk/scsi.c: New file.
7054         * include/grub/scsi.h: Likewise.
7056         * include/grub/scsicmd.h: Likewise.
7058         * disk/ata.c: Include <grub/scsi.h>.
7059         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7060         instead.
7061         (grub_ata_iterate): Skip ATAPI devices.
7062         (grub_ata_open): Only handle ATAPI devices.
7063         (struct grub_atapi_read): Removed.
7064         (grub_atapi_readsector): Likewise.
7065         (grub_ata_read): No longer handle ATAPI devices.
7066         (grub_ata_write): Likewise.
7067         (grub_atapi_iterate): New function.
7068         (grub_atapi_read): Likewise.
7069         (grub_atapi_write): Likewise.
7070         (grub_atapi_open): Likewise.
7071         (grub_atapi_close): Likewise.
7072         (grub_atapi_dev): New variable.
7073         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7074         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7076         * include/grub/disk.h (enum grub_disk_dev_id): Add
7077         `GRUB_DISK_DEVICE_SCSI_ID'.
7079 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7081         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7082         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7083         descriptive.
7085 2008-08-23  Bean  <bean123ch@gmail.com>
7087         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7088         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7089         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7090         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7091         dm_nv.mod.
7092         (raid5rec_mod_SOURCES): New macro.
7093         (raid5rec_mod_CFLAGS): Likewise.
7094         (raid5rec_mod_LDFLAGS): Likewise.
7095         (raid6rec_mod_SOURCES): Likewise.
7096         (raid6rec_mod_CFLAGS): Likewise.
7097         (raid6rec_mod_LDFLAGS): Likewise.
7098         (mdraid_mod_SOURCES): Likewise.
7099         (mdraid_mod_CFLAGS): Likewise.
7100         (mdraid_mod_LDFLAGS): Likewise.
7101         (dm_nv_mod_SOURCES): Likewise.
7102         (dm_nv_mod_CFLAGS): Likewise.
7103         (dm_nv_mod_LDFLAGS): Likewise.
7105         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7106         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7107         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7109         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7110         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7112         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7114         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7116         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7118         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7120         * disk/raid5_recover.c: New file.
7122         * disk/raid6_recover.c: Likewise.
7124         * disk/mdraid_linux.c: Likewise.
7126         * disk/dmraid_nvidia.c: Likewise.
7128         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7129         ULONG_MAX.
7131         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7132         calculate the size of raid device.
7133         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7134         different layout of raid5.
7135         (grub_raid_scan_device): Remove code specific to mdraid.
7136         (grub_raid_list): New variable.
7137         (free_array): New function.
7138         (grub_raid_register): Likewise.
7139         (grub_raid_unregister): Likewise.
7140         (grub_raid_rescan): Likewise.
7141         (GRUB_MOD_INIT): Don't iterate device here.
7142         (GRUB_MOD_FINI): Use free_array to release resource.
7144         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7145         (grub_raid5_recover_func_t): New function variable type.
7146         (grub_raid6_recover_func_t): Likewise.
7147         (grub_raid5_recover_func): New variable.
7148         (grub_raid6_recover_func): Likewise.
7149         (grub_raid_register): New function.
7150         (grub_raid_unregister): Likewise.
7151         (grub_raid_rescan): Likewise.
7152         (grub_raid_block_xor): Likewise.
7154         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7155         (CMD_CRC): New macro.
7156         (part): Removed.
7157         (read_file): Handle device as well as file.
7158         (cmd_crc): New function.
7159         (fstest): Handle multiple disks.
7160         (options): Remove part, raw and long, add root and diskcount.
7161         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7162         (main): Find the first non option entry and ignore subsequent options,
7163         add handling for the new options, support multiple disks.
7165         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7167 2008-08-23  Bean  <bean123ch@gmail.com>
7169         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7171         * genfslist.sh: Ignore kernel.mod.
7173         * genpartmaplist.sh: Likewise.
7175 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7177         * util/getroot.c (find_root_device): Skip anything that starts with
7178         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7180 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7182         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7183         * util/grub.d/00_header.in: Allow the administrator to change default
7184         gfxmode via ${GRUB_GFXMODE}.
7186 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7188         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7190 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7192         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7193         loader.
7194         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7195         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7197 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7199         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7200         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7202 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7204         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7205         (struct grub_virtual_screen): Remove `cursor_color'.
7206         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7207         initialization.
7208         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7210 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7212         Unify (identical) linux_normal.c files.
7213         * loader/i386/efi/linux_normal.c: Move from here ...
7214         * loader/linux_normal.c: ... to here.  Update all users.
7215         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7216         * loader/i386/ieee1275/linux_normal.c: Likewise.
7218 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7220         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7221         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7222         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7223         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7224         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7225         New macros.
7226         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7227         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7228         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7229         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7230         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7231         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7232         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7233         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7234         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7235         portably using grub_getxy().
7236         Replace `-EFI' with `-bzImage' in boot message.
7238 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7240         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7242 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7244         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7246         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7247         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7248         (grub_machine_mmap_iterate): New function declaration.
7249         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7250         structure.
7251         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7252         macros.
7254         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7255         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7256         Move e820 parsing from here ...
7257         * kern/i386/pc/mmap.c: New file.
7258         (grub_machine_mmap_iterate): ... to here.
7260         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7261         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7262         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7263         (grub_available_iterate): Redeclare to return `void', and redeclare
7264         its hook to use grub_uint64_t as addr and size parameters, and rename
7265         to ...
7266         (grub_machine_mmap_iterate): ... this.  Update all users.
7268         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7269         to make it more readable.  Rename to ...
7270         (grub_machine_mmap_iterate): ... this.
7272         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7273         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7274         (grub_multiboot): Allocate an extra region after the payload, and fill
7275         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7276         with the extra space.
7277         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7278         with the extra space.
7280 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7282         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7284 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7286         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7287         mdate-sh to the list `find' searches for.
7288         * DISTLIST: Regenerated.
7290 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7292         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7293         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7294         genmoddep.awk, gensymlist.sh.in.
7295         (DISTDIRS): Add bus, docs, hook, lib.
7296         * DISTLIST: Regenerated.
7297         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7299 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7301         * disk/raid.c (grub_raid_init): Handle/report errors set by
7302         grub_device_iterate().
7303         * disk/lvm.c (grub_lvm_init): Likewise.
7305 2008-08-15  Bean  <bean123ch@gmail.com>
7307         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7308         and datehook.mod.
7309         (datetime_mod_SOURCES): New macro.
7310         (datetime_mod_CFLAGS): Likewise.
7311         (datetime_mod_LDFLAGS): Likewise.
7312         (date_mod_SOURCES): Likewise.
7313         (date_mod_CFLAGS): Likewise.
7314         (date_mod_LDFLAGS): Likewise.
7315         (datehook_mod_SOURCES): Likewise.
7316         (datehook_mod_CFLAGS): Likewise.
7317         (datehook_mod_LDFLAGS): Likewise.
7319         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7320         and datehook.mod.
7321         (datetime_mod_SOURCES): New macro.
7322         (datetime_mod_CFLAGS): Likewise.
7323         (datetime_mod_LDFLAGS): Likewise.
7324         (date_mod_SOURCES): Likewise.
7325         (date_mod_CFLAGS): Likewise.
7326         (date_mod_LDFLAGS): Likewise.
7327         (datehook_mod_SOURCES): Likewise.
7328         (datehook_mod_CFLAGS): Likewise.
7329         (datehook_mod_LDFLAGS): Likewise.
7331         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7332         and datehook.mod.
7333         (datetime_mod_SOURCES): New macro.
7334         (datetime_mod_CFLAGS): Likewise.
7335         (datetime_mod_LDFLAGS): Likewise.
7336         (date_mod_SOURCES): Likewise.
7337         (date_mod_CFLAGS): Likewise.
7338         (date_mod_LDFLAGS): Likewise.
7339         (datehook_mod_SOURCES): Likewise.
7340         (datehook_mod_CFLAGS): Likewise.
7341         (datehook_mod_LDFLAGS): Likewise.
7343         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7344         and datehook.mod.
7345         (datetime_mod_SOURCES): New macro.
7346         (datetime_mod_CFLAGS): Likewise.
7347         (datetime_mod_LDFLAGS): Likewise.
7348         (date_mod_SOURCES): Likewise.
7349         (date_mod_CFLAGS): Likewise.
7350         (date_mod_LDFLAGS): Likewise.
7351         (datehook_mod_SOURCES): Likewise.
7352         (datehook_mod_CFLAGS): Likewise.
7353         (datehook_mod_LDFLAGS): Likewise.
7355         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7356         and datehook.mod.
7357         (datetime_mod_SOURCES): New macro.
7358         (datetime_mod_CFLAGS): Likewise.
7359         (datetime_mod_LDFLAGS): Likewise.
7360         (date_mod_SOURCES): Likewise.
7361         (date_mod_CFLAGS): Likewise.
7362         (date_mod_LDFLAGS): Likewise.
7363         (datehook_mod_SOURCES): Likewise.
7364         (datehook_mod_CFLAGS): Likewise.
7365         (datehook_mod_LDFLAGS): Likewise.
7367         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7369         * commands/date.c: New file.
7371         * hook/datehook.c: Likewise.
7373         * include/grub/lib/datetime.h: Likewise.
7375         * include/grub/i386/cmos.h: Likewise.
7377         * lib/datetime.c: Likewise.
7379         * lib/i386/datetime.c: Likewise.
7381         * lib/efi/datetime.c: Likewise.
7383 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7385         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7386         (grub_mkelfimage_SOURCES): New variable.
7387         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7389         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7390         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7391         * conf/powerpc-ieee1275.rmk: Likewise.
7392         * conf/i386-ieee1275.rmk: Likewise.
7394         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7395         * kern/i386/coreboot/init.c: Likewise.
7397         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7398         with `<grub/cpu/kernel.h>'.
7399         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7400         to ...
7401         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7402         * kern/i386/coreboot/startup.S: Likewise.
7404         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7405         (GRUB_MOD_GAP): Remove.
7406         * include/grub/powerpc/kernel.h: New file.
7407         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7408         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7409         * include/grub/i386/kernel.h: New file.
7410         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7411         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7412         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7414         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7415         `grub-mkelfimage'.
7416         Use --directory when invoking grub_mkimage.
7418         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7419         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7420         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7421         and GRUB_KERNEL_CPU_PREFIX.
7423 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7425         * include/grub/err.h (grub_err_printf): New function prototype.
7426         * util/misc.c (grub_err_printf): New function.
7427         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7428         grub_printf.
7429         * kern/err.c (grub_print_error): Use grub_err_printf.
7431 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7433         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7435 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7437         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7438         boot entry.
7440 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7442         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7443         of the relocation code from here ...
7444         (grub_multiboot): ... to here.
7445         (forward_relocator, backward_relocator): Move from here ...
7446         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7447         (grub_multiboot_backward_relocator): ... to here.
7448         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7449         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7450         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7451         (grub_multiboot_forward_relocator_end)
7452         (grub_multiboot_backward_relocator)
7453         (grub_multiboot_backward_relocator_end): New variables.
7455 2008-08-12  Bean  <bean123ch@gmail.com>
7457         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7459 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7461         * kern/i386/linuxbios/startup.S: Move from here ...
7462         * kern/i386/coreboot/startup.S: ... to here.
7464         * kern/i386/linuxbios/init.c: Move from here ...
7465         * kern/i386/coreboot/init.c: ... to here.
7467         * kern/i386/linuxbios/table.c: Move from here ...
7468         * kern/i386/coreboot/mmap.c: ... to here.
7470         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7472 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7474         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7475         errors.  Leave it to the upper layer to handle them.
7477 2008-08-09  Christian Franke  <franke@computer.org>
7479         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7480         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7481         Install `grub.d/10_windows' only on Cygwin.
7482         * configure.ac: Add subst of `target_os'.
7483         Check `target_os' also before setting TARGET_OBJ2ELF.
7484         Add `--enable-grub-pe2elf'.
7486 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7488         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7489         (grub_last_time): Change type to grub_uint64_t.
7490         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7491         (grub_disk_close): Likewise.
7493         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7494         (run_menu): Migrate code from to using grub_get_time_ms().
7496         * util/misc.c (grub_get_time_ms): New function.
7498 2008-08-08  Marco Gerards  <marco@gnu.org>
7500         * disk/ata.c (grub_ata_regget): Change return type to
7501         `grub_uint8_t'.
7502         (grub_ata_regget2): Likewise.
7503         (grub_ata_wait_status): New function.
7504         (grub_ata_wait_busy): Removed function, updated all users to use
7505         `grub_ata_wait_status'.
7506         (grub_ata_wait_drq): Likewise.
7507         (grub_ata_cmd): New function.
7508         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7509         error handling.
7510         (grub_ata_pio_write): Add error handling.
7511         (grub_atapi_identify): Likewise.
7512         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7513         handling.
7514         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7515         handling.  Actually use the detected registers.  Reorder the
7516         detection logic such that it is easier to read.
7517         (grub_ata_pciinit): Do not assign the same ID to each controller.
7518         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7519         handling.
7520         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7522         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7524 2008-08-08  Marco Gerards  <marco@gnu.org>
7526         * NEWS: Update.
7528 2008-08-07  Bean  <bean123ch@gmail.com>
7530         * include/grub/x86_64/pci.h: New file.
7532 2008-08-07  Christian Franke  <franke@computer.org>
7534         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7535         (TIMER2_GATE): Likewise.
7536         (grub_pit_wait): Add enable/disable of the timer2 gate
7537         bit of port 0x61.  This fixes a possible infinite loop.
7539 2008-08-07  Bean  <bean123ch@gmail.com>
7541         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7542         kern/i386/tsc.c and kern/i386/pit.c.
7544         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7545         x86_64 platform.
7547         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7548         <grub/i386/tsc.h>.
7550         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7552 2008-08-07  Bean  <bean123ch@gmail.com>
7554         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7556         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7558         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7559         multiple inclusion. Add #include <grub/types.h>.
7561 2008-08-06  Christian Franke  <franke@computer.org>
7563         * conf/common.rmk: Build and install `10_windows'.
7564         * util/grub.d/10_windows.in: New script.
7566 2008-08-06  Pavel Roskin  <proski@gnu.org>
7568         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7570 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7572         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7573         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7575 2008-08-06  Bean  <bean123ch@gmail.com>
7577         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7578         (grub_pxefs_fs_int): Remove dummy definition.
7579         (grub_pxefs_open): Use data->block_size to store the current block
7580         size setting.
7581         (grub_pxefs_read): Use block size stored in data->block_size. As the
7582         value of grub_pxe_blksize can be changed after the file is opened.
7584 2008-08-06  Bean  <bean123ch@gmail.com>
7586         * fs/i386/pc/pxe.c (curr_file): new variable.
7587         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7588         require the dummy internal file system anymore.
7589         (grub_pxefs_read): Removed.
7590         (grub_pxefs_close): Likewise.
7591         (grub_pxefs_fs_int): Likewise.
7592         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7593         connection when we switch file.
7594         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7596 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7598         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7599         `halt.mod'.
7600         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7601         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7603         * kern/i386/halt.c: New file.
7604         * kern/i386/reboot.c: Likewise.
7605         * include/grub/i386/reboot.h: Likewise.
7606         * include/grub/i386/halt.h: Likewise.
7608         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7609         Include `<grub/cpu/halt.h>'.
7610         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7611         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7613         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7614         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7615         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7616         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7617         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7618         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7619         from here ...
7620         * include/grub/i386/at_keyboard.h: ... to here.
7622 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7624         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7625         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7626         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7627         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7628         `kern/generic/millisleep.c'.
7630         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7631         instead of grub_get_rtc().
7632         (grub_tsc_init): Initialize `tsc_boot_time'.
7634         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7635         (grub_machine_init): Use grub_tsc_init() rather than
7636         installing an RTC-based handler via grub_install_get_time_ms().
7638         * kern/i386/pit.c: New file.
7639         * include/grub/i386/pit.h: Likewise.
7641 2008-08-05  Bean  <bean123ch@gmail.com>
7643         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7645         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7646         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7647         (pxe_mod_SOURCES): New macro.
7648         (pxe_mod_CFLAGS): Likewise.
7649         (pxe_mod_LDFLAGS): Likewise.
7650         (pxecmd_mod_SOURCES): Likewise.
7651         (pxecmd_mod_CFLAGS): Likewise.
7652         (pxecmd_mod_LDFLAGS): Likewise.
7654         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7655         (grub_pxe_call): Likewise.
7657         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7659         * commands/i386/pc/pxecmd.c: New file.
7661         * fs/i386/pc/pxe.c: Likewise.
7663         * include/grub/i386/pc/pxe.h: Likewise.
7665 2008-08-05  Bean  <bean123ch@gmail.com>
7667         * util/console.c (grub_console_cur_color): New variable.
7668         (grub_console_standard_color): Likewise.
7669         (grub_console_normal_color): Likewise.
7670         (grub_console_highlight_color): Likewise.
7671         (color_map): Likewise.
7672         (use_color): Likewise.
7673         (NUM_COLORS): New macro.
7674         (grub_ncurses_setcolorstate): Handle color properly.
7675         (grub_ncurses_setcolor): Don't change color here, just remember the
7676         settings, color will be set in grub_ncurses_setcolorstate.
7677         (grub_ncurses_getcolor): New function.
7678         (grub_ncurses_init): Initialize color pairs.
7679         (grub_ncurses_term): New member grub_ncurses_getcolor.
7681 2008-08-05  Colin D Bennett  <colin@gibibit.com>
7683         High resolution timer support.  Implemented for x86 CPUs using TSC.
7684         Extracted generic grub_millisleep() so it's linked in only as needed.
7685         This requires a Pentium compatible CPU; if the RDTSC instruction is
7686         not supported, then it falls back on the generic grub_get_time_ms()
7687         implementation that uses the machine's RTC.
7689         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7690         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7691         `kern/generic/millisleep.c'.
7693         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7694         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7696         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7697         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7699         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7701         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7702         `kern/generic/millisleep.c'.
7704         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7706         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7708         * kern/generic/rtc_get_time_ms.c: New file.
7710         * kern/generic/millisleep.c: New file.
7712         * kern/misc.c: Don't include
7713         <kern/time.h> anymore.
7714         (grub_millisleep_generic): Removed.
7716         * commands/sleep.c (grub_interruptible_millisleep): Uses
7717         grub_get_time_ms() instead of grub_get_rtc().
7719         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
7720         function.
7721         (grub_cpu_is_cpuid_supported): New inline function.
7722         (grub_cpu_is_tsc_supported): New inline function.
7723         (grub_tsc_init): New function prototype.
7724         (grub_tsc_get_time_ms): New function prototype.
7726         * kern/i386/tsc.c (grub_get_time_ms): New file.
7728         * include/grub/time.h: Include <grub/types.h.
7729         (grub_millisleep_generic): Removed.
7730         (grub_get_time_ms): New prototype.
7731         (grub_install_get_time_ms): New prototype.
7732         (grub_rtc_get_time_ms): New prototype.
7734         * kern/time.c (grub_get_time_ms): New function.
7735         (grub_install_get_time_ms): New function.
7737         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
7738         <grub/time.h> anymore.
7739         (grub_millisleep): Removed.
7740         (grub_machine_init): Call grub_tsc_init.
7742         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7743         get_time_ms() implementation.
7745         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7746         (ieee1275_get_time_ms): New function.
7747         (grub_machine_init): Install get_time_ms() implementation.
7749         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7750         (grub_machine_init): Call grub_tsc_init().
7751         (grub_millisleep): Removed.
7753         * kern/ieee1275/init.c (grub_millisleep): Removed.
7754         (grub_machine_init): Install ieee1275_get_time_ms()
7755         implementation.
7756         (ieee1275_get_time_ms): New function.
7757         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7758         real work.
7760 2008-08-05  Marco Gerards  <marco@gnu.org>
7762         * disk/ata.c: Include <grub/pci.h>.
7763         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7764         (grub_ata_initialize): Rewritten.
7765         (grub_ata_device_initialize): New function.
7767 2008-08-04  Pavel Roskin  <proski@gnu.org>
7769         * kern/main.c: Include grub/mm.h.
7771 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7773         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7774         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7775         corruption problem).
7777 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7779         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7780         warnings introduced in my last commit.
7782 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7784         Make PCI available on all i386 architectures.
7786         * include/grub/i386/pc/pci.h: Move from here ...
7787         * include/grub/i386/pci.h: ... to here.
7789         * include/grub/i386/pc/pci.h: Remove.
7790         * include/grub/i386/efi/pci.h: Remove.
7791         * include/grub/x86_64/efi/pci.h: Remove.
7793         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7794         `<grub/cpu/pci.h>'.
7796         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7797         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7798         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7800         * conf/i386-ieee1275.rmk: Likewise.
7802 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7804         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7805         (grub_console_setcursor): Make it possible to set cursor off.
7807 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7809         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
7810         of modules instead of assuming which platform provides what.
7811         * util/update-grub.in: Likewise.
7813 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7815         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7816         instead of `grub_install_dos_part' to determine whether a drive needs
7817         to be prepended to prefix (`grub_install_dos_part' is not reliable,
7818         because it can be overridden when loading GRUB via Multiboot).
7820 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7822         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7824 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7826         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7827         of informational grub_dprintf() calls.
7829 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7831         * disk/memdisk.c (memdisk_size): Don't initialize.
7832         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7834         * include/grub/i386/pc/kernel.h
7835         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7836         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7837         (grub_memdisk_image_size, grub_arch_memdisk_addr)
7838         (grub_arch_memdisk_size): Remove.
7840         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7841         field (was only used to transfer a constant).  Add `type' field to
7842         support multiple module types.
7843         (grub_module_iterate): New function.
7845         * kern/device.c (grub_device_open): Do not hide error messages
7846         when grub_disk_open() fails.  Use grub_print_error() instead.
7848         * kern/i386/pc/init.c (grub_arch_modules_addr)
7849         (grub_arch_memdisk_size): Remove functions.
7850         (grub_arch_modules_addr): Return the module address in high memory
7851         (now that it isn't copied anymore).
7853         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7854         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7855         decompression routine (grub_total_module_size already includes that
7856         now).  Don't copy modules back to low memory.
7858         * kern/main.c: Include `<grub/mm.h>'.
7859         (grub_load_modules): Split out (and use) ...
7860         (grub_module_iterate): ... this function, which iterates through
7861         module objects and runs a hook.
7862         Comment out grub_mm_init_region() call, as it would cause non-ELF
7863         modules to be overwritten.
7865         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7866         the memdisk image in its own region, make it part of the module list.
7867         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7868         (main): Parse --memdisk|-m option, and pass user-provided path as
7869         parameter to generate_image().
7870         (add_segments): Pass `memdisk_path' down to load_modules().
7871         (load_modules): Embed memdisk image in module section when requested.
7872         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7873         `header.type' instead of `header.offset'.
7875         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7876         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7877         (memdisk_mod_LDFLAGS): New variables.
7878         * conf/i386-coreboot.rmk: Likewise.
7879         * conf/i386-ieee1275.rmk: Likewise.
7881 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7883         * loader/i386/pc/multiboot.c (playground, forward_relocator)
7884         (backward_relocator): New variables.  Used to allocate and relocate
7885         the payload, respectively.
7886         (grub_multiboot_load_elf32): Load into heap instead of requested
7887         address, install the appropriate relocator code in each bound of
7888         the payload, and set the entry point such that
7889         grub_multiboot_real_boot() will jump to one of them.
7891         * kern/i386/loader.S (grub_multiboot_payload_size)
7892         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7893         (grub_multiboot_payload_entry_offset): New variables.
7894         (grub_multiboot_real_boot): Set cpu context to what the relocator
7895         expects, and jump to the relocator instead of the payload.
7897         * include/grub/i386/loader.h (grub_multiboot_payload_size)
7898         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7899         (grub_multiboot_payload_entry_offset): Export.
7901 2008-08-01  Bean  <bean123ch@gmail.com>
7903         * normal/menu_entry.c (editor_getline): Don't return the original
7904         string as result, as it will be released by lexer once it has done
7905         using it.
7907 2008-08-01  Robert Millan  <rmh@aybabtu.com>
7909         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7910         within menuentries, not before them.
7911         util/grub.d/10_hurd.in: Likewise.
7913 2008-08-01  Bean  <bean123ch@gmail.com>
7915         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7916         (bufio_mod_SOURCES): New macro.
7917         (bufio_mod_CFLAGS): Likewise.
7918         (bufio_mod_LDFLAGS): Likewise.
7920         * include/grub/bufio.h: New file.
7922         * io/bufio.c: Likewise.
7924         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7925         (grub_video_reader_png): Use grub_buffile_open to open file.
7927         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7928         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7930         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7931         (grub_video_reader_tga): Use grub_buffile_open to open file.
7933         * font/manager.c: Include <grub/bufio.h>.
7934         (add_font): Use grub_buffile_open to open file.
7936 2008-07-31  Robert Millan  <rmh@aybabtu.com>
7938         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7939         ELF segments, use a macro for arbitrarily accessing any of them instead
7940         of preparing a pointer that allows access to one at a time.
7941         (grub_multiboot_load_elf64): Likewise.
7943 2008-07-31  Bean  <bean123ch@gmail.com>
7945         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7946         GRUB_KERNEL_MACHINE_DATA_END.
7948 2008-07-30  Robert Millan  <rmh@aybabtu.com>
7950         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7951         Increase from 0x50 to 0x60.
7952         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7953         use UUIDs to identify the root drive for them.  If that's not
7954         possible, abort.
7955         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
7956         check, for cross-disk installs.
7958 2008-07-30  Robert Millan  <rmh@aybabtu.com>
7960         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
7961         is non-empty, use it to set the `prefix' environment variable instead
7962         of the usual approach.
7963         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
7964         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
7965         environment variable instead of dummy make_install_device().
7967         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
7968         (start): Insert a data section, with `grub_prefix' variable.
7969         * kern/i386/linuxbios/startup.S: Likewise.
7971         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
7972         New variable reference.
7973         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
7974         New macro.  Defines offset of `grub_prefix' within startup.S (relative
7975         to `start').
7976         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
7977         section within startup.S (relative to `start').
7978         * include/grub/i386/coreboot/kernel.h: Likewise.
7980         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
7981         Overwrite grub_prefix with its contents, at the beginning of the
7982         first segment.
7983         (main): Understand -p|--prefix.
7985 2008-07-30  Robert Millan  <rmh@aybabtu.com>
7987         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
7989 2008-07-30  Robert Millan  <rmh@aybabtu.com>
7991         * term/i386/pc/vga_text.c (grub_console_cls): Use
7992         grub_console_gotoxy() to go back to beginning of the screen.
7993         Found by Patrick Georgi <patrick.georgi@coresystems.de>
7995 2008-07-29  Christian Franke  <franke@computer.org>
7997         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7998         Add conversion of emulated mount points on Cygwin.
8000 2008-07-29  Christian Franke  <franke@computer.org>
8002         * util/update-grub.in: Add a check for admin
8003         group on Cygwin.
8004         Remove old `grub.cfg.new' before creation.
8005         Add `-f' to `mv' to handle the different filesystem
8006         semantics of Windows.
8008 2008-07-29  Bean  <bean123ch@gmail.com>
8010         * normal/main.c (get_line): Fix buffer overflow bug.
8012 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8014         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8015         (struct grub_apple_header): New struct.  Describes the layout of
8016         the partmap header.
8017         (apple_partition_map_iterate): Check the header magic as well as the
8018         partition magic (which was already being checked).
8020 2008-07-28  Pavel Roskin  <proski@gnu.org>
8022         * genmk.rb: Add a warning to the beginning of the output that
8023         it's a generated file and should not be edited.
8025 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8027         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8028         with the same number are found, just use issue a warning with
8029         grub_dprintf(), as this error has been reported to be non-fatal.
8031 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8033         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8034         information.
8036 2008-07-27  Bean  <bean123ch@gmail.com>
8038         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8039         (grub_fat_find_dir): Ignore case when comparing filename.
8041 2008-07-27  Bean  <bean123ch@gmail.com>
8043         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8044         smallino, as it's more descriptive, and i8count can be confused with
8045         the other field count.
8046         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8047         inode type.
8049 2008-07-27  Bean  <bean123ch@gmail.com>
8051         * commands/crc.c: New file.
8053         * lib/crc.c: Likewise.
8055         * include/grub/lib/crc.h: Likewise.
8057         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8059         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8060         (hexdump): Move this function to ...
8062         * lib/hexdump.c: ... here.
8064         * include/grub/hexdump.h: Renamed to ...
8066         * include/grub/lib/hexdump.h: ... this.
8068         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8070         * util/grub-editenv.c: Likewise.
8072         * include/envblk.h: Renamed to ...
8074         * include/lib/envblk.h: ... this.
8076         * util/envblk.c: Renamed to ...
8078         * lib/envblk.c: ... this.
8080         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8081         lib/hexdump.c.
8082         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8083         (pkglib_MODULES): Add crc.mod.
8084         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8085         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8086         (crc_mod_SOURCES): New macro.
8087         (crc_mod_CFLAGS): Likewise.
8088         (crc_mod_LDFLAGS): Likewise.
8090         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8092         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8094         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8096         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8098         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8100 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8102         * commands/help.c: Include <grub/term.h>.
8103         (TERM_WIDTH): Removed.  Updated all users.
8105 2008-07-27  Pavel Roskin  <proski@gnu.org>
8107         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8108         spurious warnings about a comment within a comment.
8110 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8112         * util/getroot.c (find_root_device): Skip devices that match
8113         /dev/dm-[0-9].  This lets the real device be found for any type of
8114         abstraction (LVM, EVMS, RAID..).
8115         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8116         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8117         device is found first, find_root_device() will now skip it.
8119 2008-07-24  Pavel Roskin  <proski@gnu.org>
8121         * include/grub/types.h: Use __builtin_bswap32() and
8122         __builtin_bswap64() with gcc 4.3 and newer.
8124 2008-07-24  Christian Franke  <franke@computer.org>
8126         * util/i386/pc/grub-install.in: If `--debug' is specified,
8127         pass `--verbose' to grub-setup.
8128         Abort script if make_system_path_relative_to_its_root() fails.
8130 2008-07-24  Bean  <bean123ch@gmail.com>
8132         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8133         variable `target_platform' should be `platform'.
8135 2008-07-24  Bean  <bean123ch@gmail.com>
8137         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8138         (grub_png_init_fixed_block): New function.
8139         (grub_png_decode_image_data): Handle fixed huffman code compression.
8141 2008-07-24  Bean  <bean123ch@gmail.com>
8143         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8144         (grub_pe2elf_SOURCES): New macro.
8145         (CLEANFILES): Add grub-pe2elf.
8147         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8148         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8149         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8150         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8151         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8152         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8153         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8154         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8155         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8156         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8157         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8158         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8159         (GRUB_PE32_DT_FUNCTION): Likewise.
8160         (GRUB_PE32_REL_I386_DIR32): Likewise.
8161         (GRUB_PE32_REL_I386_REL32): Likewise.
8162         (grub_pe32_symbol): New structure.
8163         (grub_pe32_reloc): Likewise.
8165         * util/grub-pe2elf.c: New file.
8167         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8168         start symbol in non pc platform.
8170         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8172         The following patches are from Christian Franke.
8174         * include/grub/dl.h: Remove .previous, gas supports this only
8175         for ELF format.
8177         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8178         Remove .type, gas supports this only for ELF format.
8180         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8181         nullbytes in symbol table. This fixes an infinite loop if table is
8182         zero filled.
8184         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8185         TARGET_IMG_LDFLAGS and EXEEXT.
8187         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8188         TARGET_IMG_LDFLAGS_AC.
8189         (grub_CHECK_STACK_ARG_PROBE): New function.
8191         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8193         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8195         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8196         to set TARGET_IMG_LD* accordingly.
8197         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8198         Add call to grub_CHECK_STACK_ARG_PROBE.
8199         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8201         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8203         * genmk.rb: Add EXEEXT to CLEANFILES.
8205 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8207         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8208         define the codes for arrows and lines used for the menu).
8209         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8210         as well.
8212         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8213         fonts, because the latter are too slow.
8215 2008-07-21  Bean  <bean123ch@gmail.com>
8217         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8218         a20. Run keyboard test last, as it will cause macbook to halt.
8220 2008-07-18  Pavel Roskin  <proski@gnu.org>
8222         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8223         load foreign architecture modules correctly anyway.  Keep
8224         support for loading host architecture modules, whether we
8225         compile them or not.
8227 2008-07-17  Pavel Roskin  <proski@gnu.org>
8229         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8230         change target_cpu.  The compiler default can mismatch target_cpu
8231         in any case.
8233         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8234         * kern/efi/efi.c: Likewise.
8236         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8237         target compiler is functional.
8238         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8239         are set up.
8241         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8242         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8243         adjustments from the rest, only do them if target is not
8244         explicitly given.  Merge other adjustments with the final sanity
8245         check.  Remove an extraneous check for supported CPU.  Be
8246         specific which CPU and which platform is not supported.
8248         * configure.ac: Default to pc platform for x86_64.
8250 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8252         Partial LinuxBIOS -> Coreboot rename.
8254         * conf/i386-linuxbios.rmk: Renamed to ...
8255         * conf/i386-coreboot.rmk: ... this.
8256         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8257         * configure.ac: Accept "coreboot" as input platform (but maintain
8258         compatibility with "linuxbios").
8259         * include/grub/i386/linuxbios: Renamed to ...
8260         * include/grub/i386/coreboot: ... this.
8262 2008-07-17  Bean  <bean123ch@gmail.com>
8264         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8265         (appleldr_mod_SOURCE): New variable.
8266         (appleldr_mod_CFLAGS): Likewise.
8267         (appleldr_mod_LDFLAGS): Likewise.
8268         (pci_mod_SOURCES): Likewise.
8269         (pci_mod_CFLAGS): Likewise.
8270         (pci_mod_LDFLAGS): Likewise.
8271         (lspci_mod_SOURCES): Likewise.
8272         (lspci_mod_CFLAGS): Likewise.
8273         (lspci_mod_LDFLAGS): Likewise.
8275         * conf/x86_64-efi.rmk: New file.
8277         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8278         macro.
8279         (grub_efidisk_write): Likewise.
8281         * include/efi/api.h (efi_call_0): New macro.
8282         (efi_call_1): Likewise.
8283         (efi_call_2): Likewise.
8284         (efi_call_3): Likewise.
8285         (efi_call_4): Likewise.
8286         (efi_call_5): Likewise.
8287         (efi_call_6): Likewise.
8289         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8290         grub_rescue_cmd_chainloader.
8292         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8293         (grub_pe32_optional_header): Change some fields based on i386 or
8294         x86_64 platform.
8295         (GRUB_PE32_PE32_MAGIC): Likewise.
8297         * include/grub/efi/uga_draw.h: New file.
8299         * include/grub/elf.h (STN_ABS): New constant.
8300         (R_X86_64_NONE): Relocation constant for x86_64.
8301         (R_X86_64_64): Likewise.
8302         (R_X86_64_PC32): Likewise.
8303         (R_X86_64_GOT32): Likewise.
8304         (R_X86_64_PLT32): Likewise.
8305         (R_X86_64_COPY): Likewise.
8306         (R_X86_64_GLOB_DAT): Likewise.
8307         (R_X86_64_JUMP_SLOT): Likewise.
8308         (R_X86_64_RELATIVE): Likewise.
8309         (R_X86_64_GOTPCREL): Likewise.
8310         (R_X86_64_32): Likewise.
8311         (R_X86_64_32S): Likewise.
8312         (R_X86_64_16): Likewise.
8313         (R_X86_64_PC16): Likewise.
8314         (R_X86_64_8): Likewise.
8315         (R_X86_64_PC8): Likewise.
8317         * include/grub/i386/efi/pci.h: New file.
8319         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8320         Change it value based on platform.
8321         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8322         (GRUB_E820_RAM): Likewise.
8323         (GRUB_E820_RESERVED): Likewise.
8324         (GRUB_E820_ACPI): Likewise.
8325         (GRUB_E820_NVS): Likewise.
8326         (GRUB_E820_EXEC_CODE): Likewise.
8327         (GRUB_E820_MAX_ENTRY): Likewise.
8328         (grub_e820_mmap): New structure.
8329         (linux_kernel_header): Change the efi field according to different
8330         kernel version, also field from linux_kernel_header.
8332         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8334         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8335         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8336         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8337         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8338         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8339         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8340         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8341         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8342         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8343         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8345         * include/grub/x86_64/efi/kernel.h: New file.
8347         * include/grub/x86_64/efi/loader.h: Likewise.
8349         * include/grub/x86_64/efi/machine.h: Likewise.
8351         * include/grub/x86_64/efi/pci.h: Likewise.
8353         * include/grub/x86_64/efi/time.h: Likewise.
8355         * include/grub/x86_64/linux.h: Likewise.
8357         * include/grub/x86_64/setjmp.h: Likewise.
8359         * include/grub/x86_64/time.h: Likewise.
8361         * include/grub/x86_64/types.h: Likewise.
8363         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8364          GRUB_TARGET_SIZEOF_VOID_P.
8366         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8367         (grub_efi_locate_handle): Likewise.
8368         (grub_efi_open_protocol): Likewise.
8369         (grub_efi_set_text_mode): Likewise.
8370         (grub_efi_stall): Likewise.
8371         (grub_exit): Likewise.
8372         (grub_reboot): Likewise.
8373         (grub_halt): Likewise.
8374         (grub_efi_exit_boot_services): Likewise.
8375         (grub_get_rtc): Likewise.
8377         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8378         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8379         (grub_efi_allocate_pages): Wrap efi calls.
8380         (grub_efi_free_pages): Wrap efi calls.
8381         (grub_efi_get_memory_map): Wrap efi calls.
8383         * kern/x86_64/dl.c: New file.
8385         * kern/x86_64/efi/callwrap.S: Likewise.
8387         * kern/x86_64/efi/startup.S: Likewise.
8389         * loader/efi/appleloader.c: Likewise.
8391         * loader/efi/chainloader.c (cmdline): New variable.
8392         (grub_chainloader_unload): Wrap efi calls.
8393         (grub_chainloader_boot): Likewise.
8394         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8395         command line.
8397         * loader/efi/chainloader_normal.c (chainloader_command):
8398         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8399         command line.
8401         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8402         method.
8403         (grub_e820_add_region): New function.
8404         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8405         booting.
8406         (grub_find_video_card): New function.
8407         (grub_linux_setup_video): New function.
8408         (grub_rescue_cmd_linux): Probe for video information.
8410         * normal/x86_64/setjmp.S: New file.
8412         * term/efi/console.c (map_char): New function.
8413         (grub_console_putchar): Map unicode char.
8414         (grub_console_checkkey): Wrap efi calls.
8415         (grub_console_getkey): Likewise.
8416         (grub_console_getwh): Likewise.
8417         (grub_console_gotoxy): Likewise.
8418         (grub_console_cls): Likewise.
8419         (grub_console_setcolorstate): Likewise.
8420         (grub_console_setcursor): Likewise.
8422         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8424 2008-07-16  Pavel Roskin  <proski@gnu.org>
8426         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8427         format strings.
8429         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8430         pointer, not an integer.  This fixes a warning and prevents
8431         precision loss on 64-bit systems.
8432         (relocate_addresses): Remove unneeded cast.
8434 2008-07-15  Pavel Roskin  <proski@gnu.org>
8436         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8438         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8440         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8441         Fix comparison between signed and unsigned.
8443         * include/grub/i386/ieee1275/console.h: Declare
8444         grub_console_init() and grub_console_fini().
8446         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8447         It's empty and unused.
8449         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8450         beginning to avoid warnings with some compilers.
8452         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8453         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8455 2008-07-14  Pavel Roskin  <proski@gnu.org>
8457         * kern/env.c (grub_register_variable_hook): Don't copy empty
8458         string, it leaks memory.  Pass "" to grub_env_set(), it should
8459         handle constant strings.
8461         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8462         * commands/cmp.c (grub_cmd_cmp): Likewise.
8463         * kern/dl.c (grub_dl_flush_cache): Likewise.
8464         (grub_dl_load_core): Likewise.
8465         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8466         (grub_elf64_load_phdrs): Likewise.
8468 2008-07-13  Pavel Roskin  <proski@gnu.org>
8470         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8471         between signed and unsigned.
8472         (LzmaEnc_Finish): Fix warning about an unused parameter.
8474 2008-07-13  Bean  <bean123ch@gmail.com>
8476         * Makefile.in (enable_lzo): New rule.
8478         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8480         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8482         * boot/i386/pc/lnxboot.S: #include <config.h>.
8484         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8485         its value according to the compression algorithm used, lzo or lzma.
8487         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8488         compression algorithm according to configure macro.
8490         * kern/i386/pc/startup.S (codestart): Likewise.
8492         * kern/i386/pc/lzma_decode.S: New file.
8494         * include/grub/lib/LzFind.h: Likewise.
8496         * include/grub/lib/LzHash.h: Likewise.
8498         * include/grub/lib/LzmaDec.h: Likewise.
8500         * include/grub/lib/LzmaEnc.h: Likewise.
8502         * include/grub/lib/LzmaTypes.h: Likewise.
8504         * lib/LzFind.c: Likewise.
8506         * lib/LzmaDec.c: Likewise.
8508         * lib/LzmaEnc.c: Likewise.
8510 2008-07-13  Bean  <bean123ch@gmail.com>
8512         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8513         (grub_ext4_extent_header): New structure.
8514         (grub_ext4_extent): Likewise.
8515         (grub_ext4_extent_idx): Likewise.
8516         (grub_ext4_find_leaf): New function.
8517         (grub_ext2_read_block): Handle extents.
8519 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8521         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8523 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8525         * util/grub.d/40_custom.in: New file. Example on how to add custom
8526         entries to /etc/grub.d.
8527         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8528         40_custom (implicitly, by merging all the grub.d rules).
8530 2008-07-11  Pavel Roskin  <proski@gnu.org>
8532         * commands/read.c (grub_getline): Fix invalid memory access.
8533         Don't add newline to the variable value.
8535         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8536         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8537         (serial_hw_get_port): Check validity of the port number.
8538         (grub_cmd_serial): Check return value of serial_hw_get_port().
8540 2008-07-07  Pavel Roskin  <proski@gnu.org>
8542         * boot/i386/pc/diskboot.S (notification_string): Replace
8543         "Loading kernel" with just "loading".  This is shorter, less
8544         confusing and saves a few bytes for possible future changes.
8546 2008-07-05  Pavel Roskin  <proski@gnu.org>
8548         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8549         size for ATAPI devices, they are undefined.  Output sector
8550         number in decimal form.
8552         * disk/ata.c: Use named constants for status bits.
8554 2008-07-04  Pavel Roskin  <proski@gnu.org>
8556         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8557         grub_addr_t before casting it to the void pointer to fix a
8558         warning.  Non-addressable regions are discarded earlier.
8559         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8560         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8561         (check_signature): Don't shadow table_header.
8562         (grub_linuxbios_table_iterate): Cast numeric constants to
8563         grub_linuxbios_table_header_t.
8564         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8565         grub_stop().
8567         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8568         prevent warnings.
8570         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8571         pointer, which can cause warnings.  Support 64-bit addresses.
8573         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8574         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8576 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8578         This fixes a performance issue when pc & gpt partmap iterators
8579         didn't abort iteration even after our hook found what it was
8580         looking for (often causing expensive probes of non-existent drives).
8582         Some callers relied on previous buggy behaviour, since they would
8583         raise an error when their own hooks caused early abortion of its
8584         iteration.
8586         * kern/device.c (grub_device_open): Improve error message.
8587         * disk/lvm.c (grub_lvm_open): Likewise.
8588         * disk/raid.c (grub_raid_open): Likewise.
8590         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8591         when hook requests it, independently of grub_errno.
8592         (pc_partition_map_probe): Do not fail when find_func() caused
8593         early abortion of pc_partition_map_iterate().
8595         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8596         when hook requests it, independently of grub_errno.
8597         (gpt_partition_map_probe): Do not fail when find_func() caused
8598         early abortion of gpt_partition_map_iterate().
8600         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8601         when hook requests it, independently of grub_errno.  Do not fail when
8602         part_map_iterate_hook() caused early abortion of p->iterate().
8604         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8605         when grub_partition_iterate() returned with non-zero.
8607 2008-07-03  Pavel Roskin  <proski@gnu.org>
8609         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8610         like we do in grub_ata_pio_read().
8611         (grub_ata_readwrite): Always write individual sectors.  Fix the
8612         sector count for the remainder.
8613         (grub_ata_write): Enable writing to ATA devices.  Correctly
8614         report error for ATAPI devices.
8616 2008-07-02  Pavel Roskin  <proski@gnu.org>
8618         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8619         warning.
8621         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8622         for every read sector, we already increment it for the whole
8623         batch.  This fixes reading more than 256 sectors at once.
8625         * util/grub-editenv.c (cmd_info): Cast argument to long
8626         explicitly.  ptrdiff_t reduces to int on i386.
8628         * util/grub-editenv.c (main): Be specific which parameter is
8629         missing.
8631         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8632         (memdisk): Make memdisk_orig_addr a pointer.
8634         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8635         for file offsets, use grub_off_t instead.  Fix printf format
8636         warnings.
8638         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8639         there.  Real unexpected warnings should not drown in the noise
8640         about known problems.
8642         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8643         grub_disk_addr_t for memory addresses.
8645         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8646         explicitly to fix a warning.
8648         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8650         * Makefile.in (MODULE_LDFLAGS): New variable.
8651         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
8652         the linker accepts --build-id=none.
8653         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
8654         MODULE_LDFLAGS.
8655         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8657         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8658         those in Linux XFS code.  Provide a way to access 64-bit parent
8659         inode.
8660         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
8661         the end of struct grub_xfs_dir_header.
8663 2008-07-02  Bean  <bean123ch@gmail.com>
8665         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8666         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8667         and GRUB_IEEE1275_FLAG_NO_ANSI.
8669         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8670         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8671         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8673         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8674         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8676         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8677         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8679         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8680         esc sequence on non ANSI terminal.
8681         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8683         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8684         beginning of file.
8686 2008-07-02  Bean  <bean123ch@gmail.com>
8688         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8689         (grub_editenv_SOURCES): New variable.
8690         (pkglib_MODULES): Add loadenv.mod.
8691         (loadenv_mod_SOURCES): New variable.
8692         (loadenv_mod_CFLAGS): Likewise.
8693         (loadenv_mod_LDFLAGS): Likewise.
8695         * include/grub/envblk.h: New file.
8697         * util/envblk.c: New file.
8699         * util/grub-editenv.c: New file.
8701         * commands/loadenv.c: New file.
8703 2008-07-01  Pavel Roskin  <proski@gnu.org>
8705         * include/multiboot2.h (struct multiboot_tag_module): Use char,
8706         not unsigned char.  This fixes warnings and is consistent with
8707         other tags.
8709         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8711         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8713         * term/tparm.c (analyze): Always set *popcount.
8715         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8716         cast to fix a warning.
8718         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8719         cast to suppress a warning.
8721         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8722         grub_fshelp_read_file() expects.
8724         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
8725         write uuid as a 32-bit value in CPU byte order, so declare and
8726         use it as such.
8728         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8729         long if the format specifier expects it.
8730         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8731         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8732         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8733         long to fix a warning.
8734         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8735         grub_dprintf() arguments to fix warnings.
8737 2008-06-30  Pavel Roskin  <proski@gnu.org>
8739         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8740         install_bsd_part immediately before core.img is embedded or
8741         modified on disk.  This fixes core.img verification if core.img
8742         cannot be embedded.
8744         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8745         core_path to calculate the blocklist.
8746         Patch from Javier Martín <lordhabbit@gmail.com>
8748 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8750         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
8751         block to disk block.
8752         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8753         Patch from Niels Böhm <bitbucket@arcor.de>
8755 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8757         * util/update-grub_lib.in (font_path): Search for fonts in
8758         /boot/grub first, which is more likely to be readable (we aren't
8759         deciding where fonts live, just looking for them).
8761 2008-06-26  Pavel Roskin  <proski@gnu.org>
8763         * util/biosdisk.c (read_device_map): Don't leave dead map
8764         entries for devices failing stat() check.
8766         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8767         core_path_dev for the core.img path on the target device.
8769 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8771         * disk/fs_uuid.c: New file.
8772         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8773         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8774         (fs_uuid_mod_LDFLAGS): New variables.
8775         * include/grub/disk.h (grub_disk_dev_id): Add
8776         `GRUB_DISK_DEVICE_UUID_ID'.
8777         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8778         implement iterate().
8780 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8782         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8783         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8784         Linux image includes no initrd.
8786 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
8788         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8789         call to resolve the core image location that effectively appended the
8790         name twice.
8792 2008-06-21  Robert Millan  <rmh@aybabtu.com>
8794         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8795         call from here ...
8797         * util/grub.d/10_hurd.in: ... to here ...
8798         * util/grub.d/10_linux.in: ... and here.
8800 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8802         * kern/main.c (grub_main): Export `prefix' variable immediately
8803         after it has been set by grub_machine_set_prefix().
8805 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8807         * commands/search.c (search_label, search_fs_uuid, search_file): Print
8808         search result when not saving to variable, not the other way around.
8809         When saving to variable, abort iteration as soon as a match is found.
8811 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8813         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8814         check for partition that provides /boot/grub.  Its logic is flawed,
8815         as it prevents prepare_grub_to_access_device() from being called
8816         multiple times.
8818 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8820         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8821         "insmod" command directly when abstraction modules are needed,
8822         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8823         since it had already been processed).
8825 2008-06-19  Pavel Roskin  <proski@gnu.org>
8827         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8828         changed.  This is needed in case GRUB_LIBDIR changes.
8829         * conf/i386-ieee1275.rmk: Likewise.
8830         * conf/i386-linuxbios.rmk: Likewise.
8831         * conf/i386-pc.rmk: Likewise.
8832         * conf/powerpc-ieee1275.rmk: Likewise.
8834 2008-06-18  Pavel Roskin  <proski@gnu.org>
8836         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8837         kernel_elf_symlist.c to symlist.c for consistency with other
8838         architectures.  Update all users.
8839         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8841 2008-06-18  Robert Millan  <rmh@aybabtu.com>
8843         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8844         it in prefix.
8846         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
8847         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
8848         a RAID device, run setup() for all members independently on whether
8849         LVM abstraction is being used.
8850         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8851         If grub-mkimage has set `*install_dos_part == -2', don't override this
8852         value.
8853         Perform *install_dos_part adjustments independently on whether
8854         we're embedding or not.
8855         Clarify error message when image is too big for embedding.
8856         Remove duplicate *install_dos_part stanza.
8858 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8860         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8861         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8862         variables.
8863         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8864         values in grub_ofconsole_normal_color and
8865         grub_ofconsole_highlight_color (they're not directly related to
8866         background and foreground).
8867         (grub_ofconsole_setcolorstate): Extract background and foreground
8868         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8870 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8872         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8873         /boot/grub for the check in last commit, not /boot (they could be
8874         different partitions).
8876 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8878         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8879         asked to setup access for the same partition that provides /boot,
8880         don't bother using UUIDs since our root already has the value we
8881         want.
8883 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8885         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8886         I2O devices.
8887         Patch from Sven Mueller <sven@debian.org>.
8889 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8891         * util/update-grub.in: Check for $EUID instead of $UID.
8892         Reported by Vincent Zweije.
8894 2008-06-16  Bean  <bean123ch@gmail.com>
8896         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8897         (grub_ext2_read_block): Likewise.
8898         (grub_ext2_read_inode): Likewise.
8899         (grub_ext2_mount): Likewise.
8900         (grub_ext2_close): Likewise.
8901         (grub_ext3_get_journal): Removed.
8903         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8904         (grub_reiserfs_read_symlink): Likewise.
8905         (grub_reiserfs_mount): Likewise.
8906         (grub_reiserfs_open): Likewise.
8907         (grub_reiserfs_read): Likewise.
8908         (grub_reiserfs_close): Likewise.
8909         (grub_reiserfs_get_journal): Removed.
8911         * fs/fshelp.c (grub_fshelp_read): Removed.
8912         (grub_fshelp_map_block): Likewise.
8914         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8915         (grub_fshelp_journal): Likewise.
8916         (grub_fshelp_read): Likewise.
8917         (grub_fshelp_map_block): Likewise.
8919 2008-06-16  Pavel Roskin  <proski@gnu.org>
8921         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8922         floating point anymore.
8923         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8925 2008-06-15  Pavel Roskin  <proski@gnu.org>
8927         * commands/ls.c (grub_ls_list_files): Use integer calculations
8928         for human readable format, avoid floating point use.
8929         * kern/misc.c (grub_ftoa): Remove.
8930         (grub_vsprintf): Remove floating point support.
8932 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8934         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8935         devices.
8936         Reported by Max Vozeler.
8938 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8940         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8941         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8942         skipped later.
8943         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8944         the beginning of the prefix.
8946         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8947         It is assumed that if we have a memdisk, grub-mkimage has set
8948         grub_prefix to include the "(memdisk)" drive in it.
8950 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8952         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8953         Initialize keyboard controller after registering the terminal, so that
8954         grub_printf() can be called from grub_keyboard_controller_init().
8956 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8958         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
8959         extent-btree which is written as big endian on disk.
8960         Reported by Alain Greppin  <al@chilibi.org>.
8962 2008-06-14  Robert Millan  <rmh@aybabtu.com>
8964         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
8965         * util/i386/pc/grub-install.in (modules): Likewise.
8967 2008-06-13  Pavel Roskin  <proski@gnu.org>
8969         * commands/ls.c (grub_ls_list_files): Fix format warnings.
8971 2008-06-13  Bean  <bean123ch@gmail.com>
8973         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
8975         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
8977         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
8978         to indicate sparse block.
8980 2008-06-12  Pavel Roskin  <proski@gnu.org>
8982         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
8983         number, grub_fshelp_read() does it for us.
8985         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
8986         linear disk read with journal translation.
8987         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
8988         * include/grub/fshelp.h: Declare grub_fshelp_read().
8990 2008-06-09  Pavel Roskin  <proski@gnu.org>
8992         * fs/minix.c (grub_minix_mount): Handle error reading
8993         superblock.
8995 2008-06-08  Robert Millan  <rmh@aybabtu.com>
8997         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
8998         don't append the RAID prefix afterwards.
8999         Reported by Clint Adams.
9001 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9003         Based on description from Pavel:
9004         * kern/disk.c (grub_disk_check_range): Rename to ...
9005         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9006         tasks performed by this function.
9008 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9010         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9011         `num_serial' (for consistency with other variables).
9012         (struct grub_ntfs_data): Add `uuid' member.
9013         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9014         (grub_ntfs_uuid): New function.
9015         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9017 2008-06-07  Pavel Roskin  <proski@gnu.org>
9019         * util/biosdisk.c (open_device): Revert last change to the
9020         function, it broke installation.  The sector needs to be
9021         different dependent on which device is opened.
9023 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9025         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9026         rest of GRUB, and breakage doesn't happen if its value were modified.
9028         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9029         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9030         a constant (same value).
9031         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9032         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9034 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9036         * util/biosdisk.c (open_device): Do not modify sector offset when
9037         accessing a partition.  kern/disk.c already handles this for us.
9039 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9041         * util/grub-emu.c (grub_machine_init): Move code in this function from
9042         here ...
9043         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9044         segfault in case grub_printf() is called).
9046         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9047         grub_probe.  Update all users not to explicitly add it again.
9048         (grub_device): New variable; contains corresponding device for grubdir.
9049         (fs_module, partmap_module, devabstraction_module): Pass
9050         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9051         every time.
9053 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9055         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9056         is found, print it (same layout as with labels).
9058 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9060         * util/biosdisk.c (get_drive): Rename to ...
9061         (find_grub_drive): ... this.  Update all users.
9063         (get_os_disk): Rename to ...
9064         (convert_system_partition_to_system_disk): ... this.  Update all users.
9066         (find_drive): Rename to ...
9067         (find_system_device): ... this.  Update all users.
9069 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9071         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9072         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9073         (make_device_map): Likewise.
9075 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9077         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9078         before dereferencing it.
9080         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9081         union with fat12/fat16-specific ones.  Add some new fields, including
9082         `num_serial' for both versions.
9083         (struct grub_fat_data): Add `uuid' member.
9084         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9085         names.  Initialize `data->uuid' using `num_serial'.
9086         (grub_fat_uuid): New function.
9087         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9089         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9090         (grub_reiserfs_uuid): New function.
9091         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9092         member.
9094         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9095         (grub_xfs_uuid): New function.
9096         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9098 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9100         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9101         code that is backward compatible with pre-uuid search command.
9103 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9105         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9106         floppies after everything else, to ensure floppy drive isn't accessed
9107         unnecessarily (patch from Bean).
9109 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9111         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9112         not print device names when we were asked to set a variable.
9114 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9116         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9117         using "cursor-on" and "cursor-off" commands (understood at least by
9118         the Open Firmware flavour on OLPC).
9120 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9122         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9123         on and off sequences.
9125 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9127         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9128         * util/update-grub.in: Likewise.
9130 2008-05-30  Pavel Roskin  <proski@gnu.org>
9132         * util/biosdisk.c (linux_find_partition): Simplify logic and
9133         make the code more universal.  Keep special processing for
9134         devfs, but use a simple rule for all other devices.  If the
9135         device ends with a number, append 'p' and the partition number.
9136         Otherwise, append only the partition number.
9138 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9140         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9141         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9142         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9143         the `root' parameter to Linux.
9145 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9147         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9148         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9149         --fs_uuid with --fs-uuid.
9150         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9151         all filesystems support them).
9153 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9155         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9156         grub_printf() flags, since we're printing in units of 2 bytes.
9158 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9160         * util/grub.d/00_header.in: Remove obsolete comment referencing
9161         convert_system_path_to_grub_path().
9162         * util/update-grub.in: Likewise.
9163         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9164         (convert_system_path_to_grub_path): Add a warning message explaining
9165         that this function is deprecated.  Rely on is_path_readable_by_grub()
9166         for the readability checks.
9167         (font_path): Use is_path_readable_by_grub() for the readability
9168         check rather than convert_system_path_to_grub_path().
9170 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9172         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9173         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9174         converting it first.
9175         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9176         grub.cfg for access to font file, and afterwards call it again to set
9177         the root device.
9179 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9181         * commands/search.c (options): Add --fs_uuid option.
9182         (search_fs_uuid): New function.
9183         (grub_cmd_search): Fix --set argument passing.
9184         Use search_fs_uuid() when requested via --fs_uuid.
9185         (grub_search_init): Update help message.
9186         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9187         and redeclare it as an array of 16-bit words.
9188         (grub_ext2_uuid): New function.
9189         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9190         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9191         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9192         (GRUB_DEVICE_BOOT_UUID): New variables.
9193         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9194         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9195         whenever possible.
9196         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9197         just assume `root' variable has the right value.
9198         * util/grub.d/10_linux.in: Likewise.
9199         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9200         via PRINT_FS_UUID.
9201         (main): Recognise `-t fs_uuid' argument.
9203 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9205         * util/biosdisk.c (map): Redefine structure to hold information
9206         about GRUB drive name.
9207         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9208         drive names.
9209         (call_hook): Remove.
9210         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9211         member.  Assume drive has partitions.
9212         (grub_util_biosdisk_open): Access device names via `.device' struct
9213         member.
9214         (open_device): Likewise.
9215         (find_drive): Likewise.
9216         (read_device_map): Adjust map[] usage to match the new struct
9217         definition.  Don't check for duplicates (still possible, but not cheap
9218         anymore).
9219         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9220         (make_device_name): Remove assumption of BIOS-like drive names.
9222 2008-05-30  Pavel Roskin  <proski@gnu.org>
9224         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9225         compiling execute.c doesn't need grub_script.tab.h anymore.
9226         (normal/command.c_DEPENDENCIES): Likewise.
9227         (normal/function.c_DEPENDENCIES): Likewise.
9228         * conf/i386-ieee1275.rmk: Likewise.
9229         * conf/i386-linuxbios.rmk: Likewise.
9230         * conf/i386-pc.rmk: Likewise.
9231         * conf/powerpc-ieee1275.rmk: Likewise.
9232         * conf/sparc64-ieee1275.rmk: Likewise.
9234 2008-05-29  Pavel Roskin  <proski@gnu.org>
9236         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9237         when scanning metadata for volume group name.
9239         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9240         a generated file, which may only be included from the files with
9241         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9242         use union YYSTYPE, as the later allows forward declaration.
9243         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9245 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9247         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9248         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9249         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9250         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9251         scan codes.
9253 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9255         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9256         control key combinations.
9258 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9260         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9261         * util/ieee1275/grub-install.in: ... to here.
9262         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9263         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9264         (grub_install_SOURCES): Likewise.
9266 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9268         * fs/affs.c: Update copyright year.
9269         * fs/ext2.c: Likewise.
9270         * fs/fshelp.c: Likewise.
9271         * fs/hfsplus.c: Likewise.
9272         * fs/ntfs.c: Likewise.
9273         * fs/xfs.c: Likewise.
9274         * include/grub/fshelp.h: Likewise.
9275         * util/grub-mkdevicemap.c: Likewise.
9277 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9279         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9280         might need to be fatfs to support some firmware implementations
9281         (e.g. OFW or EFI).
9283 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9285         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9286         devices.
9287         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9288         (make_device_map): Likewise.
9290 2008-05-20  Bean  <bean123ch@gmail.com>
9292         * fs/fshelp.c (grub_fshelp_map_block): New function.
9293         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9294         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9296         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9297         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9298         (grub_fshelp_journal): New structure.
9299         (grub_fshelp_map_block): New function prototype.
9300         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9301         (grub_fshelp_map_block): Likewise.
9303         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9304         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9305         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9306         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9307         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9308         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9309         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9310         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9311         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9312         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9313         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9314         (grub_ext2_sblock): New members for journal support.
9315         (grub_ext3_journal_header): New structure.
9316         (grub_ext3_journal_revoke_header): Likewise.
9317         (grub_ext3_journal_block_tag): Likewise.
9318         (grub_ext3_journal_sblock): Likewise.
9319         (grub_fshelp_node): New members logfile and journal.
9320         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9321         grub_fshelp_map_block to get real block number.
9322         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9323         number.
9324         (grub_ext2_read_inode): Likewise.
9325         (grub_ext3_get_journal): New function.
9326         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9327         (grub_ext2_close): Release memory used by journal.
9329         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9330         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9331         (grub_reiserfs_transaction_header): Renamed to
9332         grub_reiserfs_description_block, replace field data with real_blocks.
9333         (grub_reiserfs_commit_block): New structure.
9334         (grub_reiserfs_data): New member journal.
9335         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9336         number.
9337         (grub_reiserfs_read_symlink): Likewise.
9338         (grub_reiserfs_iterate_dir): Likewise.
9339         (grub_reiserfs_open): Likewise.
9340         (grub_reiserfs_read): Likewise.
9341         (grub_reiserfs_get_journal): New function.
9342         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9343         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9344         using grub_reiserfs_get_journal.
9345         (grub_reiserfs_close): Release memory used by journal.
9347         * fs/affs.c (grub_affs_read_block): Change block type to
9348         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9350         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9352         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9354         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9356         * fs/udf.c (grub_udf_read_block): Change block type to
9357         grub_disk_addr_t. Use type cast to avoid warning.
9359         * fs/xfs.c (grub_xfs_read_block): Likewise.
9361 2008-05-16  Christian Franke  <franke@computer.org>
9363         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9364         to ensure that break with ESC will always work.
9365         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9366         Remove ESC from keyboard queue.
9368 2008-05-16  Christian Franke  <franke@computer.org>
9370         * util/biosdisk.c: [__CYGWIN__] Add includes.
9371         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9372         (get_os_disk): Move variable declarations to OS specific
9373         parts to avoid warning.
9374         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9375         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9376         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9377         Cygwin.
9378         * util/getroot.c: [__CYGWIN__] Add includes.
9379         (strip_extra_slashes): Fix "/" case.
9380         [__CYGWIN__] (get_win32_path): New function.
9381         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9382         [__CYGWIN__] (find_root_device): Disable.
9383         [__CYGWIN__] (get_bootsec_serial): New function.
9384         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9385         [__linux__] (grub_guess_root_device): Add early returns to simplify
9386         structure.
9387         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9388         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9389         check for Linux only.
9391 2008-05-15  Bean  <bean123ch@gmail.com>
9393         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9394         keyboard hang problem in apple's intel mac.
9396 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9398         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9399         devices.
9400         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9401         (make_device_map): Likewise.
9402         Reported by Aurelien Jarno <aurel32@debian.org>
9404 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9406         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9407         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9408         (make_device_map): Output entries for xvd type disks.
9410 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9412         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9413         devices.
9414         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9415         (make_device_map): Likewise.
9416         Reported by Roland Dreier <rdreier@cisco.com>
9418 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9420         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9421         grub_strstr() call.  Correct a few mistakes in failure path handling.
9423 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9425         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9426         Do not print a trailing slash (therefore, the root directory is an
9427         empty string).
9428         (convert_system_path_to_grub_path): Do not remove trailing slash
9429         from make_system_path_relative_to_its_root() output.
9431         * util/i386/pc/grub-install.in: Add trailing slash to output from
9432         make_system_path_relative_to_its_root().
9434 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9436         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9437         ensures that output lines aren't intermangled with those sent to
9438         stderr (via grub_util_info()).
9439         * util/grub-probe.c (grub_refresh): Likewise.
9440         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9442 2008-05-05  Christian Franke  <franke@computer.org>
9444         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9445         Add Cygwin device names.
9446         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9447         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9448         (check_device): Return error instead of success on empty name.
9449         (make_device_map): Move label inside linux specific code to
9450         prevent compiler warning.
9452 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9454         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9455         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9456         first boot option.
9457         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9459 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9461         * docs/grub.cfg: New file (example GRUB configuration).
9463 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9465         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9466         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9467         and `disk/ieee1275/nand.c'.
9469 2008-04-25  Bean  <bean123ch@gmail.com>
9471         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9472         i386-linuxbios.
9474         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9475         change the buffer size to 4096 for cdrom device.
9477         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9478         and nand.mod.
9479         (_linux_mod_SOURCES): New variable.
9480         (_linux_mod_CFLAGS): Likewise.
9481         (_linux_mod_LDFLAGS): Likewise.
9482         (linux_mod_SOURCES): Likewise.
9483         (linux_mod_CFLAGS): Likewise.
9484         (linux_mod_LDFLAGS): Likewise.
9485         (nand_mod_SOURCES): Likewise.
9486         (nand_mod_CFLAGS): Likewise.
9487         (nand_mod_LDFLAGS): Likewise.
9489         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9490         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9491         type property. (nand device in olpc don't have this property)
9493         * include/grub/disk.h (grub_disk_dev_id): New macro
9494         GRUB_DISK_DEVICE_NAND_ID.
9496         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9497         function prototype.
9498         (grub_rescue_cmd_initrd): Likewise.
9500         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9501         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9502         ofw_cif_handler and ofw_idt, adjust padding number.
9504         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9505         GRUB_MACHINE_IEEE1275 is defined.
9507         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9508         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9510         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9511         on nested function heap_init.
9512         (grub_upper_mem): New variable for i386-ieee1275.
9513         (grub_get_extended_memory): New function for i386-ieee1275.
9514         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9516         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9517         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9518         property.
9520         * loader/i386/ieee1275/linux.c: New file.
9522         * loader/i386/ieee1275/linux_normal.c: New file.
9524         * disk/ieee1275/nand.c: New file.
9526 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9528         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9529         value.
9530         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9532 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9534         Restructures early code path on ieee1275 to unify grub_main() as
9535         the first C function that is executed in every platform.
9537         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9538         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9539         cmain().
9540         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9541         * kern/ieee1275/cmain.c (cmain): Rename to ...
9542         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9543         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9544         at the beginning.
9546 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9548         * util/update-grub.in: Fix syntax error when setting
9549         `GRUB_PRELOAD_MODULES'.
9550         Reported by Stephane Chazelas <stephane@artesyncp.com>
9552 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9554         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9555         section into account, newer toolchains generate unique build ids
9556         * configure.ac: remove the test for --build-id=none acceptance,
9557         we want build ids to be preserved
9558         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9559         far from other sections don't cause the raw binary images grow
9560         size
9562 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9564         * disk/lvm.c: Update copyright year.
9565         * kern/misc.c: Likewise.
9567 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9569         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9570         there is no memory left for physical volume name.
9572 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9574         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9575         volume name mapping to support bigger than 9 character names properly.
9577 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9579         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9580         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9582 2008-04-13  Christian Franke  <franke@computer.org>
9584         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9585         to create a floppy emulation boot CD when non emulation mode
9586         does not work.
9587         Enable Joliet CD filesystem extension.
9589 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9591         * kern/misc.c (grub_strncat): Fix off-by-one error.
9592         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9594         * kern/env.c (grub_env_context_close): Clear current context, not
9595         previous one.
9596         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9598         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9600 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9602         Improve robustness when handling LVM.
9604         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9605         (and leave `*p' unmodified).
9606         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9607         through it.
9608         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9609         iterating through it.
9610         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9611         through it.
9612         (grub_lvm_scan_device): Check the return value (and fail gracefully
9613         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9614         Don't assume `vg->pvs != NULL' when iterating through it.
9616 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9618         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9619         * genmk.rb (partmap): New variable.
9620         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9621         (#{partmap}): New target rule.
9622         * genpartmaplist.sh: New file.
9623         * Makefile.in (pkglib_DATA): Add partmap.lst.
9624         (partmap.lst): New target rule.
9625         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9626         modules (including all partition maps), instead of preloading them.
9628 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
9630         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9631         `linux-boot-prober' (if installed) to detect other operating
9632         systems which are installed on the computer and add them to
9633         the boot menu.
9634         * conf/common.rmk: Build and install 30_os-prober.
9636 2008-04-12  Robert Millan  <rmh@aybabtu.com>
9638         * kern/powerpc/ieee1275/init.c: Move from here ...
9639         * kern/ieee1275/init.c: ... to here.  Update all users.
9641         * kern/powerpc/ieee1275/cmain.c: Move from here ...
9642         * kern/ieee1275/cmain.c: ... to here.  Update all users.
9644         * kern/powerpc/ieee1275/openfw.c: Move from here ...
9645         * kern/ieee1275/openfw.c: ... to here.  Update all users.
9647         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9648         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
9650 2008-04-10  Pavel Roskin  <proski@gnu.org>
9652         * configure.ac: Always use "_cv_" in cache variables for
9653         compatibility with Autoconf 2.62.
9655 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9657         Revert grub/machine/init.h addition by Pavel (since it breaks on
9658         i386-ieee1275 and others):
9659         * util/i386/pc/misc.c: Remove grub/machine/init.h.
9660         * util/powerpc/ieee1275/misc.c: Likewise.
9662 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9664         * util/grub-probe.c (probe): Improve error message.
9666 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9668         * util/biosdisk.c (read_device_map): Skip devices that don't exist
9669         (this prevents the presence of a bogus entry from ruining the whole
9670         thing).
9672 2008-04-06  Pavel Roskin  <proski@gnu.org>
9674         * util/biosdisk.c: Include grub/util/biosdisk.h.
9675         * util/grub-fstest.c (execute_command): Make static.
9676         * util/grub-mkdevicemap.c (check_device): Likewise.
9677         * util/i386/pc/misc.c: Include grub/machine/init.h.
9678         * util/powerpc/ieee1275/misc.c: Likewise.
9679         * util/lvm.c: Include grub/util/lvm.h.
9680         * util/misc.c: Include grub/kernel.h, grub/misc.h and
9681         grub/cache.h.
9682         * util/raid.c: Include grub/util/raid.h.
9683         (grub_util_getdiskname): Make static.
9685         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9686         grub_hostfs_fini(), as they are called from grub_init_all() and
9687         grub_fini_all() respectively.  This fixes an infinite loop in
9688         grub-fstest due to double registration of hostfs.
9689         Reported by Christian Franke <Christian.Franke@t-online.de>
9691 2008-04-05  Pavel Roskin  <proski@gnu.org>
9693         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9694         all 8 functions.  Otherwise, probe function 0 only.
9696 2008-04-04  Pavel Roskin  <proski@gnu.org>
9698         * commands/lspci.c (grub_lspci_iter): Print the bus number
9699         correctly.
9701         * commands/lspci.c (grub_pci_classes): Fix typos.
9702         (grub_lspci_iter): Don't print func twice.  Print vendor ID
9703         before device ID, as it's normally done.
9705         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9706         Fix signedness warnings.
9707         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9708         Likewise.
9709         * util/ieee1275/get_disk_name.c: Include config.h so that
9710         _GNU_SOURCE is defined and getline() is declared.  Mark an
9711         unused argument as such.  Fix a signedness warning.
9713 2008-04-02  Pavel Roskin  <proski@gnu.org>
9715         * genkernsyms.sh.in: Use more robust assignments for CC and
9716         srcdir.  Quote srcdir.
9717         * gensymlist.sh.in: Likewise.  Assert at the compile time that
9718         the symbol table is not empty.
9720         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9721         * fs/cpio.c (grub_cpio_read): Likewise.
9723 2008-04-01  Pavel Roskin  <proski@gnu.org>
9725         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9726         * disk/host.c (grub_host_open): Likewise.
9727         * disk/loopback.c (grub_loopback_open): Likewise.
9728         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9729         disk->id as in disk/host.c, not a multi-character constant.
9731         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
9732         later is obsolete, potentially dangerous and sets a bad example.
9733         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9734         * util/misc.c (grub_util_get_image_size): Likewise.
9736         * disk/loopback.c (options): Improve help for "--partitions".
9738         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9739         options to align them with the short options, e.g. "echo -e".
9741 2008-03-31  Bean  <bean123ch@gmail.com>
9743         * video/reader/png.c (grub_png_data): New member is_16bit and
9744         image_data.
9745         (grub_png_decode_image_header): Detect 16 bit png image.
9746         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9747         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9748         (grub_video_reader_png): Release memory occupied by image_data.
9750         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9751         4096 bytes.
9752         (grub_nfs_mount): Skip the test for sector per cluster.
9754         * include/grub/ntfs.h (MAX_SPC): Removed.
9756 2008-03-31  Bean  <bean123ch@gmail.com>
9758         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9759         (grub_probe_SOURCES): Add fs/afs.c.
9760         (grub_fstest_SOURCES): Likewise.
9761         (afs_mod_SOURCES): New variable.
9762         (afs_mod_CFLAGS): Likewise.
9763         (afs_mod_LDFLAGS): Likewise.
9765         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9766         (grub_emu_SOURCES): Likewise.
9768         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9770         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9772         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9774         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9776         * fs/afs.c: New file.
9778 2008-03-30  Pavel Roskin  <proski@gnu.org>
9780         * disk/host.c: Include grub/misc.h to fix a warning.
9781         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9782         warnings about implicit declarations.
9784         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9785         variable.
9786         * include/grub/i386/loader.h: Change declaration of
9787         grub_linux_boot() to match what grub_loader_set() expects.
9788         * util/getroot.c (grub_guess_root_device): Return const char* to
9789         fix a warning.
9790         * util/grub-probe.c (probe): Fix a warning about uninitialized
9791         abstraction_name variable.
9792         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9793         second argument as unused to fix a warning.
9795         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9796         missing grub_error() call.
9798         * util/update-grub_lib.in: Define datarootdir, since Autoconf
9799         2.60 and newer uses it to define datadir.
9801         * commands/sleep.c: Fix warning about implicit declaration.
9802         * disk/memdisk.c: Likewise.
9803         * loader/aout.c: Likewise.
9804         * loader/i386/bsd_normal.c: Likewise.
9805         * util/grub-probe.c: Likewise.
9807         * commands/i386/cpuid.c (has_longmode): Make static.
9808         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9809         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9811         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9812         GDT.  This is more robust, as %ds can change.
9813         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9814         calling real_to_prot().
9815         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9817 2008-03-28  Pavel Roskin  <proski@gnu.org>
9819         * kern/i386/pc/startup.S: Assert that uncompressed functions
9820         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9821         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9822         code, as they push parts of the code (error handlers) beyond
9823         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
9824         code as correctness and size.
9826 2008-03-28  Pavel Roskin  <proski@gnu.org>
9828         * kern/i386/pc/startup.S
9829         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9830         data block address to the real mode, keep offset minimal.  This
9831         works around a bug in AWARD BIOS on old Athlon systems, which
9832         makes CD detection hang.
9834 2008-03-26  Pavel Roskin  <proski@gnu.org>
9836         * normal/color.c (grub_parse_color_name_pair): Make `name' a
9837         const.
9838         * include/grub/normal.h: Add grub_parse_color_name_pair()
9839         declaration.
9841 2008-03-24  Bean  <bean123ch@gmail.com>
9843         * disk/i386/pc/biosdisk.c (cd_start): Removed.
9844         (cd_count): Removed.
9845         (cd_drive): New variable.
9846         (grub_biosdisk_get_drive): Don't check for (cdN) device.
9847         (grub_biosdisk_call_hook): Likewise.
9848         (grub_biosdisk_iterate): Change cdrom detection method.
9849         (grub_biosdisk_open): Replace cd_start with cd_drive.
9850         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9851         detect cdrom device.
9853         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9854         Removed.
9855         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9856         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9857         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9858         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9859         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9860         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9861         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9862         (grub_biosdisk_cdrp): New structure.
9863         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9865         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9867         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9868         device.
9870         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9871         New function.
9873 2008-03-20  Robert Millan  <rmh@aybabtu.com>
9875         Remove 2 TiB limit in ata.mod.
9876         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9877         (grub_ata_dumpinfo): Print sector count with 0x%llx.
9878         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9879         grub_uint64_t instead of grub_uint32_t.
9881 2008-03-05  Bean  <bean123ch@gmail.com>
9883         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9884         (grub_multiboot): Set boot device.
9886         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9888 2008-03-02  Bean  <bean123ch@gmail.com>
9890         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9891         symlink_buffer.
9893 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
9895         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9896         texinfo.tex.
9898         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9899         modified.
9901         * docs/fdl.texi: New file.
9903         * docs/mdate-sh: New file. Copied from gnulib.
9904         * docs/texinfo.tex: Likewise.
9906         * config.guess: Updated from gnulib.
9907         * install-sh: Likewise.
9909 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9911         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9912         (aout_mod_SOURCES): New variable.
9913         (aout_mod_CFLAGS): Likewise.
9914         (aout_mod_LDFLAGS): Likewise.
9916         * conf/i386-ieee1275.rmk: Likewise.
9918 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9920         * util/update-grub.in: Reorganise terminal validity check.  Accept
9921         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9922         Based on suggestion by Franklin PIAT.
9924 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
9926         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9927         function.
9928         * util/getroot.c (grub_util_check_block_device): New function that
9929         returns the given argument if it is a block device and returns NULL else.
9930         * util/grub-probe.c (argument_is_device): New variable.
9931         (probe): Promote device_name from a variable to an argument. Receive
9932         device_name from grub_util_check_block_device() if path is NULL and from
9933         grub_guess_root_device() else. Do not free() device_name anymore.
9934         (options): Introduce new parameter '-d, --device'.
9935         (main): Add description of the new parameter to the help screen.
9936         Rename path variable to argument. Set argument_is_device if the '-d'
9937         option is given. Pass argument to probe() depending on
9938         argument_is_device.
9940 2008-02-24  Bean  <bean123ch@gmail.com>
9942         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9943         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9944         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9945         (GRUB_ISO9660_VOLDESC_PART): Likewise.
9946         (GRUB_ISO9660_VOLDESC_END): Likewise.
9947         (grub_iso9660_primary_voldesc): New member escape.
9948         (grub_iso9660_data): New member joliet.
9949         (grub_iso9660_convert_string): New function.
9950         (grub_iso9660_mount): Detect joliet extension.
9951         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9952         (grub_iso9660_iso9660_label): Likewise.
9954         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
9955         (grub_setup_SOURCES): Add fs/udf.c.
9956         (grub_fstest_SOURCES): Likewise.
9957         (udf_mod_SOURCES): New variable.
9958         (udf_mod_CFLAGS): Likewise.
9959         (udf_mod_LDFLAGS): Likewise.
9961         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
9962         (grub_emu_SOURCES): Likewise.
9964         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9966         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9968         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9970         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9972         * fs/udf.c: New file.
9974 2008-02-24  Robert Millan  <rmh@aybabtu.com>
9976         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
9977         (normal/lexer.c_DEPENDENCIES): New variables.
9978         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9979         (normal/lexer.c_DEPENDENCIES): Likewise.
9980         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
9981         (normal/lexer.c_DEPENDENCIES): Likewise.
9982         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
9983         (normal/lexer.c_DEPENDENCIES): Likewise.
9984         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9985         (normal/lexer.c_DEPENDENCIES): Likewise.
9986         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9987         (normal/lexer.c_DEPENDENCIES): Likewise.
9989 2008-02-23  Robert Millan  <rmh@aybabtu.com>
9991         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
9992         since they were intended to be in hex.  This didn't break previously
9993         because of a bug in gpt_partition_map_iterate() (see below).
9995         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
9996         when checking the validity of GPT header.
9997         Remove `partno', since it always provides the same information as `i'.
9999 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10001         * include/grub/efi/time.h: Fix a wrong comment.
10003 2008-02-19  Pavel Roskin  <proski@gnu.org>
10005         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10006         message.
10008 2008-02-19  Bean  <bean123ch@gmail.com>
10010         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10011         (aout_mod_SOURCES): New variable.
10012         (aout_mod_CFLAGS): Likewise.
10013         (aout_mod_LDFLAGS): Likewise.
10014         (_bsd_mod_SOURCES): New variable.
10015         (_bsd_mod_CFLAGS): Likewise.
10016         (_bsd_mod_LDFLAGS): Likewise.
10017         (bsd_mod_SOURCES): New variable.
10018         (bsd_mod_CFLAGS): Likewise.
10019         (bsd_mod_LDFLAGS): Likewise.
10021         * include/grub/aout.h: New file.
10023         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10025         * include/grub/i386/bsd.h: New file.
10027         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10028         to make it public.
10030         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10031         function is called, so that it's possible to change it inside the hook.
10032         (grub_elf64_load): Likewise.
10033         (grub_elf_file): Don't close the file if elf header is not found.
10034         (grub_elf_close): Close the file if grub_elf_file fails (The new
10035         grub_elf_file won't close it).
10036         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10037         (grub_elf64_size): Likewise.
10039         * kern/i386/loader.S (grub_unix_real_boot): New function.
10041         * loader/aout.c: New file.
10043         * loader/i386/bsd.c: New file.
10045         * loader/i386/bsd_normal.c: New file.
10047         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10049         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10050         can test other formats.
10052 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10054         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10055         (grub_gpt_partition_type_empty): Redefine with macro from
10056         `<grub/gpt_partition.h>'.
10057         (gpt_partition_map_iterate): Adjust partition type comparison.
10059         Export `entry' as partmap-specific `part.data' struct.
10060         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10062         * include/grub/gpt_partition.h (grub_gpt_header)
10063         (grub_gpt_partentry): ... to here (new file).
10065         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10067         (grub_gpt_partition_type_bios_boot): New const variable, defined
10068         with macro from `<grub/gpt_partition.h>'.
10070         (setup): Replace `first_start' with `embed_region', which keeps
10071         track of the embed region (and is partmap-agnostic).
10073         Replace find_first_partition_start() with find_usable_region(),
10074         which finds a usable region for embedding using partmap-specific
10075         knowledge (supports PC/MSDOS and GPT).
10077         Fix all assumptions that the embed region start at sector 1, using
10078         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10079         rather than `first_start' to calculate available size.
10081         In grub_util_info() message, replace "into after the MBR" with an
10082         indication of the specific sector our embed region starts at.
10084 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10086         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10087         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10088         `commands/reboot.c'.
10089         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10090         (halt_mod_SOURCES): Likewise.
10091         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10092         (halt_mod_SOURCES): Likewise.
10094 2008-02-17  Christian Franke  <franke@computer.org>
10096         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10098 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10100         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10101         set `first_start' to 0 for non-PC/MSDOS partition maps.
10103 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10105         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10106         do not assume partition map is PC/MSDOS before performing checks that
10107         are specific to that layout.
10109 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10111         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10112         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10113         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10115 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10117         * configure.ac: Only a cosmetic change on the handling of
10118         -fno-stack-protector.
10120 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10122         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10123         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10124         reboot.c.
10125         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10126         (halt_mod_SOURCES): New variable.
10127         (halt_mod_CFLAGS): Likewise.
10128         (halt_mod_LDFLAGS): Likewise.
10129         (reboot_mod_SOURCES): Likewise.
10130         (reboot_mod_CFLAGS): Likewise.
10131         (reboot_mod_LDFLAGS): Likewise.
10133         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10134         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10135         reboot.c.
10136         (halt_mod_SOURCES): Likewise.
10137         (reboot_mod_SOURCES): Likewise.
10139         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10140         commands/i386/pc/reboot.c by commands/reboot.c.
10141         (reboot_mod_SOURCES): Likewise.
10143         * commands/i386/pc/reboot.c: merge this file ...
10145         * commands/ieee1275/reboot.c: ... and this file ...
10147         * commands/reboot.c: ... to this file.
10148         Add some precompiler directive to include the correct header for
10149         each machine.
10151         * commands/ieee1275/halt.c: move this file ...
10153         * commands/halt.c: ... to here.
10154         Add some precompiler directive to include the correct header for
10155         each machine.
10157         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10158         (grub_halt): Likewise.
10160         * kern/efi/efi.c (grub_reboot): New function.
10161         (grub_halt): Likewise.
10163 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10165         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10166         /dev (like it is done for /dev/mapper).  This doesn't provide support
10167         for EVMS, but at least it is now easy to identify the problem when it
10168         arises.
10170 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10172         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10173         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10174         comparing it with -1, not 0.
10176 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10178         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10179         `disk/lvm.c'.
10180         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10181         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10183         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10184         `disk/lvm.c' to the end of the list.
10185         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10186         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10188 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10190         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10191         grub_print_error() instead.  This will let user know why we're entering
10192         rescue mode.
10193         Based on suggestions from Sam Morris.
10195 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10197         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10198         on remaining N args, instead of "--" arg N times.
10200 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10202         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10203         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10204         pattern for unknown glyphs.
10206 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10208         * configure.ac: Probe for `help2man'.
10209         * Makefile.in (builddir): New variable.
10210         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10211         or otherwise add a few flags/options to it.
10212         (install-local): For every executable utility or script that is
10213         installed, invoke $(HELP2MAN) to install a manpage based on --help
10214         output.
10216         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10217         that it doesn't prevent --help from working in build tree.
10219         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10220         with `bug-grub@gnu.org'.
10221         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10222         * util/update-grub.in (usage): New function.
10223         Implement proper argument check, with support for --help and --version
10224         (as well as existing -y).
10226 2008-02-09  Christian Franke  <franke@computer.org>
10228         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10229         avoid overwriting previous output.
10230         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10232 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10234         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10235         drawing the menu.
10237 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10239         * commands/sleep.c: New file.
10240         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10241         (sleep_mod_SOURCES): New variable.
10242         (sleep_mod_CFLAGS): Likewise.
10243         (sleep_mod_LDFLAGS): Likewise.
10245 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10247         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10248         situations in which we can deduce the RAID size and the superblock
10249         doesn't match it.
10251 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10253         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10254         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10255         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10257         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10258         and return a grub_diskmemberlist_t composed of physical array members.
10259         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10261         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10262         prototype.
10263         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10264         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10265         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10267         * util/grub-probe.c (probe): Move partmap probing code from here ...
10268         (probe_partmap): ... to here.
10269         (probe): Use probe_partmap() once for the disk we're probing, and
10270         additionally, when such disk contains a memberlist() struct member,
10271         once for each disk that is contained in the structure returned by
10272         memberlist().
10274 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10276         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10277         environment variable to 'all' in order to obtain debug output from
10278         non-util/ code.
10279         * util/i386/pc/grub-setup.c (main): Likewise.
10281 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10283         * disk/raid.c (grub_raid_scan_device): Check for
10284         `array->device[sb.this_disk.number]' rather than for
10285         `array->device[sb.this_disk.number]->name', since the latter is not
10286         guaranteed to be accessible.
10288 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10290         * disk/raid.c: Update copyright.
10291         * fs/cpio.c: Likewise.
10292         * include/grub/raid.h: Likewise.
10293         * loader/i386/pc/multiboot.c: Likewise.
10294         * util/hostfs.c: Likewise.
10296 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10298         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10299         to a grub_disk_t array.
10300         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10301         `device[x]'.
10302         (grub_raid_scan_device): Replace `device[x].name' accesses with
10303         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10305 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10307         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10308         grub_dprintf() calls.
10309         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10310         error message.
10312 2008-02-07  Christian Franke  <franke@computer.org>
10314         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10315         instead of fseek and ftell to support large files.
10316         (grub_hostfs_read): Likewise.
10318 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10320         Patch from Jeroen Dekkers.
10321         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10322         failure, since successfully reading all array members might not be
10323         required.
10325 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10327         * util/grub-probe.c (probe): Simplify partmap probing (with the
10328         assumption that the first word up to the underscore equals to
10329         the module name).
10331 2008-02-06  Christian Franke  <franke@computer.org>
10333         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10334         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10335         last block of a cpio or tar stream.
10336         Check for "TRAILER!!!" instead of any empty data
10337         block to detect last block of a cpio stream.
10338         (grub_cpio_dir): Fix constness of variable np.
10339         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10340         cpio or tar trailer is detected.  This fixes a crash
10341         on open of a non existing file.
10343 2008-02-05  Bean  <bean123ch@gmail.com>
10345         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10346         address of entry.
10347         (grub_multiboot_load_elf64): Likewise.
10348         (grub_multiboot): Initialize mbi structure.
10350         * util/grub-fstest.c: Don't include unused header file script.h.
10352         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10353         of file.
10354         (grub_fstest_SOURCES): Likewise.
10356 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10358         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10359         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10360         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10361         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10363         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10364         (translation_table): Replace hardcoded values with macros
10365         provided by `<grub/term.h>'.
10367         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10368         (keyboard_map): Correct/add a few values, with macros provided
10369         by `<grub/term.h>'.
10370         (keyboard_map_shift): Zero values that don't differ from their
10371         `keyboard_map' equivalents.
10372         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10373         Discard the second scan code that is always sent by Caps lock.
10374         Only use `keyboard_map_shift' when it provides a non-zero value,
10375         otherwise fallback to `keyboard_map'.
10377 2008-02-04  Bean  <bean123ch@gmail.com>
10379         * Makefile.in (enable_grub_fstest): New variable.
10381         * conf/common.rmk (grub_fstest_init.lst): New rule.
10382         (grub_fstest_init.h): Likewise.
10383         (grub_fstest_init.c): Likewise.
10384         (util/grub-fstest.c_DEPENDENCIES): New variable.
10385         (grub_fstest_SOURCES): Likewise.
10387         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10389         * util/grub-fstest.c: New file.
10391 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10393         Make grub-setup handle a separate root device.
10395         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10396         so that the root device can be compared with the destination
10397         device.
10398         When embedding the core image, if the root and destination devices
10399         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10400         0xFF.
10401         When not embedding, set ROOT_DRIVE to 0xFF.
10403 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10405         Add support for having a grub directory in a different drive. This
10406         is still only the data handling part.
10408         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10409         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10410         (grub_root_drive): New variable.
10412         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10413         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10414         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10415         as it was.
10417         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10419         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10420         macro.
10421         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10423         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10424         is bogus, because PXE booting does not specify any drive
10425         correctly.
10427         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10428         am not sure if this is really correct.
10430         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10431         is always identical to the boot drive when booting from a CD.
10433         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10434         longer.
10435         (root_drive): New variable.
10436         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10437         (setup_sectors): Push %dx right after popping it, because %dh will
10438         be modified later.
10439         (copy_buffer): Restore %dx.
10441 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10443         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10444         use `cdboot.img' for cdrom images.
10446 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10448         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10449         only setup gfxterm when `font' command has succeeded.
10451 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10453         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10454         (grub_rescue_cmd_multiboot_loader)
10455         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10457 2008-02-03  Pavel Roskin  <proski@gnu.org>
10459         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10460         %edx and %esi from stack only after grub_gate_a20() is called.
10461         grub_gate_a20() clobbers %edx.
10463 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10465         * configure.ac (AC_INIT): Bumped to 1.96.
10467         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10468         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10469         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10470         video/readers/png.c.
10472 2008-02-03  Bean  <bean123ch@gmail.com>
10474         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10475         (cdboot_img_SOURCES): New variable.
10476         (cdboot_img_ASFLAGS): New variable.
10477         (cdboot_img_LDFLAGS): New variable.
10479         * boot/i386/pc/cdboot.S: New file.
10481         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10482         (cd_count): Likewise.
10483         (grub_biosdisk_get_drive): Add support for cd device.
10484         (grub_biosdisk_call_hook): Likewise.
10485         (grub_biosdisk_iterate): Likewise.
10486         (grub_biosdisk_open): Likewise.
10487         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10488         (grub_biosdisk_rw): Support reading from cd device.
10489         (GRUB_MOD_INIT): Iterate cd devices.
10491         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10492         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10493         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10495         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10497 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10499         * commands/read.c: New file.
10500         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10501         (read_mod_SOURCES): New variable.
10502         (read_mod_CFLAGS): Likewise.
10503         (read_mod_LDFLAGS): Likewise.
10505 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10507         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10508         determining whether menu has to be displayed.
10510 2008-02-02  Marco Gerards  <marco@gnu.org>
10512         * bus/pci.c: New file.
10514         * include/grub/pci.h: Likewise.
10516         * include/grub/i386/pc/pci.h: Likewise.
10518         * commands/lspci.c: Likewise.
10520         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10521         `lspci.mod'.
10522         (pci_mod_SOURCES): New variable.
10523         (pci_mod_CFLAGS): Likewise.
10524         (pci_mod_LDFLAGS): Likewise.
10525         (lspci_mod_SOURCES): Likewise.
10526         (lspci_mod_CFLAGS): Likewise.
10527         (lspci_mod_LDFLAGS): Likewise.
10529 2008-02-02  Bean  <bean123ch@gmail.com>
10531         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10532         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10534         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10535         (grub_xfs_btree_node): New structure.
10536         (grub_xfs_btree_root): New structure.
10537         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10538         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10539         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10540         (GRUB_XFS_EXTENT_SIZE): Likewise.
10541         (grub_xfs_read_block): Support btree format type.
10542         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10543         Use directory block as basic unit.
10545         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10547         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10548         __attribute__ ((__regparm__ (1))).
10550 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10552         Correct a mistake in previous commit.
10554         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10555         top.
10556         (normal/command.c_DEPENDENCIES): New variable.
10558 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10560         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10561         top.
10562         (normal/command.c_DEPENDENCIES): New variable.
10563         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10564         * conf/i386-ieee1275.rmk: Likewise.
10565         * conf/i386-linuxbios.rmk: Likewise.
10566         * conf/i386-pc.rmk: Likewise.
10567         * conf/sparc64-ieee1275.rmk: Likewise.
10568         * conf/powerpc-ieee1275.rmk: Likewise.
10569         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10571         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10573 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10575         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10576         call at beginning of function.
10578 2008-01-31  Pavel Roskin  <proski@gnu.org>
10580         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10581         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10582         (grub_mkrescue_SOURCES): Likewise.
10583         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10585 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10587         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10588         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10589         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10590         (grub_probe_SOURCES): ... to here.
10592         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10593         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10594         * conf/i386-ieee1275.rmk: Likewise.
10595         * conf/i386-linuxbios.rmk: Likewise.
10596         * conf/powerpc-ieee1275.rmk: Likewise.
10598 2008-01-30  Tristan Gingold  <gingold@free.fr>
10600         * kern/rescue.c: Silently accept empty lines.
10602 2008-01-29  Bean  <bean123ch@gmail.com>
10604         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10605         (real_code_2): Code cleanup and change comment style.
10606         (move_memory): Avoid using 32-bit address mode.
10608 2008-01-29  Bean  <bean123ch@gmail.com>
10610         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10611         (png_mod_SOURCES): New variable.
10612         (png_mod_CFLAGS): Likewise.
10613         (png_mod_LDFLAGS): Likewise.
10615         * video/readers/png.c: New file.
10617 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10619         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10620         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10621         `ifndef GRUB_MOD_GAP' hack.
10622         * util/elf/grub-mkimage.c (add_segments): Likewise.
10624 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10626         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10627         `GRUB_MOD_GAP' for platforms in which it's not defined.
10628         * util/elf/grub-mkimage.c (add_segments): Likewise.
10630 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10632         Get grub-emu to build again (including parallel builds).
10634         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10635         Split into ...
10636         (util/grub-emu.c_DEPENDENCIES): ... this, ...
10637         (normal/execute.c_DEPENDENCIES): ... this, ...
10638         (grub-emu_DEPENDENCIES): ... and this.
10640         * conf/i386-efi.rmk: Likewise.
10641         * conf/i386-linuxbios.rmk: Likewise.
10642         * conf/i386-ieee1275.rmk: Likewise.
10643         * conf/powerpc-ieee1275.rmk: Likewise.
10644         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10646 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10648         * NEWS: Add a few items.
10650 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10652         Fix parallel builds with grub-emu.  Based on earlier commit for
10653         grub-probe and grub-setup.
10655         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10656         (util/grub-emu.c_DEPENDENCIES): ... this.
10657         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10658         (util/grub-emu.c_DEPENDENCIES): ... this.
10659         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10660         (util/grub-emu.c_DEPENDENCIES): ... this.
10661         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10662         (util/grub-emu.c_DEPENDENCIES): ... this.
10663         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10664         (util/grub-emu.c_DEPENDENCIES): ... this.
10666 2008-01-27  Pavel Roskin  <proski@gnu.org>
10668         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10669         to create a gap between _end and the modules added to the image
10670         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
10671         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10672         * util/elf/grub-mkimage.c (add_segments): Likewise.
10674 2008-01-26  Pavel Roskin  <proski@gnu.org>
10676         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10677         just return an error.
10679 2008-01-26  Bean  <bean123ch@gmail.com>
10681         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10682         (grub_reiserfs_get_item): Save offset of the next item.
10683         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10685 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10687         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10688         make all filesystem sources appear together (possibly fixing omissions
10689         while at it).
10690         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10691         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10692         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10693         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10695         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
10696         add `kern/file.c'.
10697         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10698         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10699         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10700         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10702         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10703         (probe): Add a sanity check to make sure of our ability to read
10704         requested files when probing for filesystem type.
10706         * genmk.rb: Update copyright year (2007).
10708         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10709         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10710         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10711         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10712         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10713         : Remove function prototypes.
10715 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10717         Revert my previous commits (based on wrong assumption of how grub_errno
10718         works).
10720         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10721         * kern/file.c (grub_file_open): Likewise.
10723 2008-01-24  Pavel Roskin  <proski@gnu.org>
10725         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10726         that hang if GRUB tries to setup colors.
10727         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10728         colors for firmwares that don't support it.
10729         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10730         Recognize Open Hack'Ware, set flags to work around its
10731         limitations.
10733 2008-01-24  Robert Millan  <rmh@aybabtu.com>
10735         * kern/file.c (grub_file_open): Do not account previous failures of
10736         unrelated functions when grub_errno is checked for.
10737         Reported by Oleg Strikov.
10739 2008-01-24  Bean  <bean123ch@gmail.com>
10741         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10742         (grub_ufs_sblock): New member volume name.
10743         (grub_ufs_find_file): Fix string copy bug.
10744         (grub_ufs_label): Implement this function properly.
10746         * fs/hfs.c (grub_hfs_cnid_type): New enum.
10747         (grub_hfs_iterate_records): Use the correct file number for extents
10748         and catalog file. Fix problem in next index calculation.
10749         (grub_hfs_find_node): Replace recursive function call with loop.
10750         (grub_hfs_iterate_dir): Replace recursive function call with loop.
10752 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10754         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10755         `<grub/symbol.h>' and `<grub/multiboot.h>'.
10756         (grub_multiboot2_real_boot): New function prototype.
10758         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10759         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10761         * kern/i386/ieee1275/init.c (grub_os_area_addr)
10762         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10764 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10766         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10767         #ifdef'ed out grub_printf().
10769 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10771         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10772         grub_dprintf calls, since they make "debug=all" mode unusable.
10773         (grub_console_checkkey): Likewise.
10775 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10777         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10778         `term/i386/pc/at_keyboard.c'.
10779         (pkglib_MODULES): Add `serial.mod'.
10780         (serial_mod_SOURCES): New variable.
10781         (serial_mod_CFLAGS): Likewise.
10782         (serial_mod_LDFLAGS): Likewise.
10784         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
10785         `<grub/powerpc/ieee1275/console.h>'.
10786         (grub_keyboard_controller_init): New function prototype.
10787         (grub_console_checkkey): Likewise.
10788         (grub_console_getkey): Likewise.
10790         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10791         keyboard on i386.
10793         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10794         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10796 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10798         * kern/i386/pc/init.c (make_install_device): When memdisk image is
10799         present, "(memdisk)/boot/grub" becomes the default prefix.
10801         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10802         a memdisk tarball with all the modules.  Add --overlay=DIR option that
10803         allows users to overlay additional files into the image.
10805 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10807         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10808         and `machine/memory.h'.
10809         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10810         (_multiboot_mod_SOURCES): New variable.
10811         (_multiboot_mod_CFLAGS): Likewise.
10812         (_multiboot_mod_LDFLAGS): Likewise.
10813         (multiboot_mod_SOURCES): Likewise.
10814         (multiboot_mod_CFLAGS): Likewise.
10815         (multiboot_mod_LDFLAGS): Likewise.
10817         * include/grub/i386/ieee1275/loader.h: New file.
10819         * include/grub/i386/ieee1275/machine.h: Likewise.
10821         * include/grub/i386/ieee1275/memory.h: Likewise.
10823         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10824         variable declaration.
10825         (grub_os_area_size): Likewise.
10827         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10828         (grub_lower_mem, grub_upper_mem): New variables.
10829         (grub_stop_floppy): New function (just to make
10830         grub_multiboot2_real_boot() happy).
10832         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10833         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10834         (grub_stop): New function.
10835         Include `"../realmode.S"' and `"../loader.S"'.
10837         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10838         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10840         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10841         rely on grub_multiboot2_real_boot() for final boot.
10843 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10845         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10846         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10847         device that doesn't look like an SD card.
10848         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10849         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10850         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10851         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10852         found.
10854 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10856         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10857         avoid claiming over our own code.
10859 2008-01-22  Bean  <bean123ch@gmail.com>
10861         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10862         (jpeg_mod_SOURCES): New variable.
10863         (jpeg_mod_CFLAGS): Likewise.
10864         (jpeg_mod_LDFLAGS): Likewise.
10866         * video/readers/jpeg.c : New file.
10868 2008-01-22  Bean  <bean123ch@gmail.com>
10870         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10871         there are no more items.
10873 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10875         * kern/mm.c (grub_mm_init_region): Improve debug message.
10877 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10879         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10880         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10881         address.
10882         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10883         a C macro.
10884         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10885         Indicates start of upper memory.
10886         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10887         (generate_image): Abort when image size is big enough to corrupt
10888         upper memory.
10890         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10891         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10892         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10893         instead of hardcoding 0xA0000.
10894         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10895         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10896         instead of hardcoding 0xA0000.
10898 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10900         * disk/memdisk.c (memdisk_size): New variable.
10901         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10902         `memdisk_size'.
10903         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
10904         image to dynamic memory.
10905         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10906         `memdisk_size'.  Free memdisk block.
10908 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10910         Fix detection of very small filesystems (like tar).
10912         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10913         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10914         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10915         a problem with this disk).
10917 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10919         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10920         on grub_biosdisk_rw_standard() error.
10922 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10924         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10925         recent changes.
10926         * kern/elf.c: Likewise.
10927         * kern/ieee1275/ieee1275.c: Likewise.
10928         * kern/powerpc/ieee1275/openfw.c: Likewise.
10929         * term/ieee1275/ofconsole.c: Likewise.
10931 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10933         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10935         * include/grub/kernel.h (grub_arch_memdisk_addr)
10936         (grub_arch_memdisk_size): Moved from here ...
10938         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10939         (grub_arch_memdisk_size): ... to here.
10941 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10943         Mostly based on bugfix from Bean.
10945         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10946         attribute with hook() parameter.
10947         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10948         declaration.
10949         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10950         attribute with hook() parameter.
10951         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10952         declaration.
10954 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10956         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
10957         (pkglib_MODULES): Add `memdisk.mod'.
10958         (memdisk_mod_SOURCES): New variable.
10959         (memdisk_mod_CFLAGS): Likewise.
10960         (memdisk_mod_LDFLAGS): Likewise.
10962         * disk/memdisk.c: New file.
10964         * include/grub/disk.h (grub_disk_dev_id): Add
10965         `GRUB_DISK_DEVICE_MEMDISK_ID'.
10967         * include/grub/i386/pc/kernel.h
10968         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
10969         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
10970         (grub_kernel_image_size): New variable declaration.
10971         (grub_total_module_size): Likewise.
10972         (grub_memdisk_image_size): Likewise.
10974         * include/grub/i386/pc/memory.h
10975         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
10977         * include/grub/kernel.h: Include `<grub/symbol.h>'.
10978         (grub_arch_memdisk_addr): New variable declaration.
10979         (grub_arch_memdisk_size): Likewise.
10981         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
10982         (grub_arch_memdisk_size): Likewise.
10984         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
10985         (codestart): Replace hardcoded `0x100000' with
10986         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
10988         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
10989         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
10990         not NULL, append the contents of the file it refers to, at the end of
10991         the compressed kernel image.  Initialize `grub_memdisk_image_size'
10992         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
10993         (options): Add "memdisk"|'m' option.
10994         (main): Parse --memdisk|-m option, and pass user-provided path as
10995         parameter to generate_image().
10997 2008-01-20  Robert Millan  <rmh@aybabtu.com>
10999         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11000         grub_dprintf() calls from here ...
11001         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11003 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11005         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11007         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11008         declaration.
11009         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11010         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11011         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11012         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11013         property).
11014         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11015         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11017 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11019         Get rid of confusing function (superseded by
11020         `grub_ieee1275_get_integer_property')
11021         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11022         prototype.
11023         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11024         function.
11025         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11026         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11027         in native endianness from grub_ieee1275_get_integer_property().
11029 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11031         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11032         command after "shut-down", since implementations differ on which
11033         the command for halt is.
11035 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11037         * include/grub/i386/linuxbios/console.h: Add header protection.
11038         (grub_keyboard_controller_init): New function prototype.
11039         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11040         (KEYBOARD_COMMAND_READ): Likewise.
11041         (KEYBOARD_COMMAND_WRITE): Likewise.
11042         (KEYBOARD_SCANCODE_SET1): Likewise.
11043         (grub_keyboard_controller_write): New function.
11044         (grub_keyboard_controller_read): Likewise.
11045         (grub_keyboard_controller_init): Likewise.
11047         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11048         (grub_console_init): On coreboot/LinuxBIOS, call
11049         grub_keyboard_controller_init().
11051 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11053         PowerPC changes provided by Pavel Roskin.
11055         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11056         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11057         don't rely on cmain() doing it.
11058         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11059         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11061 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11063         * include/grub/i386/linuxbios/memory.h
11064         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11065         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11066         receive `table_header' as argument.  Instead, probe for it in the
11067         known memory ranges where it can be present.
11068         (grub_available_iterate): Do not pass a fixed `table_header' address
11069         to grub_linuxbios_table_iterate().
11071 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11073         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11074         * conf/i386-ieee1275.rmk: New file.
11075         * include/grub/i386/ieee1275/console.h: Likewise.
11076         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11077         * include/grub/i386/ieee1275/kernel.h: Likewise.
11078         * include/grub/i386/ieee1275/time.h: Likewise.
11079         * kern/i386/ieee1275/init.c: Likewise.
11080         * kern/i386/ieee1275/startup.S: Likewise.
11082 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11084         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11085         when pointers are 32-bit (but still do set it to one when they are
11086         64-bit).
11088 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11090         * include/grub/ieee1275/ieee1275.h
11091         (grub_ieee1275_get_integer_property): New function prototype.
11093         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11094         (grub_ieee1275_get_integer_property): New function.  Wraps around
11095         grub_ieee1275_get_property() to handle endianness.
11097         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11098         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11099         where appropriate.
11100         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11101         (grub_map): Likewise.
11102         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11104 2008-01-15  Bean  <bean123ch@gmail.com>
11106         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11107         (grub_script_execute_cmdline): Reset grub_errno.
11109         * normal/main.c (read_config_file): Reset grub_errno.
11111         * normal/parse.y (script_init): New.
11112         (script): Move function and menuentry here.
11113         (delimiter): New.
11114         (command): Add delimiter at the end of command.
11115         (commands): Adjust to match the new command.
11116         (commandblock): Remove grub_script_lexer_record_start.
11117         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11118         (if): Use the new commands.
11120         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11122 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11124         * normal/menu.c (run_menu): Move timeout message from here ...
11125         (print_timeout): ... to here.
11126         (run_menu): Use print_timeout() once during initial draw to print
11127         the whole message, and again in every clock tick to update only
11128         the number of seconds.
11130 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11132         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11133         actual size of `available' from grub_ieee1275_get_property(), and
11134         restrict parsing to that bound.
11136 2008-01-15  Christian Franke  <franke@computer.org>
11138         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11139         (argp_program_version): Remove variable.
11140         (argp_program_bug_address): Likewise.
11141         (options): Convert from struct argp_option to struct option.
11142         (struct arguments): Remove.
11143         (parse_opt): Remove.
11144         (usage): New function.
11145         (main): Replace struct args members by simple variables.
11146         Replace argp_parse() by getopt_long().
11147         Add switch to evaluate options.
11148         Add missing "(...)" around root_dev in prefix string.
11150 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11152         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11153         for grub_ieee1275_exit(), in order to improve portability.
11155 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11157         * util/grub.d/10_linux.in (prefix): Define.
11158         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11160 2008-01-13  Pavel Roskin  <proski@gnu.org>
11162         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11163         grub_errno if no errors have been detected.
11165 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11167         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11168         (grub_util_get_dev_abstraction): New function prototype.
11170         * util/getroot.c: Include `<grub/util/getroot.h>'
11171         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11172         (grub_util_get_dev_abstraction): ... here (new function).
11174         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11175         `PRINT_ABSTRACTION'.
11176         (probe): Probe for abstraction type when requested.
11177         (main): Understand `--target=abstraction'.
11179         * util/i386/efi/grub-install.in: Add abstraction module to core
11180         image when it is found to be necessary.
11181         * util/i386/pc/grub-install.in: Likewise.
11182         * util/powerpc/ieee1275/grub-install.in: Likewise.
11184         * util/update-grub_lib.in (font_path): Return system path without
11185         converting to GRUB path.
11186         * util/update-grub.in: Convert system path returned by font_path()
11187         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11188         abstraction module is needed for loading fonts (if any).  Export
11189         that as `GRUB_PRELOAD_MODULES'.
11190         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11191         insmod commands).
11193 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11195         Remove some unused code from reiserfs.
11197         * fs/reiserfs.c (struct grub_reiserfs_key)
11198         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11199         (struct grub_reiserfs_node_body): Removed.
11200         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11201         Likewise.
11202         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11203         Likewise.
11204         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11205         Likewise.
11206         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11207         Likewise.
11208         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11209         Likewise.
11210         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11211         Likewise.
11212         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11213         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11214         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11216 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11218         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11219         Determines if a file is garbage left by packaging systems, etc.
11220         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11221         for processing /etc/grub.d scripts.
11222         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11223         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11224         as a condition for processing Linux images.
11226 2008-01-10  Pavel Roskin  <proski@gnu.org>
11228         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11229         to compile reiserfs.c on PowerPC.
11231 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11233         * kern/device.c (grub_device_iterate): Do not abort device iteration
11234         when one of the devices cannot be opened.
11235         * kern/disk.c (grub_disk_open): Do not account previous failures of
11236         unrelated functions when grub_errno is checked for.
11238 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11240         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11241         `! grub_linux_is_bzimage', change order of address comparison to make
11242         it more intuitive, and improve "too big zImage" error message.
11244 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11246         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11247         `$(update-grub_DATA)'.
11248         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11249         targets.
11251 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11253         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11254         which instruction is modified by grub-setup during installation
11255         (since it wasn't obvious by only looking at this file).
11257 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11259         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11260         listing actual TODO items.
11262 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11264         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11265         correctly.
11266         (grub_reiserfs_get_key_offset): Likewise.
11267         (grub_reiserfs_set_key_offset): Likewise.
11268         (grub_reiserfs_set_key_type): Likewise.
11269         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11271         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11272         better to remove the bitfield version completely.
11274 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11276         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11277         allocated from the heap, due to the fshelp implementation.
11278         (grub_reiserfs_dir): Free NODE, due to the same reason.
11280 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11282         Mostly from Vincent Pelletier:
11284         * fs/reiserfs.c: New file.
11286         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11287         (reiserfs_mod_SOURCES): New variable.
11288         (reiserfs_mod_CFLAGS): Likewise.
11289         (reiserfs_mod_LDFLAGS): Likewise.
11291         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11292         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11293         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11294         normal/color.c.
11296 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11298         * normal/color.c: Remove `<grub/env.h>'.
11300 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11302         * include/grub/normal.h: Include <grub/env.h>.
11304 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11306         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11307         usage example with `(hd0,1)'.
11308         Reported by Samuel Thibault.
11310 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11312         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11313         (grub_linux_boot_zimage): Rename to ...
11314         (grub_linux_boot): ... this.
11315         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11316         (grub_linux_boot_zimage): Conditionalize zImage copy.
11318         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11319         (grub_linux_boot_bzimage): Remove prototype.
11320         (grub_linux_boot_zimage): Rename to ...
11321         (grub_linux_boot): ... this.
11323         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11324         (grub_linux_boot): Remove function.
11326 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11328         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11329         (grub_env_write_color_highlight): Likewise.
11330         (grub_wait_after_message): Likewise.
11332         * normal/color.c: New file.
11334         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11335         (normal_mod_DEPENDENCIES): Likewise.
11337         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11338         (normal_mod_DEPENDENCIES): Likewise.
11340         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11341         (normal_mod_DEPENDENCIES): Likewise.
11343         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11344         (normal_mod_DEPENDENCIES): Likewise.
11346         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11347         for waiting after a message is printed.
11348         * normal/main.c (read_config_file): Likewise.
11349         (grub_normal_init): Register grub_env_write_color_normal() and
11350         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11351         `color_highlight' variables as global.
11353         * normal/menu.c (grub_wait_after_message): New function.
11354         (grub_color_menu_normal): New variable.  Replaces ...
11355         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11356         (grub_color_menu_highlight): New variable.  Replaces ...
11357         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11358         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11359         `GRUB_TERM_COLOR_STANDARD'.
11360         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11361         `normal_code' and `highlight_code' to `old_color_normal' and
11362         `old_color_highlight', respectively.
11363         (grub_menu_init_page): Update colors when drawing the menu, based on
11364         `menu_color_normal' and `menu_color_highlight' variables.
11365         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11366         a message is printed.
11368 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11370         * kern/env.c (grub_env_context_open): Propagate hooks for global
11371         variables to new context.
11373         * kern/main.c (grub_set_root_dev): Export `root' variable.
11375 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11377         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11378         discs unconditionally, since udev and others have options to provide
11379         them.
11381 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11383         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11385 2008-01-04  Christian Franke  <franke@computer.org>
11387         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11388         of eisa_mmap.
11390 2008-01-03  Pavel Roskin  <proski@gnu.org>
11392         * kern/i386/linuxbios/init.c: Put "void" to all function
11393         declarations with no arguments.
11394         * kern/powerpc/ieee1275/init.c: Likewise.
11395         * term/i386/pc/at_keyboard.c: Likewise.
11396         * term/i386/pc/vga_text.c: Likewise.
11397         * util/grub-mkdevicemap.c: Likewise.
11399 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11401         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11402         message when loaded image is out of bounds.
11403         (grub_multiboot_load_elf64): Likewise.
11405 2008-01-02  Pavel Roskin  <proski@gnu.org>
11407         * util/grub.d/10_linux.in: Try version without ".old" when
11408         looking for initrd.  It's better to use initrd from the newer
11409         kernel of the same version than no initrd at all.
11411 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11413         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11415 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11417         * include/grub/video.h: Added grub_video_unmap_color and
11418         grub_video_get_active_render_target.
11419         (grub_video_adapter): Added unmap_color and get_active_render_target.
11421         * video/video.c: Added grub_video_unmap_color and
11422         grub_video_get_active_render_target.
11423         (grub_video_get_info): Changed method to accept NULL pointer as an
11424         argument to allow detection of active video adapter.
11426         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11427         grub_video_vbe_unmap_color_int.
11428         Added grub_video_vbe_unmap_color and
11429         grub_video_vbe_get_active_render_target.
11430         (grub_video_vbe_adapter): Added unmap_color and
11431         get_active_render_target.
11433         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11434         with grub_video_vbe_unmap_color_int.
11436         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11437         (DEFAULT_NORMAL_COLOR): Likewise.
11438         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11439         (DEFAULT_FG_COLOR): Removed.
11440         (DEFAULT_BG_COLOR): Likewise.
11441         (DEFAULT_CURSOR_COLOR): Changed value.
11442         (grub_virtual_screen): Added standard_color_setting,
11443         normal_color_setting, highlight_color_setting and term_color.
11444         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11445         (bitmap_width): Added.
11446         (bitmap_height): Likewise.
11447         (bitmap): Likewise.
11448         (set_term_color): Likewise.
11449         (grub_virtual_screen_setup): Changed to use new terminal coloring
11450         settings.
11451         (grub_gfxterm_init): Added init for bitmap.
11452         (grub_gfxterm_fini): Added destroy for bitmap.
11453         (redraw_screen_rect): Updated to use background bitmap and new
11454         terminal coloring.
11455         (scroll_up): Added optimization for case when there is no bitmap.
11456         (grub_gfxterm_cls): Fixed to use correct background color.
11457         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11458         coloring.
11459         (grub_virtual_screen_setcolor): Likewise.
11460         (grub_virtual_screen_getcolor): Added.
11461         (grub_gfxterm_background_image_cmd): Likewise.
11462         (grub_video_term): Added setcolor and getcolor.
11463         (MOD_INIT): Added registration of background_image command.
11464         (MOD_TERM): Added unregistration for background_image command.
11466 2007-12-30  Pavel Roskin  <proski@gnu.org>
11468         * loader/multiboot_loader.c: Fix multiboot command
11469         unregistration.  Fix all typos in the word "multiboot".
11471 2007-12-29  Pavel Roskin  <proski@gnu.org>
11473         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11474         support for initrd names used in Fedora.
11476 2007-12-26  Bean  <bean123ch@gmail.com>
11478         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11479         (cpio_mod_SOURCES): New variable.
11480         (cpio_mod_CFLAGS): Likewise.
11481         (cpio_mod_LDFLAGS): Likewise.
11483         * fs/cpio.c: New file.
11485         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11487         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11489         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11491         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11493 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11495         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11496         (grub_getcolor): New function.
11498         * kern/term.c (grub_getcolor): New function.
11499         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11500         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11501         (print_entry): Set normal and highlight colors to
11502         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11503         respectively, before printing and restore them to old
11504         values afterwards.
11505         (grub_menu_init_page): Likewise.  Fill an additional colored space
11506         that would otherwise be left blank.
11508         * term/efi/console.c (grub_console_getcolor): New function.
11509         (struct grub_console_term.getcolor): New variable.
11510         * term/i386/pc/console.c (grub_console_getcolor): New function.
11511         (struct grub_console_term.getcolor): New variable.
11512         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11513         (struct grub_console_term.getcolor): New variable.
11515         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11516         (struct grub_console_term.setcolor): Remove variable.
11517         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11518         (struct grub_console_term.setcolor): Remove variable.
11519         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11520         (struct grub_console_term.setcolor): Remove variable.
11521         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11522         (struct grub_console_term.setcolor): Remove variable.
11524 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11526         * configure.ac: Search for possible unifont.hex locations, and
11527         define UNIFONT_HEX if found.
11529         * Makefile.in (UNIFONT_HEX): Define variable.
11530         (DATA): Rename to ...
11531         (PKGLIB): ... this.  Update all users.
11532         (PKGDATA): New variable.
11533         (pkgdata_IMAGES): Rename to ...
11534         (pkglib_IMAGES): ... this. Update all users.
11535         (pkgdata_MODULES): Rename to ...
11536         (pkglib_MODULES): ... this. Update all users.
11537         (pkgdata_PROGRAMS): Rename to ...
11538         (pkglib_PROGRAMS): ... this. Update all users.
11539         (pkgdata_DATA): Rename to ...
11540         (pkglib_DATA): ... this. Update all users.
11541         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11542         (unicode.pff, ascii.pff): New rules.
11543         (all-local): Add `$(PKGDATA)' dependency.
11544         (install-local): Process `$(PKGDATA)'.
11546         * util/update-grub_lib.in (font_path): Search for *.pff files in
11547         a few more locations, including `${pkgdata}'.
11549 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11551         Patch from Bean  <bean123ch@gmail.com>:
11552         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11553         `size'.
11555 2007-12-21  Bean  <bean123ch@gmail.com>
11557         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11558         (ntfscomp_mod_SOURCES): New variable.
11559         (ntfscomp_mod_CFLAGS): Likewise.
11560         (ntfscomp_mod_LDFLAGS): Likewise.
11562         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11563         (grub_probe_SOURCES): Likewise.
11564         (grub_emu_SOURCES): Likewise.
11566         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11567         (grub_emu_SOURCES): Likewise.
11569         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11570         (grub_emu_SOURCES): Likewise.
11572         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11573         (grub_emu_SOURCES): Likewise.
11575         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11576         (read_run_list): Renamed to grub_ntfs_read_run_list.
11577         (decomp_nextvcn): Moved to ntfscomp.c.
11578         (decomp_getch): Likewise.
11579         (decomp_get16): Likewise.
11580         (decomp_block): Likewise.
11581         (read_block): Likewise.
11582         (read_data): Partially moved to ntfscomp.c.
11583         (fixup): Change unsigned to grub_uint16_t.
11584         (read_mft): Change unsigned long to grub_uint32_t.
11585         (read_attr): Likewise.
11586         (read_data): Likewise.
11587         (read_run_data): Likewise.
11588         (read_run_list): Likewise.
11589         (read_mft): Likewise.
11591         * fs/ntfscomp.c: New file.
11593         * include/grub/ntfs.h: New file.
11595 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11597         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11598         IDE disk check, since Linux is known to support 20 IDE disks.
11599         Reported by Colin Watson.
11601 2007-12-15  Bean  <bean123ch@gmail.com>
11603         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11604         (lnxboot_img_SOURCES): New variable.
11605         (lnxboot_img_ASFLAGS): Likewise.
11606         (lnxboot_img_LDFLAGS): Likewise.
11608         * boot/i386/pc/lnxboot.S: New file.
11610 2007-11-24  Pavel Roskin  <proski@gnu.org>
11612         * configure.ac: Test if '--build-id=none' is supported by the
11613         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11614         objcopy to generate incorrect binary files (binutils
11615         2.17.50.0.18-1 as shipped by Fedora 8).
11616         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11617         linking, so that build ID doesn't break the test.
11619 2007-11-24  Pavel Roskin  <proski@gnu.org>
11621         * include/grub/i386/time.h: use "void" in the argument list
11622         of grub_cpu_idle().
11623         * include/grub/powerpc/time.h: Likewise.
11624         * include/grub/sparc64/time.h: Likewise.
11626 2007-11-18  Christian Franke  <franke@computer.org>
11628         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11629         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11630         This fixes the problem that function keys did not work in grub-emu.
11632 2007-11-18  Christian Franke  <franke@computer.org>
11634         * disk/host.c (grub_host_open): Remove attribute unused from
11635         name parameter. Add check for "host". This fixes the problem
11636         that grub-emu does not find partitions.
11638 2007-11-18  Christian Franke  <franke@computer.org>
11640         * util/hostfs.c (is_dir): New function.
11641         (grub_hostfs_dir):  Handle missing dirent.d_type case.
11642         (grub_hostfs_read): Add missing fseek().
11643         (grub_hostfs_label): Clear label pointer.  This fixes a crash
11644         of grub-emu on "ls (host)".
11646 2007-11-18  Christian Franke  <franke@computer.org>
11648         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11649         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11650         to 64 bit boundary by default.
11652 2007-11-18  Bean  <bean123ch@gmail.com>
11654         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11655         (hexdump_mod_SOURCES): New variable.
11656         (hexdump_mod_CFLAGS): Likewise.
11657         (hexdump_mod_LDFLAGS): Likewise.
11659         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11661         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11663         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11665         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11667         * include/grub/hexdump.h: New file.
11669         * commands/hexdump.c: New file.
11671 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11673         * commands/i386/pc/play.c (beep_off): Switch order of arguments
11674         in grub_outb() calls.
11675         (beep_on): Likewise.
11677 2007-11-10  Christian Franke  <franke@computer.org>
11679         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11680         (grub_menu_run): Likewise.
11682 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11684         * include/grub/i386/efi/machine.h: New file.
11685         * include/grub/i386/linuxbios/machine.h: Likewise.
11686         * include/grub/i386/pc/machine.h: Likewise.
11687         * include/grub/powerpc/ieee1275/machine.h: Likewise.
11688         * include/grub/sparc64/ieee1275/machine.h: Likewise.
11690         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11691         (serial_hw_io_addr): New variable.
11692         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11693         instead of `(unsigned short *) 0x400'.
11695 2007-11-10  Bean  <bean123ch@gmail.com>
11697         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11699 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11701         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11702         (vga_mod_SOURCES): Added.
11703         (vga_mod_CFLAGS): Likewise.
11704         (vga_mod_LDFLAGS): Likewise.
11706         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11707         grub_outb() calls.
11708         (set_map_mask): Likewise.
11709         (set_read_map): Likewise.
11710         (set_read_address): Likewise.
11711         (vga_font): Removed variable.
11712         (get_vga_glyph): Removed function.
11713         (invalidate_char): Likewise.
11714         (write_char): Changed to use grub_font_get_glyph() for font
11715         information.
11716         (grub_vga_putchar): Likewise.
11717         (grub_vga_getcharwidth): Likewise.
11719 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11721         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11722         flags.
11723         (pxeboot_img_LDFLAGS): Likewise.
11724         (diskboot_img_LDFLAGS): Likewise.
11725         (kernel_img_LDFLAGS): Likewise.
11727 2007-11-06  Robert Millan  <rmh@aybabtu.com>
11729         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11730         in grub_outb() calls.
11731         (serial_hw_init): Likewise.
11733 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11735         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11736         spaces.  Skip non-regular files.
11738 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11740         * kern/disk.c (grub_disk_firmware_fini)
11741         (grub_disk_firmware_is_tainted): New variables.
11743         * include/grub/disk.h (grub_disk_firmware_fini)
11744         (grub_disk_firmware_is_tainted): Likewise.
11746         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11747         (grub_disk_biosdisk_fini): ... to here.
11748         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11749         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11750         is set.  Register grub_disk_biosdisk_fini() in
11751         `grub_disk_firmware_fini'.
11753         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11754         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11755         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11756         to finish existing firmware disk interface.
11758         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11759         (ata_mod_SOURCES): New variable.
11760         (ata_mod_CFLAGS): Likewise.
11761         (ata_mod_LDFLAGS): Likewise.
11763 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11765         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
11766         (grub_ata_wait): Reimplement using grub_millisleep().
11768         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11769         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11771 2007-11-03  Marco Gerards  <marco@gnu.org>
11773         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11774         (CRTC_ADDR_PORT): New macro.
11775         (CRTC_DATA_PORT): Likewise.
11776         (CRTC_CURSOR): Likewise.
11777         (CRTC_CURSOR_ADDR_HIGH): Likewise.
11778         (CRTC_CURSOR_ADDR_LOW): Likewise.
11779         (update_cursor): New function.
11780         (grub_console_real_putchar): Call `update_cursor'.
11781         (grub_console_gotoxy): Likewise.
11782         (grub_console_cls): Set the default color when clearing the
11783         screen.
11784         (grub_console_setcursor): Implemented.
11786 2007-11-03  Marco Gerards  <marco@gnu.org>
11788         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11789         become activate.
11790         (grub_ata_pio_write): Likewise.
11792         (grub_atapi_identify): Wait after issuing an ATA command.
11793         (grub_atapi_packet): Likewise.
11794         (grub_ata_identify): Likewise.
11795         (grub_ata_readwrite): Likewise.
11797 2007-11-03  Marco Gerards  <marco@gnu.org>
11799         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11800         (grub_ata_pio_write): Likewise.
11801         (grub_ata_readwrite): Use `grub_error', instead of
11802         returning `grub_errno'.
11804 2007-11-03  Marco Gerards  <marco@gnu.org>
11806         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11807         grub_ata_pio_write once for every single sector, instead of for
11808         multiple sectors.
11810 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11812         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11814         * conf/i386-linuxbios.rmk: New file.
11816         * kern/i386/pc/hardware.c: Likewise.
11817         * term/i386/pc/at_keyboard.c: Likewise.
11818         * term/i386/pc/vga_text.c: Likewise.
11820         * include/grub/i386/linuxbios/boot.h: Likewise.
11821         * include/grub/i386/linuxbios/console.h: Likewise.
11822         * include/grub/i386/linuxbios/init.h: Likewise.
11823         * include/grub/i386/linuxbios/kernel.h: Likewise.
11824         * include/grub/i386/linuxbios/loader.h: Likewise.
11825         * include/grub/i386/linuxbios/memory.h: Likewise.
11826         * include/grub/i386/linuxbios/serial.h: Likewise.
11827         * include/grub/i386/linuxbios/time.h: Likewise.
11829         * kern/i386/linuxbios/init.c: Likewise.
11830         * kern/i386/linuxbios/startup.S: Likewise.
11831         * kern/i386/linuxbios/table.c: Likewise.
11833 2007-10-31  Marco Gerards  <marco@gnu.org>
11835         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11836         (ata_mod_SOURCES): New variable.
11837         (ata_mod_CFLAGS): Likewise.
11838         (ata_mod_LDFLAGS): Likewise.
11840         * disk/ata.c: New file.
11842         * include/grub/disk.h (grub_disk_dev_id): Add
11843         `GRUB_DISK_DEV_ATA_ID'.
11845 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11847         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11848         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11850         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11851         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11853         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11854         `<grub/types.h>'.
11856         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11858 2007-10-27  Robert Millan  <rmh@aybabtu.com>
11860         * include/grub/types.h (ULONG_MAX): Define macro.
11862 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11864         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
11865         `"../realmode.S"'.
11866         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
11868 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11870         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11871         (pkgdata_MODULES): Add `biosdisk.mod'.
11872         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11873         variables.
11875         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11876         (grub_biosdisk_init): Replace with ...
11877         (GRUB_MOD_INIT(biosdisk)): ... this.
11878         (grub_biosdisk_fini): Replace with ...
11879         (GRUB_MOD_FINI(biosdisk)): ... this.
11881         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11882         (grub_machine_init): Remove call to grub_biosdisk_init().
11883         (grub_machine_fini): Remove call to grub_machine_fini().
11885         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11887 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11889         * include/grub/time.h: New file.
11890         * include/grub/i386/time.h: Likewise.
11891         * include/grub/powerpc/time.h: Likewise.
11892         * include/grub/sparc64/time.h: Likewise.
11894         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11895         instances to ...
11896         (KERNEL_MACHINE_TIME_HEADER): ... this.
11897         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11898         instances to ...
11899         (KERNEL_MACHINE_TIME_HEADER): ... this.
11900         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11901         instances to ...
11902         (KERNEL_MACHINE_TIME_HEADER): ... this.
11904         * kern/i386/efi/init.c: Include `<grub/time.h>'.
11905         (grub_millisleep): New function.
11906         * kern/i386/pc/init.c: Include `<grub/time.h>'.
11907         (grub_millisleep): New function.
11908         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11909         Remove `grub/machine/time.h' include.
11910         (grub_millisleep): New function.
11911         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11912         Remove `grub/machine/time.h' include.
11913         (grub_millisleep): New function.
11915         * include/grub/misc.h (grub_div_roundup): New function.
11917         * kern/misc.c: Include `<grub/time.h>'.
11918         (grub_millisleep_generic): New function.
11920         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11921         Add `time.h'.
11922         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11923         Add `time.h'.
11924         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11925         `machine/time.h'.  Add `time.h'.
11926         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11928 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11930         * include/grub/misc.h (grub_max): New function.
11932 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11934         * util/misc.c (grub_util_info): Call fflush() before returning.
11936 2007-10-20  Robert Millan  <rmh@aybabtu.com>
11938         * genmk.rb (Image): Copy `extra_flags' from here ...
11939         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
11941         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11942         to `argc' and `args' arguments.
11944 2007-10-17  Robert Millan  <rmh@aybabtu.com>
11946         * kern/i386/loader.S: New file.
11948         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11949         * kern/i386/loader.S (grub_linux_prot_size)... to here.
11950         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11951         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11952         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11953         * kern/i386/loader.S (grub_linux_real_addr)... to here.
11954         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
11955         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
11956         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
11957         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
11958         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
11959         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
11960         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
11961         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
11963         * kern/i386/realmode.S: New file.
11965         * kern/i386/pc/startup.S (protstack): Moved from here ...
11966         * kern/i386/realmode.S (protstack)... to here.
11967         * kern/i386/pc/startup.S (gdt): Moved from here ...
11968         * kern/i386/realmode.S (gdt)... to here.
11969         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
11970         * kern/i386/realmode.S (prot_to_real)... to here.
11972         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
11973         `kern/i386/realmode.S'.
11975 2007-10-17  Robert Millan  <rmh@aybabtu.com>
11977         * include/grub/i386/loader.h: New file.
11979         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
11980         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11981         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11982         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11983         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
11984         * include/grub/i386/loader.h (grub_linux_prot_size)
11985         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11986         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11987         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11988         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
11990         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
11992 2007-10-15  Robert Millan  <rmh@aybabtu.com>
11994         * normal/misc.c (grub_normal_print_device_info): Do not probe for
11995         filesystem when dev->disk is unset.
11996         Do probe for filesystem even when dev->disk->has_partitions is set.
11997         In case a filesystem is found, always report it.
11998         In case it isn't, if dev->disk->has_partitions is set, report that
11999         a partition table was found instead of reporting that no filesystem
12000         could be identified.
12002 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12004         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12005         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12007         * include/grub/types.h (grub_host_to_target16): New macro.
12008         (grub_host_to_target32): Likewise.
12009         (grub_host_to_target64): Likewise.
12010         (grub_target_to_host16): Likewise.
12011         (grub_target_to_host32): Likewise.
12012         (grub_target_to_host64): Likewise.
12014         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12015         Renamed from to ...
12016         (GRUB_MOD_ALIGN): ...this.  Update all users.
12018         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12019         grub_host_to_target32.
12020         Replace grub_be_to_cpu32 with grub_target_to_host32.
12021         (load_modules): Likewise.
12022         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12023         Replace grub_be_to_cpu32 with grub_target_to_host32.
12024         Replace grub_cpu_to_be16 with grub_host_to_target16.
12025         Replace grub_cpu_to_be32 grub_host_to_target32.
12027 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12029         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12030         * util/elf/grub-mkimage.c: ... here.
12032         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12033         `util/powerpc/ieee1275/grub-mkimage.c'.
12035 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12037         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12038         and make it easier to figure out.
12039         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12040         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12041         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12042         leave us with less than HEAP_MIN_SIZE total heap.
12043         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12045 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12047         * include/grub/i386/io.h: New file.
12048         * commands/i386/pc/play.c (inb): Removed.
12049         (outb): Removed.
12050         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12051         with grub_outb().
12052         * term/i386/pc/serial.c  (inb): Removed.
12053         (outb): Removed.
12054         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12055         with grub_outb().
12056         * term/i386/pc/vga.c  (inb): Removed.
12057         (outb): Removed.
12058         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12059         with grub_outb().
12061 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12063         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12064         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12065         Reported by Marcin Kurek.
12067 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12069         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12070         SmartFirmware version updates (as released by Sven Luther), and avoid
12071         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12072         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12073         known broken.
12075 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12077         From Hitoshi Ozeki:
12078         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12079         when merging two regions.
12081 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12083         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12084         * normal/completion.c (grub_normal_do_completion): Likewise.
12085         Reported by Hitoshi Ozeki.
12087 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12089         Do not use devices at boot in chainloading.
12091         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12092         (boot_part_addr): Likewise.
12093         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12094         with BOOT_DRIVE and BOOT_PART_ADDR.
12095         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12096         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12098 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12100         Patch from Simon Peter <dn.tlp@gmx.net>:
12101         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12102         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12103         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12104         util/i386/pc/grub-setup.c_DEPENDENCIES.
12105         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12106         util/grub-probe.c_DEPENDENCIES.
12107         * conf/powerpc-ieee1275.rmk: Likewise.
12109 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12111         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12112         to tell grub-mkdevicemap how to name devices.
12113         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12114         feature).
12116         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12117         util/i386/get_disk_name.c.
12118         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12119         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12120         util/ieee1275/get_disk_name.c.
12122         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12124         * DISTLIST: Add util/i386/get_disk_name.c and
12125         util/ieee1275/get_disk_name.c.
12127         * util/grub-mkdevicemap.c: Replace device naming logic with
12128         grub_util_get_disk_name() calls.
12130 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12132         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12133         (so that it works for both plural and singular quantities).
12135 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12137         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12138         so that [xz] isn't taken into account when determining order.
12140 2007-08-02  Marco Gerards  <marco@gnu.org>
12142         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12143         `include/multiboot2.h', `include/grub/elfload.h',
12144         `include/multiboot.h', `include/grub/multiboot.h',
12145         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12146         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12147         `kern/elf.c', `loader/multiboot_loader.c',
12148         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12149         `loader/i386/pc/multiboot2.c',
12150         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12151         `util/i386/pc/grub-mkrescue.in'.  Remove
12152         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12153         `include/grub/i386/pc/util/biosdisk.h' and
12154         `include/grub/powerpc/ieee1275/multiboot.h'.
12156 2007-08-02  Bean  <bean123ch@gmail.com>
12158         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12159         (ntfs_mod_SOURCES): New variable.
12160         (ntfs_mod_CFLAGS): Likewise.
12161         (ntfs_mod_LDFLAGS): Likewise.
12163         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12164         (grub_probe_SOURCES): Likewise.
12165         (grub_emu_SOURCES): Likewise.
12167         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12168         (grub_emu_SOURCES): Likewise.
12170         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12171         (grub_emu_SOURCES): Likewise.
12173         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12175         * fs/ntfs.c: New file.
12177 2007-08-02  Bean  <bean123ch@gmail.com>
12179         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12181         * file.h (grub_file): Likewise.
12183         * fshelp.h (grub_fshelp_read_file): Likewise.
12185         * util/i386/pc/grub-setup.c (setup): Likewise.
12186         (save_first_sector): Likewise.
12187         (save_blocklists): Likewise.
12189         * fs/affs.c (grub_affs_read_file): Likewise.
12191         * fs/ext2.c (grub_ext2_read_file): Likewise.
12193         * fs/fat.c (grub_fat_read_data): Likewise.
12195         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12197         * fs/hfs.c (grub_hfs_read_file): Likewise.
12199         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12201         * fs/jfs.c (grub_jfs_read_file): Likewise.
12203         * fs/minix.c (grub_minix_read_file): Likewise.
12205         * fs/sfs.c (grub_sfs_read_file): Likewise.
12207         * fs/ufs.c (grub_ufs_read_file): Likewise.
12209         * fs/xfs.c (grub_xfs_read_file): Likewise.
12211         * command/blocklist.c (read_blocklist): Likewise.
12212         (print_blocklist): Likewise.
12214 2007-08-02  Marco Gerards  <marco@gnu.org>
12216         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12217         `util/hostfs.c'.
12219         * disk/host.c: New file.
12221         * util/hostfs.c: Likewise.
12223         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12224         return `GRUB_ERR_BAD_FS'.
12225         * fs/sfs.c (grub_sfs_mount): Likewise.
12226         * fs/xfs.c (grub_xfs_mount): Likewise.
12228         * include/grub/disk.h (enum grub_disk_dev_id): Add
12229         `GRUB_DISK_DEVICE_HOST_ID'.
12231         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12233 2007-07-24  Jerone Young  <jerone@gmail.com>
12235         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12236         modules for compilation.
12237         * conf/powerpc-ieee1275.rmk: Likewise.
12239         * include/multiboot.h: Move multiboot definitions to one file. Rename
12240         many definitions to not get grub specific.
12241         * include/multiboot2.h: Create header with multiboot 2 definitions.
12242         * include/grub/multiboot.h: Header for grub specific function
12243         prototypes and definitions.
12244         * include/grub/multiboot2.h: Likewise.
12245         * include/grub/multiboot_loader.h: Likewise.
12246         * include/grub/i386/pc/multiboot.h: Removed.
12247         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12249         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12250         and 2 to allow for one multiboot and module commands.
12251         * loader/multiboot2.c: Add multiboot2 functionality.
12252         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12253         and definition names.
12254         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12255         2 functions.
12256         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12257         ieee1275 specific multiboot2 code.
12259         * kern/i386/pc/startup.S: Change headers and definition names for
12260         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12262 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12264         * geninitheader.sh: Process file specified in first parameter rather
12265         than hardcoding grub_modules_init.lst.
12266         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12267         than hardcoding grub_modules_init.h.
12269         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12270         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12271         grub_probe_init.[ch] and grub_setup_init.[ch].
12273         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12274         grub_modules_init.h with grub_emu_init.h.
12275         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12276         grub_probe_init.[ch] files.
12277         * conf/i386-efi.rmk: Likewise.
12278         * conf/i386-pc.rmk: Likewise.
12279         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12280         grub_setup_init.[ch] files.
12282         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12283         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12284         to initialize modules rather than a list of hardcoded functions.
12285         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12286         grub_init_all() to initialize modules rather than a list of hardcoded
12287         functions.
12289 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12291         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12292         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12294 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12296         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12297         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12298         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12299         flag when running on SmartFirmware.
12300         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12301         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12302         was set.
12304         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12305         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12306         rather than decreasing it.
12308         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12309         there's not enough space to do it, fail in the same way as when it
12310         can't be done because there are no partitions.
12312         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12313         when nvsetenv failed.
12315 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12317         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12318         because this rule is automatically generated.
12319         (grub-mkrescue): Removed for the same reason as above.
12321 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12323         Migrate to GNU General Public License Version 3.
12325         * COPYING: Replaced with the plain text version of GPLv3.
12327         * config.guess: Updated from gnulib.
12328         * config.sub: Likewise.
12330         * geninit.sh: Output a GPLv3 copyright notice.
12331         * geninitheader.sh: Likewise.
12332         * genmodsrc.sh: Likewise.
12333         * gensymlist.sh.in: Likewise.
12335         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12336         * boot/i386/pc/diskboot.S: Likewise.
12337         * boot/i386/pc/pxeboot.S: Likewise.
12338         * commands/blocklist.c: Likewise.
12339         * commands/boot.c: Likewise.
12340         * commands/cat.c: Likewise.
12341         * commands/cmp.c: Likewise.
12342         * commands/configfile.c: Likewise.
12343         * commands/echo.c: Likewise.
12344         * commands/help.c: Likewise.
12345         * commands/ls.c: Likewise.
12346         * commands/search.c: Likewise.
12347         * commands/terminal.c: Likewise.
12348         * commands/test.c: Likewise.
12349         * commands/videotest.c: Likewise.
12350         * commands/i386/cpuid.c: Likewise.
12351         * commands/i386/pc/halt.c: Likewise.
12352         * commands/i386/pc/play.c: Likewise.
12353         * commands/i386/pc/reboot.c: Likewise.
12354         * commands/i386/pc/vbeinfo.c: Likewise.
12355         * commands/i386/pc/vbetest.c: Likewise.
12356         * commands/ieee1275/halt.c: Likewise.
12357         * commands/ieee1275/reboot.c: Likewise.
12358         * commands/ieee1275/suspend.c: Likewise.
12359         * disk/loopback.c: Likewise.
12360         * disk/lvm.c: Likewise.
12361         * disk/raid.c: Likewise.
12362         * disk/efi/efidisk.c: Likewise.
12363         * disk/i386/pc/biosdisk.c: Likewise.
12364         * disk/ieee1275/ofdisk.c: Likewise.
12365         * font/manager.c: Likewise.
12366         * fs/affs.c: Likewise.
12367         * fs/ext2.c: Likewise.
12368         * fs/fat.c: Likewise.
12369         * fs/fshelp.c: Likewise.
12370         * fs/hfs.c: Likewise.
12371         * fs/hfsplus.c: Likewise.
12372         * fs/iso9660.c: Likewise.
12373         * fs/jfs.c: Likewise.
12374         * fs/minix.c: Likewise.
12375         * fs/sfs.c: Likewise.
12376         * fs/ufs.c: Likewise.
12377         * fs/xfs.c: Likewise.
12378         * hello/hello.c: Likewise.
12379         * include/grub/acorn_filecore.h: Likewise.
12380         * include/grub/arg.h: Likewise.
12381         * include/grub/bitmap.h: Likewise.
12382         * include/grub/boot.h: Likewise.
12383         * include/grub/cache.h: Likewise.
12384         * include/grub/device.h: Likewise.
12385         * include/grub/disk.h: Likewise.
12386         * include/grub/dl.h: Likewise.
12387         * include/grub/elfload.h: Likewise.
12388         * include/grub/env.h: Likewise.
12389         * include/grub/err.h: Likewise.
12390         * include/grub/file.h: Likewise.
12391         * include/grub/font.h: Likewise.
12392         * include/grub/fs.h: Likewise.
12393         * include/grub/fshelp.h: Likewise.
12394         * include/grub/gzio.h: Likewise.
12395         * include/grub/hfs.h: Likewise.
12396         * include/grub/kernel.h: Likewise.
12397         * include/grub/loader.h: Likewise.
12398         * include/grub/lvm.h: Likewise.
12399         * include/grub/misc.h: Likewise.
12400         * include/grub/mm.h: Likewise.
12401         * include/grub/net.h: Likewise.
12402         * include/grub/normal.h: Likewise.
12403         * include/grub/parser.h: Likewise.
12404         * include/grub/partition.h: Likewise.
12405         * include/grub/pc_partition.h: Likewise.
12406         * include/grub/raid.h: Likewise.
12407         * include/grub/rescue.h: Likewise.
12408         * include/grub/script.h: Likewise.
12409         * include/grub/setjmp.h: Likewise.
12410         * include/grub/symbol.h: Likewise.
12411         * include/grub/term.h: Likewise.
12412         * include/grub/terminfo.h: Likewise.
12413         * include/grub/tparm.h: Likewise.
12414         * include/grub/types.h: Likewise.
12415         * include/grub/video.h: Likewise.
12416         * include/grub/efi/api.h: Likewise.
12417         * include/grub/efi/chainloader.h: Likewise.
12418         * include/grub/efi/console.h: Likewise.
12419         * include/grub/efi/console_control.h: Likewise.
12420         * include/grub/efi/disk.h: Likewise.
12421         * include/grub/efi/efi.h: Likewise.
12422         * include/grub/efi/pe32.h: Likewise.
12423         * include/grub/efi/time.h: Likewise.
12424         * include/grub/i386/linux.h: Likewise.
12425         * include/grub/i386/setjmp.h: Likewise.
12426         * include/grub/i386/types.h: Likewise.
12427         * include/grub/i386/efi/kernel.h: Likewise.
12428         * include/grub/i386/efi/loader.h: Likewise.
12429         * include/grub/i386/efi/time.h: Likewise.
12430         * include/grub/i386/pc/biosdisk.h: Likewise.
12431         * include/grub/i386/pc/boot.h: Likewise.
12432         * include/grub/i386/pc/chainloader.h: Likewise.
12433         * include/grub/i386/pc/console.h: Likewise.
12434         * include/grub/i386/pc/init.h: Likewise.
12435         * include/grub/i386/pc/kernel.h: Likewise.
12436         * include/grub/i386/pc/loader.h: Likewise.
12437         * include/grub/i386/pc/memory.h: Likewise.
12438         * include/grub/i386/pc/multiboot.h: Likewise.
12439         * include/grub/i386/pc/serial.h: Likewise.
12440         * include/grub/i386/pc/time.h: Likewise.
12441         * include/grub/i386/pc/vbe.h: Likewise.
12442         * include/grub/i386/pc/vbeblit.h: Likewise.
12443         * include/grub/i386/pc/vbefill.h: Likewise.
12444         * include/grub/i386/pc/vbeutil.h: Likewise.
12445         * include/grub/i386/pc/vga.h: Likewise.
12446         * include/grub/ieee1275/ieee1275.h: Likewise.
12447         * include/grub/ieee1275/ofdisk.h: Likewise.
12448         * include/grub/powerpc/libgcc.h: Likewise.
12449         * include/grub/powerpc/setjmp.h: Likewise.
12450         * include/grub/powerpc/types.h: Likewise.
12451         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12452         * include/grub/powerpc/ieee1275/console.h: Likewise.
12453         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12454         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12455         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12456         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12457         * include/grub/powerpc/ieee1275/time.h: Likewise.
12458         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12459         * include/grub/sparc64/libgcc.h: Likewise.
12460         * include/grub/sparc64/setjmp.h: Likewise.
12461         * include/grub/sparc64/types.h: Likewise.
12462         * include/grub/sparc64/ieee1275/console.h: Likewise.
12463         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12464         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12465         * include/grub/sparc64/ieee1275/time.h: Likewise.
12466         * include/grub/util/biosdisk.h: Likewise.
12467         * include/grub/util/getroot.h: Likewise.
12468         * include/grub/util/lvm.h: Likewise.
12469         * include/grub/util/misc.h: Likewise.
12470         * include/grub/util/raid.h: Likewise.
12471         * include/grub/util/resolve.h: Likewise.
12472         * io/gzio.c: Likewise.
12473         * kern/device.c: Likewise.
12474         * kern/disk.c: Likewise.
12475         * kern/dl.c: Likewise.
12476         * kern/elf.c: Likewise.
12477         * kern/env.c: Likewise.
12478         * kern/err.c: Likewise.
12479         * kern/file.c: Likewise.
12480         * kern/fs.c: Likewise.
12481         * kern/loader.c: Likewise.
12482         * kern/main.c: Likewise.
12483         * kern/misc.c: Likewise.
12484         * kern/mm.c: Likewise.
12485         * kern/parser.c: Likewise.
12486         * kern/partition.c: Likewise.
12487         * kern/rescue.c: Likewise.
12488         * kern/term.c: Likewise.
12489         * kern/efi/efi.c: Likewise.
12490         * kern/efi/init.c: Likewise.
12491         * kern/efi/mm.c: Likewise.
12492         * kern/i386/dl.c: Likewise.
12493         * kern/i386/efi/init.c: Likewise.
12494         * kern/i386/efi/startup.S: Likewise.
12495         * kern/i386/pc/init.c: Likewise.
12496         * kern/i386/pc/lzo1x.S: Likewise.
12497         * kern/i386/pc/startup.S: Likewise.
12498         * kern/ieee1275/ieee1275.c: Likewise.
12499         * kern/powerpc/cache.S: Likewise.
12500         * kern/powerpc/dl.c: Likewise.
12501         * kern/powerpc/ieee1275/cmain.c: Likewise.
12502         * kern/powerpc/ieee1275/crt0.S: Likewise.
12503         * kern/powerpc/ieee1275/init.c: Likewise.
12504         * kern/powerpc/ieee1275/openfw.c: Likewise.
12505         * kern/sparc64/cache.S: Likewise.
12506         * kern/sparc64/dl.c: Likewise.
12507         * kern/sparc64/ieee1275/init.c: Likewise.
12508         * kern/sparc64/ieee1275/openfw.c: Likewise.
12509         * loader/efi/chainloader.c: Likewise.
12510         * loader/efi/chainloader_normal.c: Likewise.
12511         * loader/i386/efi/linux.c: Likewise.
12512         * loader/i386/efi/linux_normal.c: Likewise.
12513         * loader/i386/pc/chainloader.c: Likewise.
12514         * loader/i386/pc/chainloader_normal.c: Likewise.
12515         * loader/i386/pc/linux.c: Likewise.
12516         * loader/i386/pc/linux_normal.c: Likewise.
12517         * loader/i386/pc/multiboot.c: Likewise.
12518         * loader/i386/pc/multiboot_normal.c: Likewise.
12519         * loader/powerpc/ieee1275/linux.c: Likewise.
12520         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12521         * normal/arg.c: Likewise.
12522         * normal/cmdline.c: Likewise.
12523         * normal/command.c: Likewise.
12524         * normal/completion.c: Likewise.
12525         * normal/execute.c: Likewise.
12526         * normal/function.c: Likewise.
12527         * normal/lexer.c: Likewise.
12528         * normal/main.c: Likewise.
12529         * normal/menu.c: Likewise.
12530         * normal/menu_entry.c: Likewise.
12531         * normal/misc.c: Likewise.
12532         * normal/parser.y: Likewise.
12533         * normal/script.c: Likewise.
12534         * normal/i386/setjmp.S: Likewise.
12535         * normal/powerpc/setjmp.S: Likewise.
12536         * normal/sparc64/setjmp.S: Likewise.
12537         * partmap/acorn.c: Likewise.
12538         * partmap/amiga.c: Likewise.
12539         * partmap/apple.c: Likewise.
12540         * partmap/gpt.c: Likewise.
12541         * partmap/pc.c: Likewise.
12542         * partmap/sun.c: Likewise.
12543         * term/gfxterm.c: Likewise.
12544         * term/terminfo.c: Likewise.
12545         * term/efi/console.c: Likewise.
12546         * term/i386/pc/console.c: Likewise.
12547         * term/i386/pc/serial.c: Likewise.
12548         * term/i386/pc/vesafb.c: Likewise.
12549         * term/i386/pc/vga.c: Likewise.
12550         * term/ieee1275/ofconsole.c: Likewise.
12551         * util/biosdisk.c: Likewise.
12552         * util/console.c: Likewise.
12553         * util/genmoddep.c: Likewise.
12554         * util/getroot.c: Likewise.
12555         * util/grub-emu.c: Likewise.
12556         * util/grub-mkdevicemap.c: Likewise.
12557         * util/grub-probe.c: Likewise.
12558         * util/lvm.c: Likewise.
12559         * util/misc.c: Likewise.
12560         * util/raid.c: Likewise.
12561         * util/resolve.c: Likewise.
12562         * util/update-grub.in: Likewise.
12563         * util/update-grub_lib.in: Likewise.
12564         * util/grub.d/00_header.in: Likewise.
12565         * util/grub.d/10_hurd.in: Likewise.
12566         * util/grub.d/10_linux.in: Likewise.
12567         * util/i386/efi/grub-install.in: Likewise.
12568         * util/i386/efi/grub-mkimage.c: Likewise.
12569         * util/i386/pc/grub-install.in: Likewise.
12570         * util/i386/pc/grub-mkimage.c: Likewise.
12571         * util/i386/pc/grub-mkrescue.in: Likewise.
12572         * util/i386/pc/grub-setup.c: Likewise.
12573         * util/i386/pc/misc.c: Likewise.
12574         * util/powerpc/ieee1275/grub-install.in: Likewise.
12575         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12576         * util/powerpc/ieee1275/misc.c: Likewise.
12577         * video/bitmap.c: Likewise.
12578         * video/video.c: Likewise.
12579         * video/i386/pc/vbe.c: Likewise.
12580         * video/i386/pc/vbeblit.c: Likewise.
12581         * video/i386/pc/vbefill.c: Likewise.
12582         * video/i386/pc/vbeutil.c: Likewise.
12583         * video/readers/tga.c: Likewise.
12585 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12587         * conf/i386-efi.rmk: Replace obsolete reference to
12588         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12589         with util/getroot.c.
12590         * conf/powerpc-ieee1275.rmk: Likewise.
12591         * conf/sparc64-ieee1275.rmk: Likewise.
12593         * util/grub-emu.c (main): Fix unchecked pointer handling.
12595 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12597         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12598         invocation to fail, in order to support partition-less media.
12600         * util/i386/pc/grub-install.in: Likewise.
12602         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12603         which fs or partmap modules are needed (akin to its sister scripts).
12605         Also use grub-probe to get rid of unportable /proc/mounts check.
12607         Print the same informational message that the other scripts do, before
12608         exiting.
12610 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12612         * util/update-grub_lib.in (font_path): New function.  Determine whether
12613         a font file can be found and, if so, echo the GRUB path to it.
12615         * util/update-grub.in: Handle multiple terminals depending on user
12616         input, platform availability and font file presence.  Propagate
12617         variables of our findings to /etc/grub.d/ children.
12619         * util/grub.d/00_header.in: Handle multiple terminals, based on
12620         environment setup by update-grub.
12622 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12624         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12626 2007-06-21  Robert Millan  <rmh@aybabtu.com>
12628         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12629         indicate end of data section in kernel image.
12630         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12631         GRUB_KERNEL_MACHINE_DATA_END.
12633         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12634         space for it.
12635         * kern/i386/efi/startup.S: Likewise.
12637         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12638         during image generation.  Implement --prefix option to override this
12639         patch.
12640         * util/i386/efi/grub-mkimage.c: Likewise.
12642         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12643         code to make path relative to its root into a separate function.
12645         * util/i386/pc/grub-install.in: Use newly provided
12646         make_system_path_relative_to_its_root() to convert ${grubdir}, then
12647         pass the result to grub-install --prefix.
12649 2007-06-13  Robert Millan  <rmh@aybabtu.com>
12651         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12652         DEFAULT_DEVICE_MAP.
12653         * util/grub-emu.c: Use above definitions from misc.h instead of
12654         defining them.
12655         * util/grub-mkdevicemap.c: Likewise.
12656         * util/i386/pc/grub-setup.c: Likewise.
12657         * util/grub-probe.c: Likewise.
12658         (probe): Abort with grub_util_error() when either
12659         grub_guess_root_device or grub_util_get_grub_dev fails.
12661 2007-06-12  Robert Millan  <rmh@aybabtu.com>
12663         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12664         "pager" assignment.
12665         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12666         "pcdata".
12667         * util/grub-probe.c (probe): Likewise for "drive_name".
12669 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12671         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12672         not just the cdrom one.
12674 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12676         * util/i386/pc/grub-mkrescue.in: Add "set -e".
12677         Add --pkglibdir=DIR option to override pkglibdir.
12678         Mention --image-type=TYPE in help output.
12679         Fix --grub-mkimage (it was a no-op).
12680         Abort gracefully when no parameter is given.
12682 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12684         * util/i386/pc/grub-mkrescue.in: New file.
12685         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
12686         * Makefile.in: Handle bin_SCRIPTS.
12688 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
12690         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12691         list of video modes.
12693 2007-06-06  Robert Millan  <rmh@aybabtu.com>
12695         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12696         file doesn't exist, or if it is in a filesystem grub can't read.
12698         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
12699         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
12700         header comment to fit in 80 columns when the variables are resolved.
12702         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12703         could be identified by update-grub.  Remove redundant check for
12704         unifont.pff existence (since convert_system_path_to_grub_path now
12705         handles that).
12707 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12709         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12711         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12713         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12715 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12717         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12719         * include/grub/partition.h: Declare grub_apple_partition_map_init and
12720         grub_apple_partition_map_fini.
12722         * util/biosdisk.c
12723         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12724         to access >2 TiB disks).
12726         Print disk->total_sectors with %llu instead of %lu, since this
12727         variable is always 64-bit (prevents wrong disk size from being displayed
12728         on either >2 TiB disk or big-endian CPU).
12730         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12731         into a generic case that supports all (sane) partition maps.
12733         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12734         breaks big-endian.
12736         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12737         and grub_apple_partition_map_fini() after that.
12739 2007-06-01  Robert Millan  <rmh@aybabtu.com>
12741         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12743         * util/grub.d/00_header.in: Only enable gfxterm when
12744         convert_system_path_to_grub_path() succeeds.
12746 2007-05-20  Robert Millan  <rmh@aybabtu.com>
12748         * util/update-grub_lib.in: New file.
12749         * DISTLIST: Add update-grub_lib.in.
12750         * conf/common.rmk: Generate update-grub_lib and install it in
12751         $(lib_DATA).
12752         * Makefile.in: Add install routine for $(lib_DATA).
12754         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12755         function provided by update-grub_lib to support arbitrary paths of
12756         unifont.pff.
12757         * util/update-grub.in: Use convert_system_path_to_grub_path() to
12758         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12760 2007-05-19  Robert Millan  <rmh@aybabtu.com>
12762         * commands/i386/cpuid.c: New module.
12763         * DISTLIST: Add it.
12764         * conf/i386-efi.rmk: Enable cpuid.mod.
12765         * conf/i386-pc.rmk: Likewise.
12767 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12769         * kern/disk.c (grub_disk_read): Check return value of
12770         grub_realloc().
12772 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12774         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12775         arrays.
12776         * disk/raid.c (grub_raid_open): Likewise.
12778 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12780         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12781         stack instead of on the heap.
12783         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12784         before doing a read on it.
12786         * configure.ac: Only use -fno-stack-protector for the target
12787         environment.
12789 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12791         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12792         __attribute_ ((unused)) to mode_type argument.
12794         * util/getroot.c (grub_guess_root_device): Fix #endif.
12796         * kern/misc.c (memcmp): Fix prototype.
12798         * include/grub/partition.h [GRUB_UTIL]
12799         (grub_gpt_partition_map_init): Add prototype.
12800         (grub_gpt_partition_map_fini): Likewise.
12802         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12803         at the right place.
12805         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12806         (grub_fat_read_data): Likewise.
12807         (grub_fat_find_dir): Likewise.
12809         * font/manager.c (find_glyph): Make table a const.
12810         (grub_font_get_glyph): Remove bitmap from if statement.
12812 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12814         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12815         code, first search for device in /dev/mapper, then in /dev.
12816         (grub_util_get_grub_dev): New function.
12817         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12818         prototype.
12819         * util/grub-probe.c (probe): Remove check for RAID, call
12820         grub_util_get_grub_dev() instead of
12821         grub_util_biosdisk_get_grub_dev().
12822         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12823         grub_util_biosdisk_get_grub_dev().
12824         * util/i386/pc/grub-setup.c (main): Likewise.
12826 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12828         * DISTLIST: Update for the latest changes.
12829         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12830         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12831         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12832         grub/util/biosdisk.h.
12833         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12834         grub/util/biosdisk.h.
12836 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12838         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12840 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12842         * util/i386/efi/grub-install.in: New.
12843         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12844         newly added grub-install.
12845         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12846         include.
12847         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12848         grub/util/biosdisk.h.
12849         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12850         grub/util/biosdisk.h.
12852 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12854         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12855         * include/grub/util/biosdisk.h: ... here.
12856         * util/i386/pc/biosdisk.c: Moved to ...
12857         * util/biosdisk.c: ... here.
12858         * util/i386/pc/getroot.c: Moved to ...
12859         * util/getroot.c: ... here.
12860         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12861         * util/grub-mkdevicemap.c: ... here.
12862         * util/i386/pc/grub-probe.c: Moved to ...
12863         * util/grub-probe.c: ... here.
12865 2007-05-15  Robert Millan  <rmh@aybabtu.com>
12867         * util/update-grub.in: Remove duplicated line in grub.cfg header
12868         message.
12870 2007-05-13  Robert Millan  <rmh@aybabtu.com>
12872         * util/update-grub.in: Fix a few assumptions about the devices holding
12873         /, /boot and /boot/grub being the same.
12874         * util/grub.d/00_header.in: Likewise.
12875         * util/grub.d/10_hurd.in: Likewise.
12876         * util/grub.d/10_linux.in: Likewise.
12878         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12879         patterns.  Use that to define the `.old' suffix as older than `'.
12881         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12883         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12884         the grub.cfg header message.
12886 2007-05-11  Robert Millan  <rmh@aybabtu.com>
12888         * util/update-grub.in: Create device.map if it doesn't already exist,
12889         before attempting to run grub-probe.
12890         Check for grub-probe and grub-mkdevicemap with the same code
12891         grub-install is using.
12892         Remove test mode.
12894 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12896         * Makefile.in: Add the datarootdir autoconf variable.
12898 2007-05-09  Robert Millan  <rmh@aybabtu.com>
12900         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12901         fail gracefully if dev->disk->partition == NULL.
12903 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12905         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12906         determine partition map module.
12907         * util/i386/pc/grub-install.in: Use this feature to decide which
12908         partition module to load, instead of hardcoding pc and gpt.
12910 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12912         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12913         source directory differs from build directory.
12915 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12917         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12918         initialisation.
12920 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12922         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12924 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12926         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12927         command-line arguments via ${GRUB_CMDLINE_LINUX}.
12929 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12931         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12932         (grub_probe_SOURCES): Likewise.
12933         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12934         GPT and initialize dos_part and bsd_part accordingly.
12935         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12936         install_bsd_part.
12937         (main): Activate gpt module for use during partition identification,
12938         and deactivate it afterwards.
12939         * util/i386/pc/grub-install.in: Add gpt module to core.img.
12940         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12941         partition identification, and deactivate it afterwards.
12943 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12945         * term/i386/pc/console.c (grub_console_fini): Call
12946         grub_term_set_current() before grub_term_unregister().
12948 2007-05-04  Robert Millan  <rmh@aybabtu.com>
12950         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12951         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12952         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
12953         and update-grub_DATA.
12954         * conf/common.rmk: Build and install update-grub components.
12955         * conf/common.mk: Regenerate.
12956         * util/update-grub.in: New.  Core of update-grub.
12957         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
12958         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
12959         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
12960         * util/grub.d/README: New.  Document grub.d directory layout.
12962 2007-05-01  Robert Millan  <rmh@aybabtu.com>
12964         * util/grub-emu.c: Move initialization functions
12965         grub_util_biosdisk_init() and grub_init_all() before
12966         grub_util_biosdisk_get_grub_dev(), which relies on them.
12968 2007-04-19  Robert Millan  <rmh@aybabtu.com>
12970         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
12971         it is used later.
12973 2007-04-18  Jerone Young  <jerone@gmail.com>
12975         * kernel/elf.c: Add missing parenthesis for conditional statement
12976         stanza.
12978 2007-04-10  Jerone Young  <jerone@gmail.com>
12980         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
12981         continue on and look for device node with real device name.
12983 2007-04-10  Jerone Young  <jerone@gmail.com>
12985         * configure.ac: Add argument for autoconf to use transformation
12986         ability.
12987         * Makefile.in: Add autoconf package transformation code.
12988         * util/i386/pc/grub-install.in: Likewise.
12989         * util/powerpc/ieee1275/grub-install.in: Likewise.
12991 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
12993         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
12994         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
12995         (EXT2_REVISION): Likewise.
12996         (EXT2_INODE_SIZE): Likewise.
12997         (struct grub_ext2_block_group): Added a missing member
12998         "used_dirs".
12999         (grub_ext2_read_inode): Divide by the inode size in a superblock
13000         instead of 128 to obtain INODES_PER_BLOCK.
13001         Use the macro EXT2_INODE_SIZE instead of directly using
13002         SBLOCK->INODE_SIZE.
13004 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13006         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13007         superblock instead of the structure size to compute an
13008         offset. This fixes the problem that GRUB could not read a
13009         filesystem when inode size is different from 128-byte.
13011 2007-03-05  Marco Gerards  <marco@gnu.org>
13013         * normal/main.c (read_config_file): When "menu" is not set, create
13014         an initial context.
13016 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13018         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13019         (HEAP_LIMIT): New macro.
13020         (grub_claim_heap): Claim memory up to `heaplimit'.
13022 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13024         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13025         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13026         (_start): Likewise.
13027         (grub_arch_modules_addr): Return address after `_end'.
13028         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13029         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13030         (add_segments): Calculate `_end' from phdr size and location.
13031         (ALIGN_UP): Moved to ...
13032         * include/grub/misc.h: here.
13033         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13034         New macro.
13035         (GRUB_IEEE1275_MODULE_BASE): Removed.
13037 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13039         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13040         loop boundary.
13042 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13044         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13045         All users updated.
13046         (grub_elf64_load_hook_t): Likewise.
13047         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13048         debug output.
13050 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13052         * kern/mm.c: Update copyright.
13053         (grub_mm_debug): Correct syntax error.
13054         (grub_mm_dump_free): New function.
13055         (grub_debug_free): Call `grub_free'.
13056         * include/grub/mm.h: Update copyright.
13057         (grub_mm_dump_free): Add declaration.
13059 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13061         * include/grub/ieee1275/ieee1275.h: Update copyright.
13062         * kern/powerpc/ieee1275/init.c: Likewise.
13063         * kern/powerpc/ieee1275/openfw.c: Likewise.
13065         * loader/powerpc/ieee1275/linux.c: Likewise.
13066         * include/grub/elfload.h: Likewise.
13067         * kern/elf.c: Likewise.
13068         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13069         callers.
13070         (grub_elf64_load): Likewise.
13071         (grub_elf32_load_segment): Move to a nested function.
13072         (grub_elf64_load_segment): Likewise.
13074 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13076         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13077         prototype.
13078         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13079         (grub_heap_len): Likewise.
13080         (HEAP_SIZE): New macro.
13081         (grub_claim_heap): New function.
13082         (grub_machine_init): Don't claim heap directly.  Call
13083         `grub_claim_heap'.
13084         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13085         (grub_available_iterate): New function.
13087 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13089         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13090         * configure.ac: Use it for testing the HOST and TARGET compilers.
13092 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13094         * Makefile.in (enable_grub_emu): New variable.
13095         * configure.ac (--enable-grub-emu): New option.
13096         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13097         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13098         * conf/i386-pc.rmk: Likewise.
13099         * conf/powerpc-ieee1275.rmk: Likewise.
13100         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13102 2006-12-12  Marco Gerards  <marco@gnu.org>
13104         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13106         * kern/env.c (grub_env_unset): Don't free the member `value' when
13107         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13108         pointer.
13110         * normal/main.c (current_menu): Removed.
13111         (free_menu): Unset the `menu' environment variable.
13112         (grub_normal_menu_addentry): Make use of the environment variable
13113         `menu', instead of using the global `current_menu'.  Allocate
13114         memory for the sourcecode of this entry.
13115         (read_config_file): New argument `nested', changed all callers.
13116         Only in the case of a new context, initialize a new menu.  Set the
13117         `menu' environment variable.
13118         (grub_normal_execute): Don't set and unset the environment
13119         variable `menu' here anymore.  Only free the menu when leaving the
13120         context.
13122         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13123         leak.
13125 2006-12-11  Marco Gerards  <marco@gnu.org>
13127         * normal/menu_entry.c (run): Fix off by one bug so the last line
13128         is executed.  Move the loader check to outside the loop.
13130 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13132         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13134 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13136         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13137         the number of sectors.  Reported by Andrey Shuvikov
13138         <mr_hyro@yahoo.com>.
13140 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13142         * kern/disk.c (grub_disk_read): When there is a read error, always
13143         try to read only the necessary data.
13145         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13146         disk/raid.c.
13147         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13148         prototype.
13149         [GRUB_UTIL] (grub_raid_fini): Likewise.
13150         [GRUB_UTIL] (grub_lvm_init): Likewise.
13151         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13152         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13153         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13154         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13155         and grub_raid_fini().
13157 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13159         * include/grub/types.h (__unused): Rename to UNUSED.
13160         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13161         (grub_elf64_size): Likewise.
13163 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13165         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13166         grub_error_push and grub_error_pop in the error-handling path.
13167         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13168         length.
13170 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13172         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13173         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13174         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13175         (kernel_elf_SOURCES): Likewise.
13176         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13177         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13178         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13179         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13180         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13181         (elf_mod_SOURCES): New variable.
13182         (elf_mod_CFLAGS): Likewise.
13183         (elf_mod_LDFLAGS): Likewise.
13184         * include/grub/types.h (__unused): New macro.
13185         * include/grub/elfload.h: New file.
13186         * kern/elf.c: Likewise.
13187         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13188         (ELF32_LOADMASK): New macro.
13189         (ELF64_LOADMASK): Likewise.
13190         (vmlinux): Removed.
13191         (grub_linux_load32): New function.
13192         (grub_linux_load64): Likewise.
13193         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13194         Use grub_elf_t instead of grub_file_t.
13196 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13198         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13199         `catch_result' to struct set_color_args.
13201 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13203         * normal/menu.c: Include grub/script.h.
13204         * normal/menu_entry.c: Likewise.
13205         * include/grub/normal.h: Do not include grub/script.h.
13207 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13209         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13211 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13213         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13214         disk.
13215         (grub_disk_close): Print debug messages when closing a disk.
13216         (grub_disk_read): Print debug messages when disk read fails.
13217         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13218         filesystem type.
13219         * kern/partition.c: Include misc.h.
13220         (grub_partition_iterate): Print debug messages when detecting
13221         partition type.
13223 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13225         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13226         is negative.
13227         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13229 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13231         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13232         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13234 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13236         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13237         instead of sizeof(lv). Patch by Michael Guntsche.
13239 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13241         * disk/lvm.c: Rename VGS to VG_LIST.
13242         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13243         (grub_lvm_open): Likewise.
13244         Thanks to Michael Guntsche for finding this bug.
13246 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13248         * configure.ac (AC_INIT): Bumped to 1.95.
13250 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13252         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13253         with "/dev/.static/dev/md".
13255 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13257         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13258         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13259         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13260         DRIVE_NAME are always freed.
13262         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13263         DOS_PART, as a DOS partition is counted from one instead of zero
13264         now. Reported by Robert Millan.
13266 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13268         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13269         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13270         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13271         string returned by grub_guess_root_device.
13272         * util/i386/pc/grub-setup.c: Likewise.
13273         * util/i386/pc/grub-probefs.c: Likewise.
13275         * util/i386/pc/grub-probefs.c: Rename to ...
13276         * util/i386/pc/grub-probe.c: ... this.
13277         * DISTLIST: Remove grub-probefs, add grub-probe.
13278         * conf/i386-efi.rmk: Likewise.
13279         * conf/i386-pc.rmk: Likewise.
13280         * util/i386/pc/grub-install.in: Likewise.
13282         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13283         choose which information we want to print.
13285 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13287         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13288         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13289         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13290         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13291         video/readers/tga.c and video/i386/pc/vbeutil.c.
13293 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13295         Added support for RAID and LVM.
13297         * disk/lvm.c: New file.
13298         * disk/raid.c: Likewise.
13299         * include/grub/lvm.h: Likewise.
13300         * include/grub/raid.h: Likewise.
13301         * include/grub/util/lvm.h: Likewise.
13302         * include/grub/util/raid.h: Likewise.
13303         * util/lvm.c: Likewise.
13304         * util/raid.c: Likewise.
13306         * include/grub/disk.h (grub_disk_dev_id): Add
13307         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13308         (grub_disk_get_size): New prototype.
13309         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13310         returns a partition.
13311         (grub_disk_get_size): New function.
13313         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13314         verbatim if grub_install_dos_part is -2.
13316         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13317         and LVM devices.
13319         * util/i386/pc/grub-setup.c (setup): New argument
13320         MUST_EMBED. Force embedding of GRUB when the argument is
13321         true. Close FILE before returning.
13322         (main): Add support for RAID and LVM.
13324         * conf/common.rmk: Add RAID and LVM modules.
13325         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13326         util/lvm.c.
13327         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13329         * kern/misc.c (grub_strstr): New function.
13330         * include/grub/misc.h (grub_strstr): New prototype.
13332 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13334         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13336 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13338         * kern/misc.c (grub_strtoull): Guess the base only if not
13339         specified.
13341 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13343         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13344         PowerMac support.
13346 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13348         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13350         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13351         Remove `flags' argument.  All callers changed.
13352         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13353         (IEEE1275_IHANDLE_INVALID): New variable.
13354         (IEEE1275_CELL_INVALID): New variable.
13355         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13356         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13357         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13358         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13359         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13360         codes from Open Firmware.  All callers updated.
13361         (grub_ieee1275_next_property): Directly return Open Firmware return
13362         code.
13363         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13364         Standardize error checking from `grub_ieee1275_get_property'.
13365         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13366         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13368 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13370         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13371         `instance_to_package_args' to `instance_to_path_args'.
13373         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13374         `grub_ieee1275_chosen'.
13376         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13377         `grub_ieee1275_interpret'.
13379 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13381         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13383 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13385         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13386         (__cmpdi): Likewise.
13388         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13389         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13390         `grub_ssize_t'.
13392         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13394         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13395         to type `grub_ssize_t'.
13396         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13398 2006-09-22  Marco Gerards  <marco@gnu.org>
13400         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13401         newlines.
13403 2006-09-22  Marco Gerards  <marco@gnu.org>
13405         * commands/echo.c: New file.
13407         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13409         * conf/common.rmk (echo_mod_SOURCES): New variable.
13410         (echo_mod_CFLAGS): Likewise.
13411         (echo_mod_LDFLAGS): Likewise.
13413 2006-09-22  Marco Gerards  <marco@gnu.org>
13415         * normal/main.c (get_line): Malloc memory instead of using
13416         preallocated memory.  Removed the arguments `cmdline' and
13417         `max_len'.  Updated all callers.
13419 2006-09-22  Marco Gerards  <marco@gnu.org>
13421         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13422         (normal_mod_DEPENDENCIES): Likewise.
13424         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13425         (normal_mod_DEPENDENCIES): Likewise.
13427         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13429 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13431         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13432         programs.
13433         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13434         (normal_mod_DEPENDENCIES): Likewise.
13435         * conf/i386-pc.mk: Regenerate.
13436         * conf/i386-efi.mk: Likewise
13437         * conf/common.mk: Likewise.
13438         * conf/powerpc-ieee1275.mk: Likewise.
13439         * conf/sparc64-ieee1275.mk: Likewise.
13441 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13443         Sync with i386 version.
13444         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13445         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13447 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13449         Import from GRUB Legacy (lib/device.c):
13450         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13451         (init_device_map) [__linux__]: Add support for I2O devices.
13453 2006-09-14  Marco Gerards  <marco@gnu.org>
13455         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13456         `-melf_i386'.
13458 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13460         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13461         /boot/grub/*.lst.
13463         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13465         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13466         before adding it to device.map.
13468 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13470         * genmk.rb: Let GCC generate dependencies the first time it
13471         compiles a file; using the -MD option.
13472         * conf/common.mk: Regenerate.
13473         * conf/i386-pc.mk: Likewise.
13474         * conf/i386-efi.mk: Likewise.
13475         * conf/powerpc-ieee1275.mk: Likewise.
13476         * conf/sparc64-ieee1275.mk: Likewise.
13478 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13480         Move the prototypes of grub_setjmp and grub_longjmp to
13481         cpu/setjmp.h, so that each architecture may specify different
13482         attributes.
13484         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13485         (grub_longjmp): Likewise.
13486         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13487         (grub_longjmp): Likewise.
13488         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13489         (grub_longjmp): Likewise.
13491         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13492         [!GRUB_UTIL] (grub_longjmp): Removed.
13494 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13496         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13497         "color!" method does not return any value.
13499 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13501         * include/grub/bitmap.h: New file.
13503         * include/grub/i386/pc/vbeutil.h: Likewise.
13505         * video/bitmap.c: Likewise.
13507         * video/readers/tga.c: Likewise.
13509         * video/i386/pc/vbeutil.c: Likewise.
13511         * commands/videotest.c: Code cleanup and updated to reflect to new
13512         video API.
13514         * term/gfxterm.c: Likewise.
13516         * video/video.c: Likewise.
13518         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13519         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13520         (bitmap_mod_SOURCES): New entry.
13521         (bitmap_mod_CFLAGS): Likewise.
13522         (bitmap_mod_LDFLAGS): Likewise.
13523         (tga_mod_SOURCES): Likewise.
13524         (tga_mod_CFLAGS): Likewise.
13525         (tga_mod_LDFLAGS): Likewise.
13527         * include/grub/video.h (grub_video_blit_operators): New enum type.
13528         (grub_video_render_target): Changed as forward declaration and moved
13529         actual definition to be video driver specific.
13530         (grub_video_adapter.blit_bitmap): Added blitting operator.
13531         (grub_video_adapter.blit_render_target): Likewise.
13532         (grub_video_blit_bitmap): Likewise.
13533         (grub_video_blit_render_target): Likewise.
13535         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13536         driver specific render target definition.
13537         (grub_video_vbe_map_rgba): Added driver internal helper.
13538         (grub_video_vbe_unmap_color): Updated to use
13539         grub_video_i386_vbeblit_info.
13540         (grub_video_vbe_get_video_ptr): Likewise.
13542         * include/grub/i386/pc/vbeblit.h
13543         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13544         grub_video_i386_vbeblit_info.
13545         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13546         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13547         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13548         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13549         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13550         (grub_video_i386_vbeblit_index_index): Likewise.
13551         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13552         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13553         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13554         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13555         operator.
13556         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13557         operator.
13559         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13560         include/grub/i386/pc/vbeblit.h.
13562         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13563         Updated to use grub_video_i386_vbeblit_info.
13564         (grub_video_i386_vbefill_R8G8B8): Likewise.
13565         (grub_video_i386_vbefill_index): Likewise.
13566         (grub_video_i386_vbefill): Added generic filler.
13568         * video/i386/pc/vbefill.c: Updated to reflect changes on
13569         include/grub/i386/pc/vbefill.h.
13571         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13572         grub_video_i386_vbeblit_info.
13573         (grub_video_vbe_unmap_color): Likewise.
13574         (grub_video_vbe_blit_glyph): Likewise.
13575         (grub_video_vbe_scroll): Likewise.
13576         (grub_video_vbe_draw_pixel): Removed function.
13577         (grub_video_vbe_get_pixel): Likewise.
13578         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13579         updated code to use it.
13580         (common_blitter): Added common blitter for render target and bitmap.
13581         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13582         (grub_video_vbe_blit_render_target): Likewise.
13584 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13586         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13587         is in text mode if there is no console control protocol instance
13588         available.
13590 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13592         * include/grub/video.h: Code cleanup.
13594         * include/grub/i386/pc/vbe.h: Likewise.
13596         * video/i386/pc/vbe.c: Likewise.
13598         * video/i386/pc/vbeblit.c: Likewise.
13600         * video/i386/pc/vbefill.c: Likewise.
13602         * video/video.c: Likewise.  Also added more comments.
13604 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13606         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13607         (struct grub_biosdisk_dap): Likewise.
13609         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13610         linkage settings for all functions.
13612 2006-07-12  Marco Gerards  <marco@gnu.org>
13614         * configure.ac (--enable-mm-debug): Fix typo.
13616         * genkernsyms.sh.in: Use proper quoting for `CC'.
13618 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13620         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13621         (normal_mod_ASFLAGS): Remove "-m32".
13623 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13625         * util/misc.c: Include config.h.
13626         [!HAVE_MEMALIGN]: Do not include malloc.h.
13627         (grub_memalign): Use posix_memalign, if present. Then, use
13628         memalign, if present. Otherwise, emit an error.
13630         * util/grub-emu.c: Do not include malloc.h.
13632         * include/grub/util/misc.h: Include unistd.h. This is required for
13633         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13634         D. Eades III <hde@foobar-qux.org>.
13636         * configure.ac (AC_GNU_SOURCE): Added.
13637         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13638         type.
13640 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
13642         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13643         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13645 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
13647         * include/grub/types.h (grub_host_addr_t): Rename to
13648         grub_target_addr_t.
13649         (grub_host_off_t): Rename to grub_target_off_t.
13650         (grub_host_size_t): Rename to grub_target_size_t.
13651         (grub_host_ssize_t): Rename to grub_target_ssize_t.
13652         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13654         * include/grub/kernel.h (struct grub_module_header): Change type
13655         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13656         (grub_module_info): Likewise.
13658 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13660         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13661         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13662         Velazquez <jesus.velazquez@gmail.com>.
13664 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13666         Count partitions from 1 instead of 0 in the string representation
13667         of partitions. Still use 0-based internally.
13669         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13670         (sun_partition_map_iterate): Use grub_partition_t instead of
13671         struct grub_partition *. Cast DESC->START_CYLINDER to
13672         grub_uint64_t after converting the endian.
13673         (sun_partition_map_probe): Subtract 1 for PARTNUM.
13674         (sun_partition_map_get_name): Add 1 to P->INDEX.
13676         * partmap/pc.c (grub_partition_parse): Subtract 1 for
13677         PCDATA->DOS_PART.
13678         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13680         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13681         zero instead of one.
13682         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13683         (gpt_partition_map_get_name): Add 1 into P->INDEX.
13685         * partmap/apple.c (apple_partition_map_iterate): Change the type
13686         of POS to unsigned.
13687         (apple_partition_map_probe): Subtract 1 for PARTNUM.
13688         (apple_partition_map_get_name): Add 1 into P->INDEX.
13690         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13691         of POS to unsigned.
13692         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13693         calculate the offset of a partition.
13694         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13695         (amiga_partition_map_get_name): Add 1 into P->INDEX.
13697         * partmap/acorn.c (acorn_partition_map_find): Change the type of
13698         SECTOR to grub_disk_addr_t.
13699         (acorn_partition_map_iterate): Likewise.
13700         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13701         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13702         top.
13703         (acorn_partition_map_get_name): Add 1 into P->INDEX.
13705         * kern/i386/pc/init.c (make_install_device): Add 1 into
13706         GRUB_INSTALL_DOS_PART.
13708         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13709         conditional.
13711 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13713         Clean up the code to support 64-bit addressing in disks and
13714         files. This change is not enough for filesystems yet.
13716         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13717         type of "start" to grub_uint64_t.
13718         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13719         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13720         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13721         convert addresses.
13723         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13724         to grub_disk_addr_t.
13726         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13727         string.
13729         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13731         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13732         to char *.
13734         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13736         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13738         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13740         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13741         to grub_off_t, to detect an error from grub_file_seek.
13742         (grub_multiboot_load_elf32): Likewise.
13744         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13745         maximum unsigned long value when an overflow is detected.
13746         (grub_strtoull): New function.
13747         (grub_divmod64): Likewise.
13748         (grub_lltoa): use grub_divmod64.
13750         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13751         grub_disk_addr_t.
13752         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13753         the pointer to next character. Use grub_strtoull instead of
13754         grub_strtoul.
13755         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13756         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13757         respectively.
13759         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13760         return value is signed.
13761         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13762         test if OFFSET is less than zero, as OFFSET is unsigned now.
13764         * kern/disk.c (struct grub_disk_cache): Change the type of
13765         "sector" to grub_disk_addr_t.
13766         (grub_disk_cache_get_index): Change the type of SECTOR to
13767         grub_disk_addr_t. Calculate the hash with SECTOR casted to
13768         unsigned after shifting.
13769         (grub_disk_cache_invalidate): Change the type of SECTOR to
13770         grub_disk_addr_t.
13771         (grub_disk_cache_unlock): Likewise.
13772         (grub_disk_cache_store): Likewise.
13773         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13774         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13775         grub_disk_addr_t and grub_uint64_t, respectively.
13776         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13777         body, as the value of OFFSET is tweaked by
13778         grub_disk_check_range. Change the types of START_SECTOR, LEN and
13779         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13780         respectively.
13781         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13782         body, as the value of OFFSET is tweaked by
13783         grub_disk_check_range. Change the types of LEN and N to
13784         grub_size_t.
13786         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13787         and "saved_offset" to grub_off_t.
13788         (test_header): Cast BUF to char *.
13789         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13790         to char *.
13791         (grub_gzio_read): Change the types of OFFSET and SIZE to
13792         grub_off_t and grub_size_t, respectively.
13794         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13795         Removed.
13796         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13797         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13798         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13799         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13800         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13802         * include/grub/types.h (grub_off_t): Unconditionally set to
13803         grub_uint64_t.
13804         (grub_disk_addr_t): Changed to grub_uint64_t.
13806         * include/grub/partition.h (struct grub_partition): Change the
13807         types of "start", "len" and "offset" to grub_disk_addr_t,
13808         grub_uint64_t and grub_disk_addr_t, respectively.
13809         (grub_partition_get_start): Return grub_disk_addr_t.
13810         (grub_partition_get_len): Return grub_uint64_t.
13812         * include/grub/misc.h (grub_strtoull): New prototype.
13813         (grub_divmod64): Likewise.
13815         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13816         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13817         grub_off_t, respectively.
13818         All callers and references changed.
13820         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13821         grub_size_t in "read".
13822         All callers and references changed.
13824         * include/grub/file.h (struct grub_file): Change the types of
13825         "offset" and "size" to grub_off_t and grub_off_t,
13826         respectively. Change the type of SECTOR to grub_disk_addr_t in
13827         "read_hook".
13828         (grub_file_read): Change the type of LEN to grub_size_t.
13829         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13830         grub_off_t.
13831         (grub_file_size): Return grub_off_t.
13832         (grub_file_tell): Likewise.
13833         All callers and references changed.
13835         * include/grub/disk.h (struct grub_disk_dev): Change the types of
13836         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13837         "write".
13838         (struct grub_disk): Change the type of "total_sectors" to
13839         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13840         "read_hook".
13841         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13842         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13843         (grub_disk_write): Likewise.
13844         All callers and references changed.
13846         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13847         char * for grub_strncmp to silence gcc.
13848         (grub_iso9660_mount): Likewise.
13849         (grub_iso9660_mount): Likewise.
13850         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13851         return statement.
13852         (grub_iso9660_iterate_dir): Likewise.
13853         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13855         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13856         LEN to grub_disk_addr_t and grub_size_t, respectively.
13858         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13860         * fs/jfs.c (grub_jfs_read_file): Likewise.
13862         * fs/minix.c (grub_jfs_read_file): Likewise.
13864         * fs/sfs.c (grub_jfs_read_file): Likewise.
13866         * fs/ufs.c (grub_jfs_read_file): Likewise.
13868         * fs/xfs.c (grub_jfs_read_file): Likewise.
13870         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13871         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13872         respectively.
13874         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13875         BLKNR to -1 instead of returning GRUB_ERRNO.
13876         (grub_ext2_read_file): Change the types of SECTOR and
13877         LEN to grub_disk_addr_t and grub_size_t, respectively.
13879         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13880         LEN to grub_disk_addr_t and grub_size_t, respectively.
13882         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13883         grub_file_read.
13885         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13886         string. Do not cast SECTOR explicitly.
13888         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13889         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13890         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13891         grub_disk_addr_t and grub_size_t, respectively. If the sector is
13892         over 2TB and LBA mode is not supported, raise an error.
13893         (get_safe_sectors): New function.
13894         (grub_biosdisk_read): Use get_safe_sectors.
13895         (grub_biosdisk_write): Likewise.
13897         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13898         (grub_efidisk_write): Likewise.
13900         * disk/loopback.c (delete_loopback): Cosmetic changes.
13901         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13902         correctly.
13903         (grub_loopback_open): Likewise.
13904         (grub_loopback_read): Likewise. Also, change the type of POS to
13905         grub_off_t, and fix the usage of grub_memset.
13907         * commands/i386/pc/play.c: Include grub/machine/time.h.
13909         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13910         print FILE->SIZE.
13912         * commands/configfile.c: Include grub/env.h.
13914         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13915         GRUB_ERRNO directly instead. Change the type of POS to
13916         grub_off_t. Follow the coding standard.
13918         * commands/blocklist.c: Include grub/partition.h.
13919         (grub_cmd_blocklist): Return an error if the underlying device is
13920         not a disk. Take the starting sector of a partition into account,
13921         if a partition is used.
13923         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13924         a length field.
13925         (lba_mode): Support 64-bit addresses.
13926         (chs_mode): Likewise.
13927         (copy_buffer): Adapted to the new offsets of a length field and a
13928         segment field.
13929         (blocklist_default_start): Allocate 64-bit space.
13931         * boot/i386/pc/boot.S (force_lba): Removed.
13932         (boot_drive): Moved to under KERNEL_SECTOR.
13933         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13934         space.
13935         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13936         is useless.
13937         (lba_mode): Refactored to support a 64-bit address. More size
13938         optimization.
13939         (setup_sectors): Likewise.
13941 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13943         * DISTLIST: Added include/grub/i386/linux.h. Removed
13944         include/grub/i386/pc/linux.h
13946         * configure.ac (AC_INIT): Bumped to 1.94.
13948         * config.guess: Updated from gnulib.
13949         * config.sub: Likewise.
13950         * install-sh: Likewise.
13951         * mkinstalldirs: Likewise.
13953 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
13955         * conf/common.rmk (grub_modules_init.lst): Depended on
13956         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
13957         MODSRCFILES.
13959         * genmk.rb (PModule::rule): Reverted the previous change.
13961 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
13963         * conf/common.rmk (grub_modules_init.lst): Depends on
13964         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
13965         that the target does not exist before producing.
13966         (grub_modules_init.h): Remove the target before generating.
13967         (grub_emu_init.c): Likewise.
13969         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
13971 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
13973         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
13974         for the target-specific tests. Make sure that we also have the
13975         up-to-date target variables for those tests.
13977 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
13979         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
13980         (PModule::rule): Likewise.
13982 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
13984         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
13985         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
13986         target-specific flags should be prefixed.
13987         (PModule::rule): Likewise.
13989 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
13991         * configure.ac (CMP): Check if cmp is available explicitly.
13993 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
13995         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
13996         (target_cpu): New variable.
13997         (pkglibdir): Use target_cpu instead of host_cpu.
13999         * util/i386/pc/grub-install.in (host_cpu): Removed.
14000         (target_cpu): New variable.
14001         (pkglibdir): Use target_cpu instead of host_cpu.
14003         * util/genmoddep.c: Removed.
14005         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14006         instead of GRUB_HOST_SIZEOF_VOID_P.
14007         * kern/dl.c: Likewise.
14009         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14010         ...
14011         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14012         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14013         (GRUB_TARGET_SIZEOF_LONG): ... this.
14014         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14015         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14016         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14017         to ...
14018         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14019         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14020         (GRUB_TARGET_SIZEOF_LONG): ... this.
14021         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14022         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14023         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14024         to ...
14025         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14026         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14027         (GRUB_TARGET_SIZEOF_LONG): ... this.
14028         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14029         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14031         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14032         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14033         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14034         instead of GRUB_HOST_SIZEOF_LONG.
14035         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14036         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14037         GRUB_CPU_WORDS_BIGENDIAN.
14038         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14039         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14040         grub_host_ssize_t.
14042         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14043         (genmoddep_SOURCES): Likewise.
14044         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14045         (genmoddep_SOURCES): Likewise.
14046         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14047         (genmoddep_SOURCES): Likewise.
14048         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14049         Likewise.
14050         (genmoddep_SOURCES): Likewise.
14052         * genmoddep.awk: New file.
14054         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14055         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14056         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14057         (PModule::rule): Likewise.
14058         (Program::rule): Likewise.
14059         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14060         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14061         respectively.
14063         * configure.ac: Rewritten intensively to use host and target
14064         instead of build and host, respectively.
14066         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14067         (host_cpu): Removed.
14068         (target_cpu): New variable.
14069         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14070         (BUILD_CC): Removed.
14071         (BUILD_CFLAGS): Likewise.
14072         (BUILD_CPPFLAGS): Likewise.
14073         (TARGET_CC): New variable.
14074         (TARGET_CFLAGS): Likewise.
14075         (TARGET_CPPFLAGS): Likewise.
14076         (TARGET_LDFLAGS): Likewise.
14077         (AWK): Likewise.
14078         (include): Use target_cpu instead of host_cpu.
14079         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14081         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14083 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14085         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14086         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14087         field 'false' to 'exec_on_false'.
14088         (grub_script_create_cmdif): Renamed argument names to reflect above
14089         changes.
14091         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14093         * normal/script.c (grub_script_create_cmdif): Likewise.
14095 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14097         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14098         top.
14099         (grub_hfsplus_btree_recptr): Likewise.
14100         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14101         FILEBLOCK both to pass a block number and store next block
14102         number.
14103         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14104         overflow file correctly. Specify errors appropriately, because
14105         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14106         grub_hfsplus_btree_recptr to get the pointer to a found key.
14107         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14108         is found.
14110         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14111         linux.mod.
14112         (_linux_mod_SOURCES): New variable.
14113         (_linux_mod_CFLAGS): Likewise.
14114         (_linux_mod_LDFLAGS): Likewise.
14115         (linux_mod_SOURCES): Likewise.
14116         (linux_mod_CFLAGS): Likewise.
14117         (linux_mod_LDFLAGS): Likewise.
14119         * DISTLIST: Added loader/i386/efi/linux.c,
14120         loader/i386/efi/linux_normal.c and
14121         include/grub/i386/efi/loader.h.
14123         * loader/i386/efi/linux.c: New file.
14124         * loader/i386/efi/linux_normal.c: Likewise.
14125         * include/grub/i386/efi/loader.h: Likewise.
14127 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14129         * commands/blocklist.c: New file.
14131         * DISTLIST: Added commands/blocklist.c.
14133         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14134         color for the background, and a darker color for the foreground.
14135         (grub_console_checkkey): Return READ_KEY.
14136         (grub_console_cls): Set the background to
14137         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14139         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14141         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14142         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14144         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14145         prototype.
14147         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14148         BG. The spec is wrong again.
14150         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14151         prototype.
14152         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14154         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14155         commands/blocklist.c.
14156         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14158         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14159         (blocklist_mod_SOURCES): New variable.
14160         (blocklist_mod_CFLAGS): Likewise.
14161         (blocklist_mod_LDFLAGS): Likewise.
14163 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14165         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14166         duplication.
14167         (lba_mode): Use %eax more intensively to reduce the code size.
14169 2006-05-20  Marco Gerards  <marco@gnu.org>
14171         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14173         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14174         for `menuentry'.
14175         (script): Accept leading newlines.
14176         (newlines): New rule to describe 0 or more newlines.
14177         (commands): Accept `command' with trailing newline.  Fixed the
14178         order in which arguments were passed to `grub_script_add_cmd'.
14179         Accept commands separated by newlines.
14180         (function): Changed to accept newlines.
14181         (menuentry) Rewritten.
14183         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14184         front of the list, instead of to the end.
14186 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14188         * util/i386/pc/grub-install.in (bindir): New variable.
14189         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14190         Shaver <lbgwjl@gmail.com>.
14192 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14194         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14195         grub/machine/linux.h
14196         * loader/i386/pc/linux.c: Likewise.
14198         * include/grub/i386/pc/linux.h: Moved to ...
14199         * include/grub/i386/linux.h: ... here.
14201         * include/grub/i386/linux.h (struct linux_kernel_params): New
14202         struct.
14204 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14206         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14207         checking.
14208         (grub_video_vbe_blit_glyph): Likewise.
14209         (grub_video_vbe_blit_bitmap): Likewise.
14210         (grub_video_vbe_blit_render_target): Likewise.
14212 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14214         * configure.ac (--with-platform): Properly quote the square
14215         brackets.
14217 2006-05-08  Marco Gerards  <marco@gnu.org>
14219         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14220         this...
14221         (kernel_elf_HEADERS): ...to this.  Updated all users.
14222         (grubof_symlist.c): Renamed from this...
14223         (kernel_elf_symlist.c): ...to this.  Updated all users.
14224         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14225         (grubof_SOURCES): Renamed from this...
14226         (kernel_elf_SOURCES): ...to this.
14227         (grubof_HEADERS): Renamed from this...
14228         (kernel_elf_HEADERS): ...to this.
14229         (grubof_CFLAGS): Renamed from this...
14230         (kernel_elf_CFLAGS): ...to this.
14231         (grubof_ASFLAGS): Renamed from this...
14232         (kernel_elf_ASFLAGS): ...to this.
14233         (grubof_LDFLAGS): Renamed from this...
14234         (kernel_elf_LDFLAGS): ...to this.
14236         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14237         this...
14238         (kernel_elf_HEADERS): ...to this.  Updated all users.
14239         (grubof_symlist.c): Renamed from this...
14240         (kernel_elf_symlist.c): ...to this.  Updated all users.
14241         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14242         (grubof_SOURCES): Renamed from this...
14243         (kernel_elf_SOURCES): ...to this.
14244         (grubof_HEADERS): Renamed from this...
14245         (kernel_elf_HEADERS): ...to this.
14246         (grubof_CFLAGS): Renamed from this...
14247         (kernel_elf_CFLAGS): ...to this.
14248         (grubof_ASFLAGS): Renamed from this...
14249         (kernel_elf_ASFLAGS): ...to this.
14250         (grubof_LDFLAGS): Renamed from this...
14251         (kernel_elf_LDFLAGS): ...to this.
14253         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14254         `kernel.elf' instead of `grubof'.
14256 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14258         Add --with-platform to configure. Use pkglibdir instead of
14259         pkgdatadir. This is reported by Roger Leigh.
14261         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14262         (host_vendor): Likewise.
14263         (host_os): Likewise.
14264         (pkgdatadir): Likewise.
14265         (platform): New variable.
14266         (pkglibdir): Likewise.
14267         Use PKGLIBDIR instead of PKGDATADIR.
14269         * util/i386/pc/grub-install.in (datadir): Removed.
14270         (host_vendor): Likewise.
14271         (host_os): Likewise.
14272         (pkgdatadir): Likewise.
14273         (platform): New variable.
14274         (pkglibdir): Likewise.
14275         Use PKGLIBDIR instead of PKGDATADIR.
14277         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14278         instead of GRUB_DATADIR.
14279         (main): Likewise.
14280         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14281         (main): Likewise.
14282         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14283         (main): Likewise.
14285         * configure.ac (--with-platform): New option.
14286         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14288         * Makefile.in: Include a makefile based on PLATFORM instead of
14289         HOST_VENDOR.
14290         (pkgdatadir): Not appended by the machine type.
14291         (pkglibdir): Appended by the machine type.
14292         (host_vendor): Removed.
14293         (platform): New variable.
14294         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14295         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14296         (uninstall): Likewise.
14298 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14300         Use the environment context in the menu. Remove the commands
14301         "default" and "timeout", and use variables instead.
14303         * normal/menu.c: Include grub/env.h.
14304         (print_entry): Cast TITLE to silence gcc.
14305         (get_timeout): New function.
14306         (set_timeout): Likewise.
14307         (get_entry_number): Likewise.
14308         (run_menu): Use a default entry, a fallback entry and a timeout
14309         in the environment variables "default", "fallback" and
14310         "timeout". Also, tweak the default entry if it is not within the
14311         current menu entries.
14312         (grub_menu_run): Use a fallback entry in the environment variable
14313         "fallback".
14315         * normal/main.c (read_config_file): Do not initialize
14316         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14317         NEWMENU->TIMEOUT.
14318         (grub_normal_execute): Use a data slot to store the menu.
14320         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14321         fallback_entry and timeout.
14322         (struct grub_menu_list): Removed.
14323         (grub_menu_list_t): Likewise.
14324         (struct grub_context): Likewise.
14325         (grub_context_t): Likewise.
14326         (grub_context_get): Likewise.
14327         (grub_context_get_current_menu): Likewise.
14328         (grub_context_push_menu): Likewise.
14329         (grub_context_pop_menu): Likewise.
14330         (grub_default_init): Likewise.
14331         (grub_default_fini): Likewise.
14332         (grub_timeout_init): Likewise.
14333         (grub_timeout_fini): Likewise.
14335         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14336         and timeout.mod.
14337         (normal_mod_SOURCES): Removed normal/context.c.
14339         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14340         commands/default.c, commands/timeout.c and normal/context.c.
14341         (normal_mod_SOURCES): Removed normal/context.c.
14343         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14344         commands/timeout.c and normal/context.c.
14345         (normal_mod_SOURCES): Removed normal/context.c.
14347         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14348         commands/default.c, commands/timeout.c and normal/context.c.
14349         (normal_mod_SOURCES): Removed normal/context.c.
14351         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14352         timeout.mod.
14353         (default_mod_SOURCES): Removed.
14354         (default_mod_CFLAGS): Likewise.
14355         (default_mod_LDFLAGS): Likewise.
14356         (timeout_mod_SOURCES): Removed.
14357         (timeout_mod_CFLAGS): Likewise.
14358         (timeout_mod_LDFLAGS): Likewise.
14360         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14361         normal/context.c.
14363         * commands/default.c: Removed.
14364         * commands/timeout.c: Likewise.
14365         * normal/context.c: Likewise.
14367 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14369         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14371 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14373         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14374         "next" to "prev" for readability.
14375         (struct grub_env_sorted_var): New struct.
14376         (grub_env_context): Renamed to ...
14377         (initial_context): ... this.
14378         (grub_env_var_context): Renamed to ...
14379         (current_context): ... this.
14380         (grub_env_find): Look only at CURRENT_CONTEXT.
14381         (grub_env_context_open): Rewritten to copy exported variables from
14382         previous context.
14383         (grub_env_context_close): Rewritten according to the new
14384         scheme. Also, add an assertion to prevent the initial context from
14385         removed.
14386         (grub_env_insert): Removed the code for the sorted list.
14387         (grub_env_remove): Likewise.
14388         (grub_env_export): Simply mark the variable with
14389         GRUB_ENV_VAR_GLOBAL.
14390         (grub_env_set): A cosmetic change for naming consistency.
14391         (grub_env_get): Likewise.
14392         (grub_env_unset): Likewise.
14393         (grub_env_iterate): Rewritten to sort variables within this
14394         function.
14395         (grub_register_variable_hook): Fixed for naming consistency. Call
14396         grub_env_find again, only if NAME is not found at the first time.
14397         (mangle_data_slot_name): New function.
14398         (grub_env_set_data_slot): Likewise.
14399         (grub_env_get_data_slot): Likewise.
14400         (grub_env_unset_data_slot): Likewise.
14402         * include/grub/env.h (grub_env_var_type): New enum.
14403         (GRUB_ENV_VAR_LOCAL): New constant.
14404         (GRUB_ENV_VAR_GLOBAL): Likewise.
14405         (GRUB_ENV_VAR_DATA): Likewise.
14406         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14407         "type".
14408         (grub_env_set): Replace VAR with NAME for consistency.
14409         (grub_register_variable_hook): Likewise.
14410         (grub_env_export): Specify the name of the argument.
14411         (grub_env_set_data_slot): New prototype.
14412         (grub_env_get_data_slot): Likewise.
14413         (grub_env_unset_data_slot): Likewise.
14415 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14417         Extend the loader so that GRUB can accept a loader which comes
14418         back to GRUB when a loaded image exits. Also, this change adds
14419         support for a chainloader on EFI.
14421         * term/efi/console.c: Include grub/misc.h.
14422         (grub_console_checkkey): Display a scan code on the top for
14423         debugging. This will be removed once the EFI port gets stable.
14424         Correct the scan code mapping.
14426         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14427         allocate memory from larger regions, in order to reduce the number
14428         of allocated regions. Otherwise, the MacOSX loader panics.
14429         (filter_memory_map): Avoid less than 1MB for compatibility with
14430         other loaders.
14431         (add_memory_regions): Allocate from the tail of a region, if
14432         possible, to avoid allocating a region near to 1MB, for the MacOSX
14433         loader.
14435         * kern/efi/init.c (grub_efi_set_prefix): Specify
14436         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14438         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14439         argument IMAGE_HANDLE and specify it to get a loaded image.
14440         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14441         grub_efi_get_loaded_image.
14442         (grub_efi_get_filename): Divide the length by the size of
14443         grub_efi_char16_t.
14444         (grub_efi_get_device_path): New function.
14445         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14446         the length by the size of grub_efi_char16_t for a file path device
14447         path node.
14449         * kern/loader.c (grub_loader_noreturn): New variable.
14450         (grub_loader_set): Accept a new argument NORETURN. Set
14451         GRUB_LOADER_NORETURN to NORETURN.
14452         All callers changed.
14453         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14454         grub_machine_fini.
14456         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14457         prototype.
14458         (grub_efi_get_loaded_image): Take an argument to specify an image
14459         handle.
14461         * include/grub/loader.h (grub_loader_set): Added one more argument
14462         NORETURN.
14464         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14465         instead of grub_efi_open_protocol.
14466         (grub_efidisk_get_device_name): Likewise.
14467         (grub_efidisk_close): Print a newline.
14468         (grub_efidisk_get_device_handle): Fixed to use
14469         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14470         GRUB_EFI_DEVICE_PATH_TYPE.
14472         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14473         * kern/efi/efi.c (device_path_guid): ... here.
14475         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14476         chain.mod.
14477         (kernel_mod_HEADERS): Added efi/disk.h.
14478         (_chain_mod_SOURCES): New variable.
14479         (_chain_mod_CFLAGS): Likewise.
14480         (_chain_mod_LDFLAGS): Likewise.
14481         (chain_mod_SOURCES): Likewise.
14482         (chain_mod_CFLAGS): Likewise.
14483         (chain_mod_LDFLAGS): Likewise.
14485         * DISTLIST: Added include/grub/efi/chainloader.h,
14486         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14488         * include/grub/efi/chainloader.h: New file.
14489         * loader/efi/chainloader.c: Likewise.
14490         * loader/efi/chainloader_normal.c: Likewise.
14492 2006-04-30  Marco Gerards  <marco@gnu.org>
14494         * commands/configfile.c (grub_cmd_source): New function.
14495         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14496         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14498 2006-04-30  Marco Gerards  <marco@gnu.org>
14500         * normal/execute.c (grub_script_execute_cmd): Change the return
14501         type to `grub_err_t'.  Correctly return the error.
14502         (grub_script_execute_cmdline): In case a command line is not a
14503         command or a function, try to interpret it as an assignment.
14505 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14507         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14508         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14509         skip a node whose name is obviously invalid as UTF-16,
14510         i.e. contains a NUL character. Stop the iteration when the last
14511         directory entry is found. Instead of using the return value of
14512         grub_hfsplus_btree_iterate_node, store the value in RET and use
14513         it, because the iterator can be stopped by the last directory
14514         entry.
14516 2006-04-30  Marco Gerards  <marco@gnu.org>
14518         * include/grub/env.h (grub_env_export): New prototype.  Reported
14519         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14521 2006-04-30  Marco Gerards  <marco@gnu.org>
14523         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14524         size of the extents in a catalog file record.
14526 2006-04-29  Marco Gerards  <marco@gnu.org>
14528         * commands/configfile.c (grub_cmd_configfile): Execute the
14529         configfile within its own context.
14531         * include/grub/env.h (grub_env_context_open): New prototype.
14532         (grub_env_context_close): Likewise.
14534         * kern/env.c (grub_env): Removed.
14535         (grub_env_sorted): Likewise.
14536         (grub_env_context): New variable.
14537         (grub_env_var_context): Likewise.
14538         (grub_env_find): Search both the active context and the global
14539         context.
14540         (grub_env_context_open): New function.
14541         (grub_env_context_close): Likewise.
14542         (grub_env_insert): Likewise.
14543         (grub_env_remove): Likewise.
14544         (grub_env_export): Likewise.
14545         (grub_env_set): Changed to use helper functions to avoid code
14546         duplication.
14547         (grub_env_iterate): Rewritten so both the current context and the
14548         global context are being used.
14550         * normal/command.c (export_command): New function.
14551         (grub_command_init): Register the `export' function.
14553 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14555         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14556         explicitly to suppress gcc's warnings.
14557         * fs/fat.c (grub_fat_find_dir): Likewise.
14558         (grub_fat_label): Likewise.
14559         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14560         (grub_xfs_mount): Likewise.
14561         (grub_xfs_label): Likewise.
14562         * fs/affs.c (grub_affs_mount): Likewise.
14563         (grub_affs_label): Likewise.
14564         (grub_affs_iterate_dir): Likewise.
14565         * fs/sfs.c (grub_sfs_mount): Likewise.
14566         (grub_sfs_iterate_dir): Likewise.
14567         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14568         * fs/hfs.c (grub_hfs_mount): Likewise.
14569         (grub_hfs_cmp_catkeys): Likewise.
14570         (grub_hfs_find_dir): Likewise.
14571         (grub_hfs_dir): Likewise.
14572         (grub_hfs_label): Likewise.
14573         * fs/jfs.c (grub_jfs_mount): Likewise.
14574         (grub_jfs_opendir): Likewise.
14575         (grub_jfs_getent): Likewise.
14576         (grub_jfs_lookup_symlink): Likewise.
14577         (grub_jfs_label): Likewise.
14578         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14579         (grub_hfsplus_iterate_dir): Likewise.
14580         (grub_hfsplus_btree_iterate_node): Made static.
14582         * util/grub-emu.c (prefix): New variable.
14583         (grub_machine_set_prefix): New function.
14584         (main): Do not set the environment variable "prefix" here. Only
14585         set PREFIX, which is used later by grub_machine_set_prefix.
14587         * include/grub/video.h: Do not include grub/symbol.h.
14588         (grub_video_register): Not exported. This symbol is not defined in
14589         the kernel.
14590         (grub_video_unregister): Likewise.
14591         (grub_video_iterate): Likewise.
14592         (grub_video_setup): Likewise.
14593         (grub_video_restore): Likewise.
14594         (grub_video_get_info): Likewise.
14595         (grub_video_get_blit_format): Likewise.
14596         (grub_video_set_palette): Likewise.
14597         (grub_video_get_palette): Likewise.
14598         (grub_video_set_viewport): Likewise.
14599         (grub_video_get_viewport): Likewise.
14600         (grub_video_map_color): Likewise.
14601         (grub_video_map_rgb): Likewise.
14602         (grub_video_map_rgba): Likewise.
14603         (grub_video_fill_rect): Likewise.
14604         (grub_video_blit_glyph): Likewise.
14605         (grub_video_blit_bitmap): Likewise.
14606         (grub_video_blit_render_target): Likewise.
14607         (grub_video_scroll): Likewise.
14608         (grub_video_swap_buffers): Likewise.
14609         (grub_video_create_render_target): Likewise.
14610         (grub_video_delete_render_target): Likewise.
14611         (grub_video_set_active_render_target): Likewise.
14613         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14614         Undefined.
14615         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14617         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14618         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14619         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14620         instead of $(srcdir)/genkernsyms.sh.
14622         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14623         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14624         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14625         instead of $(srcdir)/genkernsyms.sh.
14627         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14628         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14629         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14630         instead of $(srcdir)/genkernsyms.sh.
14632         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14633         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14634         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14635         instead of $(srcdir)/genkernsyms.sh.
14637         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14638         genkernsyms.sh.
14640         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14641         genkernsyms.sh.
14642         (gensymlist.sh): New target.
14643         (genkernsyms.sh): Likewise.
14645         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14646         genkernsyms.sh.in and gensymlist.sh.in.
14648         * genkernsyms.sh: Removed.
14649         * gensymlist.sh: Likewise.
14651         * genkernsyms.sh.in: New file.
14652         * gensymlist.sh.in: Likewise.
14654 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14656         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14657         clobber "prefix", since we may have already set it manually.
14659 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14661         * kern/misc.c (abort): New alias for grub_abort.
14663 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
14665         A new machine-specific function "grub_machine_set_prefix" is
14666         defined. This is called after loading modules, so that a prefix
14667         initialization can use modules. Also, this change adds an
14668         intensive debugging feature for the memory manager via the
14669         configure option "--enable-mm-debug".
14671         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14672         PART.LEN.
14674         * kern/sparc64/ieee1275/init.c (abort): Removed.
14675         (grub_stop): Likewise.
14676         (grub_exit): New function.
14677         (grub_set_prefix): Renamed to ...
14678         (grub_machine_set_prefix): ... this.
14679         (grub_machine_init): Do not call grub_set_prefix.
14681         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14682         (grub_machine_set_prefix): ... this.
14683         (grub_machine_init): Do not call grub_set_prefix.
14685         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14686         (grub_machine_init): Do not set the prefix here.
14688         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14690         * kern/efi/init.c: Include grub/mm.h.
14691         (grub_efi_set_prefix): New function.
14693         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14694         (grub_efi_get_filename): New function.
14695         (grub_print_device_path): Renamed to ...
14696         (grub_efi_print_device_path): ... this.
14698         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14699         [MM_DEBUG] (grub_realloc): Likewise.
14700         [MM_DEBUG] (grub_free): Likewise.
14701         [MM_DEBUG] (grub_memalign): Likewise.
14702         [MM_DEBUG] (grub_mm_debug): New variable.
14703         [MM_DEBUG] (grub_debug_malloc): New function.
14704         [MM_DEBUG] (grub_debug_free): New function.
14705         [MM_DEBUG] (grub_debug_realloc): New function.
14706         [MM_DEBUG] (grub_debug_memalign): New function.
14708         * kern/misc.c (grub_abort): Print a newline to distinguish
14709         the message.
14711         * kern/main.c (grub_main): Call grub_machine_set_prefix and
14712         grub_set_root_dev after loading modules. This is necessary when
14713         setting a prefix depends on modules.
14715         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14716         (grub_efi_print_device_path): ... this.
14717         (grub_efi_get_filename): New prototype.
14718         (grub_efi_set_prefix): Likewise.
14720         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14721         and grub/disk.h.
14722         (grub_efidisk_get_device_handle): New prototype.
14723         (grub_efidisk_get_device_name): Likewise.
14725         * include/grub/mm.h: Include config.h.
14726         (MM_DEBUG): Removed.
14727         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14728         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14729         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14730         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14731         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14732         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14733         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14734         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14735         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14737         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14739         * disk/efi/efidisk.c: Include grub/partition.h.
14740         (iterate_child_devices): New function.
14741         (add_device): First, compare only last device path nodes, so that
14742         devices are sorted by the types.
14743         (grub_efidisk_get_device_handle): New function.
14744         (grub_efidisk_get_device_name): Likewise.
14746         * configure.ac (--enable-mm-debug): New option to enable the
14747         memory manager debugging feature. This makes the binary much
14748         bigger, so is disabled by default.
14750 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
14752         Use grub_abort instead of grub_stop, and grub_exit must be
14753         define in each architecture now. Also, this change adds support
14754         for EFI disks.
14756         * util/i386/pc/grub-probefs.c: Include grub/term.h.
14757         (grub_getkey): New function.
14758         (grub_term_get_current): Likewise.
14760         * util/i386/pc/grub-setup.c: Include grub/term.h.
14761         (grub_getkey): New function.
14762         (grub_term_get_current): Likewise.
14764         * util/misc.c (grub_stop): Renamed to ...
14765         (grub_exit): ... this.
14767         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14768         (grub_exit): ... this.
14769         (grub_machine_init): Use grub_abort instead of abort.
14770         (grub_stop): Removed.
14772         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14773         abort.
14775         * kern/i386/pc/startup.S (grub_exit): New function.
14776         (cold_reboot): New label.
14778         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14779         (grub_efi_init): Call grub_efidisk_init.
14780         (grub_efi_fini): Call grub_efidisk_fini.
14782         * kern/efi/efi.c: Include grub/mm.h.
14783         (grub_efi_console_control_guid): Renamed to ...
14784         (console_control_guid): ... this.
14785         (grub_efi_loaded_image_guid): Renamed to ...
14786         (loaded_image_guid): ... this.
14787         (grub_efi_locate_handle): New function.
14788         (grub_efi_open_protocol): Likewise.
14789         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14790         GRUB_EFI_CONSOLE_CONTROL_GUID.
14791         (grub_efi_exit): Removed.
14792         (grub_stop): Likewise.
14793         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14794         (grub_exit): New function.
14795         (grub_print_device_path): Likewise.
14797         * kern/rescue.c (grub_rescue_cmd_exit): New function.
14798         (grub_enter_rescue_mode): Register "exit".
14800         * kern/misc.c (grub_real_dprintf): A cosmetic change.
14801         (grub_abort): New function.
14803         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14805         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14807         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14809         * include/grub/efi/efi.h (grub_efi_exit): Removed.
14810         (grub_print_device_path): New prototype.
14811         (grub_efi_locate_handle): Likewise.
14812         (grub_efi_open_protocol): Likewise.
14814         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14815         * disk/efi/efidisk.c: Likewise.
14817         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14819         * include/grub/efi/console_control.h
14820         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14822         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14823         last 8 bytes as an array.
14824         (GRUB_EFI_DISK_IO_GUID): New macro.
14825         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14826         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14827         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14828         grub_uint8_t.
14829         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14830         (struct grub_efi_device_path): Rename the member "sub_type" to
14831         "subtype".
14832         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14833         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14834         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14835         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14836         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14837         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14838         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14839         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14840         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14841         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14842         (struct grub_efi_pci_device_path): New structure.
14843         (grub_efi_pci_device_path_t): New type.
14844         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14845         (struct grub_efi_pccard_device_path): New structure.
14846         (grub_efi_pccard_device_path_t): New type.
14847         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14848         (struct grub_efi_memory_mapped_device_path): New structure.
14849         (grub_efi_memory_mapped_device_path_t): New type.
14850         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14851         (struct grub_efi_vendor_device_path): New structure.
14852         (grub_efi_vendor_device_path_t): New type.
14853         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14854         (struct grub_efi_controller_device_path): New structure.
14855         (grub_efi_controller_device_path_t): New type.
14856         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14857         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14858         (struct grub_efi_acpi_device_path): New structure.
14859         (grub_efi_acpi_device_path_t): New type.
14860         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14861         (struct grub_efi_expanded_acpi_device_path): New structure.
14862         (grub_efi_expanded_acpi_device_path_t): New type.
14863         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14864         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14865         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14866         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14867         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14868         (struct grub_efi_atapi_device_path): New structure.
14869         (grub_efi_atapi_device_path_t): New type.
14870         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14871         (struct grub_efi_fibre_channel_device_path): New structure.
14872         (grub_efi_fibre_channel_device_path_t): New type.
14873         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14874         (struct grub_efi_1394_device_path): New structure.
14875         (grub_efi_1394_device_path_t): New type.
14876         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14877         (struct grub_efi_usb_device_path): New structure.
14878         (grub_efi_usb_device_path_t): New type.
14879         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14880         (struct grub_efi_usb_class_device_path): New structure.
14881         (grub_efi_usb_class_device_path_t): New type.
14882         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14883         (struct grub_efi_i2o_device_path): New structure.
14884         (grub_efi_i2o_device_path_t): New type.
14885         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14886         (struct grub_efi_mac_address_device_path): New structure.
14887         (grub_efi_mac_address_device_path_t): New type.
14888         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14889         (struct grub_efi_ipv4_device_path): New structure.
14890         (grub_efi_ipv4_device_path_t): New type.
14891         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14892         (struct grub_efi_ipv6_device_path): New structure.
14893         (grub_efi_ipv6_device_path_t): New type.
14894         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14895         (struct grub_efi_infiniband_device_path): New structure.
14896         (grub_efi_infiniband_device_path_t): New type.
14897         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14898         (struct grub_efi_uart_device_path): New structure.
14899         (grub_efi_uart_device_path_t): New type.
14900         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14901         (struct grub_efi_vendor_messaging_device_path): New structure.
14902         (grub_efi_vendor_messaging_device_path_t): New type.
14903         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14904         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14905         (struct grub_efi_hard_drive_device_path): New structure.
14906         (grub_efi_hard_drive_device_path_t): New type.
14907         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14908         (struct grub_efi_cdrom_device_path): New structure.
14909         (grub_efi_cdrom_device_path_t): New type.
14910         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14911         (struct grub_efi_vendor_media_device_path): New structure.
14912         (grub_efi_vendor_media_device_path_t): New type.
14913         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14914         (struct grub_efi_file_path_device_path): New structure.
14915         (grub_efi_file_path_device_path_t): New type.
14916         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14917         (struct grub_efi_protocol_device_path): New structure.
14918         (grub_efi_protocol_device_path_t): New type.
14919         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14920         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14921         (struct grub_efi_bios_device_path): New structure.
14922         (grub_efi_bios_device_path_t): New type.
14923         (struct grub_efi_disk_io): New structure.
14924         (grub_efi_disk_io_t): New type.
14925         (struct grub_efi_block_io_media): New structure.
14926         (grub_efi_block_io_media_t): New type.
14927         (struct grub_efi_block_io): New structure.
14928         (grub_efi_block_io_t): New type.
14930         * include/grub/misc.h (grub_stop): Removed.
14931         (grub_exit): New prototype.
14932         (grub_abort): Likewise.
14934         * include/grub/disk.h (enum grub_disk_dev_id): Added
14935         GRUB_DISK_DEVICE_EFIDISK_ID.
14937         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14938         disk/efi/efidisk.c.
14939         (kernel_syms.lst): Remove the target if an error occurs.
14941 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
14943         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14944         as it was simply too buggy.
14946 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
14948         * kern/misc.c (grub_lltoa): New function.
14949         (grub_vsprintf): Added support for the long long suffix,
14950         i.e. "ll".
14952 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
14954         * Makefile.in (LDFLAGS): Add variable.
14955         (LD): Remove variable.
14956         * configure.ac: Add -m32 to LDFLAGS.
14957         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
14958         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
14959         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
14960         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
14961         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
14962         variables.
14963         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
14964         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
14965         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
14967 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
14969         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
14970         length for unknown glyph.
14972 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
14974         Add support for pre-loaded modules into the EFI port.
14976         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
14977         completely. Accept one more argument DIR. The caller has changed.
14979         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
14981         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
14982         (grub_efi_loaded_image_guid): New variable.
14983         (grub_efi_get_loaded_image): New function.
14984         (grub_arch_modules_addr): Likewise.
14986         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
14987         prototype.
14989         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
14990         (struct grub_efi_loaded_image): New structure.
14991         (grub_efi_loaded_image_t): New type.
14993 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
14995         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
14996         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
14997         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
14999 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15001         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15003 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15005         * DISTLIST: Added include/grub/efi/console.h,
15006         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15007         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15009         * include/grub/efi/console.h: New file.
15010         * include/grub/efi/time.h: Likewise.
15011         * include/grub/i386/efi/kernel.h: Likewise.
15012         * kern/efi/init.c: Likewise.
15013         * kern/efi/mm.c: Likewise.
15014         * term/efi/console.c: Likewise.
15016         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15017         (grub_stop): Removed.
15018         (grub_get_rtc): Likewise.
15019         (grub_machine_init): Simply call grub_efi_init.
15020         (grub_machine_fini): Call grub_efi_fini.
15022         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15023         (grub_efi_output_string): Removed.
15024         (grub_efi_stall): New function.
15025         (grub_stop): Likewise.
15026         (grub_get_rtc): Likewise.
15028         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15029         (grub_efi_stall): New prototype.
15030         (grub_efi_allocate_pages): Likewise.
15031         (grub_efi_free_pages): Likewise.
15032         (grub_efi_get_memory_map): Likewise.
15033         (grub_efi_mm_init): Likewise.
15034         (grub_efi_mm_fini): Likewise.
15035         (grub_efi_init): Likewise.
15036         (grub_efi_fini): Likewise.
15038         * include/grub/i386/efi/time.h: Do not include
15039         grub/symbol.h. Include grub/efi/time.h.
15040         (GRUB_TICKS_PER_SECOND): Removed.
15041         (grub_get_rtc): Likewise.
15043         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15044         Added padding. The EFI spec is buggy.
15045         (GRUB_EFI_BLACK): New macro.
15046         (GRUB_EFI_BLUE): Likewise.
15047         (GRUB_EFI_GREEN): Likewise.
15048         (GRUB_EFI_CYAN): Likewise.
15049         (GRUB_EFI_RED): Likewise.
15050         (GRUB_EFI_MAGENTA): Likewise.
15051         (GRUB_EFI_BROWN): Likewise.
15052         (GRUB_EFI_LIGHTGRAY): Likewise.
15053         (GRUB_EFI_BRIGHT): Likewise.
15054         (GRUB_EFI_DARKGRAY): Likewise.
15055         (GRUB_EFI_LIGHTBLUE): Likewise.
15056         (GRUB_EFI_LIGHTGREEN): Likewise.
15057         (GRUB_EFI_LIGHTCYAN): Likewise.
15058         (GRUB_EFI_LIGHTRED): Likewise.
15059         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15060         (GRUB_EFI_YELLOW): Likewise.
15061         (GRUB_EFI_WHITE): Likewise.
15062         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15063         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15064         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15065         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15066         (GRUB_EFI_BACKGROUND_RED): Likewise.
15067         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15068         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15069         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15070         (GRUB_EFI_TEXT_ATTR): Likewise.
15072         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15073         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15074         (kernel_mod_HEADERS): Added efi/time.h.
15076 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15078         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15079         include/grub/efi/api.h, include/grub/efi/console_control.h,
15080         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15081         include/grub/i386/efi/time.h, kern/efi/efi.c,
15082         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15083         and util/i386/efi/grub-mkimage.c.
15085         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15087         * genmk.rb (PModule#rule): Do not export symbols if
15088         #{prefix}_EXPORTS is set to "no".
15090         * conf/i386-efi.mk: New file.
15091         * conf/i386-efi.rmk: Likewise.
15092         * include/grub/efi/api.h: Likewise.
15093         * include/grub/efi/console_control.h: Likewise.
15094         * include/grub/efi/efi.h: Likewise.
15095         * include/grub/efi/pe32.h: Likewise.
15096         * include/grub/i386/efi/time.h: Likewise.
15097         * kern/efi/efi.c: Likewise.
15098         * kern/i386/efi/init.c: Likewise.
15099         * kern/i386/efi/startup.S: Likewise.
15100         * util/i386/efi/grub-mkimage.c: Likewise.
15102 2006-04-17  Marco Gerards  <marco@gnu.org>
15104         * include/grub/script.h: Include <grub/parser.h> and
15105         "grub_script.tab.h".
15106         (struct grub_lexer_param): New struct.
15107         (struct grub_parser_param): Likewise.
15108         (grub_script_create_arglist): Pass the state in an argument.
15109         (grub_script_add_arglist): Likewise.
15110         (grub_script_create_cmdline): Likewise.
15111         (grub_script_create_cmdblock): Likewise.
15112         (grub_script_create_cmdif): Likewise.
15113         (grub_script_create_cmdmenu): Likewise.
15114         (grub_script_add_cmd): Likewise.
15115         (grub_script_arg_add): Likewise.
15116         (grub_script_lexer_ref): Likewise.
15117         (grub_script_lexer_deref): Likewise.
15118         (grub_script_lexer_record_start): Likewise.
15119         (grub_script_lexer_record_stop): Likewise.
15120         (grub_script_mem_record): Likewise.
15121         (grub_script_mem_record_stop): Likewise.
15122         (grub_script_malloc): Likewise.
15123         (grub_script_yylex): Likewise.
15124         (grub_script_yyparse): Likewise.
15125         (grub_script_yyerror): Likewise.
15126         (grub_script_yylex): Likewise.
15127         (grub_script_lexer_init): Return the state.
15129         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15130         (grub_script_lexer_done): Likewise.
15131         (grub_script_lexer_getline): Likewise.
15132         (grub_script_lexer_refs): Likewise.
15133         (script): Likewise.
15134         (newscript): Likewise.
15135         (record): Likewise.
15136         (recording): Likewise.
15137         (recordpos): Likewise.
15138         (recordlen): Likewise.
15139         (grub_script_lexer_init): Return the state instead of setting
15140         global variables.
15141         (grub_script_lexer_ref): Use the newly added argument for state
15142         instead of globals.
15143         (grub_script_lexer_deref): Likewise.
15144         (grub_script_lexer_record_start): Likewise.
15145         (grub_script_lexer_record_stop): Likewise.
15146         (recordchar): Likewise.
15147         (nextchar): Likewise.
15148         (grub_script_yylex2): Likewise.
15149         (grub_script_yylex): Likewise.
15150         (grub_script_yyerror): Likewise.
15152         * normal/parser.y (func_mem): Removed variable.
15153         (menu_entry): Likewise.
15154         (err): Likewise.
15155         (%lex-param): New parser option.
15156         (%parse-param): Likewise.
15157         (script): Always return the AST.
15158         (argument): Pass the state around.
15159         (arguments): Likewise.
15160         (grubcmd): Likewise.
15161         (commands): Likewise.
15162         (function): Likewise.
15163         (menuentry): Likewise.
15164         (if_statement): Likewise.
15165         (if): Likewise.
15167         * normal/script.c (grub_script_memused): Removed variable.
15168         (grub_script_parsed): Likewise.
15169         (grub_script_malloc): Added a state argument.  Use that instead of
15170         global variables.
15171         (grub_script_mem_record): Likewise.
15172         (grub_script_mem_record_stop): Likewise.
15173         (grub_script_arg_add): Likewise.
15174         (grub_script_add_arglist): Likewise.
15175         (grub_script_create_cmdline): Likewise.
15176         (grub_script_create_cmdif): Likewise.
15177         (grub_script_create_cmdmenu): Likewise.
15178         (grub_script_add_cmd): Likewise.
15179         (grub_script_parse): Setup the state before calling the parser.
15181 2006-04-16  Marco Gerards  <marco@gnu.org>
15183         * normal/command.c (grub_command_init): Remove the title command.
15185         * normal/lexer.c (grub_script_yylex): Renamed from this...
15186         (grub_script_yylex2): ... to this.
15187         (grub_script_yylex): New function.  Temporary
15188         introduced to filter some tokens.
15189         (grub_script_yyerror): Print a newline.
15191         * normal/main.c (read_config_file): Output information about the
15192         lines that contain errors.  Wait for a key after all lines have
15193         been processed.  Don't return an empty menu.
15195         * normal/parser.y (func_mem): Don't initialize.
15196         (menu_entry): Likewise.
15197         (err): New variable.
15198         (script): Don't return anything when an error was encountered.
15199         (ws, returns): Removed rules.
15200         (argument): Disabled concatenated variable support.
15201         (arguments): Remove explicit separators.
15202         (grubcmd): Likewise.
15203         (function): Likewise.
15204         (menuentry): Likewise.
15205         (if): Likewise.
15206         (commands): Likewise.  Add error handling.
15208         * normal/script.c (grub_script_create_cmdline): If
15209         `grub_script_parsed' is 0, assume the parser encountered an error.
15211 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15213         * configure.ac: Add support for EFI. Fix the typo
15214         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15216 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15218         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15219         foreign multibyte characters should be shown correctly.
15221 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15223         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15224         calculation.
15225         (read_config_file): Made it to close file before returning.
15227 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15229         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15230         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15231         video/i386/pc/vbefill.c.
15233         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15234         video/i386/pc/vbefill.c.
15236         * include/grub/video.h (grub_video_blit_format): New enum.
15237         (grub_video_mode_info): Added new member blit_format.
15238         (grub_video_get_blit_format): New function prototype.
15240         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15241         function prototype.
15242         (grub_video_vbe_map_rgb): Likewise.
15243         (grub_video_vbe_unmap_color): Likewise.
15245         * include/grub/i386/pc/vbeblit.h: New file.
15247         * include/grub/i386/pc/vbefill.h: New file.
15249         * video/video.c (grub_video_get_blit_format): New function.
15250         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15251         (grub_video_vbe_map_rgb): Likewise.
15252         (grub_video_vbe_unmap_color): Likewise.
15254         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15255         optimized fills.
15256         (grub_video_vbe_blit_render_target): Changed to use more optimized
15257         blits.
15258         (grub_video_vbe_setup): Added detection for optimized settings.
15259         (grub_video_vbe_create_render_target): Likewise.
15261         * video/i386/pc/vbeblit.c: New file.
15263         * video/i386/pc/vbefill.c: New file.
15265 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15267         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15268         here...
15270         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15271         parsing to support both hex and dec ranges.  If filename was missing
15272         show usage information.
15274 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15276         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15277         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15279         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15280         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15281         (video_mod_SOURCES): Added.
15282         (video_mod_CFLAGS): Likewise.
15283         (video_mod_LDFLAGS): Likewise.
15284         (gfxterm_mod_SOURCES): Likewise.
15285         (gfxterm_mod_CFLAGS): Likewise.
15286         (gfxterm_mod_LDFLAGS): Likewise.
15287         (videotest_mod_SOURCES): Likewise.
15288         (videotest_mod_CFLAGS): Likewise.
15289         (videotest_mod_LDFLAGS): Likewise.
15290         (vesafb_mod_SOURCES): Removed.
15291         (vesafb_mod_CFLAGS): Likewise.
15292         (vesafb_mod_LDFLAGS): Likewise.
15293         (vga_mod_SOURCES): Likewise.
15294         (vga_mod_CFLAGS): Likewise.
15295         (vga_mod_LDFLAGS): Likewise.
15297         * commands/videotest.c: New file.
15299         * font/manager.c (fill_with_default_glyph): Modified to use
15300         grub_font_glyph.
15301         (grub_font_get_glyph): Likewise.
15302         (fontmanager): Renamed from this...
15303         (font_manager): ... to this.
15305         * include/grub/font.h (grub_font_glyph): Added new structure.
15306         (grub_font_get_glyph): Modified to use grub_font_glyph.
15308         * include/grub/misc.h (grub_abs): Added as inline function.
15310         * include/grub/video.h: New file.
15312         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15313         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15314         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15315         (grub_vbe_get_controller_info): Renamed from this...
15316         (grub_vbe_bios_get_controller_info): ... to this.
15317         (grub_vbe_get_mode_info): Renamed from this...
15318         (grub_vbe_bios_get_mode_info): ... to this.
15319         (grub_vbe_set_mode): Renamed from this...
15320         (grub_vbe_bios_set_mode): ... to this.
15321         (grub_vbe_get_mode): Renamed from this...
15322         (grub_vbe_bios_get_mode): ... to this.
15323         (grub_vbe_set_memory_window): Renamed from this...
15324         (grub_vbe_bios_set_memory_window): ... to this.
15325         (grub_vbe_get_memory_window): Renamed from this...
15326         (grub_vbe_bios_get_memory_window): ... to this.
15327         (grub_vbe_set_scanline_length): Renamed from this...
15328         (grub_vbe_set_scanline_length): ... to this.
15329         (grub_vbe_get_scanline_length): Renamed from this...
15330         (grub_vbe_bios_get_scanline_length): ... to this.
15331         (grub_vbe_set_display_start): Renamed from this...
15332         (grub_vbe_bios_set_display_start): ... to this.
15333         (grub_vbe_get_display_start): Renamed from this...
15334         (grub_vbe_bios_get_display_start): ... to this.
15335         (grub_vbe_set_palette_data): Renamed from this...
15336         (grub_vbe_bios_set_palette_data): ... to this.
15337         (grub_vbe_set_pixel_rgb): Removed.
15338         (grub_vbe_set_pixel_index): Likewise.
15340         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15341         from this...
15342         (grub_vbe_bios_get_controller_info): ... to this.
15343         (grub_vbe_get_mode_info): Renamed from this...
15344         (grub_vbe_bios_get_mode_info): ... to this.
15345         (grub_vbe_set_mode): Renamed from this...
15346         (grub_vbe_bios_set_mode): ... to this.
15347         (grub_vbe_get_mode): Renamed from this...
15348         (grub_vbe_bios_get_mode): ... to this.
15349         (grub_vbe_set_memory_window): Renamed from this...
15350         (grub_vbe_bios_set_memory_window): ... to this.
15351         (grub_vbe_get_memory_window): Renamed from this...
15352         (grub_vbe_bios_get_memory_window): ... to this.
15353         (grub_vbe_set_scanline_length): Renamed from this...
15354         (grub_vbe_set_scanline_length): ... to this.
15355         (grub_vbe_get_scanline_length): Renamed from this...
15356         (grub_vbe_bios_get_scanline_length): ... to this.
15357         (grub_vbe_set_display_start): Renamed from this...
15358         (grub_vbe_bios_set_display_start): ... to this.
15359         (grub_vbe_get_display_start): Renamed from this...
15360         (grub_vbe_bios_get_display_start): ... to this.
15361         (grub_vbe_set_palette_data): Renamed from this...
15362         (grub_vbe_bios_set_palette_data): ... to this.
15363         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15364         getting corrupted after calling it.  Added more pushes and pops.
15365         (grub_vbe_bios_set_mode): Likewise.
15366         (grub_vbe_bios_get_mode): Likewise.
15367         (grub_vbe_bios_get_memory_window): Likewise.
15368         (grub_vbe_bios_set_scanline_length): Likewise.
15369         (grub_vbe_bios_get_scanline_length): Likewise.
15370         (grub_vbe_bios_get_display_start): Likewise.
15371         (grub_vbe_bios_set_palette_data): Likewise.
15373         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15374         (cl_insert): Likewise.
15375         (cl_delete): Likewise.
15377         * term/gfxterm.c: New file.
15379         * term/i386/pc/vesafb.c: Removed file.
15381         * video/video.c: New file.
15383         * video/i386/pc/vbe.c (real2pm): Added new function.
15384         (grub_video_vbe_draw_pixel): Likewise.
15385         (grub_video_vbe_get_video_ptr): Likewise.
15386         (grub_video_vbe_get_pixel): Likewise
15387         (grub_video_vbe_init): Likewise.
15388         (grub_video_vbe_fini): Likewise.
15389         (grub_video_vbe_setup): Likewise.
15390         (grub_video_vbe_get_info): Likewise.
15391         (grub_video_vbe_set_palette): Likewise.
15392         (grub_video_vbe_get_palette): Likewise.
15393         (grub_video_vbe_set_viewport): Likewise.
15394         (grub_video_vbe_get_viewport): Likewise.
15395         (grub_video_vbe_map_color): Likewise.
15396         (grub_video_vbe_map_rgb): Likewise.
15397         (grub_video_vbe_map_rgba): Likewise.
15398         (grub_video_vbe_unmap_color): Likewise.
15399         (grub_video_vbe_fill_rect): Likewise.
15400         (grub_video_vbe_blit_glyph): Likewise.
15401         (grub_video_vbe_blit_bitmap): Likewise.
15402         (grub_video_vbe_blit_render_target): Likewise.
15403         (grub_video_vbe_scroll): Likewise.
15404         (grub_video_vbe_swap_buffers): Likewise.
15405         (grub_video_vbe_create_render_target): Likewise.
15406         (grub_video_vbe_delete_render_target): Likewise.
15407         (grub_video_vbe_set_active_render_target): Likewise.
15408         (grub_vbe_set_pixel_rgb): Remove function.
15409         (grub_vbe_set_pixel_index): Likewise.
15410         (index_color_mode): Remove static variable.
15411         (active_mode): Likewise.
15412         (framebuffer): Likewise.
15413         (bytes_per_scan_line): Likewise.
15414         (grub_video_vbe_adapter): Added new static variable.
15415         (framebuffer): Likewise.
15416         (render_target): Likewise.
15417         (initial_mode): Likewise.
15418         (mode_in_use): Likewise.
15419         (mode_list): Likewise.
15421 2006-03-10  Marco Gerards  <marco@gnu.org>
15423         * configure.ac (AC_INIT): Bumped to 1.93.
15425         * DISTLIST: Added `include/grub/hfs.h'.
15427 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15429         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15430         18H, which might help the BIOS falling back to next boot media.
15432 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15434         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15435         Poe Chen <poe.poechen@gmail.com>.
15437 2006-01-17  Marco Gerards  <marco@gnu.org>
15439         * include/grub/normal.h: Include <grub/script.h>.
15440         (grub_command_list): Removed struct.
15441         (grub_command_list_t): Removed type.
15442         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15443         members `commands' and `sourcecode'.
15444         * include/grub/script.h: Add inclusion guards.
15445         (grub_script_cmd_menuentry): New struct.
15446         (grub_script_execute_menuentry): New prototype.
15447         (grub_script_lexer_record_start): Likewise.
15448         (grub_script_lexer_record_stop): Likewise.
15449         * normal/execute.c (grub_script_execute_menuentry): New function.
15450         * normal/lexer.c (record, recording, recordpos, recordlen): New
15451         variables.
15452         (grub_script_lexer_record_start): New function.
15453         (grub_script_lexer_record_stop): Likewise.
15454         (recordchar): Likewise.
15455         (nextchar): Likewise.
15456         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15457         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15458         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15459         (current_menu): New variable.
15460         (free_menu): Mainly rewritten.
15461         (grub_normal_menu_addentry): New function.
15462         (read_config_file): Rewritten.
15463         * normal/menu.c (run_menu_entry): Mainly rewritten.
15464         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15465         the menu entry.
15466         (run): Mainly rewritten.
15467         * normal/parser.y (menu_entry): New variable.
15468         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15469         (menuentry): New rule.
15470         (command): Add `menuentry'.
15471         (if_statement): Allow additional returns before `fi'.
15472         * normal/script.c (grub_script_create_cmdmenu): New function.
15474 2006-01-03  Marco Gerards  <marco@gnu.org>
15476         * INSTALL: GNU Bison is required.
15477         * configure.ac: Rewritten the test to detect Bison.
15478         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15479         <xun.sun.cn@gmail.com>.
15481 2006-01-03  Marco Gerards  <marco@gnu.org>
15483         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15484         the HFS+ filesystem to filesystem blocks.
15485         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15486         GCC warning is silenced.
15488 2006-01-03  Marco Gerards  <marco@gnu.org>
15490         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15491         read from disk from big endian to host byte order.
15493 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15495         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15496         documentation.
15497         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15498         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15499         embedded HFS+ filesystem.
15500         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15501         (grub_hfs_sblock): Move from here...
15502         * include/grub/hfs.h: To here...  New file.
15503         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15504         documentation.
15505         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15506         New macros.
15507         (grub_hfsplus_volheader): Change type of member `magic' to
15508         `grub_uint16_t'.
15509         (grub_hfsplus_data): Add new member `embedded_offset'.
15510         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15511         returned block.
15512         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15513         Calculate the offset.
15515 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15517         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15518         Removed.
15519         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15521 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15523         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15524         ENV->NAME is NULL after allocating ENV->VALUE.
15526 2005-12-25  Marco Gerards  <marco@gnu.org>
15528         * kern/env.c (grub_env_set): Rewritten the error handling code.
15530 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15532         * geninit.sh: Made more robust, and more portable.
15534 2005-12-25  Marco Gerards  <marco@gnu.org>
15536         Add support for Apple HFS+ filesystems.
15538         * fs/hfsplus.c: New file.
15540         * DISTLIST: Added `fs/hfsplus.c'.
15542         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15543         (hfsplus_mod_SOURCES): New variable.
15544         (hfsplus_mod_CFLAGS): Likewise.
15545         (hfsplus_mod_LDFLAGS): Likewise.
15546         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15547         (grub_setup_SOURCES): Likewise.
15548         (grub_mkdevicemap_SOURCES): Likewise.
15549         (grub_emu_SOURCES): Likewise.
15550         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15552         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15554         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15556 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15558         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15559         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15560         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15561         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15562         normal/lexer.c, normal/parser.y, normal/script.c, and
15563         partmap/gpt.c.
15564         Removed kern/sparc64/cache.c.
15566         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15567         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15568         grub_emu_init.c.
15570         * configure.ac (AC_INIT): Bumped to 1.92.
15572 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15574         * kern/err.c (grub_error_push): Added new function to support error
15575         stacks.
15576         (grub_error_pop): Likewise.
15577         (grub_error_stack_items): New local variable to support error stacks.
15578         (grub_error_stack_pos): Likewise.
15579         (grub_error_stack_assert): Likewise.
15580         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15581         stack depth.
15582         (grub_print_error): Added support to print errors from error stack.
15584         * include/grub/err.h (grub_error_push): Added function prototype.
15585         (grub_error_pop): Likewise.
15587 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15589         * configure.ac: Accept `powerpc64' as host_cpu.
15590         (amd64): Rename to `biarch32'.
15592         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15593         non-cacheline-aligned addresses.
15595         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15596         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15597         if `size' is non-zero.
15599 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15601         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15602         and `cd' to make sure the filename is not prefixed with a
15603         directory name.
15604         (pkgdata_MODULES): Add `gpt.mod'.
15605         (gpt_mod_SOURCES): New variable.
15606         (gpt_mod_CFLAGS): Likewise.
15607         (gpt_mod_LDFLAGS): Likewise.
15609         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15611         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15612         New macro.
15614         * partmap/gpt.c: New file.
15616         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15617         GPT partition map is detected.
15619 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15621         * commands/i386/pc/play.c: New file.
15622         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15623         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15624         macros.
15626 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
15628         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15629         ((unused))' to silence gcc warning.
15631 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
15633         * configure.ac: Correct `AC_PROG_YACC' test.
15635 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15637         * util/powerpc/ieee1275/grub-install.in: Run the mount point
15638         check before installing files.
15640 2005-11-22  Mike Small  <smallm@panix.com>
15642         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15643         number regex so multidigit numbers are recognized correctly.
15645 2005-11-22  Mike Small  <smallm@panix.com>
15647         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15648         debugging message before attempting to claim memory.
15649         (grub_rescue_cmd_initrd): Add a claim debugging message and try
15650         multiple addresses in case of failure.
15652 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15654         * term/tparm.c (get_space): Remove empty `if' statement.
15656         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15658         * kern/parser.c (check_varstate): Rename `state' to 's'.
15660 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15662         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
15663         variable definitions to the beginning of each function.  Sort stack
15664         variables by size.
15665         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
15666         `buf' argument to `char *'.
15668 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15670         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15671         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15672         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15673         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15674         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15675         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15676         configfile.mod, search.mod, gzio.mod and test.mod.
15677         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15678         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15679         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15680         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15681         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15682         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15683         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15684         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15685         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15686         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15687         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15688         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15689         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15690         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15691         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15692         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15693         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15694         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15695         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15696         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15697         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15698         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15699         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15701         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15702         `grep --include'.
15703         (pkgdata_MODULES): Add test.mod.
15705 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15707         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
15708         appending to variables with "+=".
15709         (PModule): Use full pathname to generate *.lst filenames.
15711         * Makefile.in: Fixed list rules moved from genmk.rb.
15712         (.DELETE_ON_ERROR): New special target.
15713         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15715         * conf/i386-pc.rmk: Include conf/common.mk.
15716         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15717         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15718         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15719         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15720         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15721         configfile.mod, search.mod, gzio.mod and test.mod.
15722         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15723         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15724         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15725         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15726         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15727         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15728         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15729         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15730         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15731         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15732         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15733         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15734         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15735         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15736         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15737         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15738         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15739         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15740         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15741         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15742         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15743         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15744         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15745         here...
15746         * conf/common.rmk: ... to here.  New file.
15748         * conf/common.mk: New file.
15750 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
15752         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15753         (grub_script.tab.c): ... here.
15755         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15756         (grub_script.tab.c): ... here.
15758         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15759         (grub_script.tab.c): ... here.
15761         * normal/command.c (grub_command_find): Fixed a memory leak of
15762         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15764 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15766         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15767         "@" which marks the start of a comment on ARM.
15768         (VARIABLE): Likewise.
15770 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15772         Add support for Linux/ADFS partition tables.
15774         * partmap/acorn.c: New file.
15776         * include/grub/acorn_filecore.h: Likewise.
15778         * DISTLIST: Added `partmap/acorn.c' and
15779         `include/grub/acorn_filecore.h'.
15781         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15782         `partmap/acorn.c'.
15783         (pkgdata_MODULES): Add `acorn.mod'.
15784         (acorn_mod_SOURCES): New variable.
15785         (acorn_mod_CFLAGS): Likewise.
15787         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15788         `partmap/acorn.c'.
15789         (pkgdata_MODULES): Add `acorn.mod'.
15790         (acorn_mod_SOURCES): New variable.
15791         (acorn_mod_CFLAGS): Likewise.
15793         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15794         (pkgdata_MODULES): Add `acorn.mod'.
15795         (acorn_mod_SOURCES): New variable.
15796         (acorn_mod_CFLAGS): Likewise.
15797         (acorn_mod_LDFLAGS): Likewise.
15799         * include/types.h (grub_disk_addr_t): New typedef.
15801 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
15803         * geninit.sh: New file.
15805         * geninitheader.sh: Likewise.
15807         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15808         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15809         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15810         * commands/configfile.c (grub_configfile_init)
15811         (grub_configfile_fini): Likewise.
15812         * commands/default.c (grub_default_init, grub_default_fini):
15813         Likewise.
15814         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15815         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15816         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15817         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15818         Likewise.
15819         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15820         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15821         Likewise.
15822         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15823         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15824         Likewise.
15825         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15826         Likewise.
15827         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15828         Likewise.
15829         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15830         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15831         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15832         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15833         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15834         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15835         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15836         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15837         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15838         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15839         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15840         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15841         * partmap/amiga.c (grub_amiga_partition_map_init)
15842         (grub_amiga_partition_map_fini): Likewise.
15843         * partmap/apple.c (grub_apple_partition_map_init)
15844         (grub_apple_partition_map_fini): Likewise.
15845         * partmap/pc.c (grub_pc_partition_map_init)
15846         (grub_pc_partition_map_fini): Likewise.
15847         * partmap/sun.c (grub_sun_partition_map_init,
15848         grub_sun_partition_map_fini): Likewise.
15849         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15850         Likewise.
15852         * util/grub-emu.c: Include <grub_modules_init.h>.
15853         (main): Don't initialize and de-initialize any modules directly,
15854         use `grub_init_all' and `grub_fini_all' instead.
15856         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15857         `grub_vesafb_mod_init'.
15858         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
15859         all users.
15860         * term/i386/pc/vga.c (grub_vga_init): Renamed to
15861         `grub_vga_mod_init'.  Updated all users.
15862         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15864         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15865         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15866         rules.
15868         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15869         Generate a function to initialize the module in utilities.
15870         Updated all callers.
15871         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
15872         initialize the module in utilities.  Updated all callers.
15874 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15876         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15877         escape sequence and a literal ^L to clear the screen.
15879         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15880         when returning from Open Firmware.
15882 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15884         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15885         (grub_ofconsole_height): Likewise.
15886         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15887         manually insert a '\n'.
15888         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15889         `grub_ofconsole_height'.  Return early if these are already set.
15891 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
15893         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15894         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15895         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15896         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15897         and `normal/script.c'.
15898         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15899         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15900         (test_mod_SOURCES): New variable.
15901         (test_mod_CFLAGS): Likewise.
15902         (test_mod_LDFLAGS): Likewise.
15903         (pkgdata_MODULES): Add `test.mod'.
15904         (grub_script.tab.c): New rule.
15905         (grub_script.tab.h): Likewise.
15907 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
15909         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15910         `commands/test.c', `normal/execute.c', `normal/lexer.c',
15911         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15912         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15913         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15914         (test_mod_SOURCES): New variable.
15915         (test_mod_CFLAGS): Likewise.
15916         (pkgdata_MODULES): Add `test.mod'.
15917         (grub_script.tab.c): New rule.
15918         (grub_script.tab.h): Likewise.
15920 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
15922         Add initial scripting support.
15924         * commands/test.c: New file.
15925         * include/grub/script.h: Likewise.
15926         * normal/execute.c: Likewise.
15927         * normal/function.c: Likewise.
15928         * normal/lexer.c: Likewise.
15929         * normal/parser.y: Likewise.
15930         * normal/script.c: Likewise.
15932         * configure.ac: Add `AC_PROG_YACC' test.
15934         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15935         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15936         `normal/function.c' and `normal/script.c'.
15937         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15938         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15939         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15940         variables.
15941         (pkgdata_MODULES): Add `test.mod'.
15942         (grub_script.tab.c): New rule.
15943         (grub_script.tab.h): Likewise.
15945         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15947         * include/grub/normal.h (grub_test_init): New prototype.
15948         (grub_test_fini): Likewise.
15950         * normal/command.c: Include <grub/script.h>.
15951         (grub_command_execute): Rewritten.
15953         * util/grub-emu.c (main): Call `grub_test_init' and
15954         `grub_test_fini'.
15956 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
15958         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
15959         to 0.
15960         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
15961         there are no pending characters.
15963 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
15965         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
15966         `grub_strndup' to drop device arguments. Replace unnecessary
15967         `grub_strndup' with `grub_strdup'.
15969 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
15971         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
15972         `debug' environment variable has been set.
15974 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15976         * Makefile.in (install-local): Use $(DATA).
15977         (uninstall): Likewise.
15978         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
15979         (sbin_UTILITIES): ... to here.
15980         (sbin_SCRIPTS): New variable.
15981         (grub_install_SOURCES): New variable.
15982         * util/powerpc/ieee1275/grub-install.in: New file.
15983         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
15984         variable.
15985         (add_segments): Call `grub_util_get_path'.
15987 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
15989         From Timothy Baldwin:
15990         * commands/ls.c (grub_ls_list_files): Close FILE with
15991         grub_file_close.
15992         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
15994 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
15996         * include/grub/parser.h: New file.
15998         * kern/parser.c: Likewise.
16000         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16001         (grub_setup_SOURCES): Likewise.
16002         (grub_probefs_SOURCES): Likewise.
16003         (grub_emu_SOURCES): Likewise.
16004         (kernel_img_HEADERS): Add `parser.h'.
16006         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16007         (grub_emu_SOURCES): Add `kern/parser.c'.
16008         (grubof_SOURCES): Likewise.
16010         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16011         (grubof_SOURCES): Add `kern/parser.c'.
16013         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16015         * kern/misc.c (grub_split_cmdline): Removed function.
16017         * kern/rescue.c: Include <grub/parser.h>.
16018         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16019         of `grub_split_cmdline'.
16021         * normal/command.c: Include <grub/parser.h>.
16022         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16023         of `grub_split_cmdline'.
16025         * normal/completion.c: Include <grub/parser.h>.
16026         (cmdline_state): New variable.
16027         (iterate_dir): End the filename with a quote depending on the
16028         command line state.
16029         (get_state): new function.
16030         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16031         split the arguments and determine the current argument.  When the
16032         argument string is not quoted, escape all spaces.
16034 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16036         * normal/sparc64/setjmp.S: New file.
16038 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16040         * include/grub/sparc64/libgcc.h: New file.
16041         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16042         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16043         normal/sparc64/setjmp.c.
16045 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16047         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16048         * kern/sparc64/cache.S: New file.
16049         * kern/sparc64/cache.c: Removed.
16050         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16051         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16052         -mtune=ultrasparc.
16053         (COMMON_LDFLAGS): Add -melf64_sparc.
16054         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16055         (grubof_SOURCES): Use cache.S instead of cache.c.
16056         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16057         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16058         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16059         commented though.
16060         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16061         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16062         (linux_mod_CFLAGS): Commented out.
16063         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16064         out because module isn't built.
16065         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16066         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16067         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16068         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16069         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16070         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16071         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16072         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16073         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16074         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16075         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16076         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16077         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16078         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16080 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16082         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16083         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16084         longer, because HFS should not be used on PC.
16086 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16088         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16089         consistently within the loop.
16091 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16093         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16094         directory can not be read.
16096 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16098         * configure.ac (AC_INIT): Increase the version number to 1.91.
16100         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16101         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16102         term/i386/pc/serial.c.
16104 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16106         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16107         file size must be permitted.
16109         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16110         between %ah and %al.
16112 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16114         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16115         grub_uint64_t.
16116         Call the hook with a NUL-terminated filename.
16117         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16118         grub_cpu_to_be32.
16120         * kern/term.c (cursor_state): New variable.
16121         (grub_term_set_current): Reset the cursor state on a new
16122         terminal.
16123         (grub_setcursor): Rewritten to use CURSOR_STATE.
16124         (grub_getcursor): New function.
16126         * include/grub/term.h (grub_getcursor): New prototype.
16128         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16129         integers on ARM. Reported by Timothy Baldwin
16130         <T.E.Baldwin99@members.leeds.ac.uk>.
16132 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16134         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16135         allocated.
16136         (grub_sfs_dir): Likewise.
16138 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16140         Add support for the SFS filesystem.
16142         * fs/sfs.c: New file.
16144         * DISTLIST: Added `fs/sfs.c'.
16146         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16147         (grub_probefs_SOURCES): Likewise.
16148         (grub_emu_SOURCES): Likewise.
16149         (pkgdata_MODULES): Add `sfs.mod'.
16150         (sfs_mod_SOURCES): New variable.
16151         (sfs_mod_CFLAGS): Likewise.
16152         (sfs_mod_LDFLAGS): Likewise.
16154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16155         (pkgdata_MODULES): Add `sfs.mod'.
16156         (sfs_mod_SOURCES): New variable.
16157         (sfs_mod_CFLAGS): Likewise.
16159         * util/grub-emu.c (main): Call `grub_sfs_init' and
16160         `grub_sfs_fini'.
16162         * include/grub/fs.h (grub_sfs_init): New prototype.
16163         (grub_sfs_fini): Likewise.
16165 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16167         Add support for the AFFS filesystem.
16169         * fs/affs.c: New file.
16171         * DISTLIST: Added `fs/affs.c'.
16173         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16174         (grub_probefs_SOURCES): Likewise.
16175         (grub_emu_SOURCES): Likewise.
16176         (pkgdata_MODULES): Add `affs.mod'.
16177         (affs_mod_SOURCES): New variable.
16178         (affs_mod_CFLAGS): Likewise.
16179         (affs_mod_LDFLAGS): Likewise.
16181         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16182         (pkgdata_MODULES): Add `affs.mod'.
16183         (affs_mod_SOURCES): New variable.
16184         (affs_mod_CFLAGS): Likewise.
16186         * util/grub-emu.c (main): Call `grub_affs_init' and
16187         `grub_affs_fini'.
16189         * include/grub/fs.h (grub_affs_init): New prototype.
16190         (grub_affs_fini): Likewise.
16192 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16194         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16196 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16198         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16199         `-m32' to CFLAGS.
16201         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16202         linking.
16204         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16205         (COMMON_LDFLAGS): New variable.
16206         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16207         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16208         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16209         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16210         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16211         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16212         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16213         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16214         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16215         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16216         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16217         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16218         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16219         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16220         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16221         variables.
16222         (normal_mod_ASFLAGS): Add `-m32'.
16224         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16225         (grub_host_size_t, grub_host_ssize_t): New types.
16226         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16227         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16228         `GRUB_HOST_SIZEOF_VOID_P'.
16230         * include/grub/kernel.h (struct grub_module_header): Type of
16231         member offset changed to `grub_host_off_t'.  Type of member size
16232         changed to `grub_host_size_t'.
16233         (struct grub_module_info): Type of member offset changed to
16234         `grub_host_off_t'.  Type of member size changed to
16235         `grub_host_size_t'.
16237 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16239         Make GRUB's kernel compliant to Multiboot Specification.
16241         * kern/i386/pc/startup.S (multiboot_header): New label.
16242         (multiboot_entry): Likewise.
16243         (multiboot_trampoline): Likewise.
16245         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16246         Increased to 0x4A0.
16248         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16249         put parentheses after a question mark.
16250         [!GRUB_UTIL] (my_mod): New variable.
16252         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16254 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16256         Adds support for the XFS filesystem.  Btrees are not supported
16257         yet.
16259         * fs/xfs.c: New file.
16261         * DISTLIST: Added `fs/xfs.c'.
16263         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16264         (grub_probefs_SOURCES): Likewise.
16265         (grub_emu_SOURCES): Likewise.
16266         (pkgdata_MODULES): Add `xfs.mod'.
16267         (xfs_mod_SOURCES): New variable.
16268         (xfs_mod_CFLAGS): Likewise.
16270         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16271         (pkgdata_MODULES): Add `xfs.mod'.
16272         (xfs_mod_SOURCES): New variable.
16273         (xfs_mod_CFLAGS): Likewise.
16275         * util/grub-emu.c (main): Call `grub_xfs_init' and
16276         `grub_xfs_fini'.
16278         * include/grub/fs.h (grub_xfs_init): New prototype.
16279         (grub_xfs_fini): Likewise.
16282 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16284         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16285         color modes, allow greater than 16 colors to be configured as
16286         a default palette.
16288 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16290         * normal/completion.c (complete_arguments): Add the qualifier
16291         const into OPTIONS.
16293         From Omniflux <omniflux+lists@omniflux.com>:
16294         * include/grub/terminfo.h: New file.
16295         * include/grub/tparm.h: Likewise.
16296         * include/grub/i386/pc/serial.h: Likewise.
16297         * term/terminfo.c: Likewise.
16298         * term/tparm.c: Likewise.
16299         * term/i386/pc/serial.c: Likewise.
16300         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16301         serial.mod.
16302         (terminfo_mod_SOURCES): New variable.
16303         (terminfo_mod_CFLAGS): Likewise.
16304         (serial_mod_SOURCES): Likewise.
16305         (serial_mod_CFLAGS): Likewise.
16307 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16309         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16310         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16311         and kern/powerpc/ieee1275/cmain.c, respectively.
16313         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16314         * kern/powerpc/ieee1275/crt0.S: ... here.
16316         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16317         * kern/powerpc/ieee1275/cmain.c: ... here.
16319         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16320         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16321         instead of boot/powerpc/ieee1275/crt0.S and
16322         boot/powerpc/ieee1275/cmain.c, respectively.
16324         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16325         sectors. It was not used anyway.
16327 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16329         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16330         `unused parameter' warning.
16332 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16334         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16335         function.
16336         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16337         getcharwidth.
16339 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16341         * include/grub/normal.h (enum grub_completion_type): Added
16342         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16344         * normal/cmdline.c (print_completion): Handle
16345         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16346         * normal/menu_entry.c (store_completion): Likewise.
16348         * normal/completion.c (complete_arguments): New function.
16349         (grub_normal_do_completion): Call `complete_arguments' when the
16350         current words start with a dash.
16352 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16354         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16355         `gzio.mod' instead of `io.mod').
16357 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16359         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16360         (DISTDIRS): Added io and video.
16361         Rewrite the search routine to make an output consistently.
16363         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16364         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16365         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16366         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16367         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16368         util/powerpc/ieee1275/misc.c.
16370         * include/grub/gzio.h: New file.
16371         * io/gzio.c: Likewise.
16373         * kern/file.c (grub_file_close): Call grub_device_close only if
16374         FILE->DEVICE is not NULL.
16376         * include/grub/mm.h [!NULL] (NULL): New macro.
16378         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16380         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16381         (pkgdata_MODULES): Added gzio.mod.
16382         (gzio_mod_SOURCES): New variable.
16383         (gzio_mod_CFLAGS): Likewise.
16385         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16386         (pkgdata_MODULES): Added gzio.mod.
16387         (gzio_mod_SOURCES): New variable.
16388         (gzio_mod_CFLAGS): Likewise.
16390         * commands/cat.c: Include grub/gzio.h.
16391         (grub_cmd_cat): Use grub_gzfile_open instead of
16392         grub_file_open.
16394         * commands/cmp.c: Include grub/gzio.h.
16395         (grub_cmd_cmp): Use grub_gzfile_open instead of
16396         grub_file_open.
16398         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16399         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16400         grub_file_open.
16401         (grub_rescue_cmd_module): Likewise.
16403 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16405         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16406         kern/sparc64/ieee1275/init.c because it contains _start.
16407         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16409 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16411         * configure.ac: Add support for sparc64 host with ieee1275
16412         firmware.
16413         * configure: Generated from configure.ac.
16414         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16415         instead of int.
16416         (grub_ofdisk_read): Likewise.
16417         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16418         pointers as (void *) to remove a warning.
16419         (grub_ofdisk_close): Likewise.
16420         (grub_ofdisk_read): Likewise.
16421         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16422         returns, so make it return void to remove a warning.
16423         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16424         Corresponding prototype change.
16425         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16426         values, and cast the pointers as (void *) to remove a warning.
16427         (grub_mm_dump): Likewise.
16428         * conf/sparc64-ieee1275.mk: New file.
16429         * conf/sparc64-ieee1275.rmk: Likewise.
16430         * include/grub/sparc64/setjmp.h: Likewise.
16431         * include/grub/sparc64/types.h: Likewise.
16432         * include/grub/sparc64/ieee1275/console.h: Likewise.
16433         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16434         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16435         * include/grub/sparc64/ieee1275/time.h: Likewise.
16436         * kern/sparc64/cache.c: Likewise.
16437         * kern/sparc64/dl.c: Likewise.
16438         * kern/sparc64/ieee1275/init.c: Likewise.
16439         * kern/sparc64/ieee1275/openfw.c: Likewise.
16441 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16443         * util/console.c (grub_ncurses_putchar): If C is greater than
16444         0x7f, set C to a question mark.
16445         (grub_ncurses_getcharwidth): New function.
16446         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16447         getcharwidth.
16449         * normal/menu.c (print_entry): Made aware of Unicode. First,
16450         convert TITLE to UCS-4, and predict the cursor position by
16451         grub_getcharwidth.
16453         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16454         const to SRC.
16455         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16457 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16459         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16460         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16461         grub_strcat.
16463         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16464         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16465         grub_strcpy and grub_strlen. Take it into account that a space
16466         character is inserted as a delimiter.
16468 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16470         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16471         invalid magic in the error.
16473         * commands/search.c: New file.
16475         * util/grub-emu.c (main): Call grub_search_init and
16476         grub_search_fini.
16478         * kern/rescue.c (grub_rescue_print_disks): Removed.
16479         (grub_rescue_print_devices): New function.
16480         (grub_rescue_cmd_ls): Use grub_device_iterate with
16481         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16482         grub_rescue_print_disks.
16484         * kern/partition.c (grub_partition_iterate): Return the result of
16485         PARTMAP->ITERATE instead of GRUB_ERRNO.
16487         * kern/device.c: Include grub/partition.h.
16488         (grub_device_iterate): New function.
16490         * include/grub/partition.h (grub_partition_iterate): Return int
16491         instead of grub_err_t.
16493         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16494         prototype.
16495         [GRUB_UTIL] (grub_search_fini): Likewise.
16497         * include/grub/device.h (grub_device_iterate): New prototype.
16499         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16500         commands/search.c.
16501         (pkgdata_MODULES): Added search.mod.
16502         (search_mod_SOURCES): New variable.
16503         (search_mod_CFLAGS): Likewise.
16505         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16506         (pkgdata_MODULES): Added search.mod.
16507         (search_mod_SOURCES): New variable.
16508         (search_mod_CFLAGS): Likewise.
16510         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16511         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16512         All callers changed.
16514         * DISTLIST: Added commands/search.c.
16516 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16518         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16519         conversion.
16520         (grub_getcharwidth): New function.
16522         * kern/misc.c (grub_utf8_to_ucs4): New function.
16524         * include/grub/term.h (struct grub_term): Added a new member
16525         "getcharwidth".
16526         (grub_getcharwidth): New prototype.
16528         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16530         * term/i386/pc/console.c (map_char): New function. Segregated from
16531         grub_console_putchar.
16532         (grub_console_putchar): Use map_char.
16533         (grub_console_getcharwidth): New function.
16534         (grub_console_term): Specified grub_console_getcharwidth as
16535         getcharwidth.
16537         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16538         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16540         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16541         GRUB_ERRNO.
16542         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16543         on grub_strtoul completely.
16544         (write_char): Declare local variables in the beginning of the
16545         function.
16546         (grub_vesafb_getcharwidth): New function.
16547         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16548         getcharwidth.
16550 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16552         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16553         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16554         commands/i386/pc/vbetest.c.
16556         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16557         call grub_vbe_get_controller_info again, because the returned
16558         information is volatile.
16559         (grub_vbe_set_video_mode): Mostly rewritten.
16560         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16561         grub_vbe_status_t correctly.
16562         (grub_vbe_get_video_mode_info): Likewise.
16563         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16564         several if statements.
16566         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16567         * commands/i386/pc/vbeinfo.c: ... this.
16569         * commands/i386/pc/vbe_test.c: Renamed to ...
16570         * commands/i386/pc/vbetest.c: ... this.
16572         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16573         ...
16574         (grub_cmd_vbeinfo): ... this. Save video modes before
16575         iterating. Skip a video mode, if it is not available, not enough
16576         information is given or it is monochrome. Show the memory
16577         model. Leave the interpretation of MODEVAR to grub_strtoul
16578         completely.
16579         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16580         (GRUB_MOD_FINI): Likewise.
16582         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16583         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16584         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16585         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16586         grub_strtoul completely.
16587         (real2pm): Removed.
16588         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16589         (GRUB_MOD_FINI): Likewise.
16591         * normal/misc.c: Include grub/mm.h.
16593         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16594         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16595         (vbe_list_modes_mod_SOURCES): Removed.
16596         (vbe_list_modes_mod_CFLAGS): Likewise.
16597         (vbe_test_mod_SOURCES): Likewise.
16598         (vbe_test_mod_CFLAGS): Likewise.
16599         (vbeinfo_mod_SOURCES): New variable.
16600         (vbeinfo_mod_CFLAGS): Likewise.
16601         (vbetest_mod_SOURCES): Likewise.
16602         (vbetest_mod_CFLAGS): Likewise.
16604 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16606         * normal/misc.c: New file.
16608         * DISTLIST: Added normal/misc.c.
16610         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16611         DISK to HOOK. Call HOOK with DISK.
16612         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16613         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16614         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16616         * normal/menu_entry.c (struct screen): Added a new member
16617         "completion_shown".
16618         (completion_buffer): New global variable.
16619         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16620         (store_completion): New function.
16621         (complete): Likewise.
16622         (clear_completions): Likewise.
16623         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16624         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16625         a tab, call complete.
16627         * normal/completion.c (disk_dev): Removed.
16628         (print_simple_completion): Likewise.
16629         (print_partition_completion): Likewise.
16630         (print_func): New global variable.
16631         (add_completion): Do not take the arguments WHAT or PRINT any
16632         longer. Added a new argument TYPE. Instead of printing directly,
16633         call PRINT_FUNC if not NULL.
16634         All callers changed.
16635         (complete_device): Use a local variable DEV instead of
16636         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16637         (grub_normal_do_completion): Take a new argument HOOK. Do not
16638         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16639         empty string, return NULL instead.
16640         All callers changed.
16642         * normal/cmdline.c (print_completion): New function.
16644         * kern/partition.c (grub_partition_iterate): Add an argument DISK
16645         to HOOK.
16646         All callers changed.
16648         * kern/disk.c (grub_print_partinfo): Removed.
16650         * include/grub/partition.h (struct grub_partition_map): Add a new
16651         argument DISK into HOOK of ITERATE.
16652         (grub_partition_iterate): Add a new argument DISK to HOOK.
16654         * include/grub/normal.h (enum grub_completion_type): New enum.
16655         (grub_completion_type_t): New type.
16656         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16657         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16658         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16659         (GRUB_COMPLETION_TYPE_FILE): Likewise.
16660         (grub_normal_do_completion): Added a new argument HOOK.
16661         (grub_normal_print_device_info): New prototype.
16663         * include/grub/disk.h (grub_print_partinfo): Removed.
16665         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16666         (normal_mod_SOURCES): Likewise.
16667         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16668         (normal_mod_SOURCES): Likewise.
16670         * commands/ls.c (grub_ls_list_disks): Use
16671         grub_normal_print_device_info instead of grub_print_partinfo. Free
16672         PNAME.
16673         (grub_ls_list_files): Use grub_normal_print_device_info instead of
16674         duplicating the code.
16676 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16678         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16679         follow GCS more precisely.
16680         * commands/i386/pc/vbe_test.c: Likewise.
16681         * include/grub/i386/pc/vbe.h: Likewise.
16682         * term/i386/pc/vesafb.c: Likewise.
16683         * video/i386/pc/vbe.c: Likewise.
16685 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16687         * DISTLIST: Added term/i386/pc/vesafb.c
16688         DISTLIST: Added video/i386/pc/vbe.c
16689         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16690         DISTLIST: Added commands/i386/pc/vbe_test.c.
16691         * commands/i386/pc/vbe_list_modes.c: New file.
16692         * commands/i386/pc/vbe_test.c: Likewise.
16693         * term/i386/pc/vesafb.c: Likewise.
16694         * video/i386/pc/vbe.c: Likewise.
16695         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16696         (grub_vbe_probe) Added prototype.
16697         (grub_vbe_set_video_mode) Likewise.
16698         (grub_vbe_get_video_mode) Likewise.
16699         (grub_vbe_get_video_mode_info) Likewise.
16700         (grub_vbe_set_pixel_rgb) Likewise.
16701         (grub_vbe_set_pixel_index) Likewise.
16702         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16703         (pkgdata_MODULES): Added vesafb.mod.
16704         (pkgdata_MODULES): Added vbe_list_modes.mod.
16705         (pkgdata_MODULES): Added vbe_test.mod.
16706         (vbe_mod_SOURCES): Added.
16707         (vbe_mod_CFLAGS): Likewise.
16708         (vesafb_mod_SOURCES): Likewise.
16709         (vesafb_mod_CFLAGS): Likewise.
16710         (vbe_list_modes_mod_SOURCES): Likewise.
16711         (vbe_list_modes_mod_CFLAGS): Likewise.
16712         (vbe_test_mod_SOURCES): Likewise.
16713         (vbe_test_mod_CFLAGS): Likewise.
16715 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
16717         * normal/command.c (grub_command_execute): If INTERACTIVE is
16718         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16719         CMDLINE. Disable the pager if INTERACTIVE is true.
16720         All callers are changed.
16722         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16723         before reading a config file.
16724         * normal/main.c (read_config_file): Even if a command is not
16725         found, register it if it is within an entry.
16727         * util/grub-emu.c: Include sys/types.h and unistd.h.
16728         (options): Added --hold.
16729         (struct arguments): Added a new member "hold".
16730         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16731         missing.
16732         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16733         cleared by a debugger, if it is not zero.
16735         * include/grub/normal.h (grub_command_execute): Add an argument
16736         INTERACTIVE.
16738 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
16740         * DISTLIST: Added include/grub/i386/pc/vbe.h.
16742 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
16744         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16745         program with another one, because the old one didn't detect a bug
16746         in gcc-3.4. Always use regparm 2, because the new test is still
16747         not enough for gcc-4.0. Someone must investigate a simple test
16748         case which detects a bug in gcc-4.0.
16750 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
16752         * DISTLIST: Added normal/completion.c.
16754         * normal/completion.c: New file.
16756         * term/i386/pc/console.c (grub_console_getwh): New function.
16757         (grub_console_term): Assign grub_console_getwh to getwh.
16759         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16760         function is defined in normal/completion.c as
16761         grub_normal_do_completion.
16762         (grub_cmdline_get): Use grub_normal_do_completion instead of
16763         grub_tab_complete.
16765         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16766         returns non-zero, otherwise return 0.
16767         (grub_partition_iterate): First, probe the partition map. Then,
16768         call ITERATE only for this partition map.
16770         * kern/misc.c (grub_strncmp): Rewritten.
16772         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16773         returns non-zero. Otherwise return 0.
16775         * include/grub/partition.h (grub_partition_map_iterate): Return
16776         int instead of void.
16778         * include/grub/normal.h (grub_normal_do_completion): New prototype.
16780         * include/grub/misc.h (grub_strncmp): Change the type of N to
16781         grub_size_t.
16783         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16784         of void.
16786         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16787         unsigned explicitly before comparing it with I.
16789         * kern/main.c (grub_env_write_root): Add the attribute unused into
16790         VAR.
16792         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16793         normal/completion.c.
16794         (normal_mod_SOURCES): Likewise.
16795         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16796         (normal_mod_SOURCES): Likewise.
16798         * normal/command.c (grub_iterate_commands): If ITERATE returns
16799         non-zero, return one immediately.
16801 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
16803         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16804         * kern/i386/pc/startup.S: Updated Global Descriptor table's
16805         descriptions.
16806         (grub_vbe_get_controller_info): New function.
16807         (grub_vbe_get_mode_info): Likewise.
16808         (grub_vbe_set_mode): Likewise.
16809         (grub_vbe_get_mode): Likewise.
16810         (grub_vbe_set_memory_window): Likewise.
16811         (grub_vbe_get_memory_window): Likewise.
16812         (grub_vbe_set_scanline_length): Likewise.
16813         (grub_vbe_get_scanline_length): Likewise.
16814         (grub_vbe_set_display_start): Likewise.
16815         (grub_vbe_get_display_start): Likewise.
16816         (grub_vbe_set_palette_data): Likewise.
16817         * include/grub/i386/pc/vbe.h: New file.
16819 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16821         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16822         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16823         * DISTLIST: Likewise.
16824         * kern/ieee1275/of.c: Moved to ...
16825         * kern/ieee1275/ieee1275.c: ... here.
16827 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16829         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16830         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16831         Pass 0 as `end' parameter to grub_strtoul().
16833 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16835         * include/grub/powerpc/ieee1275/console.h: Do not include
16836         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
16837         ifdef.
16838         (grub_console_cur_color): Remove i386-specific prototype.
16839         (grub_console_real_putchar): Likewise.
16840         (grub_console_checkkey): Likewise.
16841         (grub_console_getkey): Likewise.
16842         (grub_console_getxy): Likewise.
16843         (grub_console_gotoxy): Likewise.
16844         (grub_console_cls): Likewise.
16845         (grub_console_setcursor): Likewise.
16846         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16847         Include <grub/machine/console.h>.
16848         * term/ieee1275/ofconsole.c: Likewise.
16850 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
16852         * Makefile.in (LIBLZO): New variable.
16854         * configure.ac: Check for LZO version 2.
16856         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16857         lzo/lzo1x.h instead of lzo1x.h.
16859         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16860         of -llzo.
16862         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16863         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16865         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16866         copying the data from PARTITION to P.
16868 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16870         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16871         negative, unload the module.
16873         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16874         map is "pc_partition_map" but not "pc".
16875         (usage): Fix the description. The options are --boot-image and
16876         --core-image but not --boot-file or --core-file.
16877         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16878         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16879         DEFAULT_DIRECTORY.
16881         * util/i386/pc/grub-install.in: Do not specify --boot-file or
16882         --core-file. Specify INSTALL_DEVICE as an argument.
16884         * util/console.c: Include config.h.
16885         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16886         [HAVE_NCURSES_H]: Include ncurses.h.
16887         [HAVE_CURSES_H]: Include curses.h.
16888         [!A_NORMAL] (A_NORMAL): Defined as zero.
16889         [!A_STANDOUT] (A_STANDOUT): Likewise.
16891         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16892         -lncurses.
16893         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16895         * configure.ac: Check for curses libraries and headers.
16897         * Makefile.in (LIBCURSES): New variable.
16899         * genmk.rb (Script::rule): Set the executable bits.
16901         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16902         name of the PC partition map is "pc_partition_map" but not "pc".
16904 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16906         * util/i386/pc/grub-install.in (grub_probefs): New variable.
16907         (modules): Likewise.
16908         (usage): Added descriptions for --modules and --grub-probefs.
16909         Handle --modules and --grub-probefs. Save the arguments in MODULES
16910         and GRUB_PROBEFS, respectively.
16911         Auto-detect a filesystem module against GRUBDIR. If the result is
16912         empty and modules are not specified explicitly, abort the
16913         installation. Add the result to MODULES.
16915         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16916         disk/powerpc/ieee1275/ofdisk.c,
16917         include/grub/powerpc/ieee1275/init.h and
16918         term/powerpc/ieee1275/ofconsole.c.
16919         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16920         term/ieee1275/ofconsole.c.
16922         * include/grub/powerpc/ieee1275/console.h: Resurrected.
16924         * COPYING: Upgraded to the latest version. Only the address of the
16925         FSF office has changed.
16927 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16929         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16930         kern/ieee1275.c with kern/ieee1275/of.c.
16932         * kern/ieee1275.c: Moved to ...
16933         * kern/ieee1275/of.c: ... here.
16935 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
16937         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16938         readability.
16940         * config.guess: Updated to the latest version from gnulib.
16941         * config.sub: Likewise.
16942         * install.sh: Likewise.
16943         * mkinstalldirs: Likewise.
16945         * include/grub/console.h: Removed. This file is arch-specific. Do
16946         not put this in include/grub.
16948         * include/grub/i386/pc/console.h: Resurrected.
16950         * util/console.c: Include grub/machine/console.h instead of
16951         grub/console.h.
16952         * util/grub-emu.c: Likewise.
16954 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
16956         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
16957         hardcoded value.
16959         From Vincent Pelletier  <subdino2004@yahoo.fr>
16960         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
16961         Redefined to use grub_getwh.
16962         (grub_term): New member named getwh.
16963         (grub_getwh): New prototype.
16964         * kern/term.c (grub_getwh): New function.
16965         * term/i386/pc/console.c (grub_console_getwh): New function.
16966         (grub_console_term): New member `getwh'.
16967         * term/i386/pc/vga.c (grub_vga_getwh): New function.
16968         (grub_vga_term): New member `getwh'.
16969         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
16970         grub_ssize_t.
16971         (grub_ofconsole_getw): New function.
16972         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
16973         (grub_ofconsole_term): New field named getwh and new initial
16974         value.
16976 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
16978         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
16979         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
16980         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
16981         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
16982         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
16983         of <grub/machine/ieee1275.h>.
16984         * commands/ieee1275/reboot.c: Likewise.
16985         * boot/powerpc/ieee1275/ieee1275.c: Move ...
16986         * kern/ieee1275.c: ... to here.  All users updated.  Change all
16987         parameter structs to use new type `grub_ieee1275_cell_t'.
16988         * term/powerpc/ieee1275/ofconsole.c: Move ...
16989         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
16990         * disk/powerpc/ieee1275/ofdisk.c: Move ...
16991         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
16992         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
16993         to return int.
16994         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
16995         Remove unused prototypes.  All users updated.
16996         * include/grub/powerpc/ieee1275/console.h: Removed.
16997         * include/grub/powerpc/ieee1275/ieee1275.h: Define
16998         `grub_ieee1275_cell_t'.
16999         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17000         Cast comparisons with -1 to the correct type.
17001         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17002         type to match `grub_ieee1275_entry_fn'.
17004 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17006         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17008         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17009         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17010         partmap/sun.c.
17011         (grub_probefs_SOURCES): New variable.
17013         * util/i386/pc/grub-probefs.c: New file.
17015         * util/i386/pc/grub-setup.c (main): Call
17016         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17017         grub_hfs_init and grub_jfs_init to initialize the system. Call
17018         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17019         grub_pc_partition_map_fini to finish the system.
17021 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17023         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17024         function.
17025         (grub_multiboot_load_elf32): Likewise.
17026         (grub_multiboot_is_elf64): Likewise.
17027         (grub_multiboot_load_elf64): Likewise.
17028         (grub_multiboot_load_elf): Likewise.
17029         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17030         an ELF32 or ELF64 file.
17031         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17033         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17034         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17035         NULL before calling FS->LABEL.
17036         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17037         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17038         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17039         before calling FS->LABEL.
17041 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17043         * util/i386/pc/grub-install.in (datadir): New variable.
17044         (libdir): Removed.
17045         (pkgdatadir): New variable.
17046         (pkglibdir): Removed.
17048 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17050         * DISTLIST: Added util/i386/pc/grub-install.in.
17052         * util/i386/pc/grub-install.in: New file.
17054         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17055         (grub_install_SOURCES): Likewise.
17057         * genmk.rb: Added support for scripts.
17058         (Script): New class.
17059         (scripts): New variable.
17061         * Makefile.in (install-local): Install sbin_SCRIPTS by
17062         INSTALL_SCRIPT.
17063         (uninstall): Remove sbin_SCRIPTS.
17065         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17066         device, try to get a GRUB device by
17067         grub_util_biosdisk_get_grub_dev.
17068         Free DEST_DEV.
17070         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17071         description for --device-map.
17073 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17075         Change the semantics of variable hooks. They now return strings
17076         instead of error values.
17078         * util/i386/pc/grub-setup.c: Include grub/env.h.
17079         (setup): Use grub_device_set_root instead of grub_env_set.
17081         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17082         grub_env_get instead of grub_device_set_root and
17083         grub_device_get_root, respectively.
17085         * kern/main.c (grub_env_write_root): New function.
17086         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17087         grub_env_set instead of grub_device_set_root.
17089         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17090         many variables.
17091         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17092         rather than calling ENV->WRITE_HOOK afterwards.
17093         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17094         passing a pointer of a pointer.
17095         (grub_register_variable_hook): Change the types of "read_hook" and
17096         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17097         respectively.
17098         Allocate the default empty string on the heap, because this string
17099         may be freed later.
17101         * kern/device.c: Include grub/env.h.
17102         (grub_device_set_root): Removed.
17103         (grub_device_get_root): Likewise.
17104         (grub_device_open): Use grub_env_get instead of
17105         grub_device_get_root.
17107         * include/grub/env.h (grub_env_read_hook_t): New type.
17108         (grub_env_write_hook_t): Likewise.
17109         (grub_env_var): Change the types of "read_hook" and "write_hook"
17110         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17111         (grub_register_variable_hook): Likewise.
17113         * include/grub/device.h (grub_device_set_root): Removed.
17114         (grub_device_set_root): Likewise.
17116         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17117         make sure that DIRNAME terminates with '/', so that
17118         grub_fat_find_dir will fail if PATH is not a directory.
17120         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17121         from DIRNAME.
17122         Use the qualifier auto for print_files and print_files_long.
17123         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17124         as a regular file.
17125         Put a newline only if there is no error.
17126         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17127         used.
17129 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17131         * kern/partition.c (grub_partition_probe): Initialize PART to
17132         NULL. Otherwise, when no partition map is registered, this returns
17133         a garbage.
17135 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17137         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17138         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17139         valid.
17141 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17143         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17144         information on each device, if it does not have partitions. Print
17145         "Device" instead of "Disk", because this function is not specific
17146         to disk devices.
17148         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17149         static to ensure that it is put on the memory rather than a
17150         register.
17152 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17154         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17155         (grub_cat_init): Likewise.
17156         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17157         (options): Likewise.
17158         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17159         (grub_configfile_init): Likewise.
17160         * font/manager.c (GRUB_MOD_INIT): Likewise.
17161         * commands/help.c (GRUB_MOD_INIT): Likewise.
17162         (grub_help_init): Likewise.
17163         * normal/command.c (grub_command_init): Likewise.
17164         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17165         * disk/loopback.c (grub_loop_init): Likewise.
17166         (GRUB_MOD_INIT): Likewise.
17167         * commands/ls.c (grub_ls_init): Likewise.
17168         (GRUB_MOD_INIT): Likewise.
17169         (options): Likewise.
17170         * commands/boot.c (grub_boot_init): Likewise.
17171         (GRUB_MOD_INIT): Likewise.
17172         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17173         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17174         (GRUB_MOD_INIT): Likewise.
17175         * commands/cmp.c (grub_cmp_init): Likewise.
17176         (GRUB_MOD_INIT): Likewise.
17178         * normal/arg.c: Use <> instead of "" to include header files.
17179         (SHORT_ARG_HELP): New macro.
17180         (SHORT_ARG_USAGE): Likewise.
17181         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17182         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17183         descriptions.
17184         (find_short): Check if C is 'h' or 'u' explicitly.
17185         (grub_arg_show_help): Use space characters instead of tabs. Treat
17186         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17187         are shown with --help and --usage only if they are not used for
17188         the command itself.
17189         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17190         'h' and 'u'.
17192         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17193         const into "longarg". Change the type of "shortarg" to int.
17195 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17197         * boot/i386/pc/boot.S (boot_drive_check): New label.
17199         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17200         macro.
17202         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17203         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17205 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17207         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17208         When turning off Gate A20, skip the check and return immediately,
17209         because this is not fatal usually.
17211 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17213         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17214         be 0x7C00 instead of 0x8000.
17216         * boot/i386/pc/pxeboot.S: Rewritten.
17218         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17219         EXT_C.
17220         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17221         result.
17223 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17225         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17226         robustness. This routine now supports a BIOS call and System
17227         Control Port A to modify the gate A20.
17229         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17230         Increased to 0x440.
17232 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17234         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17235         device path and resulting ihandle.
17236         (grub_ofdisk_close): dprintf the ihandle being closed.
17237         (grub_ofdisk_read): dprintf function parameters.
17238         * kern/mm.c (grub_mm_init_region): Likewise.
17239         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17240         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17241         size, and boot arguments.
17242         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17243         before loading into memory.
17244         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17245         before loading into memory.
17247 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17249         * kern/mm.c: Added much documentation.
17250         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17251         8, set to 5 instead of 8.
17253 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17255         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17257         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17258         (grub_mkdevicemap_SOURCES): New variable.
17260         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17261         lib/device.c of GRUB Legacy.
17263 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17265         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17266         instead of PATH is NULL.
17268 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17270         * commands/cmp.c (BUFFER_SIZE): New macro.
17271         (grub_cmd_cmp): Close the right file at the right time.  Compare
17272         only data just read.  Don't report files of different  size as
17273         identical.  Dynamically allocate buffers.  Move variable
17274         declarations at the beginning of function.
17276 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17278         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17279         reverse.
17281 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17283         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17284         when backspace is pressed at beginning of line.
17286 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17288         * DISTLIST: Added genfslist.sh.
17290         * normal/main.c (fs_module_list): New variable.
17291         (autoload_fs_module): New function.
17292         (read_fs_list): Likewise.
17293         (grub_normal_execute): Call read_fs_list.
17295         * kern/fs.c (grub_fs_autoload_hook): New variable.
17296         (grub_fs_probe): Added support for auto-loading.
17298         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17299         (grub_fs_module_list_t): New type.
17301         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17302         (grub_fs_autoload_hook): New prototype.
17304         * genfslist.sh: New file.
17306         * genmk.rb: Added a rule to generate a filesystem list.
17308 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17310         * configure.ac: Fix the test for cross-compiling.
17312         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17313         define GRUB_UTIL anymore.
17315         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17316         so this function works on other systems than just big endian.
17317         (load_modules): Likewise.
17318         (add_segments): Likewise.
17320 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17322         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17323         contains `l' modifier, get a long from va_arg().
17325 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17327         * kern/mm.c (grub_free): If the next free block which is being
17328         merged is the first free block, set the first block to the block
17329         being freed.
17330         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17332 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17334         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17335         `grub_ieee1275_chosen'.
17337 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17339         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17340         (grub_ieee1275_chosen): New variable.
17341         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17342         `chosen'.
17343         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17344         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17345         Rename first argument to `phandle' for consistency.
17346         (grub_ieee1275_get_property_length): Likewise.
17347         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17348         to grub_ieee1275_phandle_t.
17349         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17350         Move export next to declaration.
17351         (grub_ieee1275_chosen): New variable.
17352         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17353         Correct cosmetic typo.
17354         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17355         `grub_ieee1275_chosen'.
17356         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17357         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17358         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17359         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17360         `grub_ieee1275_chosen'.
17362 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17364         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17365         /chosen/bootargs.
17366         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17367         /chosen/bootargs as "variable=value" pairs.
17369 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17371         * include/grub/misc.h (grub_dprintf): New macro.
17372         (grub_real_dprintf): New prototype.
17373         (grub_strword): Likewise.
17374         (grub_iswordseparator): Likewise.
17375         * kern/misc.c (grub_real_dprintf): New function.
17376         (grub_strword): Likewise.
17377         (grub_iswordseparator): Likewise.
17379 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17381         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17382         (roundup): Remove macro.
17383         (grub_ieee1275_flags): Make static.
17384         (grub_ieee1275_realmode): Remove.
17385         (grub_ieee1275_test_flag): New function.
17386         (grub_ieee1275_set_flag): Likewise.
17387         (find_options): Rename to `grub_ieee1275_find_options'; update
17388         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17389         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17390         (cmain): New prototype.
17391         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17392         `grub_ieee1275_flags' directly.
17393         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17394         machine/biosdisk.h.
17395         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17396         Don't include grub/machine/init.h.
17397         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17398         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17399         Remove prototype.
17400         (grub_ieee1275_realmode): Likewise.
17401         (grub_ieee1275_flag): New enum.
17402         (grub_ieee1275_test_flag): New prototype.
17403         (grub_ieee1275_set_flag): New prototype.
17404         * include/grub/powerpc/ieee1275/init.h: Remove file.
17405         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17406         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17407         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17408         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17409         comment.
17410         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17411         `grub_ieee1275_test_flag'.
17412         (grub_ieee1275_encode_devname): Likewise.
17414 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17416         * include/grub/powerpc/ieee1275/ieee1275.h
17417         (grub_ieee1275_encode_devname): New prototype.
17418         (grub_ieee1275_get_filename): Likewise.
17419         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17420         function.
17421         (grub_set_prefix): Likewise.
17422         (grub_machine_init): Call grub_set_prefix.
17423         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17424         (grub_parse_type): New enum.
17425         (grub_ieee1275_get_devargs): New function.
17426         (grub_ieee1275_get_devname): Likewise.
17427         (grub_ieee1275_parse_args): Likewise.
17428         (grub_ieee1275_get_filename): Likewise.
17429         (grub_ieee1275_encode_devname): Likewise.
17431 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17433         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17434         `grub_loader_unset'.
17436 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17438         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17439         instead of grub_ieee1275_interpret.
17440         (grub_halt_init): New function.
17441         (grub_halt_fini): Likewise.
17442         (GRUB_MOD_INIT): Correct message grammar.
17443         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17444         instead of grub_ieee1275_interpret.
17445         (grub_reboot_init): New function.
17446         (grub_reboot_fini): Likewise.
17447         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17448         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17449         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17450         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17451         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17452         function.
17453         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17454         Add prototype.
17455         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17456         prototype.
17457         (grub_halt): Likewise.
17458         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17459         (cmain): Remove __attribute__((unused)).
17460         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17461         (grub_heap_len): Likewise.
17462         (grub_machine_fini): New function.
17463         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17464         (grub_halt): Likewise.
17465         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17466         function.
17467         * util/powerpc/ieee1275/misc.c: New file.
17469 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17471         * DISTLIST: New file.
17472         * gendistlist.sh: Likewise.
17474         * Makefile.in (COMMON_DISTFILES): Removed.
17475         (BOOT_DISTFILES): Likewise.
17476         (CONF_DISTFILES): Likewise.
17477         (DISK_DISTFILES): Likewise.
17478         (FS_DISTFILES): Likewise.
17479         (INCLUDE_DISTFILES): Likewise.
17480         (KERN_DISTFILES): Likewise.
17481         (LOADER_DISTFILES): Likewise.
17482         (TERM_DISTFILES): Likewise.
17483         (UTIL_DISTFILES): Likewise.
17484         (DISTFILES): Likewise.
17485         (uninstall): Uninstall files in $(pkgdata_DATA).
17486         (DISTLIST): New target.
17487         (distdir): Use the contents of the file DISTLIST to get a list of
17488         distributed files.
17490 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17492         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17493         descriptor. This is ported from GRUB Legacy.
17495         * gencmdlist.sh: Added an extra semicolon to make it work with
17496         old sed versions. Reported by Robert Bihlmeyer
17497         <robbe@orcus.priv.at>.
17499 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17501         Automatic loading of commands is supported.
17503         * normal/main.c (read_command_list): New function.
17504         (grub_normal_execute): Call read_command_list.
17506         * normal/command.c (grub_register_command): Return zero or CMD.
17507         Allocate CMD->NAME from the heap.
17508         Initialize CMD->MODULE_NAME to zero.
17509         Find the same name as well. If the same command is found and it is
17510         a dummy command, overwrite members. If it is not a dummy command,
17511         return zero.
17512         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17513         (grub_command_find): If a dummy command is found, load a module
17514         and retry to find a command only once.
17516         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17517         make sure that each command is loaded.
17519         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17520         macro.
17521         (struct grub_command): Remove const from the member `name'.
17522         Add a new member `module_name'.
17523         (grub_register_command): Return grub_command_t.
17525         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17526         sure that each command is loaded.
17528         * genmk.rb (PModule::rule): Specify a module name without the
17529         suffix ".mod" to gencmdlist.sh.
17531 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17533         * gencmdlist.sh: New file.
17535         * genmk.rb (PModule::rule): Generate a rule for a command list.
17536         Clean command.lst.
17537         Generate command.lst from $(COMMANDFILES).
17539         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17540         (DATA): Added $(pkgdata_DATA).
17541         (install-local): Install files in $(pkgdata_DATA).
17543 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17545         * term/i386/pc/vga.c (debug_command): Removed.
17546         (GRUB_MOD_INIT): Do not register the command "debug".
17548         From Hollis Blanchard:
17549         * commands/configfile.c: New file.
17550         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17551         commands/configfile.c.
17552         (pkgdata_MODULES): Added configfile.mod.
17553         (configfile_mod_SOURCES): New variable.
17554         (configfile_mod_CFLAGS): Likewise.
17555         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17556         commands/configfile.c.
17557         (pkgdata_MODULES): Added configfile.mod.
17558         (configfile_mod_SOURCES): New variable.
17559         (configfile_mod_CFLAGS): Likewise.
17560         * util/grub-emu.c (main): Call grub_configfile_init and
17561         grub_configfile_fini.
17562         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17563         prototype.
17564         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17566 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17568         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17569         address.
17571         * commands/help.c (grub_cmd_help): Do not print newlines after
17572         the last command in print_command_help.
17574 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17576         * commands/default.h: New file.
17577         * commands/timeout.h: Likewise.
17578         * normal/context.c: Likewise.
17580         * util/misc.c: Do not include sys/times.h.
17581         Include sys/time.h and grub/machine/time.h.
17582         (grub_get_rtc): Rewritten with gettimeofday.
17584         * util/grub-emu.c (main): Call grub_default_init and
17585         grub_timeout_init before grub_normal_init, and call
17586         grub_timeout_fini and grub_default_fini after grub_main.
17588         * util/console.c (grub_ncurses_checkkey): Return the read
17589         character or -1.
17591         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17592         timeouts.
17594         * normal/main.c (read_config_file): Push MENU. If this fails,
17595         print an error and wait for a user input.
17596         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17597         If a menu is empty or an error occurs, pop MENU.
17598         (grub_normal_execute): Pop and free MENU after grub_menu_run
17599         returns.
17601         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17603         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17604         include time.h.
17605         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17606         without GRUB_UTIL.
17607         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17608         time.h.
17609         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17610         without GRUB_UTIL.
17612         * include/grub/normal.h (struct grub_menu_list): New struct.
17613         (grub_menu_list_t): New type.
17614         (struct grub_context): New struct.
17615         (grub_context_t): New type.
17616         (grub_register_command): Got rid of EXPORT_FUNC.
17617         (grub_unregister_command): Likewise.
17618         (grub_context_get): New prototype.
17619         (grub_context_get_current_menu): Likewise.
17620         (grub_context_push_menu): Likewise.
17621         (grub_context_pop_menu): Likewise.
17622         [GRUB_UTIL] (grub_default_init): Likewise.
17623         [GRUB_UTIL] (grub_default_fini): Likewise.
17624         [GRUB_UTIL] (grub_timeout_init): Likewise.
17625         [GRUB_UTIL] (grub_timeout_fini): Likewise.
17627         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17628         commands/timeout.c and normal/context.c.
17629         (pkgdata_MODULES): Added default.mod and timeout.mod.
17630         (normal_mod_SOURCES): Added normal/context.c.
17631         (default_mod_SOURCES): New variable.
17632         (default_mod_CFLAGS): Likewise.
17633         (timeout_mod_SOURCES): Likewise.
17634         (timeout_mod_CFLAGS): Likewise.
17635         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17636         conf/i386-pc.rmk.
17637         (pkgdata_MODULES): Added default.mod and timeout.mod.
17638         (normal_mod_SOURCES): Added normal/context.c.
17639         (default_mod_SOURCES): New variable.
17640         (default_mod_CFLAGS): Likewise.
17641         (timeout_mod_SOURCES): Likewise.
17642         (timeout_mod_CFLAGS): Likewise.
17644         * Makefile.in (all-local): Added $(MKFILES).
17646 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
17648         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17649         (grub_emu_SOURCES): Likewise.
17650         (pkgdata_MODULES): Add `sun.mod'.
17651         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17652         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17653         `partmap/sun.c'.
17654         (pkgdata_MODULES): Add `sun.mod'.
17655         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17656         * include/grub/partition.h (grub_sun_partition_map_init): New
17657         prototype.
17658         (grub_sun_partition_map_fini): Likewise.
17659         * partmap/sun.c: New file.
17660         * util/grub-emu.c (main): Initialize and de-initialize the sun
17661         partitionmap support.
17663 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
17665         This implements an Emacs-like menu entry editor.
17667         * normal/menu_entry.c: New file.
17669         * util/console.c (grub_ncurses_putchar): Translate some Unicode
17670         characters to ASCII.
17671         (saved_char): New variable.
17672         (grub_ncurses_checkkey): Rewritten completely.
17673         (grub_ncurses_getkey): Likewise.
17674         (grub_ncurses_init): Call raw instead of cbreak.
17676         * normal/menu.c (print_entry): Do not put a space.
17677         (init_page): Renamed to ...
17678         (grub_menu_init_page): ... this. All callers changed.
17679         (edit_menu_entry): Removed.
17680         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17682         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17684         * kern/misc.c (grub_vprintf): Call grub_refresh.
17686         * normal/menu.c (DISP_LEFT): Renamed to ...
17687         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17688         * normal/menu.c (DISP_UP): Renamed to ...
17689         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17690         * normal/menu.c (DISP_RIGHT): Renamed to ...
17691         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17692         * normal/menu.c (DISP_DOWN): Renamed to ...
17693         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17694         * normal/menu.c (DISP_HLINE): Renamed to ...
17695         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17696         * normal/menu.c (DISP_VLINE): Renamed to ...
17697         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17698         * normal/menu.c (DISP_UL): Renamed to ...
17699         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17700         * normal/menu.c (DISP_UR): Renamed to ...
17701         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17702         * normal/menu.c (DISP_LL): Renamed to ...
17703         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17704         * normal/menu.c (DISP_LR): Renamed to ...
17705         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17706         * normal/menu.c (TERM_WIDTH): Renamed to ...
17707         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17708         * normal/menu.c (TERM_HEIGHT): Renamed to ...
17709         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17710         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17711         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17712         * normal/menu.c (TERM_MARGIN): Renamed to ...
17713         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17714         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17715         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17716         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17717         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17718         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17719         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17720         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17721         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17722         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17723         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17724         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17725         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17726         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17727         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17728         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17729         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17730         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17731         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17732         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17733         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17734         All callers changed.
17736         * include/grub/normal.h: New prototype.
17738         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17739         normal/menu_entry.c.
17740         (normal_mod_SOURCES): Likewise.
17741         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17742         (normal_mod_SOURCES): Likewise.
17744 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
17746         * include/grub/normal.h (grub_halt_init): New prototype.
17747         (grub_halt_fini): Likewise.
17748         (grub_reboot_init): Likewise.
17749         (grub_reboot_fini): Likewise.
17751         * util/grub-emu.c: Include signal.h.
17752         (main_env): New global variable.
17753         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17754         catch C-c.
17755         (grub_machine_fini): New function.
17756         (main): Call grub_halt_init and grub_reboot_init before
17757         grub_main, and grub_reboot_fini and grub_halt_fini after it.
17758         Call setjmp with MAIN_ENV to go back afterwards.
17759         Call grub_machine_fini right before return.
17761         * include/grub/util/misc.h: Include setjmp.h.
17762         (main_env): New prototype.
17764         * include/grub/kernel.h (grub_machine_fini): New prototype.
17765         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17766         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17768         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17769         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17770         * term/i386/pc/console.c (grub_console_fini): Likewise.
17772         * util/i386/pc/misc.c: New file.
17774         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17775         util/i386/pc/misc.c, commands/i386/pc/halt.c and
17776         commands/i386/pc/reboot.c.
17778 2005-02-14  Guillem Jover  <guillem@hadrons.org>
17780         * include/grub/dl.h (grub_dl_check_header): New prototype.
17781         (grub_arch_dl_check_header): Change return type to grub_err_t,
17782         remove size parameter and export function.  Update all callers.
17783         * kern/dl.c (grub_dl_check_header): New function.
17784         (grub_dl_load_core): Use `grub_dl_check_header' instead of
17785         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
17786         are inside the core.
17787         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17788         independent ELF header checks.
17789         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17790         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17791         `grub_dl_check_header' instead of explicit checks.  Check for the
17792         ELF type.
17793         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17794         `grub_dl_check_header' instead of explicit checks.  Remove arch
17795         specific ELF header checks.
17797         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17798         argument SIZE.
17800 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
17802         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17803         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17805 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
17807         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17808         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17809         (part_map_iterate): Clear `grub_errno' and return 0 if
17810         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17811         * partmap/amiga.c (amiga_partition_map_iterate): Return
17812         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17813         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17815 2005-02-01  Guillem Jover  <guillem@hadrons.org>
17817         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17818         help info.
17820 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17822         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17823         Removed prototype.
17824         (grub_rescue_cmd_linux): New prototype.
17825         (grub_rescue_cmd_initrd): Likewise.
17826         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17827         `bi_rec'.
17828         (grub_linux_release_mem): Release the memory for the initrd.
17829         (grub_load_linux): Renamed from this...
17830         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
17831         Changed `entry' not to be static.  Loop over memory regions to
17832         find another one when the default fails.
17833         (grub_rescue_cmd_initrd): New function.
17834         (grub_linux_init): Remove function.
17835         (grub_linux_fini): Likewise.
17836         (GRUB_MOD_INIT): Register `initrd'.
17837         (GRUB_MOD_FINI): Unregister `initrd'.
17838         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17839         Function removed.
17840         (grub_linux_normal_fini): Likewise.
17841         (GRUB_MOD_INIT): Register `initrd'.
17842         (GRUB_MOD_FINI): Unregister `initrd'.
17844 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17846         * commands/help.c: New file.
17847         * normal/arg.c (show_help): Renamed to...
17848         (grub_arg_show_help): ... this.
17849         * commands/i386/pc/halt.c: New file.
17850         * commands/i386/pc/reboot.c: Likewise.
17851         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17852         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17853         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17854         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17855         variables.
17856         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17857         `commands/help.c'.
17858         (pkgdata_MODULES): Add `help.mod'.
17859         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17860         * grub/i386/pc/init.h (grub_reboot): New prototype.
17861         (grub_halt): Likewise.
17862         * include/grub/normal.h (grub_arg_show_help): New prototype.
17863         (grub_help_init): Likewise.
17864         (grub_help_fini): Likewise.
17865         * util/grub-emu.c (main): Initialize and deinitialize the help
17866         command.
17868         * normal/cmdline.c (grub_cmdline_get): Doc fix.
17870         * normal/command.c (grub_command_init): Fixed the description of
17871         the `set' and `unset' commands.
17873 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17875         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17876         function.
17877         * commands/ieee1275/halt.c: New file.
17878         * commands/ieee1275/reboot.c: Likewise.
17879         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17880         `__attribute__ ((unused))'.  Some GCS related fixed.
17881         (grub_suspend_init) [GRUB_UTIL]: Function removed.
17882         (grub_suspend_fini): Likewise.
17883         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17884         and `halt.mod'.
17885         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17886         (halt_mod_CFLAGS): New variables.
17887         * include/grub/powerpc/ieee1275/ieee1275.h
17888         (grub_ieee1275_interpret): New prototype.
17890 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
17892         * include/grub/misc.h (memmove): New prototype.
17893         (memcpy): Likewise.
17895 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
17897         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17898         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
17900 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
17902         * kern/misc.c (grub_strndup): Function rewritten.
17904 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
17906         * normal/menu.c (TERM_WIDTH): Macro redefined.
17907         (TERM_TOP_BORDER_Y): Likewise.
17908         (draw_border): Replaced while-loop by a for-loop.  Make the number
17909         of lines consistent with the number of lines displayed in
17910         print_entries.  Added a margin below the rectangle.
17911         (print_entry): Make the entry fit in the rectangle.
17912         (print_entries): Display the scroll arrows next to the right
17913         border.
17915 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17917         * fs/minix.c (grub_minix_find_file): Reserve more space for
17918         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
17919         `grub_strncpy' to copy `path' into it.
17921 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17923         Add the loopback device, a device via which files can be accessed
17924         as devices.
17926         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17927         (pkgdata_MODULES): Add loopback.mod.
17928         (loopback_mod_SOURCES): New variable.
17929         (loopback_mod_CFLAGS): Likewise.
17930         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17931         `disk/loopback.c'.
17932         (pkgdata_MODULES): Add loopback.mod.
17933         (loopback_mod_SOURCES): New variable.
17934         (loopback_mod_CFLAGS): Likewise.
17935         * disk/loopback.c: new file.
17936         * include/grub/normal.h (grub_loop_init): New prototype.
17937         (grub_loop_fini): New prototype.
17938         * util/grub-emu.c (main): Initialize and de-initialize loopback
17939         support.
17940         * include/grub/disk.h (grub_disk_dev_id): Add
17941         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17943 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
17945         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17946         function.
17947         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17948         (suspend_mod_SOURCES): New variable.
17949         (suspend_mod_CFLAGS): Likewise.
17950         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17951         New prototype.
17952         * commands/ieee1275/suspend.c: New file.
17954 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
17956         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
17957         ((unused))' to `__attribute__ ((used))'.
17958         (GRUB_MOD_FINI): Likewise.
17959         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
17960         * genmk.rb (PModule): Assign space to common symbols when linking
17961         modules.
17963 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
17965         * include/grub/mm.h (grub_mm_init_region): Change the type of the
17966         `unsigned' arguments to `grub_size_t'.
17967         (grub_malloc): Likewise.
17968         (grub_realloc): Likewise.
17969         (grub_memalign): Likewise.
17970         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
17971         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17972         * util/misc.c (grub_malloc): Likewise.
17973         (grub_realloc): Likewise.
17974         * kern/mm.c (get_header_from_pointer): Change the casts to
17975         `unsigned' into a cast to `grub_size_t'.
17977         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
17978         point to `currnode' when `currnode' is changed.
17980         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
17981         Schottelius <nico-linux@schottelius.org>.
17983 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
17985         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
17986         (note_path): Remove variable.
17987         (GRUB_IEEE1275_NOTE_NAME): New macro.
17988         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
17989         (grub_ieee1275_note_hdr): New structure.
17990         (grub_ieee1275_note_desc): Likewise.
17991         (grub_ieee1275_note): Likewise.
17992         (load_note): Remove `dir' argument.  All callers updated.  Remove
17993         `note_img' and `path'.  Do not load a file from `note_path'.
17994         Initialize a struct grub_ieee1275_note and write that to `out'.
17995         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
17997 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
17999         * util/misc.c (grub_util_read_image): Revert last change.  It
18000         called `grub_util_read_at', which seeks from the beginning of the
18001         file.
18003 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18005         * TODO: Add note about endianness in grub-mkimage.
18006         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18007         section.
18008         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18009         (grub_mkimage_SOURCES): New target.
18010         * include/grub/kernel.h (grub_start_addr): Remove variable.
18011         (grub_end_addr): Likewise.
18012         (grub_total_module_size): Likewise.
18013         (grub_kernel_image_size): Likewise.
18014         (GRUB_MODULE_MAGIC): New constant.
18015         (grub_module_info): New structure.
18016         (grub_arch_modules_addr): New prototype.
18017         (grub_get_end_addr): Remove prototype.
18018         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18019         * include/grub/powerpc/ieee1275/kernel.h: New file.
18020         * include/grub/util/misc.h (grub_util_get_fp_size): New
18021         prototype.
18022         (grub_util_read_at): Likewise.
18023         (grub_util_write_image_at): Likewise.
18024         * kern/main.c (grub_get_end_addr): Remove function.
18025         (grub_load_modules): Call grub_arch_modules_addr instead of using
18026         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18027         the grub_module_info fields instead of calling grub_get_end_addr
18028         as loop conditions.  Move grub_add_unused_region code here.
18029         (grub_add_unused_region): Remove function.
18030         * kern/i386/pc/init.c: Include grub/cache.h.
18031         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18032         one call to add_mem_region.
18033         (grub_arch_modules_addr): New function.
18034         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18035         (grub_total_module_size): Likewise.
18036         Include grub/machine/kernel.h.
18037         (grub_arch_modules_addr): New function.
18038         * util/grub-emu.c (grub_end_addr): Remove variable.
18039         (grub_total_module_size): Likewise.
18040         (grub_arch_modules_addr): New function.
18041         * util/misc.c: Include unistd.h.
18042         (grub_util_get_fp_size): New function.
18043         (grub_util_read_at): Likewise.
18044         (grub_util_write_image_at): Likewise.
18045         (grub_util_read_image): Call grub_util_read_at.
18046         (grub_util_write_image): Call grub_util_write_image_at.
18047         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18048         additional memory in kernel_img for a struct grub_module_info.
18049         Fill in that grub_module_info.
18050         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18052 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18054         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18055         New function.
18056         * include/grub/powerpc/ieee1275/ieee1275.h
18057         (grub_ieee1275_milliseconds): New prototype.
18058         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18059         Change to 1000.
18060         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18061         grub_ieee1275_milliseconds.
18063 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18065         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18066         variable.
18067         (find_options): New function.
18068         (cmain): Call find_options.
18069         * include/grub/powerpc/ieee1275/ieee1275.h
18070         (grub_ieee1275_realmode): New extern variable.
18071         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18072         grub_map if grub_ieee1275_realmode is false.
18074 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18076         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18077         lines are inserted and make it work like readline.  Reported by
18078         Vincent Pelletier <subdino2004@yahoo.fr>.
18080 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18082         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18084         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18085         `kern/powerpc/cache.S'.
18087 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18089         * genmk.rb: Handle the `Program' class in the main loop.  Written
18090         by Johan Rydberg <jrydberg@gnu.org>.
18091         (Program): New class.
18092         (programs): New variable.
18093         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18094         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18095         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18096         (help_arch): Function removed.
18097         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18098         `powerpc/libgcc.h' and `loader.h'.
18099         (pkgdata_PROGRAMS): New variable.
18100         (sbin_UTILITIES): Variable removed.
18101         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18102         (grubof_SOURCES): Variable re-defined so it only includes the
18103         core functionality.
18104         (grubof_CFLAGS): Remove `-DGRUBOF'.
18105         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18106         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18107         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18108         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18109         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18110         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18111         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18112         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18113         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18114         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18115         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18116         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18117         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18118         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18119         (pc_mod_CFLAGS): New variables.
18120         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18121         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18122         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18123         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18124         Moved from here...
18125         * include/grub/i386/pc/init.h (grub_os_area_addr)
18126         (rub_os_area_size): ... to here.
18127         * include/grub/powerpc/ieee1275/ieee1275.h
18128         (grub_ieee1275_entry_fn): Export symbol.
18129         * include/grub/powerpc/ieee1275/init.h: New file.
18130         * include/grub/powerpc/libgcc.h: Likewise.
18131         * include/grub/cache.h: Likewise.
18132         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18133         <hollis@penguinppc.org>.
18134         * kern/dl.c: Include <grub/cache.h>.
18135         (grub_dl_flush_cache): New function.
18136         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18137         for this module.
18138         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18139         (grub_console_init): Removed prototypes.
18140         (grub_machine_init): Don't initialize the modules anymore.
18141         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18142         static.
18143         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18144         Macro undef removed.
18145         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18146         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18147         relocation `R_PPC_REL32'.  Return an error when the relocation is
18148         unknown.
18149         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18150         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18151         * util/misc.c (grub_arch_sync_caches): Likewise.
18153 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18155         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18156         `symlist.c', add `grubof_symlist.c'.
18157         (symlist.c): Variable removed.
18158         (grubof_HEADERS): Variable added.
18159         (grubof_symlist.c): New target.
18160         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18161         `kernel_img_HEADERS'.
18162         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18163         * kern/powerpc/dl.c: New file.
18164         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18165         Function removed.
18166         (grub_arch_dl_relocate_symbols): Likewise.
18167         (grub_register_exported_symbols): Likewise.
18169 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18171         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18172         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18173         to fail instead.  Reported by Vincent Pelletier
18174         <subdino2004@yahoo.fr>.
18176         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18177         it is not allocated.  Reported by Vincent Pelletier
18178         <subdino2004@yahoo.fr>.
18180         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18181         output so the output looks better.
18183 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18185         Modulize the partition map support and add support for the amiga
18186         partition map.
18188         * commands/ls.c: Include <grub/partition.h> instead of
18189         <grub/machine/partition.h>.
18190         * kern/disk.c: Likewise.
18191         * kern/rescue.c: Likewise.
18192         * loader/i386/pc/chainloader.c: Likewise.
18193         * normal/cmdline.c: Likewise.
18194         * kern/powerpc/ieee1275/init.c: Likewise.
18195         (grub_machine_init): Call `grub_pc_partition_map_init',
18196         `grub_amiga_partition_map_init' and
18197         `grub_apple_partition_map_init'.
18198         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18199         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18200         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18201         `partition.h' and `pc_partition.h'.
18202         (grub_setup_SOURCES): Remove
18203         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18204         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18205         (grub_emu_SOURCES): Likewise.
18206         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18207         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18208         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18209         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18210         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18211         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18212         (grubof_SOURCES): Likewise.
18213         * disk/i386/pc/partition.c: File removed.
18214         * disk/powerpc/ieee1275/partition.c: Likewise.
18215         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18216         * include/grub/i386/pc/partition.h: Likewise.
18217         * kern/partition.c: New file.
18218         * partmap/amiga.c: Likewise.
18219         * partmap/apple.c: Likewise.
18220         * partmap/pc.c: Likewise.
18221         * include/grub/partition.h: Likewise..
18222         * include/grub/pc_partition.h: Likewise.
18223         * util/grub-emu.c: Include <grub/partition.h> instead of
18224         <grub/machine/partition.h>.
18225         (main): Call `grub_pc_partition_map_init',
18226         `grub_amiga_partition_map_init' and
18227         `grub_apple_partition_map_init' and deinitialize afterwards.
18228         * util/i386/pc/biosdisk.c: Include `#include
18229         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18230         `<grub/machine/partition.h>'.
18231         * util/i386/pc/grub-setup.c: Likewise.
18232         * util/i386/pc/biosdisk.c: Likewise.
18233         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18234         partition information in case of a PC partition.
18235         * util/i386/pc/grub-setup.c: Include `#include
18236         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18237         `<grub/machine/partition.h>'.
18238         (setup): Only access the PC specific partition information in case
18239         of a PC partition.
18241 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18243         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18244         (grub_longjmp): Likewise.
18245         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18246         20.
18247         * normal/powerpc/setjmp.S: New file.
18248         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18249         `normal/powerpc/setjmp.S'.
18250         (grubof_CFLAGS): Add `-DGRUBOF'.
18251         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18252         [GRUB_UTIL && !GRUBOF].
18254 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18256         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18257         property named `name'.  Correctly handle the error returned by
18258         `grub_ieee1275_finddevice' if a device can not be opened.
18260 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18262         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18263         `actual' for negativity.
18264         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18265         kern/fshelp.c.
18267 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18269         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18270         (PAGE_OFFSET): New macro.
18271         (CRTC_ADDR_PORT): Likewise.
18272         (CRTC_DATA_PORT): Likewise.
18273         (START_ADDR_HIGH_REGISTER): Likewise.
18274         (START_ADDR_LOW_REGISTER): Likewise.
18275         (GRAPHICS_ADDR_PORT): Likewise.
18276         (GRAPHICS_DATA_PORT): Likewise.
18277         (READ_MAP_REGISTER): Likewise.
18278         (INPUT_STATUS1_REGISTER): Likewise.
18279         (INPUT_STATUS1_VERTR_BIT): Likewise.
18280         (page): New variable.
18281         (wait_vretrace): New function.
18282         (set_read_map): Likewise.
18283         (set_start_address): Likewise.
18284         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18285         the right page.
18286         (check_vga_mem): Take the page into account.
18287         (write_char): Likewise.
18288         (write_cursor): Likewise.
18289         (scroll_up): Likewise.  Copy the page to the page that is not
18290         shown and switch between both pages.
18291         (grub_vga_putchar): Fix off by one error.
18292         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18293         account.
18295 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18297         Add support for iso9660 (including rockridge).
18299         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18300         (iso9660_mod_SOURCES): New variable.
18301         (iso9660_mod_CFLAGS): Likewise.
18302         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18303         * include/grub/fs.h (grub_iso9660_init): New prototype.
18304         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18305         * fs/iso9660.c: New file.
18307         * include/grub/misc.h (grub_strncat): New prototype.
18308         * kern/misc.c (grub_strncat): New function.
18310         * fs/hfs.c (grub_hfs_mount): Translate the error
18311         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18312         * fs/jfs.c (grub_jfs_mount): Likewise.
18313         * fs/ufs.c (grub_ufs_mount): Likewise.
18315 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18317         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18318         which initialized BAT registers.
18319         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18320         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18321         Move from here...
18322         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18323         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18324         ... to here.
18325         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18326         (grub_mapclaim): Likewise.
18327         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18328         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18329         hand.
18331 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18333         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18334         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18335         -ffreestanding and -msoft-float.
18337 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18339         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18340         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18341         set in grub_ieee1275_flags.
18343 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18345         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18346         prototype.
18347         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18348         grub_console_init first.
18349         Change the memory range used for grub_ieee1275_claim and
18350         grub_mm_init_region.
18351         Print an error message if the claim fails.
18352         Include <grub/misc.h>.
18354 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18356         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18357         Call grub_children_iterate for device nodes of type `scsi',
18358         `ide', or `ata'.
18359         (grub_ofdisk_open): Remove manual device alias resolution.
18360         Fix memory leak when device cannot be opened.
18361         * include/grub/powerpc/ieee1275/ieee1275.h
18362         (grub_children_iterate): New prototype.
18363         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18364         New function.
18365         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18366         Return -1 if args.size was -1.
18368 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18370         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18371         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18372         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18373         Open Firmware's memory for it; claim memory from _start to _end.
18374         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18375         (_end): New extern.
18376         (_start): Zero BSS from __bss_start to _end.
18377         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18378         New extern.
18379         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18381 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18383         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18384         -1 if args.base was -1.
18386 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18388         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18389         escape sequence instead of a literal ^L. Also call
18390         grub_ofconsole_gotoxy.
18392 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18394         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18395         void *  arguments to grub_addr_t.  All callers updated.  Also make
18396         the `result' argument optional.
18397         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18398         All callers updated.
18400 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18402         * commands/ls.c (grub_ls_list_files): Use the string following the
18403         initial ')', if present, as the filesystem path.
18404         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18406         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18408 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18410         Make the source code of the menu interface more readable.
18412         * normal/menu.c: Include grub/mm.h.
18413         (TERM_WIDTH): New macro.
18414         (TERM_HEIGHT): Likewise.
18415         (TERM_INFO_HEIGHT): Likewise.
18416         (TERM_MARGIN): Likewise.
18417         (TERM_SCROLL_WIDTH): Likewise.
18418         (TERM_TOP_BORDER_Y): Likewise.
18419         (TERM_LEFT_BORDER_X): Likewise.
18420         (TERM_BORDER_WIDTH): Likewise.
18421         (TERM_MESSAGE_HEIGHT): Likewise.
18422         (TERM_BORDER_HEIGHT): Likewise.
18423         (TERM_NUM_ENTRIES): Likewise.
18424         (TERM_FIRST_ENTRY_Y): Likewise.
18425         (TERM_ENTRY_WIDTH): Likewise.
18426         (TERM_CURSOR_X): Likewise.
18427         (draw_border): Use macros instead of magic numbers.
18428         (print_entry): Likewise.
18429         (print_entries): Likewise.
18430         (run_menu): Likewise. Also, handle the key 'e'.
18431         (run_menu_entry): Ignore empty command lines.
18432         (print_message): Added a new argument EDIT. If EDIT is true,
18433         print a different message.
18434         (init_page): Likewise.
18435         (edit_menu_entry): New function. Not implemented yet.
18437 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18439         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18440         can be loaded from normal mode.
18442         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18443         `multiboot.mod'.
18444         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18445         (multiboot_mod_CFLAGS): New variables.
18446         * loader/i386/pc/linux_normal.c: New file.
18447         * loader/i386/pc/multiboot_normal.c: Likewise.
18449         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18450         attribute `unused'.
18452         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18453         `fdiro' to read the mode information from instead of `diro'.
18455         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18456         looking up a symlink.
18458         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18459         macro.
18460         * normal/command.c (grub_command_execute): Don't parse the
18461         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18462         flags of the command.
18464         * normal/menu.c (grub_menu_run): Fix typo.
18466 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18468         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18470         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18471         `y + 1' instead of `y - 1'.
18473         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18475 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18477         From Hollis Blanchard <hollis@penguinppc.org>:
18478         * kern/misc.c (memmove): New alias for grub_memmove.
18479         (memcmp): New alias for grub_memcmp.
18480         (memset): New alias for grub_memset.
18481         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18482         Change "int handle" to "grub_ieee1275_phandle_t handle".
18483         * include/grub/powerpc/ieee1275/ieee1275.h
18484         (grub_ieee1275_get_property): Likewise.
18486 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18488         Added normal mode command `chainloader' as module chain.mod, which
18489         depends on normal.mod and _chain.mod.
18491         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18492         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18493         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18494         Deleted prototype.
18495         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18496         but arguments parsing moved to ...
18497         (grub_chainloader_cmd): ... here.  New function.
18498         * include/grub/i386/pc/chainloader.h: New file.
18499         * loader/i386/pc/chainloader_normal.c: Likewise.
18501 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18503         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18504         (grub_mkimage_LDFLAGS): Likewise.
18505         (grub_emu_SOURCES): Likewise.
18506         (kernel_img_HEADERS): Added fshelp.h.
18507         * fs/ext2.c: Include <grub/fshelp.h>.
18508         (FILETYPE_REG): New macro.
18509         (FILETYPE_INO_REG): Likewise.
18510         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18511         Changed all users.
18512         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18513         all users.
18514         (grub_fshelp_node): New struct.
18515         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18516         to a pointer.
18517         (grub_ext2_get_file_block): Removed function.
18518         (grub_ext2_read_block): New function.
18519         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18520         This function was written.
18521         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18522         (grub_ext2_find_file): Removed function.
18523         (grub_ext2_read_symlink): New function.
18524         (grub_ext2_iterate_dir): Likewise.
18525         (grub_ext2_open): Rewritten.
18526         (grub_ext2_dir): Rewritten.
18527         * include/grub/fshelp.h: New file.
18528         * fs/fshelp.c: Likewise.
18530 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18532         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18533         (print_message): Add a missing newline.
18534         (run_menu): Added timeout support.
18535         (run_menu_entry): New local function.
18536         (grub_menu_run): Added support for booting.
18538         * kern/loader.c (grub_loader_is_loaded): New function.
18540         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18541         (grub_get_rtc): Exported.
18543         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18544         (grub_get_rtc): Exported.
18546         * include/grub/normal.h (struct grub_command_list): Remove
18547         constant from the member `command'.
18549         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18551         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18553         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18555 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18557         Add support for the JFS filesystem.
18559         * fs/jfs.c: New file.
18560         * include/grub/fs.h (grub_jfs_init): New prototype.
18561         (grub_jfs_fini): New prototype.
18562         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18563         (grub_emu_SOURCES): Likewise.
18564         (pkgdata_MODULES): Add jfs.mod.
18565         (jfs_mod_SOURCES): New variable.
18566         (jfs_mod_CFLAGS): Likewise.
18567         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18568         (grubof_SOURCES): Likewise.
18569         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18571         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18572         endian to the host endian.
18573         (grub_fat_utf16_to_utf8): Move function from there...
18574         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18575         the endianness of the source string anymore.
18576         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18578 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18580         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18581         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18582         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18583         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18585         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18586         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18587         for `node_found' and `it_dir'.
18588         (grub_hfs_dir): Add prototype for `dir_hook'.
18590         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18591         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18592         and `indir32' to silence a gcc warning.
18594         * include/grub/fs.h (grub_hfs_init): New prototype.
18595         (grub_hfs_fini): Likewise.
18598 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18600         Each disk device has its own id now. This is useful to make use
18601         of multiple disk devices.
18603         * include/grub/disk.h (grub_disk_dev_id): New enum.
18604         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18605         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18607         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18608         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18610         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18611         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18613         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18614         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18616         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18617         "id" which is used by the cache manager.
18619         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18620         of just "GRUB".
18622 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18624         * fs/hfs.c: New file.
18625         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18626         (grub_emu_SOURCES): Likewise.
18627         (pkgdata_MODULES): Add hfs.mod.
18628         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18629         (grubof_SOURCES): Likewise.
18630         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18632         * include/grub/misc.h (grub_strncasecmp): Add prototype.
18633         * kern/misc.c (grub_strncasecmp): Add function.
18635 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
18637         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18638         with parentheses.
18640         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18641         (grub_ext2_dir): In case the directory entry type is unknown, read
18642         it from the inode.
18644 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
18646         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18647         grub_load_linux instead of grub_rescue_cmd_linux as second
18648         argument of grub_rescue_register_command.
18650         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18652 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
18654         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18655         function.
18656         * commands/boot.c: Remove the check for `GRUB_UTIL'.
18657         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18658         `loader/powerpc/ieee1275/linux.c',
18659         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18660         * include/grub/powerpc/ieee1275/ieee1275.h
18661         (grub_ieee1275_release): New prototype.
18662         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18663         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18664         normal, boot, linux and linux_normal.
18665         * loader/powerpc/ieee1275/linux.c: New file.
18666         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18668 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
18670         * normal/arg.c (grub_arg_parse): Correct error handling after
18671         reallocating the argumentlist (check if `argl' is not null instead
18672         of checking if `args' is not null).
18673         * kern/mm.c (grub_realloc): Return the same pointer when using the
18674         same region, instead of returning the header address.
18676 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18678         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18679         one block instead of two when looking for the initial partition.
18680         (grub_partition_probe): Initialize the local variable `p' with 0.
18681         Use base 10 for the grub_strtoul call.
18682         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
18683         need for one local variable.
18684         (grub_strtoul): Don't add the new value to `num', instead of that
18685         just assign it.
18687 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18689         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18690         (pxeboot_img_SOURCES): New variable.
18691         (pxeboot_img_ASFLAGS): Likewise.
18692         (pxeboot_img_LDFLAGS): Likewise.
18693         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
18694         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
18695         <lode_leroy@hotmail.com>.
18697 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18699         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18700         there was no input.
18702 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18704         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
18705         the history buffer logic.
18707 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18709         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18710         (FILETYPE_INO_SYMLINK): New macros.
18711         (grub_ext2_find_file): Check if the node is a directory using the
18712         inode stat information instead of using the filetype in the
18713         dirent.  Exclude the first character of an absolute symlink.
18714         (grub_ext2_dir): Mask out the filetype part of the mode member of
18715         the inode.
18717 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
18719         Add support for UFS version 1 and 2.  Add support for the minix
18720         filesystem version 1 and 2, both the variants with 14 and 30 long
18721         filenames.
18723         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18724         fs/minix.c.
18725         (grub_emu_SOURCES): Likewise.
18726         (pkgdata_MODULES): Add ufs.mod and minix.mod.
18727         (ufs_mod_SOURCES): New variable.
18728         (ufs_mod_CFLAGS): Likewise.
18729         (minix_mod_SOURCES): Likewise.
18730         (minix_mod_CFLAGS): Likewise.
18731         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18732         fs/minix.c.
18733         (grubof_SOURCES): Likewise.
18734         * fs/ufs.c: New file.
18735         * fs/minix.c: New file.
18736         * include/grub/fs.h (grub_ufs_init): New prototype.
18737         (grub_ufs_fini): Likewise.
18738         (grub_minix_init): Likewise.
18739         (grub_minix_fini): Likewise.
18740         * util/grub-emu.c (main): Initialize and deinitialize UFS and
18741         minix fs.
18743 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
18745         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18746         commands/ls.c, commands/terminal.c, commands/boot.c,
18747         commands/cmp.c and commands/cat.c.
18748         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18750         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18751         "env.h"
18753 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18755         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18756         and grub_, respectively. Because the conversion is trivial and
18757         mechanical, I omit the details here. Please refer to the CVS
18758         if you need more information.
18760 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18762         * include/pupa: Renamed to ...
18763         * include/grub: ... this.
18764         * util/i386/pc/pupa-mkimage.c: Renamed to ...
18765         * util/i386/pc/grub-mkimage.c: ... this.
18766         * util/i386/pc/pupa-setup.c: Renamed to ...
18767         * util/i386/pc/grub-setup.c: ... this.
18768         * util/pupa-emu.c: Renamed to ...
18769         * util/grub-emu.c: ... this.
18771 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
18773         Add support for the newworld apple macintosh (PPC).  This has been
18774         tested on the powerbook 2000 only.  It only adds support for
18775         generic ieee1275 functions, console and disk support.  This should
18776         be easy to port to other architectures with support for Open
18777         Firmware.
18779         * configure.ac: Accept the powerpc as host_cpu.  In the case of
18780         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
18781         specific tests are only executed while building for the i386.
18782         Inverse test for crosscompile.
18783         * genmk.rb (Utility): Allow assembler files.
18784         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18785         * conf/powerpc-ieee1275.rmk: New file.
18786         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18787         * disk/powerpc/ieee1275/partition.c: Likewise.
18788         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18789         * include/pupa/powerpc/ieee1275/console.h: Likewise.
18790         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18791         * include/pupa/powerpc/ieee1275/time.h: Likewise.
18792         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18793         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18794         * include/pupa/powerpc/ieee1275/loader.h
18795         * include/pupa/powerpc/setjmp.h: Likewise.
18796         * include/pupa/powerpc/types.h: Likewise.
18797         * kern/powerpc/ieee1275/init.c: Likewise.
18798         * kern/powerpc/ieee1275/openfw.c: Likewise.
18799         * term/powerpc/ieee1275/ofconsole.c: Likewise.
18801         These files were written by Johan Rydberg
18802         (jrydberg@night.trouble.net) and I only modified them slightly.
18804         * boot/powerpc/ieee1275/cmain.c: New file.
18805         * boot/powerpc/ieee1275/crt0.S: Likewise.
18806         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18807         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18809 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
18811         * Makefile.in: Update copyright.
18812         * genmodsrc.sh: Likewise.
18813         * gensymlist.sh: Likewise.
18814         * term/i386/pc/vga.c: Indent correctly.
18816         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18817         bugreporting address.
18818         * util/i386/pc/pupa-setup.c (usage): Likewise,
18819         (main): Call pupa_ext2_init and pupa_ext2_fini.
18821         * fs/fat.c (log2): Renamed to ...
18822         (fat_log2): ... this.
18823         All callers changed.
18824         * kern/misc.c (memcpy): Alias to pupa_memmove.
18825         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18826         lvalue cast.
18827         * util/console.c (pupa_ncurses_fini): Return 0.
18829         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18830         Move fail label here.
18831         [__GNU__]: Don't warn when using stat.
18832         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18833         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18834         long int. Use strtol instead of strtoul.
18836 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
18838         * commands/boot.c: New file.
18839         * commands/cat.c: Likewise.
18840         * commands/cmp.c: Likewise.
18841         * commands/ls.c: Likewise.
18842         * commands/terminal.c: Likewise.
18843         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18844         (pupa_register_command): Changed interface to match the new
18845         argument parser.
18846         (pupa_command_execute): Changed (almost rewritten) so it uses
18847         pupa_split_command.  Added support for setting variables using the
18848         syntax `foo=bar'.
18849         (rescue_command): Changed to work with the new argument parser.
18850         (terminal_command): Moved from here to commands/terminal.c.
18851         (set_command): New function.
18852         (unset_command): New function.
18853         (insmod_command): New function.
18854         (rmmod_command): New function.
18855         (lsmod_command): New function.
18856         (pupa_command_init): Don't initialize the command terminal
18857         anymore.  Initialize the commands set, unset, insmod, rmmod and
18858         lsmod.
18859         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18860         (kernel_img_HEADERS): Add arg.h and env.h.
18861         (pupa_mkimage_LDFLAGS): Add kern/env.c.
18862         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18863         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18864         normal/arg.c.
18865         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18866         terminal.mod.
18867         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18868         (boot_mod_SOURCES): New variable.
18869         (terminal_mod_SOURCES): Likewise.
18870         (ls_mod_SOURCES): Likewise.
18871         (cmp_mod_SOURCES): Likewise.
18872         (cat_mod_SOURCES): Likewise.
18874         * normal/arg.c: New file.
18875         * kern/env.c: Likewise.
18876         * include/pupa/arg.h: Likewise.
18877         * include/pupa/env.h: Likewise.
18878         * font/manager.c (font_command): Changed to match argument parsing
18879         interface changes.
18880         (PUPA_MOD_INIT): Likewise.
18881         * hello/hello.c (pupa_cmd_hello): Likewise.
18882         (PUPA_MOD_INIT): Likewise.
18883         * include/pupa/disk.h: Include <pupa/device.h>.
18884         (pupa_print_partinfo): New prototype.
18885         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18886         (pupa_dl_get_prefix): Likewise.
18887         * include/pupa/misc.h: Include <pupa/err.h>.
18888         (pupa_isgraph): New prototype.
18889         (pupa_isdigit): Likewise.
18890         (pupa_split_cmdline): Likewise.
18891         * include/pupa/normal.h: Include <pupa/arg.h>.
18892         (pupa_command): Changed the prototype of the member `func' to
18893         match the argument parsing interface.  Added member `options'.
18894         (pupa_register_command): Updated to match function.
18895         (pupa_arg_parse): New prototype.
18896         (pupa_hello_init) [PUPA_UTIL]: New prototype.
18897         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18898         (pupa_ls_init) [PUPA_UTIL]: Likewise.
18899         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18900         (pupa_cat_init) [PUPA_UTIL]: Likewise.
18901         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18902         (pupa_boot_init) [PUPA_UTIL]: Likewise.
18903         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18904         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18905         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18906         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18907         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18908         * kern/disk.c: Include <pupa/file.h>.
18909         (pupa_print_partinfo): New function.
18910         * kern/dl.c: Include <pupa/env.h>.
18911         (pupa_dl_dir): Variable removed.
18912         (pupa_dl_load): Use the environment variable `prefix' instead of
18913         the variable pupa_dl_dir.
18914         (pupa_dl_set_prefix): Function removed.
18915         (pupa_dl_get_prefix): Likewise.
18916         * kern/i386/pc/init.c: Include <pupa/env.h>.
18917         (pupa_machine_init): Use the environment variable `prefix' instead of
18918         using pupa_dl_set_prefix to set the prefix.
18919         * kern/main.c: Include <pupa/env.h>.
18920         (pupa_set_root_dev): Use the environment variable `prefix' instead of
18921         using pupa_dl_get_prefix to get the prefix.
18922         * kern/misc.c: Include <pupa/env.h>.
18923         (pupa_isdigit): New function.
18924         (pupa_isgraph): Likewise.
18925         (pupa_ftoa): Likewise.
18926         (pupa_vsprintf): Added support for printing values of the type
18927         `double'.  Make it possible to format variable output when using
18928         formatting like `%1.2%f'.
18929         (pupa_split_cmdline): New function.
18930         * kern/rescue.c: Include <pupa/env.h>.
18931         (next_word): Removed function.
18932         (pupa_rescue_cmd_prefix): Likewise.
18933         (pupa_rescue_cmd_set): New function.
18934         (pupa_rescue_cmd_unset): New function.
18935         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18936         split the command line instead of splitting it here.  Added
18937         support for setting variables using the syntax `foo=bar'.  Don't
18938         initialize the prefix command anymore.  Initialized the set and
18939         unset commands.
18940         * normal/cmdline.c: Include <pupa/env.h>.
18941         (pupa_tab_complete): Added prototypes for print_simple_completion,
18942         print_partition_completion, add_completion, iterate_commands,
18943         iterate_dev, iterate_part and iterate_dir. Moved code to print
18944         partition information from here to kern/disk.c.
18945         (pupa_cmdline_run): Don't check if the function exists anymore.
18946         * normal/main.c: Include <pupa/env.h>.
18947         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18948         instead of using pupa_dl_get_prefix to get the prefix.
18949         * term/i386/pc/vga.c: Include <pupa/arg.h>.
18950         (check_vga_mem): Cast pointers to `void *' to silence a gcc
18951         warning.
18952         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18953         (pupa_vga_setcolor): Declare unused variables with `__attribute__
18954         ((unused))' to silence a gcc warning.
18955         (pupa_vga_setcolor): Likewise.
18956         (debug_command): Changed to match argument parsing
18957         interface changes.
18958         * util/pupa-emu.c: Include <pupa/env.h>.
18959         (options): Added 0's for unused fields to silence a gcc warning.
18960         (argp): Likewise.
18961         (main): Use the environment variable `prefix' instead of using
18962         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
18963         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
18964         and terminal.
18966         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
18967         * util/misc.c: Include <malloc.h>.
18968         (pupa_malloc): Rewritten so errors are correctly reported.
18969         (pupa_realloc): Likewise.
18970         (pupa_memalign): Likewise.
18971         (pupa_mm_init_region): Declare unused variables with
18972         `__attribute__ ((unused))' to silence a gcc warning.
18973         * normal/i386/setjmp.S: Remove tab at the end of the file to
18974         silence a gcc warning.
18975         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
18976         variables with `__attribute__ ((unused))' to silence a gcc
18977         warning.
18978         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
18979         local variable i unsigned to silence a gcc warning.
18981         * kern/term.c: Include <pupa/misc.h>.
18982         (pupa_more_lines): New variable.
18983         (pupa_more): Likewise.
18984         (pupa_putcode): When the pager is active pause at the end of every
18985         screen.
18986         (pupa_set_more): New function.
18987         * include/pupa/term.h (pupa_set_more): New prototype.
18990 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
18992         Now this project is GRUB 2 rather than PUPA. The location of
18993         the CVS repository was moved to GRUB's.
18995         * configure.ac: Use bug-grub as the reporting address.
18996         Use GRUB instead of PUPA.
18997         Change the version number to 1.90.
18999 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19001         * genkernsyms.sh: Updated copyright information.
19002         * genmk.rb: Likewise.
19003         * genmodsrc.sh: Likewise.
19004         * gensymlist.sh: Likewise.
19005         * boot/i386/pc/boot.S: Likewise.
19006         * boot/i386/pc/diskboot.S: Likewise.
19007         * disk/i386/pc/biosdisk.c: Likewise.
19008         * disk/i386/pc/partition.c: Likewise.
19009         * font/manager.c: Likewise.
19010         * fs/ext2.c: Likewise.
19011         * fs/fat.c: Likewise.
19012         * include/pupa/boot.h: Likewise.
19013         * include/pupa/device.h: Likewise.
19014         * include/pupa/disk.h: Likewise.
19015         * include/pupa/dl.h: Likewise.
19016         * include/pupa/elf.h: Likewise.
19017         * include/pupa/err.h: Likewise.
19018         * include/pupa/file.h: Likewise.
19019         * include/pupa/font.h: Likewise.
19020         * include/pupa/fs.h: Likewise.
19021         * include/pupa/kernel.h: Likewise.
19022         * include/pupa/loader.h: Likewise.
19023         * include/pupa/misc.h: Likewise.
19024         * include/pupa/mm.h: Likewise.
19025         * include/pupa/net.h: Likewise.
19026         * include/pupa/normal.h: Likewise.
19027         * include/pupa/rescue.h: Likewise.
19028         * include/pupa/setjmp.h: Likewise.
19029         * include/pupa/symbol.h: Likewise.
19030         * include/pupa/term.h: Likewise.
19031         * include/pupa/types.h: Likewise.
19032         * include/pupa/i386/setjmp.h: Likewise.
19033         * include/pupa/i386/types.h: Likewise.
19034         * include/pupa/i386/pc/biosdisk.h: Likewise.
19035         * include/pupa/i386/pc/boot.h: Likewise.
19036         * include/pupa/i386/pc/console.h: Likewise.
19037         * include/pupa/i386/pc/init.h: Likewise.
19038         * include/pupa/i386/pc/kernel.h: Likewise.
19039         * include/pupa/i386/pc/linux.h: Likewise.
19040         * include/pupa/i386/pc/loader.h: Likewise.
19041         * include/pupa/i386/pc/memory.h: Likewise.
19042         * include/pupa/i386/pc/multiboot.h: Likewise.
19043         * include/pupa/i386/pc/partition.h: Likewise.
19044         * include/pupa/i386/pc/time.h: Likewise.
19045         * include/pupa/i386/pc/vga.h: Likewise.
19046         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19047         * include/pupa/util/getroot.h: Likewise.
19048         * include/pupa/util/misc.h: Likewise.
19049         * include/pupa/util/resolve.h: Likewise.
19050         * kern/device.c: Likewise.
19051         * kern/disk.c: Likewise.
19052         * kern/dl.c: Likewise.
19053         * kern/err.c: Likewise.
19054         * kern/file.c: Likewise.
19055         * kern/fs.c: Likewise.
19056         * kern/loader.c: Likewise.
19057         * kern/main.c: Likewise.
19058         * kern/misc.c: Likewise.
19059         * kern/mm.c: Likewise.
19060         * kern/rescue.c: Likewise.
19061         * kern/term.c: Likewise.
19062         * kern/i386/dl.c: Likewise.
19063         * kern/i386/pc/init.c: Likewise.
19064         * kern/i386/pc/lzo1x.S: Likewise.
19065         * kern/i386/pc/startup.S: Likewise.
19066         * loader/i386/pc/chainloader.c: Likewise.
19067         * loader/i386/pc/linux.c: Likewise.
19068         * loader/i386/pc/multiboot.c: Likewise.
19069         * normal/cmdline.c: Likewise.
19070         * normal/command.c: Likewise.
19071         * normal/main.c: Likewise.
19072         * normal/menu.c: Likewise.
19073         * normal/i386/setjmp.S: Likewise.
19074         * term/i386/pc/console.c: Likewise.
19075         * term/i386/pc/vga.c: Likewise.
19076         * util/console.c: Likewise.
19077         * util/genmoddep.c: Likewise.
19078         * util/misc.c: Likewise.
19079         * util/pupa-emu.c: Likewise.
19080         * util/resolve.c: Likewise.
19081         * util/unifont2pff.rb: Likewise.
19082         * util/i386/pc/biosdisk.c: Likewise.
19083         * util/i386/pc/getroot.c: Likewise.
19084         * util/i386/pc/pupa-mkimage.c: Likewise.
19085         * util/i386/pc/pupa-setup.c: Likewise.
19087 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19089         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19090         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19091         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19092         reading and reset it after reading.
19093         (pupa_ext2_close): Return PUPA_ERR_NONE.
19095         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19096         Correct value.
19097         (struct linux_kernel_header): Add kernel_version and
19098         initrd_addr_max.
19099         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19100         pupa_file_read succeeds.
19101         (pupa_rescue_cmd_initrd): Implement.
19103 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19105         * fs/ext2.c (pupa_ext2_label): New function.
19106         (pupa_ext2_fs): Added label.
19107         * fs/fat.c (pupa_fat_label): New function.
19108         (pupa_fat_fs): Added label.
19109         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19111         * kern/misc.c (pupa_strndup): New function.
19112         * include/pupa/misc.h (pupa_strndup): New prototype.
19114         * include/pupa/normal.h: Include <pupa/err.h>.
19115         (pupa_set_history): New prototype.
19116         (pupa_iterate_commands): New prototype.
19117         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19118         <pupa/disk.h>, <pupa/file.h>.
19119         (hist_size): New variable.
19120         (hist_lines): Likewise.
19121         (hist_end): Likewise.
19122         (hist_used): Likewise.
19123         (pupa_set_history): New function.
19124         (pupa_history_get): Likewise.
19125         (pupa_history_add): Likewise.
19126         (pupa_history_replace): Likewise.
19127         (pupa_tab_complete): Likewise.
19128         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19129         completion shows partitionnames while completing partitions, this
19130         feature was suggested by Jeff Bailey.
19131         * normal/command.c (pupa_iterate_commands): New function.
19132         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19133         (pupa_normal_init): Initialize history buffer.
19134         (PUPA_MOD_INIT): Likewise.
19135         (pupa_normal_fini): Free the history buffer.
19136         (PUPA_MOD_FINI): Likewise.
19138         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19139         key.
19141         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19142         * configure.ac [i386]: Check for regparam bug.
19143         (NESTED_FUNC_ATTR) [! i386]: Defined.
19145 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19147         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19148         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19149         (pupa_emu_SOURCES): New variable.
19150         (pupa_emu_LDFLAGS): Likewise.
19151         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19152         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19153         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19154         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19155         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19156         (pupa_jmp_buf): New typedef.
19157         (pupa_setjmp) [PUPA_UTIL]: New macro.
19158         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19159         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19160         (pupa_refresh): New prototype.
19161         * include/pupa/util/getroot.h: New file.
19162         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19163         it.
19164         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19165         (pupa_rescue_cmd_cat): Likewise.
19166         (pupa_rescue_cmd_ls): Likewise.
19167         (pupa_rescue_cmd_testload): Likewise.
19168         (pupa_rescue_cmd_lsmod): Likewise.
19169         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19170         * normal/menu.c (run_menu): Likewise.
19171         * kern/term.c (pupa_cls): Likewise.
19172         (pupa_refresh): New function.
19173         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19174         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19175         * util/console.c: New file.
19177         * util/i386/pc/getroot.c: New file.
19178         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19179         (pupa_putchar): New function.
19180         (pupa_refresh): Likewise.
19181         (xgetcwd): Function moved to ...
19182         (strip_extra_slashes): Likewise.
19183         (get_prefix): Likewise.
19184         * util/i386/pc/getroot.c: ... here.
19185         (find_root_device): Function moved and renamed to...
19186         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19187         Changed all callers.
19188         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19189         and renamed to...
19190         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19191         Changed all callers.
19192         * util/misc.c (pupa_memalign): New function.
19193         (pupa_mm_init_region): Likewise.
19194         (pupa_register_exported_symbols): Likewise.
19195         (pupa_putchar): Function removed.
19196         * util/pupa-emu.c: New file.
19198 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19200         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19201         (_multiboot_mod_SOURCES): New variable.
19202         (_multiboot_mod_CFLAGS): Likewise.
19203         * loader/i386/pc/multiboot.c: New file.
19204         * include/pupa/i386/pc/multiboot.h: Likewise.
19205         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19206         (pupa_multiboot_real_boot): New function.
19207         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19208         (pupa_multiboot_real_boot): New prototype.
19209         (pupa_rescue_cmd_multiboot): Likewise
19210         (pupa_rescue_cmd_module): Likewise.
19212         * kern/loader.c (pupa_loader_set): Continue when
19213         pupa_loader_unload_func() fails.
19214         (pupa_loader_unset): New function.
19215         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19217         * kern/misc.c (pupa_stpcpy): New function.
19218         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19220 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19222         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19223         for available extensions.
19225         * include/pupa/i386/pc/time.h: New file.
19226         * kern/disk.c: Include <pupa/machine/time.h>.
19227         (PUPA_CACHE_TIMEOUT): New macro.
19228         (pupa_last_time): New variable.
19229         (pupa_disk_open): Flush the cache when there was a timeout.
19230         (pupa_disk_close): Reset the timer.
19231         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19232         pupa_currticks.
19233         * util/misc.c: Include <sys/times.h>
19234         (pupa_get_rtc): New function.
19236 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19238         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19239         as blocks.
19240         (pupa_ext2_get_file_block): Use blocks member.
19242         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19243         first block. Return -1 instead of pupa_errno on error.
19245 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19247         * README: In the pupa-mkimage example use _chain instead of chain
19248         and ext2 instead of fat.
19249         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19250         adding journal playback for ext2fs.
19251         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19252         (pkgdata_MODULES): Added ext2.mod.
19253         (ext2_mod_SOURCES): New variable.
19254         (ext2_mod_CFLAGS): Likewise.
19255         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19256         * include/pupa/misc.h (pupa_strncpy): New prototype.
19257         (pupa_strcat): Likewise.
19258         (pupa_strncmp): Likewise.
19259         * kern/misc.c (pupa_strcat): Enable function.
19260         (pupa_strncpy): New function.
19261         (pupa_strncmp): Likewise.
19262         * fs/ext2.c: New file.
19264         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19265         when the read failed before retrying.
19266         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19267         (_FILE_OFFSET_BITS): Likewise.
19268         * configure.ac: Added AC_SYS_LARGEFILE.
19270 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19272         * genmk.rb (PModule#rule): Make sure to get only symbol names
19273         from the output of nm.
19274         Reported by Robert Millan <zeratul2@wanadoo.es>.
19276 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19278         I forgot to check in these changes for a long time. This adds
19279         incomplete support for VGA console, and this is still very
19280         buggy. Also, a lot of consideration is required for I18N,
19281         UNICODE, and VGA font issues. Therefore, assume that this is
19282         such that "better than nothing".
19284         * font/manager.c: New file.
19285         * include/pupa/font.h: Likewise.
19286         * include/pupa/i386/pc/vga.h: Likewise.
19287         * term/i386/pc/vga.c: Likewise.
19288         * util/unifont2pff.rb: Likewise.
19290         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19291         (pkgdata_MODULES): Added vga.mod and font.mod.
19292         (vga_mod_SOURCES): New variables.
19293         (vga_mod_CFLAGS): Likewise.
19294         (font_mod_SOURCES): Likewise.
19295         (font_mod_CFLAGS): Likewise.
19297         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19299         * include/pupa/term.h: Include pupa/err.h.
19300         (struct pupa_term): Added init and fini.
19301         Changed the argument of putchar to pupa_uint32_t.
19303         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19304         (pupa_console_real_putchar): New prototype.
19305         (pupa_console_putchar): Removed.
19306         (pupa_console_checkkey): Exported.
19307         (pupa_console_getkey): Likewise.
19309         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19310         characters.
19312         * kern/term.c (pupa_term_set_current): Rewritten.
19313         (pupa_putchar): Likewise.
19314         (pupa_putcode): New function.
19316         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19317         (pupa_console_real_putchar): ... this.
19318         (pupa_vga_set_mode): New function.
19319         (pupa_vga_get_font): Likewise.
19321         * normal/command.c: Include pupa/term.h.
19322         (terminal_command): New function.
19323         (pupa_command_init): Register the command "terminal".
19325         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19326         (DISP_UP): Likewise.
19327         (DISP_RIGHT): Likewise.
19328         (DISP_DOWN): Likewise.
19329         (DISP_HLINE): Likewise.
19330         (DISP_VLINE): Likewise.
19331         (DISP_UL): Likewise.
19332         (DISP_UR): Likewise.
19333         (DISP_LL): Likewise.
19334         (DISP_LR): Likewise.
19336         * term/i386/pc/console.c (pupa_console_putchar): New function.
19338 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19340         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19341         FIX. Reverse the path_list.
19343         * include/pupa/normal.h: Export pupa_register_command and
19344         pupa_unregister_command.
19346         * hello/hello.c (pupa_cmd_hello): New module.
19347         * conf/i386-pc.rmk: Added hello.mod.
19349 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19351         * kern/i386/pc/lzo1x.S: New file.
19353         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19354         (compress_kernel): New variable.
19355         (generate_image): Heavily modified to support compressing a
19356         large part of the core image.
19358         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19359         leak.
19360         (pupa_util_load_image): New function.
19362         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19363         (pupa_compressed_size): New variable.
19364         (codestart): Enable Gate A20 here.
19365         Decompress the compressed part of the core image.
19366         Rearrange the code to put functions and variables which are
19367         required for initialization in the non-compressed part.
19368         Include lzo1x.S.
19370         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19371         here.
19373         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19375         * include/pupa/i386/pc/kernel.h
19376         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19377         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19378         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19379         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19380         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19382         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19384         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19385         (Utility#rule): Likewise.
19387         * configure.ac: Check if LZO is available.
19389 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19391         * include/pupa/normal.h: New file.
19392         * include/pupa/setjmp.h: Likewise.
19393         * include/pupa/i386/setjmp.h: Likewise.
19394         * normal/cmdline.c: Likewise.
19395         * normal/command.c: Likewise.
19396         * normal/main.c: Likewise.
19397         * normal/menu.c: Likewise.
19398         * normal/i386/setjmp.S: Likewise.
19400         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19401         (pupa_rescue_cmd_initrd): Likewise.
19403         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19404         Likewise.
19406         * kern/i386/pc/startup.S (translation_table): New variable.
19407         (translate_keycode): New function.
19408         (pupa_console_getkey): Call translate_keycode.
19410         * kern/rescue.c (attempt_normal_mode): New function.
19411         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19412         it failed, print a message.
19414         * kern/mm.c (pupa_real_malloc): Print more information when a
19415         free magic is broken.
19416         (pupa_free): If the first free header is not free actually, set
19417         it to P.
19419         * kern/main.c (pupa_load_normal_mode): Just load the module
19420         "normal".
19421         (pupa_main): Don't print the message
19422         "Entering into rescue mode..." here.
19424         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19425         Declared.
19426         (pupa_rescue_cmd_initrd): Likewise.
19427         (pupa_rescue_cmd_initrd): Likewise.
19429         * include/pupa/symbol.h (FUNCTION): Specify the type.
19430         (VARIABLE): Likewise.
19432         * include/pupa/err.h (pupa_err_t): Added
19433         PUPA_ERR_UNKNOWN_COMMAND.
19435         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19436         (pupa_dl_get_prefix): Likewise.
19438         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19439         Added _chain.mod and _linux.mod instead of chain.mod and
19440         linux.mod.
19441         (chain_mod_SOURCES): Renamed to ...
19442         (_chain_mod_SOURCES): ... this.
19443         (chain_mod_CFLAGS): Renamed to ...
19444         (_chain_mod_CFLAGS): ... this.
19445         (linux_mod_SOURCES): Renamed to ...
19446         (_linux_mod_SOURCES): ... this.
19447         (linux_mod_CFLAGS): Renamed to ...
19448         (_linux_mod_CFLAGS): ... this.
19449         (normal_mod_SOURCES): New variable.
19450         (normal_mod_CFLAGS): Likewise.
19451         (normal_mod_ASFLAGS): Likewise.
19453 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19455         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19456         possible.
19458         * kern/dl.c (pupa_dl_ref): Refer depending modules
19459         recursively.
19460         (pupa_dl_unref): Unrefer depending modules recursively.
19461         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19462         a module is unloaded before one depending on that module is
19463         unloaded.
19464         (pupa_dl_unload): Unload depending modules explicitly,
19465         if possible.
19467 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19469         * include/pupa/i386/pc/linux.h: New file.
19470         * loader/i386/pc/linux.c: Likewise.
19472         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19473         Removed.
19474         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19475         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19476         of PUPA_CHAINLOADER_BOOT_SECTOR.
19478         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19479         (pupa_linux_prot_size): New variable.
19480         (pupa_linux_tmp_addr): Likewise.
19481         (pupa_linux_real_addr): Likewise.
19482         (pupa_linux_boot_zimage): New function.
19483         (pupa_linux_boot_bzimage): Likewise.
19485         * kern/i386/pc/init.c (struct mem_region): New structure.
19486         (MAX_REGIONS): New macro.
19487         (mem_regions): New variable.
19488         (num_regions): Likewise.
19489         (pupa_os_area_addr): Likewise.
19490         (pupa_os_area_size): Likewise.
19491         (pupa_lower_mem): Likewise.
19492         (pupa_upper_mem): Likewise.
19493         (add_mem_region): New function.
19494         (compact_mem_regions): Likewise.
19495         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19496         the size of the conventional memory and that of so-called upper
19497         memory (before the first memory hole).
19498         Instead of adding each found region to free memory, use
19499         add_mem_region and add them after removing overlaps.
19500         Also, add only 1/4 of the upper memory to free memory. The rest
19501         is used for loading OS images. Maybe this is ad hoc, but this
19502         makes it much easier to relocate OS images when booting.
19504         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19505         (pupa_enter_rescue_mode): Don't register initrd and module.
19507         * kern/mm.c: Include pupa/dl.h.
19509         * kern/main.c: Include pupa/file.h and pupa/device.h.
19511         * kern/loader.c (pupa_loader_load_module_func): Removed.
19512         (pupa_loader_load_module): Likewise.
19514         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19515         ``.o''.
19517         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19518         (pupa_linux_tmp_addr): Likewise.
19519         (pupa_linux_real_addr): Likewise.
19520         (pupa_linux_boot_zimage): Likewise.
19521         (pupa_linux_boot_bzimage): Likewise.
19523         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19524         (pupa_upper_mem): Likewise.
19525         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19526         module is too dangerous.
19528         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19529         (pupa_os_area_size): Likewise.
19530         (pupa_loader_set): Remove the first argument. Loader doesn't
19531         manage modules or initrd any longer.
19532         (pupa_loader_load_module): Removed.
19534         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19535         (linux_mod_SOURCES): New variable.
19536         (linux_mod_CFLAGS): Likewise.
19538 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19540         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19541         the length of a blocklist correctly.
19543         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19544         Use ioctl only if the OS file is a block device.
19545         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19546         not very useful for normal files.
19548         * kern/main.c (pupa_set_root_dev): New function.
19549         (pupa_load_normal_mode): Likewise.
19550         (pupa_main): Call those above.
19552         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19553         pupa_uint16_t.
19555         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19557 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19559         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19560         (setup): Configure the installed partition information and the
19561         dl prefix.
19563         * loader/i386/pc/chainloader.c (my_mod): New variable.
19564         (pupa_chainloader_unload): New function.
19565         (pupa_rescue_cmd_chainloader): Refer itself.
19566         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19568         * kern/i386/pc/startup.S (install_partition): Removed.
19569         (version_string): Likewise.
19570         (config_file): Likewise.
19571         (pupa_install_dos_part): New variable.
19572         (pupa_install_bsd_part): Likewise.
19573         (pupa_prefix): Likewise.
19574         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19576         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19577         and pupa/misc.h.
19578         (make_install_device): New function.
19579         (pupa_machine_init): Set the dl prefix.
19581         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19582         (buf): Renamed to ...
19583         (linebuf): ... this.
19584         (pupa_rescue_cmd_prefix): New function.
19585         (pupa_rescue_cmd_insmod): Likewise.
19586         (pupa_rescue_cmd_rmmod): Likewise.
19587         (pupa_rescue_cmd_lsmod): Likewise.
19588         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19589         rmmod and lsmod.
19591         * kern/mm.c (pupa_memalign): If failed even after invalidating
19592         disk caches, unload unneeded modules and retry.
19594         * kern/misc.c (pupa_memmove): New function.
19595         (pupa_memcpy): Removed.
19596         (pupa_strcpy): New function.
19597         (pupa_itoa): Made static.
19599         * kern/dl.c (pupa_dl_iterate): New function.
19600         (pupa_dl_ref): Likewise.
19601         (pupa_dl_unref): Likewise.
19602         (pupa_dl_unload): Return if succeeded or not.
19603         (pupa_dl_unload_unneeded): New function.
19604         (pupa_dl_unload_all): Likewise.
19605         (pupa_dl_init): Renamed to ...
19606         (pupa_dl_set_prefix): ... this.
19607         (pupa_dl_get_prefix): New function.
19609         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19610         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19611         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19612         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19613         (pupa_install_dos_part): Declared.
19614         (pupa_install_bsd_part): Likewise.
19615         (pupa_prefix): Likewise.
19616         (pupa_boot_drive): Likewise.
19618         * include/pupa/types.h: Fix a typo.
19620         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19621         pupa_memmove.
19622         (pupa_memmove): Declared.
19623         (pupa_strcpy): Likewise.
19625         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19626         pupa_mod_init takes one argument, its own module.
19627         (pupa_dl_unload_unneeded): Declared.
19628         (pupa_dl_unload_all): Likewise.
19629         (pupa_dl_ref): Likewise.
19630         (pupa_dl_unref): Likewise.
19631         (pupa_dl_iterate): Likewise.
19632         (pupa_dl_init): Renamed to ...
19633         (pupa_dl_set_prefix): ... this.
19634         (pupa_dl_get_prefix): Declared.
19636         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19637         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19638         unloaded.
19639         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19640         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19642         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19643         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19645 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19647         * util/i386/pc/pupa-setup.c (setup): Define the internal
19648         function find_first_partition_start at the top level, because GCC
19649         3.0.x cannot compile internal functions in deeper scopes
19650         correctly.
19651         (find_root_device): Use lstat instead of stat.
19652         Don't follow symbolic links.
19653         Fix the path-constructing code.
19655         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19656         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19657         by a BLKGETSIZE ioctl first, because block devices don't fill
19658         the member st_mode of the structure stat on Linux.
19659         [__linux__] (linux_find_partition): Use a temporary buffer
19660         REAL_DEV for the working space. Copy it to DEV before returning.
19661         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19662         buffer cache consistent.
19663         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19664         strncmp. The previous value was merely wrong.
19665         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19667         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19668         FAT size is 12. The previous value was merely wrong.
19670         * kern/main.c (pupa_main): Don't split the starting message from
19671         newlines.
19673         * kern/term.c (pupa_putchar): Put CR after LF instead of before
19674         LF, because BIOS goes crazy about character attributes in this
19675         case.
19677 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19679         * include/i386/pc/util/biosdisk.h: New file.
19680         * util/i386/pc/biosdisk.c: Likewise.
19681         * util/i386/pc/pupa-setup.c: Likewise.
19683         * Makefile.in (INCLUDE_DISTFILES): Added
19684         include/pupa/i386/pc/util/biosdisk.h.
19685         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19686         directory util/i386/pc.
19687         (install-local): Added a rule for sbin_UTILITIES.
19688         (uninstall): Likewise.
19690         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19692         * util/misc.c (xrealloc): New function.
19693         (pupa_malloc): Likewise.
19694         (pupa_free): Likewise.
19695         (pupa_realloc): Likewise.
19696         (pupa_stop): Likewise.
19697         (pupa_putchar): Likewise.
19699         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19701         * include/pupa/util/misc.h (xrealloc): Declared.
19703         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19704         macro.
19705         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19706         (PUPA_BOOT_MACHINE_BPB_END): ... this.
19708         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19709         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19711         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19712         way should be implemented.
19713         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19715         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19716         the size of NAME for safety.
19717         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19718         0x88.
19720         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19721         (pupa_setup_SOURCES): Likewise.
19723         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19725 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19727         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19728         bunch of pushl's from pusha, because this destroys the return
19729         value.
19731 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19733         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19734         This means that any missing prototypes could be fatal. Also, you
19735         must take care when writing assembly code. See the comments at
19736         the beginning of startup.S, for more details.
19738         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19739         compilation mechanism.
19740         (pupa_chainloader_real_boot): Likewise.
19741         (pupa_biosdisk_rw_int13_extensions): Likewise.
19742         (pupa_biosdisk_rw_standard): Likewise.
19743         (pupa_biosdisk_check_int13_extensions): Likewise.
19744         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19745         (pupa_biosdisk_get_diskinfo_standard): Likewise.
19746         (pupa_get_memsize): Likewise.
19747         (pupa_get_mmap_entry): Likewise.
19748         (pupa_console_putchar): Likewise.
19749         (pupa_console_setcursor): Likewise.
19750         (pupa_getrtsecs): Use pushl instead of push.
19752         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19753         memory instead of the stack for a mmap entry, because some
19754         BIOSes may ignore the maximum size and overflow.
19756         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19758         * genmk.rb (PModule#rule): Compile automatically generated
19759         sources with module-specific CFLAGS as well as other sources.
19761 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19763         * configure.ac: Check ld.
19764         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19765         respectively, before checking endianness and sizes.
19767         * Makefile.in (LD): New variable.
19769 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19771         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19773 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19775         * Changelog: New file.