]> git.proxmox.com Git - grub2.git/blob - ChangeLog
Fix typos and extra spaces
[grub2.git] / ChangeLog
1 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2
3 * util/unifont2pff.rb: Remove.
4
5 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
6
7 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
8 `#'.
9
10 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
11
12 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
13 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
14 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
15 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
16 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
19
20 2009-02-02 Christian Franke <franke@computer.org>
21
22 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
23
24 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
25
26 * INSTALL: Note that we now require at least autoconf 2.59 and
27 that LZO is optional.
28
29 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
30
31 Base on patch on bug #24154 created by Tomas Tintera
32 <trosos@seznam.cz>.
33
34 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
35
36 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
37
38 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
39 <bero@arklinux.org>.
40
41 * normal/parser.y (script_init): Add missing semicolon.
42
43 2009-01-31 Colin D Bennett <colin@gibibit.com>
44
45 * normal/main.c: Add include to grub/menu_viewer.h.
46 (free_menu_entry_classes): Added.
47 (grub_normal_menu_addentry): Added class property handling.
48 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
49 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
50
51 * normal/menu_viewer.c: New file.
52
53 * normal/menu.c (run_menu_entry): Renamed to ...
54 (grub_menu_execute_entry): ... this and made it as global.
55 (grub_menu_run): Renamed to ...
56 (show_text_menu): ... this and made it local.
57 (show_text_menu): Adapt to new function names.
58 (grub_normal_terminal_menu_viewer): New global variable.
59
60 * include/grub/menu.h: New file.
61
62 * include/grub/menu_viewer.h: New file.
63
64 * include/grub/normal.h: Added include to grub/menu.h.
65 (grub_menu_entry): Moved to include/grub/menu.h.
66 (grub_menu_entry_t): Likewise.
67 (grub_menu): Likewise.
68 (grub_menu_t): Likewise.
69 (grub_normal_terminal_menu_viewer): Added.
70 (grub_menu_execute_entry): Likewise.
71 (grub_menu_run): Removed.
72
73 * DISTLIST: Added include/grub/menu.h.
74 Added include/grub/menu_viewer.h.
75 Added normal/menu_viewer.c.
76
77 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
78
79 * normal/execute.c (grub_script_execute_menuentry): Changed to use
80 arglist for menutitle arguments.
81
82 * normal/main.c (grub_normal_menu_addentry): Likewise.
83
84 * normal/parser.y (menuentry): Likewise.
85
86 * normal/script.c (grub_script_create_cmdmenu): Likewise.
87
88 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
89 (grub_script_create_cmdmenu): Likewise.
90
91 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
92
93 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
94 changes.
95
96 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
97
98 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
99
100 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
101
102 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
103
104 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
105
106 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
107
108 2009-01-30 Christian Franke <franke@computer.org>
109
110 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
111 in option help text.
112
113 2009-01-27 Pavel Roskin <proski@gnu.org>
114
115 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
116
117 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
118
119 * commands/lsmmap.c: Add include to grub/machine/memory.h.
120
121 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
122
123 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
124 unregister function.
125
126 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
127
128 * disk/scsi.c (grub_scsi_read): Fix sign problem.
129
130 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
131
132 * util/grub-mkfont.c (usage): Fix typo.
133
134 * util/elf/grub-mkimage.c (load_modules): Fix warning.
135
136 2009-01-26 Daniel Mierswa <impulze@impulze.org>
137
138 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
139
140 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
141
142 * kern/misc.c (grub_strcasecmp): New function.
143 (grub_strcasecmp): Use grub_size_t instead of int for length.
144 Fix return value.
145 * include/grub/misc.h: Update function prototypes.
146
147 2009-01-26 Robert Millan <rmh@aybabtu.com>
148
149 * configure.ac: Fix cross-compilation check.
150
151 2009-01-22 Christian Franke <franke@computer.org>
152
153 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
154 (precision) digit string. Allow `.format2' without `format1' (width).
155 Limit input chars for `%s' output to `format2' if specified. This is
156 compatible with standard printf ().
157
158 2009-01-22 Christian Franke <franke@computer.org>
159
160 * disk/ata.c (grub_ata_wait_status): Replace by ...
161 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
162 other status bits may be invalid while BSY is asserted.
163 (grub_ata_check_ready): New function.
164 (grub_ata_cmd): Removed.
165 (grub_ata_wait_drq): New function.
166 (grub_ata_strncpy): Remove inline.
167 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
168 and error check now done by grub_ata_wait_drq ().
169 (grub_ata_pio_write): Likewise.
170 (grub_atapi_identify): Set DEV before check for !BSY. Use
171 grub_ata_wait_drq () to wait for data.
172 (grub_ata_device_initialize): Add status register check to
173 detect missing SATA slave devices. Add debug messages.
174 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
175 (grub_atapi_packet): Set DEV before check for !BSY. Replace
176 transfer loop by grub_ata_pio_write ().
177 (grub_ata_identify): Set DEV before check for !BSY. Use
178 grub_ata_wait_drq () to wait for data.
179 (grub_ata_setaddress): Set DEV before check for !BSY.
180 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
181 read/write in one loop. Fix invalid command on write. Fix incomplete
182 command on (size % batch) == 0. Add missing error check after write of
183 last block. Add debug messages.
184 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
185
186 2009-01-19 Christian Franke <franke@computer.org>
187
188 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
189 (GRUB_ATAPI_IREASON_*): Likewise.
190 (grub_ata_pio_write): Fix timeout error return.
191 (grub_atapi_identify): Add grub_ata_wait () after cmd.
192 (grub_atapi_wait_drq): New function.
193 (grub_atapi_packet): New parameter `size'.
194 Use grub_atapi_wait_drq () and direct write instead of
195 grub_ata_pio_write ().
196 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
197 reads the number of bytes requested by the device for each DRQ
198 assertion.
199 (grub_atapi_write): Remove old implementation, return not
200 implemented instead.
201
202 2009-01-19 Christian Franke <franke@computer.org>
203
204 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
205 of 512 to calculate data size.
206 (grub_scsi_read12): Likewise.
207 (grub_scsi_write10): Likewise.
208 (grub_scsi_write12): Likewise.
209 (grub_scsi_read): Adjust size according to blocksize.
210 Add checks for invalid blocksize and unaligned transfer.
211
212 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
213
214 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
215
216 * term/gfxterm.c (write_char): Fix background rendering for wide
217 width glyphs.
218
219 2009-01-19 Robert Millan <rmh@aybabtu.com>
220
221 * config.guess: Update to latest version from config git.
222 * config.sub: Likewise.
223
224 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
225
226 * Makefile.in: Change font compilation to use new grub-mkfont instead
227 of java version.
228
229 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
230 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
231 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
232 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
233 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
234 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
235 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
236 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
237 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
238
239 2009-01-16 Christian Franke <franke@computer.org>
240
241 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
242 (enum grub_ata_timeout_milliseconds): New enum.
243 (grub_ata_wait_status): Add parameter milliseconds.
244 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
245 recovery from timed-out commands.
246 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
247 return grub_errno instead of REG_ERROR.
248 (grub_ata_pio_write): Add parameter milliseconds.
249 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
250 Pass milliseconds to grub_ata_wait_status () and
251 grub_ata_pio_read ().
252 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
253 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
254 grub_ata_wait_status (). Fix IDENTIFY timeout check.
255 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
256 It is not suitable for device detection, because DEV bit is ignored,
257 the command may run too long, and not all devices set the signature
258 properly.
259 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
260 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
261 Fix device selection, DEV bit must be set first to address the registers
262 of the correct device.
263 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
264 grub_ata_pio_read/write ().
265 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
266 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
267
268 2009-01-13 Carles Pina i Estany <carles@pina.cat>
269
270 * util/grub-editenv.c (main): Use fseeko(), not fseek().
271
272 2009-01-13 Bean <bean123ch@gmail.com>
273
274 * util/grub-mkfont.c (write_font): forget to remove some debug code.
275
276 2009-01-13 Bean <bean123ch@gmail.com>
277
278 * Makefile.in: (enable_grub_mkfont): New variable.
279 (freetype_cflags): Likewise.
280 (freetype_libs): Likewise.
281
282 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
283 (grub_mkfont_SOURCES): New variable.
284 (grub_mkfont_CFLAGS): Likewise.
285 (grub_mkfont_LDFLAGS): Likewise.
286
287 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
288 library if `--enable-grub-mkfont' is requested.
289 (enable_grub_mkfont): New variable.
290 (freetype_cflags): Likewise.
291 (freetype_libs): Likewise.
292
293 * util/grub-mkfont.c: New file.
294
295 2009-01-12 Christian Franke <franke@computer.org>
296
297 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
298 mode check. Fix setting of compat_use[].
299
300 2009-01-10 Robert Millan <rmh@aybabtu.com>
301
302 Update a few copyright years which we forgot to do in 2008 (only for
303 files whose changes made in 2008 were copyright-significant)
304
305 * Makefile.in: Add 2008 to Copyright line.
306 * disk/ieee1275/ofdisk.c: Likewise.
307 * disk/efi/efidisk.c: Likewise.
308 * kern/dl.c: Likewise.
309 * kern/sparc64/ieee1275/init.c: Likewise.
310 * kern/mm.c: Likewise.
311 * kern/efi/mm.c: Likewise.
312 * boot/i386/pc/boot.S: Likewise.
313 * genfslist.sh: Likewise.
314 * fs/iso9660.c: Likewise.
315 * fs/hfs.c: Likewise.
316 * fs/jfs.c: Likewise.
317 * fs/minix.c: Likewise.
318 * fs/ufs.c: Likewise.
319 * gensymlist.sh.in: Likewise.
320 * genkernsyms.sh.in: Likewise.
321 * include/grub/misc.h: Likewise.
322 * include/grub/types.h: Likewise.
323 * include/grub/symbol.h: Likewise.
324 * include/grub/elf.h: Likewise.
325 * include/grub/kernel.h: Likewise.
326 * include/grub/disk.h: Likewise.
327 * include/grub/dl.h: Likewise.
328 * include/grub/i386/linux.h: Likewise.
329 * include/grub/i386/pc/biosdisk.h: Likewise.
330 * include/grub/efi/api.h: Likewise.
331 * include/grub/efi/pe32.h: Likewise.
332 * include/grub/util/misc.h: Likewise.
333 * normal/execute.c: Likewise.
334 * normal/arg.c: Likewise.
335 * normal/completion.c: Likewise.
336 * normal/lexer.c: Likewise.
337 * normal/parser.y: Likewise.
338 * normal/misc.c: Likewise.
339 * commands/i386/pc/vbeinfo.c: Likewise.
340 * commands/hexdump.c: Likewise.
341 * commands/terminal.c: Likewise.
342 * commands/ls.c: Likewise.
343 * commands/help.c: Likewise.
344 * partmap/pc.c: Likewise.
345 * loader/efi/chainloader.c: Likewise.
346 * loader/multiboot_loader.c: Likewise.
347 * loader/i386/pc/multiboot2.c: Likewise.
348 * term/efi/console.c: Likewise.
349 * term/i386/pc/serial.c: Likewise.
350 * util/lvm.c: Likewise.
351 * util/console.c: Likewise.
352 * util/i386/efi/grub-mkimage.c: Likewise.
353 * util/raid.c: Likewise.
354
355 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
356
357 * commands/videotest.c: Removed include to grub/machine/memory.h.
358
359 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
360 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
361 (video_mod_SOURCES): Removed.
362 (video_mod_CFLAGS): Likewise.
363 (video_mod_LDFLAGS): Likewise.
364 (gfxterm_mod_SOURCES): Likewise.
365 (gfxterm_mod_CFLAGS): Likewise.
366 (gfxterm_mod_LDFLAGS): Likewise.
367 (videotest_mod_SOURCES): Likewise.
368 (videotest_mod_CFLAGS): Likewise.
369 (videotest_mod_LDFLAGS): Likewise.
370 (bitmap_mod_SOURCES): Likewise.
371 (bitmap_mod_CFLAGS): Likewise.
372 (bitmap_mod_LDFLAGS): Likewise.
373 (tga_mod_SOURCES): Likewise.
374 (tga_mod_CFLAGS): Likewise.
375 (tga_mod_LDFLAGS): Likewise.
376 (jpeg_mod_SOURCES): Likewise.
377 (jpeg_mod_CFLAGS): Likewise.
378 (jpeg_mod_LDFLAGS): Likewise.
379 (png_mod_SOURCES): Likewise.
380 (png_mod_CFLAGS): Likewise.
381 (png_mod_LDFLAGS): Likewise.
382
383 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
384 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
385 (video_mod_SOURCES): Added.
386 (video_mod_CFLAGS): Likewise.
387 (video_mod_LDFLAGS): Likewise.
388 (videotest_mod_SOURCES): Likewise.
389 (videotest_mod_CFLAGS): Likewise.
390 (videotest_mod_LDFLAGS): Likewise.
391 (bitmap_mod_SOURCES): Likewise.
392 (bitmap_mod_CFLAGS): Likewise.
393 (bitmap_mod_LDFLAGS): Likewise.
394 (tga_mod_SOURCES): Likewise.
395 (tga_mod_CFLAGS): Likewise.
396 (tga_mod_LDFLAGS): Likewise.
397 (jpeg_mod_SOURCES): Likewise.
398 (jpeg_mod_CFLAGS): Likewise.
399 (jpeg_mod_LDFLAGS): Likewise.
400 (png_mod_SOURCES): Likewise.
401 (png_mod_CFLAGS): Likewise.
402 (png_mod_LDFLAGS): Likewise.
403 (gfxterm_mod_SOURCES): Likewise.
404 (gfxterm_mod_CFLAGS): Likewise.
405 (gfxterm_mod_LDFLAGS): Likewise.
406
407 * term/gfxterm.c: Removed include to grub/machine/memory.h,
408 grub/machine/console.h.
409
410 2009-01-04 Jerone Young <jerone@gmail.com>
411
412 Make on screen instructions clearer
413
414 Based on patch created by Jidanni <jidanni@jidanni.org>
415
416 * normal/menu.c: print clearer instructions on the screen
417
418 2009-01-02 Colin D Bennett <colin@gibibit.com>
419
420 New font engine.
421
422 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
423 build system and fixed gfxterm.c to work with different sized fonts.
424
425 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
426
427 * configure: Re-generated.
428
429 * DISTLIST: Removed font/manager.c.
430 Added font/font.c.
431 Added font/font_cmd.c.
432
433 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
434 compilation.
435
436 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
437
438 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
439
440 * kern/term.c: Changed users of grub_utf8_to_ucs4.
441
442 * normal/menu.c: Likewise.
443
444 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
445 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
446
447 * include/grub/font.h: Replaced with new file.
448
449 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
450 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
451 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
452 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
453 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
454 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
455 fg_red, fg_green, fg_blue, fg_alpha.
456 (grub_video_adapter): Removed blit_glyph.
457 (grub_video_blit_glyph): Removed.
458
459 * font/manager.c: Removed file.
460
461 * font/font.c: New file.
462
463 * font/font_cmd.c: Likewise.
464
465 * video/video.c (grub_video_blit_glyph): Removed.
466
467 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
468 (grub_video_vbe_map_rgba): Likewise.
469 (grub_video_vbe_unmap_color_int): Likewise.
470 (grub_video_vbe_blit_glyph): Removed.
471 (grub_video_vbe_adapter): Removed blit_glyph.
472
473 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
474 (get_pixel): Likewise.
475 (set_pixel): Likewise.
476
477 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
478
479 * term/gfxterm.c: Adapted to new font engine.
480
481 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
482
483 * term/i386/pc/vga.c: Likewise.
484
485 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
486
487 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
488
489 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
490
491 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
492
493 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
494
495 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
496
497 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
498
499 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
500
501 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
502
503 * util/grub.d/00_header.in: Changed to use new loadfont command.
504
505 * util/grub-mkconfig_lib.in: Changed font extension.
506
507 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
508
509 * util/getroot.c (grub_util_get_grub_dev): Add support for
510 /dev/md/dNNpNN style partitionable mdraid devices.
511
512 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
513
514 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
515 at a time limit of the PXE TFTP API correctly.
516 (grub_pxefs_close): Likewise.
517
518 2008-11-29 Robert Millan <rmh@aybabtu.com>
519
520 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
521 grub_ata_device_initialize() calls.
522
523 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
524
525 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
526 iteration failed.
527 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
528
529 2008-11-28 Robert Millan <rmh@aybabtu.com>
530
531 Fix build on powerpc-ieee1275. Based on patch created by
532 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
533 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
534 `kern/ieee1275/mmap.c'.
535 * include/grub/powerpc/ieee1275/memory.h: New file.
536
537 Provide grub-install on coreboot.
538 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
539 (grub_install_SOURCES): New variable.
540 * util/i386/pc/grub-install.in: Add a few condition checks to make it
541 usable on coreboot.
542
543 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
544
545 * util/grub-fstest.c (grub_term_get_current_input): Change return type
546 to `grub_term_input_t'.
547 (grub_term_get_current_output): Change return type to
548 `grub_term_output_t'.
549
550 2008-11-22 Robert Millan <rmh@aybabtu.com>
551
552 Fix breakage on coreboot due to declaration mismatch.
553 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
554 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
555 grub_vga_text_cls().
556
557 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
558 comments. Avoid copying one more byte than necessary (just in case).
559
560 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
561 to 0x200000 (avoids trouble with some OFW implementations, and matches
562 with the one in Yaboot).
563 Reported by Manoel Abranches
564
565 2008-11-20 Robert Millan <rmh@aybabtu.com>
566
567 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
568 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
569
570 * util/grub-mkconfig_lib.in (grub_warn): New function.
571 (convert_system_path_to_grub_path): Use grub_warn() when issuing
572 warnings, to obtain consistent formatting.
573 * util/grub.d/00_header.in: Likewise.
574 * util/update-grub_lib.in: Likewise.
575
576 * loader/i386/linux.c (allocate_pages): Fix a warning.
577 Move comment text to `#error' stanza.
578
579 Harmonize ieee1275's grub_available_iterate() with the generic
580 grub_machine_mmap_iterate() interface (fixes a recently-introduced
581 build problem on i386-ieee1275):
582 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
583 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
584 parameter `type'. Update all users of this function.
585 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
586 `kern/ieee1275/mmap.c'.
587 * kern/ieee1275/init.c
588 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
589 with ...
590 (grub_machine_mmap_iterate): ... this.
591 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
592 return type to `grub_err_t'. Update all implementations of this
593 function prototype.
594 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
595 Likewise.
596
597 Add `lsmmap' command (lists firmware-provided memory map):
598 * commands/lsmmap.c: New file.
599 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
600 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
601 variables.
602 * conf/powerpc-ieee1275.rmk: Likewise.
603 * conf/i386-coreboot.rmk: Likewise.
604 * conf/i386-ieee1275.rmk: Likewise.
605
606 2008-11-19 Robert Millan <rmh@aybabtu.com>
607
608 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
609 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
610 constraints to initrd allocation (based on code from
611 loader/i386/pc/linux.c). Without them, initrd was allocated too high
612 for Linux to find it.
613
614 2008-11-14 Robert Millan <rmh@aybabtu.com>
615
616 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
617 order to cope with duplicate slashes.
618
619 2008-11-14 Robert Millan <rmh@aybabtu.com>
620
621 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
622 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
623 don't want to mess with lower memory, because it is used in the Linux
624 loader.
625
626 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
627 an appropriate place in lower memory, between 0x10000 and 0x90000,
628 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
629 is in our heap (probably as a result of it being corrupted during
630 decompression). Add #error instance with comment to explain why this
631 loader isn't currently usable on PC/BIOS.
632
633 2008-11-14 Robert Millan <rmh@aybabtu.com>
634
635 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
636 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
637
638 2008-11-12 Robert Millan <rmh@aybabtu.com>
639
640 Make loader/i386/linux.c buildable on i386-pc (although disabled).
641
642 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
643 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
644 from here ...
645 * include/grub/i386/pc/memory.h: ... to here.
646
647 2008-11-12 Robert Millan <rmh@aybabtu.com>
648
649 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
650 split).
651
652 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
653 (grub_console_cur_color, grub_console_real_putchar)
654 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
655 (grub_console_setcolorstate, grub_console_setcolor)
656 (grub_console_getcolor): Move from here ...
657 * include/grub/i386/vga_common.h: ... to here (new file).
658
659 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
660 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
661 `<grub/i386/io.h>'.
662 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
663 `<grub/i386/vga_common.h>'.
664
665 2008-11-12 Robert Millan <rmh@aybabtu.com>
666
667 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
668 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
669 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
670 variables.
671 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
672 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
673
674 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
675 grub_console_init() with call to grub_vga_text_init().
676 (grub_machine_fini): Replace call to
677 grub_console_fini() with call to grub_vga_text_fini() and
678 grub_at_keyboard_fini().
679
680 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
681 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
682 (grub_console_setcolorstate, grub_console_setcolor)
683 (grub_console_getcolor): New function prototypes.
684
685 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
686 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
687 (grub_vga_text_setcursor): Static-ize.
688 (grub_vga_text_term): New structure.
689 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
690
691 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
692 (grub_console_cur_color, grub_console_standard_color)
693 (grub_console_normal_color, grub_console_highlight_color)
694 (map_char, grub_console_putchar, grub_console_getcharwidth)
695 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
696 (grub_console_getcolor): Move from here ...
697 * term/i386/vga_common.c: ... to here (same function names).
698
699 2008-11-12 Robert Millan <rmh@aybabtu.com>
700
701 Use newly-added Multiboot support in coreboot.
702
703 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
704 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
705
706 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
707 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
708 (codestart): Store the MBI in `startup_multiboot_info' when we're
709 being loaded using Multiboot.
710
711 * kern/i386/coreboot/init.c (grub_machine_init): Move
712 grub_at_keyboard_init() call to beginning of function (useful for
713 debugging). Call grub_machine_mmap_init() before attempting to use
714 grub_machine_mmap_iterate().
715 (grub_lower_mem, grub_upper_mem): Move from here ...
716 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
717 here (new file).
718
719 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
720 function prototype.
721
722 2008-11-12 Robert Millan <rmh@aybabtu.com>
723
724 Fix a regression introduced by the at_keyboard.mod split. Because
725 some terminals are default on some platforms and non-default on
726 others, the first terminal being registered determines which is
727 going to be default.
728
729 * kern/term.c (grub_term_register_input): If this is the first
730 terminal being registered, set it as the current one.
731 (grub_term_register_output): Likewise.
732
733 * term/efi/console.c (grub_console_init): Do not call
734 grub_term_set_current_output() or grub_term_set_current_input().
735 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
736 * term/i386/pc/console.c (grub_console_init): Likewise.
737 (grub_console_fini): Do not call grub_term_set_current_input()
738 (but leave grub_term_set_current_output() to restore text mode).
739
740 2008-11-10 Robert Millan <rmh@aybabtu.com>
741
742 * util/grub.d/00_header.in: Add backward compatibility check for
743 versions of terminal.mod that don't understand `terminal_input' or
744 `terminal_output'.
745
746 2008-11-09 Robert Millan <rmh@aybabtu.com>
747
748 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
749 `terminal_input' / `terminal_output', not `terminal'.
750
751 2008-11-08 Robert Millan <rmh@aybabtu.com>
752
753 * Makefile.in (include_DATA): Fix srcdir=. assumption.
754 (DISTCLEANFILES): Add `build_env.mk'.
755
756 2008-11-08 Robert Millan <rmh@aybabtu.com>
757
758 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
759 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
760 members. Update all users.
761 * util/console.c (grub_ncurses_term): Split in ...
762 (grub_ncurses_term_input): ... this, and ...
763 (grub_ncurses_term_output): ... this. Update all users.
764 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
765
766 2008-11-08 Robert Millan <rmh@aybabtu.com>
767
768 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
769 (PKGDATA): Add $(pkgdata_SRCDIR).
770 (pkglib_BUILDDIR): New variable.
771 (pkgdata_SRCDIR): New variable.
772 (build_env.mk): New target.
773 (include_DATA): New variable.
774 (install-local): Install $(include_DATA) files in $(includedir).
775
776 2008-11-07 Pavel Roskin <proski@gnu.org>
777
778 * gendistlist.sh: Use C locale for sorting to ensure consistent
779 output on all systems.
780
781 * util/grub.d/00_header.in: Remove incorrect space before
782 "serial".
783
784 2008-11-07 Robert Millan <rmh@aybabtu.com>
785
786 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
787 per specification.
788 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
789 * loader/multiboot_loader.c (find_multi_boot2_header): New function
790 (based on find_multi_boot1_header).
791 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
792 using find_multi_boot2_header(), and abort if neither Multiboot or
793 Multiboot headers were found.
794
795 2008-11-07 Robert Millan <rmh@aybabtu.com>
796
797 Modularize at_keyboard.mod:
798
799 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
800 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
801 (at_keyboard_mod_LDFLAGS): New variables.
802
803 Actual terminal split:
804
805 * include/grub/term.h (struct grub_term): Split in ...
806 (struct grub_term_input): ... this, and ...
807 (struct grub_term_output): ... this. Update all users.
808 (grub_term_set_current): Split in ...
809 (grub_term_set_current_input): ... this, and ...
810 (grub_term_set_current_output): ... this.
811 (grub_term_get_current): Split in ...
812 (grub_term_get_current_input): ... this, and ...
813 (grub_term_get_current_output): ... this.
814 (grub_term_register): Split in ...
815 (grub_term_register_input): ... this, and ...
816 (grub_term_register_output): ... this.
817 (grub_term_unregister): Split in ...
818 (grub_term_unregister_input): ... this, and ...
819 (grub_term_unregister_output): ... this.
820 (grub_term_iterate): Split in ...
821 (grub_term_iterate_input): ... this, and ...
822 (grub_term_iterate_output): ... this.
823
824 * kern/term.c (grub_term_list): Split in ...
825 (grub_term_list_input): ... this, and ...
826 (grub_term_list_output): ... this. Update all users.
827 (grub_cur_term): Split in ...
828 (grub_cur_term_input): ... this, and ...
829 (grub_cur_term_output): ... this. Update all users.
830 (grub_term_set_current): Split in ...
831 (grub_term_set_current_input): ... this, and ...
832 (grub_term_set_current_output): ... this.
833 (grub_term_get_current): Split in ...
834 (grub_term_get_current_input): ... this, and ...
835 (grub_term_get_current_output): ... this.
836 (grub_term_register): Split in ...
837 (grub_term_register_input): ... this, and ...
838 (grub_term_register_output): ... this.
839 (grub_term_unregister): Split in ...
840 (grub_term_unregister_input): ... this, and ...
841 (grub_term_unregister_output): ... this.
842 (grub_term_iterate): Split in ...
843 (grub_term_iterate_input): ... this, and ...
844 (grub_term_iterate_output): ... this.
845
846 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
847 a check for input and one for output (and only attempt to get keys
848 from user when input works).
849
850 * util/grub-probe.c (grub_term_get_current): Split in ...
851 (grub_term_get_current_input): ... this, and ...
852 (grub_term_get_current_output): ... this.
853 * util/grub-fstest.c: Likewise.
854 * util/i386/pc/grub-setup.c: Likewise.
855 * util/grub-editenv.c: Likewise.
856
857 Portability adjustments:
858
859 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
860 `term/i386/pc/at_keyboard.c'.
861 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
862 grub_keyboard_controller_init() (now handled by terminal .init).
863 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
864 grub_at_keyboard_init().
865 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
866 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
867 at_keyboard.mod via input terminal interface).
868 * include/grub/i386/coreboot/console.h: Convert into a stub for
869 `<grub/i386/pc/console.h>'.
870
871 Migrate full terminals to new API:
872
873 * term/efi/console.c (grub_console_term): Split into ...
874 (grub_console_term_input): ... this, and ...
875 (grub_console_term_output): ... this. Update all users.
876 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
877 (grub_ofconsole_init): Split into ...
878 (grub_ofconsole_init_input): ... this, and ...
879 (grub_ofconsole_init_output): ... this.
880 (grub_ofconsole_term): Split into ...
881 (grub_ofconsole_term_input): ... this, and ...
882 (grub_ofconsole_term_output): ... this. Update all users.
883 * term/i386/pc/serial.c (grub_serial_term): Split into ...
884 (grub_serial_term_input): ... this, and ...
885 (grub_serial_term_output): ... this. Update all users.
886 * term/i386/pc/console.c (grub_console_term): Split into ...
887 (grub_console_term_input): ... this, and ...
888 (grub_console_term_output): ... this. Update all users.
889 (grub_console_term_input): Only enable it on PC/BIOS platform.
890 (grub_console_init): Remove grub_keyboard_controller_init() call.
891
892 Migrate input terminals to new API:
893
894 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
895 `i386' and `i386/pc' to enable build on x86_64 (this driver is
896 i386-specific anyway).
897 (grub_console_checkkey): Rename to ...
898 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
899 users.
900 (grub_keyboard_controller_orig): New variable.
901 (grub_console_getkey): Rename to ...
902 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
903 users.
904 (grub_keyboard_controller_init): Static-ize. Save original
905 controller value so that it can be restored ...
906 (grub_keyboard_controller_fini): ... here (new function).
907 (grub_at_keyboard_term): New structure.
908 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
909 functions.
910
911 Migrate output terminals to new API:
912
913 * term/i386/pc/vga.c (grub_vga_term): Change type to
914 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
915 members. Update all users.
916 * term/gfxterm.c (grub_video_term): Change type to
917 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
918 members. Update all users.
919 * include/grub/i386/pc/console.h (grub_console_checkkey)
920 (grub_console_getkey): Do not export (no longer needed by gfxterm,
921 etc).
922
923 Migrate `terminal' command and userland tools to new API:
924
925 * commands/terminal.c (grub_cmd_terminal): Split into ...
926 (grub_cmd_terminal_input): ... this, and ...
927 (grub_cmd_terminal_output): ... this.
928 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
929 `terminal_input' and `terminal_output'.
930 * util/grub.d/00_header.in: Adjust `terminal' calls to new
931 `terminal_input' / `terminal_output' API.
932 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
933 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
934 provided ${GRUB_TERMINAL}, convert it).
935
936 2008-11-04 Robert Millan <rmh@aybabtu.com>
937
938 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
939 for FreeBSD.
940 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
941
942 2008-11-03 Bean <bean123ch@gmail.com>
943
944 * kern/elf.c (grub_elf32_load): Revert to previous code.
945 (grub_elf64_load): Likewise.
946
947 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
948
949 2008-11-01 Robert Millan <rmh@aybabtu.com>
950
951 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
952 (TARGET_CPPFLAGS): Likewise.
953 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
954
955 2008-11-01 Carles Pina i Estany <carles@pina.cat>
956
957 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
958
959 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
960
961 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
962 addition of objects until the code is not going to be able to fail.
963
964 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
965
966 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
967 (add a missing NULL check, and correct them by moving the pointer
968 operations after the actual check).
969
970 2008-10-29 Robert Millan <rmh@aybabtu.com>
971
972 * util/i386/pc/grub-install.in: Handle empty string as output from
973 make_system_path_relative_to_its_root().
974
975 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
976
977 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
978 circular metadata worst case scenario. If the metadata is circular
979 then copy the wrap in place.
980 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
981 project lib/format_text/layout.h
982 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
983
984 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
985
986 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
987
988 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
989
990 * util/update-grub_lib.in: Mention filename in warning message.
991
992 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
993
994 * NEWS: Update for rename of update-grub to grub-mkconfig.
995
996 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
997
998 * util/update-grub_lib.in: Copy to ...
999 * util/grub-mkconfig_lib.in: ... this. Update all users.
1000 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1001 * util/update-grub.in: Rename to ...
1002 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1003 option. Add `--output' option to allow users to specify the generated
1004 configuration file. Default to stdout.
1005 (update_grub_dir): Rename to ...
1006 (grub_mkconfig_dir): ... this.
1007 (grub_cfg): Default to an empty string.
1008 * conf/common.rmk (update-grub): Rename to ...
1009 (grub-mkconfig): ... this.
1010 (update-grub_lib): Copy to ...
1011 (grub-mkconfig_lib): ... this.
1012 (update-grub_SCRIPTS): Copy to ...
1013 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1014 (update-grub_DATA): Rename to ...
1015 (grub-mkconfig_DATA): ... this.
1016
1017 2008-09-28 Robert Millan <rmh@aybabtu.com>
1018
1019 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1020 to `modified'. Add the real `created' field.
1021 (grub_iso9660_uuid): Use `modified' rather than `created' for
1022 constructing the UUID.
1023
1024 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1025
1026 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1027 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1028
1029 2008-09-28 Bean <bean123ch@gmail.com>
1030
1031 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1032 Thanks to Christian Franke for finding this bug.
1033
1034 2008-09-25 Robert Millan <rmh@aybabtu.com>
1035
1036 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1037 instances of grub_util_get_disk_name() (see previous commit).
1038
1039 2008-09-25 Robert Millan <rmh@aybabtu.com>
1040
1041 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1042 `util/i386/get_disk_name.c'.
1043 * conf/i386-efi.rmk: Likewise.
1044 * conf/x86_64-efi.rmk: Likewise.
1045 * conf/i386-coreboot.rmk: Likewise.
1046 * conf/i386-ieee1275.rmk: Likewise.
1047 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1048 `util/ieee1275/get_disk_name.c'.
1049 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1050 * util/ieee1275/get_disk_name.c: Remove file.
1051 * util/i386/get_disk_name.c: Remove file.
1052 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1053 "hd%d" for device.map entries, rather than using
1054 grub_util_get_disk_name().
1055
1056 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1057
1058 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1059 warning.
1060 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1061
1062 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1063
1064 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1065 Changed to 0x5100.
1066 (GRUB_TERM_PPAGE): Changed to 0x4900.
1067
1068 2008-09-24 Robert Millan <rmh@aybabtu.com>
1069
1070 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1071 macros (they were i386-pc specific).
1072 * include/grub/sparc64/ieee1275/console.h: Likewise.
1073 * include/grub/efi/console.h: Likewise.
1074
1075 2008-09-22 Bean <bean123ch@gmail.com>
1076
1077 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1078 resident and in attribute list.
1079
1080 * include/grub/ntfs.h (BMP_LEN): Removed.
1081
1082 2008-09-22 Bean <bean123ch@gmail.com>
1083
1084 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1085 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1086
1087 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1088 error occurs, as grub_disk_open will call grub_disk_close, which will
1089 call p->close (scsi).
1090
1091 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1092
1093 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1094 (AC_PREREQ): Bumped to 2.59.
1095 (AC_TRY_COMPILE): Replace obsolete macro with ...
1096 (AC_COMPILE_IFELSE): ... this.
1097 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1098 (AC_LINK_IFELSE): ... this.
1099
1100 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1101
1102 * autogen.sh: Add a call to `gendistlist.sh'.
1103
1104 2008-09-19 Christian Franke <franke@computer.org>
1105
1106 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1107 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1108 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1109 Export __enable_execute_stack() to modules.
1110 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1111 New function.
1112
1113 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1114
1115 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1116 Sort the list.
1117
1118 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1119
1120 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1121 #include <grub/util/hostdisk.h>.
1122
1123 2008-09-08 Robert Millan <rmh@aybabtu.com>
1124
1125 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1126 segments when their filesz is zero (grub_file_read() interprets
1127 zero-size as "read until EOF", which results in memory corruption).
1128 Use `lowest_segment' rather than 0 for calculating the current
1129 segment load address.
1130
1131 2008-09-08 Robert Millan <rmh@aybabtu.com>
1132
1133 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1134 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1135 clobbered useful information.
1136
1137 2008-09-08 Robert Millan <rmh@aybabtu.com>
1138
1139 * include/grub/util/biosdisk.h: Move to ...
1140 * include/grub/util/hostdisk.h: ... here. Update all users.
1141 * util/biosdisk.c: Move to ...
1142 * util/hostdisk.c: ... here. Update all users.
1143
1144 2008-09-07 Robert Millan <rmh@aybabtu.com>
1145
1146 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1147 variables.
1148 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1149 and length can be stored directly in the `mbi->mmap_addr' and
1150 `mbi->mmap_length' struct fields.
1151
1152 2008-09-07 Robert Millan <rmh@aybabtu.com>
1153
1154 * conf/i386.rmk: New file. Provides declaration for building
1155 `cpuid.mod'.
1156 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1157 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1158 variables.
1159 Include `conf/i386.mk'.
1160 * conf/i386-efi.rmk: Likewise.
1161 * conf/x86_64-efi.rmk: Likewise.
1162 * conf/i386-coreboot.rmk: Likewise.
1163 * conf/i386-ieee1275.rmk: Likewise.
1164
1165 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1166
1167 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1168 Adds optimization support for BGR based modes.
1169
1170 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1171 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1172 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1173 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1174 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1175 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1176 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1177 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1178 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1179 (grub_video_i386_vbeblit_index_index): Likewise.
1180 (grub_video_i386_vbeblit_replace_directN): Added.
1181 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1182 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1183 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1184 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1185 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1186 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1187 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1188 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1189 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1190 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1191 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1192 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1193 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1194
1195 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1196 (grub_video_i386_vbefill_R8G8B8): Likewise.
1197 (grub_video_i386_vbefill_index): Likewise.
1198 (grub_video_i386_vbefill_direct32): Added.
1199 (grub_video_i386_vbefill_direct24): Likewise.
1200 (grub_video_i386_vbefill_direct16): Likewise.
1201 (grub_video_i386_vbefill_direct8): Likewise.
1202
1203 * include/grub/video.h (grub_video_blit_format): Removed
1204 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1205 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1206 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1207 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1208 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1209
1210 * video/video.c (grub_video_get_blit_format): Updated to use new
1211 blit formats. Added handling for 16 bit color modes.
1212
1213 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1214 fillers.
1215 (common_blitter): Updated to use new blitters.
1216
1217 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1218 Removed.
1219 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1220 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1221 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1222 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1223 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1224 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1225 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1226 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1227 (grub_video_i386_vbeblit_index_index): Likewise.
1228 (grub_video_i386_vbeblit_replace_directN): Added.
1229 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1230 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1231 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1232 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1233 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1234 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1235 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1236 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1237 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1238 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1239 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1240 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1241 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1242
1243 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1244 (grub_video_i386_vbefill_R8G8B8): Likewise.
1245 (grub_video_i386_vbefill_index): Likewise.
1246 (grub_video_i386_vbefill_direct32): Added.
1247 (grub_video_i386_vbefill_direct24): Likewise.
1248 (grub_video_i386_vbefill_direct16): Likewise.
1249 (grub_video_i386_vbefill_direct8): Likewise.
1250
1251 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1252 types.
1253
1254 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1255 types.
1256
1257 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1258 blitter types.
1259
1260 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1261 types.
1262
1263 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1264
1265 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1266 RAID level 1.
1267
1268 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1269
1270 * fs/iso9660.c (grub_iso9660_date): New structure.
1271 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1272 (grub_iso9660_uuid): New function.
1273
1274 2008-09-05 Bean <bean123ch@gmail.com>
1275
1276 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1277
1278 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1279 insensitive bit for names in Win32 and Win32 & DOS namespace.
1280
1281 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1282
1283 * include/grub/types.h (LONG_MAX): Likewise.
1284
1285 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1286
1287 * util/getroot.c: Include <config.h>.
1288 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1289 add support for /dev/md/N devices and handle LVM double dash escaping.
1290
1291 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1292
1293 * config.guess: Update to latest version from config git.
1294 * config.sub: Likewise.
1295
1296 2008-09-03 Robert Millan <rmh@aybabtu.com>
1297
1298 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1299 `disk->total_sectors'.
1300
1301 2008-09-01 Colin D Bennett <colin@gibibit.com>
1302
1303 * include/grub/normal.h: Fixed incorrect comment for
1304 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1305
1306 2008-09-01 Colin D Bennett <colin@gibibit.com>
1307
1308 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1309 values with defines.
1310
1311 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1312 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1313 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1314 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1315 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1316 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1317 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1318 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1319 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1320 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1321 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1322 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1323 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1324 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1325 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1326 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1327 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1328 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1329 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1330
1331 2008-08-31 Robert Millan <rmh@aybabtu.com>
1332
1333 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1334 declaration.
1335 (grub_multiboot): Fix a few warnings.
1336
1337 2008-08-31 Robert Millan <rmh@aybabtu.com>
1338
1339 * loader/i386/pc/multiboot.c: Update comment not to say that
1340 boot_device support is unimplemented.
1341
1342 2008-08-31 Robert Millan <rmh@aybabtu.com>
1343
1344 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1345 or memory map support are unimplemented.
1346
1347 2008-08-31 Colin D Bennett <colin@gibibit.com>
1348
1349 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1350
1351 2008-08-31 Colin D Bennett <colin@gibibit.com>
1352
1353 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1354 total video memory in 'vbeinfo' output; show color format details for
1355 each video mode.
1356
1357 2008-08-30 Pavel Roskin <proski@gnu.org>
1358
1359 * util/genmoddep.c: Remove for real this time.
1360 * DISTLIST: Remove util/genmoddep.c.
1361
1362 2008-08-30 Robert Millan <rmh@aybabtu.com>
1363
1364 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1365 as required by Multiboot spec (it was already 4-byte aligned, but
1366 only by chance).
1367
1368 2008-08-29 Pavel Roskin <proski@gnu.org>
1369
1370 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1371 * kern/powerpc/ieee1275/startup.S: ... this.
1372 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1373 * DISTLIST: Likewise.
1374
1375 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1376 grub/cpu/kernel.h. Add start label for consistency with other
1377 platforms. Add grub_prefix immediately after start. Add jump
1378 to the code after grub_prefix.
1379 * include/grub/powerpc/kernel.h: Provide valid values for
1380 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1381
1382 2008-08-29 Bean <bean123ch@gmail.com>
1383
1384 * configure.ac: Change host_os to cygwin for mingw.
1385 (asprintf): New check for function.
1386
1387 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1388 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1389
1390 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1391 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1392 sync, sleep and grub_util_get_disk_size for mingw.
1393
1394 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1395 to get size in mingw.
1396 (open_device): Use flag O_BINARY if it's defined.
1397 (find_root_device): Add dummy code for mingw.
1398
1399 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1400 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1401 (get_scsi_disk_name): Return 0 for mingw.
1402
1403 * util/hostfs.c: #include <grub/util/misc.h>.
1404 (grub_hostfs_open): Use "rb" flag to open file, use
1405 grub_util_get_disk_size to get disk size for mingw.
1406
1407 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1408 (asprintf): New function if HAVE_ASPRINTF is not set.
1409 (sync): New function for mingw.
1410 (sleep): Likewise.
1411 (grub_util_get_disk_size): Likewise.
1412
1413 2008-08-28 Pavel Roskin <proski@gnu.org>
1414
1415 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1416 kern/time.c.
1417
1418 2008-08-28 Robert Millan <rmh@aybabtu.com>
1419
1420 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1421
1422 2008-08-28 Robert Millan <rmh@aybabtu.com>
1423
1424 Change find_grub_drive() syntax so it doesn't prevent it from
1425 detecting NULL names as errors.
1426
1427 * util/biosdisk.c (find_grub_drive): Move free slot search code
1428 from here ...
1429 (find_free_slot): ... to here.
1430 (read_device_map): Use find_free_slot() to search for free slots.
1431
1432 2008-08-27 Marco Gerards <marco@gnu.org>
1433
1434 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1435 (scsi_mod_SOURCES): New variable.
1436 (scsi_mod_CFLAGS): Likewise
1437 (scsi_mod_LDFLAGS): Likewise.
1438
1439 * disk/scsi.c: New file.
1440
1441 * include/grub/scsi.h: Likewise.
1442
1443 * include/grub/scsicmd.h: Likewise.
1444
1445 * disk/ata.c: Include <grub/scsi.h>.
1446 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1447 instead.
1448 (grub_ata_iterate): Skip ATAPI devices.
1449 (grub_ata_open): Only handle ATAPI devices.
1450 (struct grub_atapi_read): Removed.
1451 (grub_atapi_readsector): Likewise.
1452 (grub_ata_read): No longer handle ATAPI devices.
1453 (grub_ata_write): Likewise.
1454 (grub_atapi_iterate): New function.
1455 (grub_atapi_read): Likewise.
1456 (grub_atapi_write): Likewise.
1457 (grub_atapi_open): Likewise.
1458 (grub_atapi_close): Likewise.
1459 (grub_atapi_dev): New variable.
1460 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1461 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1462
1463 * include/grub/disk.h (enum grub_disk_dev_id): Add
1464 `GRUB_DISK_DEVICE_SCSI_ID'.
1465
1466 2008-08-26 Robert Millan <rmh@aybabtu.com>
1467
1468 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1469 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1470 descriptive.
1471
1472 2008-08-23 Bean <bean123ch@gmail.com>
1473
1474 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1475 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1476 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1477 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1478 dm_nv.mod.
1479 (raid5rec_mod_SOURCES): New macro.
1480 (raid5rec_mod_CFLAGS): Likewise.
1481 (raid5rec_mod_LDFLAGS): Likewise.
1482 (raid6rec_mod_SOURCES): Likewise.
1483 (raid6rec_mod_CFLAGS): Likewise.
1484 (raid6rec_mod_LDFLAGS): Likewise.
1485 (mdraid_mod_SOURCES): Likewise.
1486 (mdraid_mod_CFLAGS): Likewise.
1487 (mdraid_mod_LDFLAGS): Likewise.
1488 (dm_nv_mod_SOURCES): Likewise.
1489 (dm_nv_mod_CFLAGS): Likewise.
1490 (dm_nv_mod_LDFLAGS): Likewise.
1491
1492 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1493 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1494 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1495
1496 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1497 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1498
1499 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1500
1501 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1502
1503 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1504
1505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1506
1507 * disk/raid5_recover.c: New file.
1508
1509 * disk/raid6_recover.c: Likewise.
1510
1511 * disk/mdraid_linux.c: Likewise.
1512
1513 * disk/dmraid_nvidia.c: Likewise.
1514
1515 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1516 ULONG_MAX.
1517
1518 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1519 calculate the size of raid device.
1520 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1521 different layout of raid5.
1522 (grub_raid_scan_device): Remove code specific to mdraid.
1523 (grub_raid_list): New variable.
1524 (free_array): New function.
1525 (grub_raid_register): Likewise.
1526 (grub_raid_unregister): Likewise.
1527 (grub_raid_rescan): Likewise.
1528 (GRUB_MOD_INIT): Don't iterate device here.
1529 (GRUB_MOD_FINI): Use free_array to release resource.
1530
1531 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1532 (grub_raid5_recover_func_t): New function variable type.
1533 (grub_raid6_recover_func_t): Likewise.
1534 (grub_raid5_recover_func): New variable.
1535 (grub_raid6_recover_func): Likewise.
1536 (grub_raid_register): New function.
1537 (grub_raid_unregister): Likewise.
1538 (grub_raid_rescan): Likewise.
1539 (grub_raid_block_xor): Likewise.
1540
1541 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1542 (CMD_CRC): New macro.
1543 (part): Removed.
1544 (read_file): Handle device as well as file.
1545 (cmd_crc): New function.
1546 (fstest): Handle multiple disks.
1547 (options): Remove part, raw and long, add root and diskcount.
1548 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1549 (main): Find the first non option entry and ignore subsequent options,
1550 add handling for the new options, support multiple disks.
1551
1552 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1553
1554 2008-08-23 Bean <bean123ch@gmail.com>
1555
1556 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1557
1558 * genfslist.sh: Ignore kernel.mod.
1559
1560 * genpartmaplist.sh: Likewise.
1561
1562 2008-08-23 Robert Millan <rmh@aybabtu.com>
1563
1564 * util/getroot.c (find_root_device): Skip anything that starts with
1565 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1566
1567 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1568
1569 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1570 * util/grub.d/00_header.in: Allow the administrator to change default
1571 gfxmode via ${GRUB_GFXMODE}.
1572
1573 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1574
1575 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1576
1577 2008-08-21 Robert Millan <rmh@aybabtu.com>
1578
1579 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1580 loader.
1581 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1582 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1583
1584 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1585
1586 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1587 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1588
1589 2008-08-19 Robert Millan <rmh@aybabtu.com>
1590
1591 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1592 (struct grub_virtual_screen): Remove `cursor_color'.
1593 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1594 initialization.
1595 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1596
1597 2008-08-18 Robert Millan <rmh@aybabtu.com>
1598
1599 Unify (identical) linux_normal.c files.
1600 * loader/i386/efi/linux_normal.c: Move from here ...
1601 * loader/linux_normal.c: ... to here. Update all users.
1602 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1603 * loader/i386/ieee1275/linux_normal.c: Likewise.
1604
1605 2008-08-18 Robert Millan <rmh@aybabtu.com>
1606
1607 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1608 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1609 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1610 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1611 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1612 New macros.
1613 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1614 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1615 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1616 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1617 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1618 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1619 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1620 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1621 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1622 portably using grub_getxy().
1623 Replace `-EFI' with `-bzImage' in boot message.
1624
1625 2008-08-17 Robert Millan <rmh@aybabtu.com>
1626
1627 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1628
1629 2008-08-17 Robert Millan <rmh@aybabtu.com>
1630
1631 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1632
1633 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1634 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1635 (grub_machine_mmap_iterate): New function declaration.
1636 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1637 structure.
1638 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1639 macros.
1640
1641 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1642 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1643 Move e820 parsing from here ...
1644 * kern/i386/pc/mmap.c: New file.
1645 (grub_machine_mmap_iterate): ... to here.
1646
1647 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1648 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1649 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1650 (grub_available_iterate): Redeclare to return `void', and redeclare
1651 its hook to use grub_uint64_t as addr and size parameters, and rename
1652 to ...
1653 (grub_machine_mmap_iterate): ... this. Update all users.
1654
1655 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1656 to make it more readable. Rename to ...
1657 (grub_machine_mmap_iterate): ... this.
1658
1659 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1660 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1661 (grub_multiboot): Allocate an extra region after the payload, and fill
1662 it with a Multiboot memory map. Adjust a.out loader to calculate size
1663 with the extra space.
1664 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1665 with the extra space.
1666
1667 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1668
1669 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1670
1671 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1672
1673 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1674 mdate-sh to the list `find' searches for.
1675 * DISTLIST: Regenerated.
1676
1677 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1678
1679 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1680 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1681 genmoddep.awk, gensymlist.sh.in.
1682 (DISTDIRS): Add bus, docs, hook, lib.
1683 * DISTLIST: Regenerated.
1684 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1685
1686 2008-08-16 Robert Millan <rmh@aybabtu.com>
1687
1688 * disk/raid.c (grub_raid_init): Handle/report errors set by
1689 grub_device_iterate().
1690 * disk/lvm.c (grub_lvm_init): Likewise.
1691
1692 2008-08-15 Bean <bean123ch@gmail.com>
1693
1694 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1695 and datehook.mod.
1696 (datetime_mod_SOURCES): New macro.
1697 (datetime_mod_CFLAGS): Likewise.
1698 (datetime_mod_LDFLAGS): Likewise.
1699 (date_mod_SOURCES): Likewise.
1700 (date_mod_CFLAGS): Likewise.
1701 (date_mod_LDFLAGS): Likewise.
1702 (datehook_mod_SOURCES): Likewise.
1703 (datehook_mod_CFLAGS): Likewise.
1704 (datehook_mod_LDFLAGS): Likewise.
1705
1706 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1707 and datehook.mod.
1708 (datetime_mod_SOURCES): New macro.
1709 (datetime_mod_CFLAGS): Likewise.
1710 (datetime_mod_LDFLAGS): Likewise.
1711 (date_mod_SOURCES): Likewise.
1712 (date_mod_CFLAGS): Likewise.
1713 (date_mod_LDFLAGS): Likewise.
1714 (datehook_mod_SOURCES): Likewise.
1715 (datehook_mod_CFLAGS): Likewise.
1716 (datehook_mod_LDFLAGS): Likewise.
1717
1718 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1719 and datehook.mod.
1720 (datetime_mod_SOURCES): New macro.
1721 (datetime_mod_CFLAGS): Likewise.
1722 (datetime_mod_LDFLAGS): Likewise.
1723 (date_mod_SOURCES): Likewise.
1724 (date_mod_CFLAGS): Likewise.
1725 (date_mod_LDFLAGS): Likewise.
1726 (datehook_mod_SOURCES): Likewise.
1727 (datehook_mod_CFLAGS): Likewise.
1728 (datehook_mod_LDFLAGS): Likewise.
1729
1730 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1731 and datehook.mod.
1732 (datetime_mod_SOURCES): New macro.
1733 (datetime_mod_CFLAGS): Likewise.
1734 (datetime_mod_LDFLAGS): Likewise.
1735 (date_mod_SOURCES): Likewise.
1736 (date_mod_CFLAGS): Likewise.
1737 (date_mod_LDFLAGS): Likewise.
1738 (datehook_mod_SOURCES): Likewise.
1739 (datehook_mod_CFLAGS): Likewise.
1740 (datehook_mod_LDFLAGS): Likewise.
1741
1742 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1743 and datehook.mod.
1744 (datetime_mod_SOURCES): New macro.
1745 (datetime_mod_CFLAGS): Likewise.
1746 (datetime_mod_LDFLAGS): Likewise.
1747 (date_mod_SOURCES): Likewise.
1748 (date_mod_CFLAGS): Likewise.
1749 (date_mod_LDFLAGS): Likewise.
1750 (datehook_mod_SOURCES): Likewise.
1751 (datehook_mod_CFLAGS): Likewise.
1752 (datehook_mod_LDFLAGS): Likewise.
1753
1754 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1755
1756 * commands/date.c: New file.
1757
1758 * hook/datehook.c: Likewise.
1759
1760 * include/grub/lib/datetime.h: Likewise.
1761
1762 * include/grub/i386/cmos.h: Likewise.
1763
1764 * lib/datetime.c: Likewise.
1765
1766 * lib/i386/datetime.c: Likewise.
1767
1768 * lib/efi/datetime.c: Likewise.
1769
1770 2008-08-14 Robert Millan <rmh@aybabtu.com>
1771
1772 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1773 (grub_mkelfimage_SOURCES): New variable.
1774 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1775
1776 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1777 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1778 * conf/powerpc-ieee1275.rmk: Likewise.
1779 * conf/i386-ieee1275.rmk: Likewise.
1780
1781 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1782 * kern/i386/coreboot/init.c: Likewise.
1783
1784 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1785 with `<grub/cpu/kernel.h>'.
1786 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1787 to ...
1788 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1789 * kern/i386/coreboot/startup.S: Likewise.
1790
1791 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1792 (GRUB_MOD_GAP): Remove.
1793 * include/grub/powerpc/kernel.h: New file.
1794 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1795 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1796 * include/grub/i386/kernel.h: New file.
1797 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1798 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1799 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1800
1801 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1802 `grub-mkelfimage'.
1803 Use --directory when invoking grub_mkimage.
1804
1805 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1806 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1807 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1808 and GRUB_KERNEL_CPU_PREFIX.
1809
1810 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1811
1812 * include/grub/err.h (grub_err_printf): New function prototype.
1813 * util/misc.c (grub_err_printf): New function.
1814 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1815 grub_printf.
1816 * kern/err.c (grub_print_error): Use grub_err_printf.
1817
1818 2008-08-13 Robert Millan <rmh@aybabtu.com>
1819
1820 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1821
1822 2008-08-13 Robert Millan <rmh@aybabtu.com>
1823
1824 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1825 boot entry.
1826
1827 2008-08-12 Robert Millan <rmh@aybabtu.com>
1828
1829 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1830 of the relocation code from here ...
1831 (grub_multiboot): ... to here.
1832 (forward_relocator, backward_relocator): Move from here ...
1833 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1834 (grub_multiboot_backward_relocator): ... to here.
1835 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1836 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1837 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1838 (grub_multiboot_forward_relocator_end)
1839 (grub_multiboot_backward_relocator)
1840 (grub_multiboot_backward_relocator_end): New variables.
1841
1842 2008-08-12 Bean <bean123ch@gmail.com>
1843
1844 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1845
1846 2008-08-11 Robert Millan <rmh@aybabtu.com>
1847
1848 * kern/i386/linuxbios/startup.S: Move from here ...
1849 * kern/i386/coreboot/startup.S: ... to here.
1850
1851 * kern/i386/linuxbios/init.c: Move from here ...
1852 * kern/i386/coreboot/init.c: ... to here.
1853
1854 * kern/i386/linuxbios/table.c: Move from here ...
1855 * kern/i386/coreboot/mmap.c: ... to here.
1856
1857 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1858
1859 2008-08-11 Robert Millan <rmh@aybabtu.com>
1860
1861 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1862 errors. Leave it to the upper layer to handle them.
1863
1864 2008-08-09 Christian Franke <franke@computer.org>
1865
1866 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1867 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1868 Install `grub.d/10_windows' only on Cygwin.
1869 * configure.ac: Add subst of `target_os'.
1870 Check `target_os' also before setting TARGET_OBJ2ELF.
1871 Add `--enable-grub-pe2elf'.
1872
1873 2008-08-08 Robert Millan <rmh@aybabtu.com>
1874
1875 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1876 (grub_last_time): Change type to grub_uint64_t.
1877 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1878 (grub_disk_close): Likewise.
1879
1880 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1881 (run_menu): Migrate code from to using grub_get_time_ms().
1882
1883 * util/misc.c (grub_get_time_ms): New function.
1884
1885 2008-08-08 Marco Gerards <marco@gnu.org>
1886
1887 * disk/ata.c (grub_ata_regget): Change return type to
1888 `grub_uint8_t'.
1889 (grub_ata_regget2): Likewise.
1890 (grub_ata_wait_status): New function.
1891 (grub_ata_wait_busy): Removed function, updated all users to use
1892 `grub_ata_wait_status'.
1893 (grub_ata_wait_drq): Likewise.
1894 (grub_ata_cmd): New function.
1895 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1896 error handling.
1897 (grub_ata_pio_write): Add error handling.
1898 (grub_atapi_identify): Likewise.
1899 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1900 handling.
1901 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1902 handling. Actually use the detected registers. Reorder the
1903 detection logic such that it is easier to read.
1904 (grub_ata_pciinit): Do not assign the same ID to each controller.
1905 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1906 handling.
1907 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1908
1909 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1910
1911 2008-08-08 Marco Gerards <marco@gnu.org>
1912
1913 * NEWS: Update.
1914
1915 2008-08-07 Bean <bean123ch@gmail.com>
1916
1917 * include/grub/x86_64/pci.h: New file.
1918
1919 2008-08-07 Christian Franke <franke@computer.org>
1920
1921 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1922 (TIMER2_GATE): Likewise.
1923 (grub_pit_wait): Add enable/disable of the timer2 gate
1924 bit of port 0x61. This fixes a possible infinite loop.
1925
1926 2008-08-07 Bean <bean123ch@gmail.com>
1927
1928 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1929 kern/i386/tsc.c and kern/i386/pit.c.
1930
1931 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1932 x86_64 platform.
1933
1934 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1935 <grub/i386/tsc.h>.
1936
1937 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1938
1939 2008-08-07 Bean <bean123ch@gmail.com>
1940
1941 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1942
1943 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1944
1945 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1946 multiple inclusion. Add #include <grub/types.h>.
1947
1948 2008-08-06 Christian Franke <franke@computer.org>
1949
1950 * conf/common.rmk: Build and install `10_windows'.
1951 * util/grub.d/10_windows.in: New script.
1952
1953 2008-08-06 Pavel Roskin <proski@gnu.org>
1954
1955 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1956
1957 2008-08-06 Robert Millan <rmh@aybabtu.com>
1958
1959 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1960 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1961
1962 2008-08-06 Bean <bean123ch@gmail.com>
1963
1964 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1965 (grub_pxefs_fs_int): Remove dummy definition.
1966 (grub_pxefs_open): Use data->block_size to store the current block
1967 size setting.
1968 (grub_pxefs_read): Use block size stored in data->block_size. As the
1969 value of grub_pxe_blksize can be changed after the file is opened.
1970
1971 2008-08-06 Bean <bean123ch@gmail.com>
1972
1973 * fs/i386/pc/pxe.c (curr_file): new variable.
1974 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1975 require the dummy internal file system anymore.
1976 (grub_pxefs_read): Removed.
1977 (grub_pxefs_close): Likewise.
1978 (grub_pxefs_fs_int): Likewise.
1979 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1980 connection when we switch file.
1981 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1982
1983 2008-08-06 Robert Millan <rmh@aybabtu.com>
1984
1985 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1986 `halt.mod'.
1987 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1988 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1989
1990 * kern/i386/halt.c: New file.
1991 * kern/i386/reboot.c: Likewise.
1992 * include/grub/i386/reboot.h: Likewise.
1993 * include/grub/i386/halt.h: Likewise.
1994
1995 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1996 Include `<grub/cpu/halt.h>'.
1997 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1998 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1999
2000 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2001 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2002 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2003 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2004 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2005 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2006 from here ...
2007 * include/grub/i386/at_keyboard.h: ... to here.
2008
2009 2008-08-05 Robert Millan <rmh@aybabtu.com>
2010
2011 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2012 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2013 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2014 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2015 `kern/generic/millisleep.c'.
2016
2017 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2018 instead of grub_get_rtc().
2019 (grub_tsc_init): Initialize `tsc_boot_time'.
2020
2021 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2022 (grub_machine_init): Use grub_tsc_init() rather than
2023 installing an RTC-based handler via grub_install_get_time_ms().
2024
2025 * kern/i386/pit.c: New file.
2026 * include/grub/i386/pit.h: Likewise.
2027
2028 2008-08-05 Bean <bean123ch@gmail.com>
2029
2030 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2031
2032 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2033 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2034 (pxe_mod_SOURCES): New macro.
2035 (pxe_mod_CFLAGS): Likewise.
2036 (pxe_mod_LDFLAGS): Likewise.
2037 (pxecmd_mod_SOURCES): Likewise.
2038 (pxecmd_mod_CFLAGS): Likewise.
2039 (pxecmd_mod_LDFLAGS): Likewise.
2040
2041 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2042 (grub_pxe_call): Likewise.
2043
2044 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2045
2046 * commands/i386/pc/pxecmd.c: New file.
2047
2048 * fs/i386/pc/pxe.c: Likewise.
2049
2050 * include/grub/i386/pc/pxe.h: Likewise.
2051
2052 2008-08-05 Bean <bean123ch@gmail.com>
2053
2054 * util/console.c (grub_console_cur_color): New variable.
2055 (grub_console_standard_color): Likewise.
2056 (grub_console_normal_color): Likewise.
2057 (grub_console_highlight_color): Likewise.
2058 (color_map): Likewise.
2059 (use_color): Likewise.
2060 (NUM_COLORS): New macro.
2061 (grub_ncurses_setcolorstate): Handle color properly.
2062 (grub_ncurses_setcolor): Don't change color here, just remember the
2063 settings, color will be set in grub_ncurses_setcolorstate.
2064 (grub_ncurses_getcolor): New function.
2065 (grub_ncurses_init): Initialize color pairs.
2066 (grub_ncurses_term): New member grub_ncurses_getcolor.
2067
2068 2008-08-05 Colin D Bennett <colin@gibibit.com>
2069
2070 High resolution timer support. Implemented for x86 CPUs using TSC.
2071 Extracted generic grub_millisleep() so it's linked in only as needed.
2072 This requires a Pentium compatible CPU; if the RDTSC instruction is
2073 not supported, then it falls back on the generic grub_get_time_ms()
2074 implementation that uses the machine's RTC.
2075
2076 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2077 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2078 `kern/generic/millisleep.c'.
2079
2080 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2081 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2082
2083 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2084 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2085
2086 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2087
2088 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2089 `kern/generic/millisleep.c'.
2090
2091 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2092
2093 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2094
2095 * kern/generic/rtc_get_time_ms.c: New file.
2096
2097 * kern/generic/millisleep.c: New file.
2098
2099 * kern/misc.c: Don't include
2100 <kern/time.h> anymore.
2101 (grub_millisleep_generic): Removed.
2102
2103 * commands/sleep.c (grub_interruptible_millisleep): Uses
2104 grub_get_time_ms() instead of grub_get_rtc().
2105
2106 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2107 function.
2108 (grub_cpu_is_cpuid_supported): New inline function.
2109 (grub_cpu_is_tsc_supported): New inline function.
2110 (grub_tsc_init): New function prototype.
2111 (grub_tsc_get_time_ms): New function prototype.
2112
2113 * kern/i386/tsc.c (grub_get_time_ms): New file.
2114
2115 * include/grub/time.h: Include <grub/types.h.
2116 (grub_millisleep_generic): Removed.
2117 (grub_get_time_ms): New prototype.
2118 (grub_install_get_time_ms): New prototype.
2119 (grub_rtc_get_time_ms): New prototype.
2120
2121 * kern/time.c (grub_get_time_ms): New function.
2122 (grub_install_get_time_ms): New function.
2123
2124 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2125 <grub/time.h> anymore.
2126 (grub_millisleep): Removed.
2127 (grub_machine_init): Call grub_tsc_init.
2128
2129 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2130 get_time_ms() implementation.
2131
2132 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2133 (ieee1275_get_time_ms): New function.
2134 (grub_machine_init): Install get_time_ms() implementation.
2135
2136 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2137 (grub_machine_init): Call grub_tsc_init().
2138 (grub_millisleep): Removed.
2139
2140 * kern/ieee1275/init.c (grub_millisleep): Removed.
2141 (grub_machine_init): Install ieee1275_get_time_ms()
2142 implementation.
2143 (ieee1275_get_time_ms): New function.
2144 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2145 real work.
2146
2147 2008-08-05 Marco Gerards <marco@gnu.org>
2148
2149 * disk/ata.c: Include <grub/pci.h>.
2150 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2151 (grub_ata_initialize): Rewritten.
2152 (grub_ata_device_initialize): New function.
2153
2154 2008-08-04 Pavel Roskin <proski@gnu.org>
2155
2156 * kern/main.c: Include grub/mm.h.
2157
2158 2008-08-04 Robert Millan <rmh@aybabtu.com>
2159
2160 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2161 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2162 corruption problem).
2163
2164 2008-08-04 Robert Millan <rmh@aybabtu.com>
2165
2166 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2167 warnings introduced in my last commit.
2168
2169 2008-08-03 Robert Millan <rmh@aybabtu.com>
2170
2171 Make PCI available on all i386 architectures.
2172
2173 * include/grub/i386/pc/pci.h: Move from here ...
2174 * include/grub/i386/pci.h: ... to here.
2175
2176 * include/grub/i386/pc/pci.h: Remove.
2177 * include/grub/i386/efi/pci.h: Remove.
2178 * include/grub/x86_64/efi/pci.h: Remove.
2179
2180 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2181 `<grub/cpu/pci.h>'.
2182
2183 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2184 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2185 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2186
2187 * conf/i386-ieee1275.rmk: Likewise.
2188
2189 2008-08-03 Robert Millan <rmh@aybabtu.com>
2190
2191 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2192 (grub_console_setcursor): Make it possible to set cursor off.
2193
2194 2008-08-03 Robert Millan <rmh@aybabtu.com>
2195
2196 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2197 of modules instead of assuming which platform provides what.
2198 * util/update-grub.in: Likewise.
2199
2200 2008-08-03 Robert Millan <rmh@aybabtu.com>
2201
2202 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2203 instead of `grub_install_dos_part' to determine whether a drive needs
2204 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2205 because it can be overridden when loading GRUB via Multiboot).
2206
2207 2008-08-02 Robert Millan <rmh@aybabtu.com>
2208
2209 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2210
2211 2008-08-02 Robert Millan <rmh@aybabtu.com>
2212
2213 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2214 of informational grub_dprintf() calls.
2215
2216 2008-08-02 Robert Millan <rmh@aybabtu.com>
2217
2218 * disk/memdisk.c (memdisk_size): Don't initialize.
2219 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2220
2221 * include/grub/i386/pc/kernel.h
2222 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2223 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2224 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2225 (grub_arch_memdisk_size): Remove.
2226
2227 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2228 field (was only used to transfer a constant). Add `type' field to
2229 support multiple module types.
2230 (grub_module_iterate): New function.
2231
2232 * kern/device.c (grub_device_open): Do not hide error messages
2233 when grub_disk_open() fails. Use grub_print_error() instead.
2234
2235 * kern/i386/pc/init.c (grub_arch_modules_addr)
2236 (grub_arch_memdisk_size): Remove functions.
2237 (grub_arch_modules_addr): Return the module address in high memory
2238 (now that it isn't copied anymore).
2239
2240 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2241 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2242 decompression routine (grub_total_module_size already includes that
2243 now). Don't copy modules back to low memory.
2244
2245 * kern/main.c: Include `<grub/mm.h>'.
2246 (grub_load_modules): Split out (and use) ...
2247 (grub_module_iterate): ... this function, which iterates through
2248 module objects and runs a hook.
2249 Comment out grub_mm_init_region() call, as it would cause non-ELF
2250 modules to be overwritten.
2251
2252 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2253 the memdisk image in its own region, make it part of the module list.
2254 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2255 (main): Parse --memdisk|-m option, and pass user-provided path as
2256 parameter to generate_image().
2257 (add_segments): Pass `memdisk_path' down to load_modules().
2258 (load_modules): Embed memdisk image in module section when requested.
2259 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2260 `header.type' instead of `header.offset'.
2261
2262 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2263 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2264 (memdisk_mod_LDFLAGS): New variables.
2265 * conf/i386-coreboot.rmk: Likewise.
2266 * conf/i386-ieee1275.rmk: Likewise.
2267
2268 2008-08-02 Robert Millan <rmh@aybabtu.com>
2269
2270 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2271 (backward_relocator): New variables. Used to allocate and relocate
2272 the payload, respectively.
2273 (grub_multiboot_load_elf32): Load into heap instead of requested
2274 address, install the appropriate relocator code in each bound of
2275 the payload, and set the entry point such that
2276 grub_multiboot_real_boot() will jump to one of them.
2277
2278 * kern/i386/loader.S (grub_multiboot_payload_size)
2279 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2280 (grub_multiboot_payload_entry_offset): New variables.
2281 (grub_multiboot_real_boot): Set cpu context to what the relocator
2282 expects, and jump to the relocator instead of the payload.
2283
2284 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2285 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2286 (grub_multiboot_payload_entry_offset): Export.
2287
2288 2008-08-01 Bean <bean123ch@gmail.com>
2289
2290 * normal/menu_entry.c (editor_getline): Don't return the original
2291 string as result, as it will be released by lexer once it has done
2292 using it.
2293
2294 2008-08-01 Robert Millan <rmh@aybabtu.com>
2295
2296 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2297 within menuentries, not before them.
2298 util/grub.d/10_hurd.in: Likewise.
2299
2300 2008-08-01 Bean <bean123ch@gmail.com>
2301
2302 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2303 (bufio_mod_SOURCES): New macro.
2304 (bufio_mod_CFLAGS): Likewise.
2305 (bufio_mod_LDFLAGS): Likewise.
2306
2307 * include/grub/bufio.h: New file.
2308
2309 * io/bufio.c: Likewise.
2310
2311 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2312 (grub_video_reader_png): Use grub_buffile_open to open file.
2313
2314 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2315 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2316
2317 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2318 (grub_video_reader_tga): Use grub_buffile_open to open file.
2319
2320 * font/manager.c: Include <grub/bufio.h>.
2321 (add_font): Use grub_buffile_open to open file.
2322
2323 2008-07-31 Robert Millan <rmh@aybabtu.com>
2324
2325 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2326 ELF segments, use a macro for arbitrarily accessing any of them instead
2327 of preparing a pointer that allows access to one at a time.
2328 (grub_multiboot_load_elf64): Likewise.
2329
2330 2008-07-31 Bean <bean123ch@gmail.com>
2331
2332 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2333 GRUB_KERNEL_MACHINE_DATA_END.
2334
2335 2008-07-30 Robert Millan <rmh@aybabtu.com>
2336
2337 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2338 Increase from 0x50 to 0x60.
2339 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2340 use UUIDs to identify the root drive for them. If that's not
2341 possible, abort.
2342 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2343 check, for cross-disk installs.
2344
2345 2008-07-30 Robert Millan <rmh@aybabtu.com>
2346
2347 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2348 is non-empty, use it to set the `prefix' environment variable instead
2349 of the usual approach.
2350 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2351 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2352 environment variable instead of dummy make_install_device().
2353
2354 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2355 (start): Insert a data section, with `grub_prefix' variable.
2356 * kern/i386/linuxbios/startup.S: Likewise.
2357
2358 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2359 New variable reference.
2360 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2361 New macro. Defines offset of `grub_prefix' within startup.S (relative
2362 to `start').
2363 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2364 section within startup.S (relative to `start').
2365 * include/grub/i386/coreboot/kernel.h: Likewise.
2366
2367 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2368 Overwrite grub_prefix with its contents, at the beginning of the
2369 first segment.
2370 (main): Understand -p|--prefix.
2371
2372 2008-07-30 Robert Millan <rmh@aybabtu.com>
2373
2374 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2375
2376 2008-07-30 Robert Millan <rmh@aybabtu.com>
2377
2378 * term/i386/pc/vga_text.c (grub_console_cls): Use
2379 grub_console_gotoxy() to go back to beginning of the screen.
2380 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2381
2382 2008-07-29 Christian Franke <franke@computer.org>
2383
2384 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2385 Add conversion of emulated mount points on Cygwin.
2386
2387 2008-07-29 Christian Franke <franke@computer.org>
2388
2389 * util/update-grub.in: Add a check for admin
2390 group on Cygwin.
2391 Remove old `grub.cfg.new' before creation.
2392 Add `-f' to `mv' to handle the different filesystem
2393 semantics of Windows.
2394
2395 2008-07-29 Bean <bean123ch@gmail.com>
2396
2397 * normal/main.c (get_line): Fix buffer overflow bug.
2398
2399 2008-07-28 Robert Millan <rmh@aybabtu.com>
2400
2401 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2402 (struct grub_apple_header): New struct. Describes the layout of
2403 the partmap header.
2404 (apple_partition_map_iterate): Check the header magic as well as the
2405 partition magic (which was already being checked).
2406
2407 2008-07-28 Pavel Roskin <proski@gnu.org>
2408
2409 * genmk.rb: Add a warning to the beginning of the output that
2410 it's a generated file and should not be edited.
2411
2412 2008-07-28 Robert Millan <rmh@aybabtu.com>
2413
2414 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2415 with the same number are found, just use issue a warning with
2416 grub_dprintf(), as this error has been reported to be non-fatal.
2417
2418 2008-07-27 Robert Millan <rmh@aybabtu.com>
2419
2420 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2421 information.
2422
2423 2008-07-27 Bean <bean123ch@gmail.com>
2424
2425 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2426 (grub_fat_find_dir): Ignore case when comparing filename.
2427
2428 2008-07-27 Bean <bean123ch@gmail.com>
2429
2430 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2431 smallino, as it's more descriptive, and i8count can be confused with
2432 the other field count.
2433 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2434 inode type.
2435
2436 2008-07-27 Bean <bean123ch@gmail.com>
2437
2438 * commands/crc.c: New file.
2439
2440 * lib/crc.c: Likewise.
2441
2442 * include/grub/lib/crc.h: Likewise.
2443
2444 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2445
2446 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2447 (hexdump): Move this function to ...
2448
2449 * lib/hexdump.c: ... here.
2450
2451 * include/grub/hexdump.h: Renamed to ...
2452
2453 * include/grub/lib/hexdump.h: ... this.
2454
2455 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2456
2457 * util/grub-editenv.c: Likewise.
2458
2459 * include/envblk.h: Renamed to ...
2460
2461 * include/lib/envblk.h: ... this.
2462
2463 * util/envblk.c: Renamed to ...
2464
2465 * lib/envblk.c: ... this.
2466
2467 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2468 lib/hexdump.c.
2469 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2470 (pkglib_MODULES): Add crc.mod.
2471 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2472 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2473 (crc_mod_SOURCES): New macro.
2474 (crc_mod_CFLAGS): Likewise.
2475 (crc_mod_LDFLAGS): Likewise.
2476
2477 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2478
2479 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2480
2481 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2482
2483 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2484
2485 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2486
2487 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
2488
2489 * commands/help.c: Include <grub/term.h>.
2490 (TERM_WIDTH): Removed. Updated all users.
2491
2492 2008-07-27 Pavel Roskin <proski@gnu.org>
2493
2494 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2495 spurious warnings about a comment within a comment.
2496
2497 2008-07-25 Robert Millan <rmh@aybabtu.com>
2498
2499 * util/getroot.c (find_root_device): Skip devices that match
2500 /dev/dm-[0-9]. This lets the real device be found for any type of
2501 abstraction (LVM, EVMS, RAID..).
2502 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2503 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2504 device is found first, find_root_device() will now skip it.
2505
2506 2008-07-24 Pavel Roskin <proski@gnu.org>
2507
2508 * include/grub/types.h: Use __builtin_bswap32() and
2509 __builtin_bswap64() with gcc 4.3 and newer.
2510
2511 2008-07-24 Christian Franke <franke@computer.org>
2512
2513 * util/i386/pc/grub-install.in: If `--debug' is specified,
2514 pass `--verbose' to grub-setup.
2515 Abort script if make_system_path_relative_to_its_root() fails.
2516
2517 2008-07-24 Bean <bean123ch@gmail.com>
2518
2519 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2520 variable `target_platform' should be `platform'.
2521
2522 2008-07-24 Bean <bean123ch@gmail.com>
2523
2524 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
2525 (grub_png_init_fixed_block): New function.
2526 (grub_png_decode_image_data): Handle fixed huffman code compression.
2527
2528 2008-07-24 Bean <bean123ch@gmail.com>
2529
2530 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2531 (grub_pe2elf_SOURCES): New macro.
2532 (CLEANFILES): Add grub-pe2elf.
2533
2534 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2535 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2536 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2537 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2538 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2539 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2540 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2541 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2542 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2543 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2544 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2545 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2546 (GRUB_PE32_DT_FUNCTION): Likewise.
2547 (GRUB_PE32_REL_I386_DIR32): Likewise.
2548 (GRUB_PE32_REL_I386_REL32): Likewise.
2549 (grub_pe32_symbol): New structure.
2550 (grub_pe32_reloc): Likewise.
2551
2552 * util/grub-pe2elf.c: New file.
2553
2554 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2555 start symbol in non pc platform.
2556
2557 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2558
2559 The following patches are from Christian Franke.
2560
2561 * include/grub/dl.h: Remove .previous, gas supports this only
2562 for ELF format.
2563
2564 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2565 Remove .type, gas supports this only for ELF format.
2566
2567 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2568 nullbytes in symbol table. This fixes an infinite loop if table is
2569 zero filled.
2570
2571 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2572 TARGET_IMG_LDFLAGS and EXEEXT.
2573
2574 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2575 TARGET_IMG_LDFLAGS_AC.
2576 (grub_CHECK_STACK_ARG_PROBE): New function.
2577
2578 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2579
2580 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2581
2582 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2583 to set TARGET_IMG_LD* accordingly.
2584 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2585 Add call to grub_CHECK_STACK_ARG_PROBE.
2586 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2587
2588 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2589
2590 * genmk.rb: Add EXEEXT to CLEANFILES.
2591
2592 2008-07-23 Robert Millan <rmh@aybabtu.com>
2593
2594 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2595 define the codes for arrows and lines used for the menu).
2596 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2597 as well.
2598
2599 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2600 fonts, because the latter are too slow.
2601
2602 2008-07-21 Bean <bean123ch@gmail.com>
2603
2604 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2605 a20. Run keyboard test last, as it will cause macbook to halt.
2606
2607 2008-07-18 Pavel Roskin <proski@gnu.org>
2608
2609 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2610 load foreign architecture modules correctly anyway. Keep
2611 support for loading host architecture modules, whether we
2612 compile them or not.
2613
2614 2008-07-17 Pavel Roskin <proski@gnu.org>
2615
2616 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2617 change target_cpu. The compiler default can mismatch target_cpu
2618 in any case.
2619
2620 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2621 * kern/efi/efi.c: Likewise.
2622
2623 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2624 target compiler is functional.
2625 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2626 are set up.
2627
2628 * configure.ac: Default to efi platform for x86_64-apple. Allow
2629 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2630 adjustments from the rest, only do them if target is not
2631 explicitly given. Merge other adjustments with the final sanity
2632 check. Remove an extraneous check for supported CPU. Be
2633 specific which CPU and which platform is not supported.
2634
2635 * configure.ac: Default to pc platform for x86_64.
2636
2637 2008-07-17 Robert Millan <rmh@aybabtu.com>
2638
2639 Partial LinuxBIOS -> Coreboot rename.
2640
2641 * conf/i386-linuxbios.rmk: Renamed to ...
2642 * conf/i386-coreboot.rmk: ... this.
2643 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2644 * configure.ac: Accept "coreboot" as input platform (but maintain
2645 compatibility with "linuxbios").
2646 * include/grub/i386/linuxbios: Renamed to ...
2647 * include/grub/i386/coreboot: ... this.
2648
2649 2008-07-17 Bean <bean123ch@gmail.com>
2650
2651 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2652 (appleldr_mod_SOURCE): New variable.
2653 (appleldr_mod_CFLAGS): Likewise.
2654 (appleldr_mod_LDFLAGS): Likewise.
2655 (pci_mod_SOURCES): Likewise.
2656 (pci_mod_CFLAGS): Likewise.
2657 (pci_mod_LDFLAGS): Likewise.
2658 (lspci_mod_SOURCES): Likewise.
2659 (lspci_mod_CFLAGS): Likewise.
2660 (lspci_mod_LDFLAGS): Likewise.
2661
2662 * conf/x86_64-efi.rmk: New file.
2663
2664 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2665 macro.
2666 (grub_efidisk_write): Likewise.
2667
2668 * include/efi/api.h (efi_call_0): New macro.
2669 (efi_call_1): Likewise.
2670 (efi_call_2): Likewise.
2671 (efi_call_3): Likewise.
2672 (efi_call_4): Likewise.
2673 (efi_call_5): Likewise.
2674 (efi_call_6): Likewise.
2675
2676 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2677 grub_rescue_cmd_chainloader.
2678
2679 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2680 (grub_pe32_optional_header): Change some fields based on i386 or
2681 x86_64 platform.
2682 (GRUB_PE32_PE32_MAGIC): Likewise.
2683
2684 * include/grub/efi/uga_draw.h: New file.
2685
2686 * include/grub/elf.h (STN_ABS): New constant.
2687 (R_X86_64_NONE): Relocation constant for x86_64.
2688 (R_X86_64_64): Likewise.
2689 (R_X86_64_PC32): Likewise.
2690 (R_X86_64_GOT32): Likewise.
2691 (R_X86_64_PLT32): Likewise.
2692 (R_X86_64_COPY): Likewise.
2693 (R_X86_64_GLOB_DAT): Likewise.
2694 (R_X86_64_JUMP_SLOT): Likewise.
2695 (R_X86_64_RELATIVE): Likewise.
2696 (R_X86_64_GOTPCREL): Likewise.
2697 (R_X86_64_32): Likewise.
2698 (R_X86_64_32S): Likewise.
2699 (R_X86_64_16): Likewise.
2700 (R_X86_64_PC16): Likewise.
2701 (R_X86_64_8): Likewise.
2702 (R_X86_64_PC8): Likewise.
2703
2704 * include/grub/i386/efi/pci.h: New file.
2705
2706 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2707 Change it value based on platform.
2708 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2709 (GRUB_E820_RAM): Likewise.
2710 (GRUB_E820_RESERVED): Likewise.
2711 (GRUB_E820_ACPI): Likewise.
2712 (GRUB_E820_NVS): Likewise.
2713 (GRUB_E820_EXEC_CODE): Likewise.
2714 (GRUB_E820_MAX_ENTRY): Likewise.
2715 (grub_e820_mmap): New structure.
2716 (linux_kernel_header): Change the efi field according to different
2717 kernel version, also field from linux_kernel_header.
2718
2719 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2720
2721 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2722 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2723 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2724 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2725 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2726 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2727 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2728 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2729 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2730 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2731
2732 * include/grub/x86_64/efi/kernel.h: New file.
2733
2734 * include/grub/x86_64/efi/loader.h: Likewise.
2735
2736 * include/grub/x86_64/efi/machine.h: Likewise.
2737
2738 * include/grub/x86_64/efi/pci.h: Likewise.
2739
2740 * include/grub/x86_64/efi/time.h: Likewise.
2741
2742 * include/grub/x86_64/linux.h: Likewise.
2743
2744 * include/grub/x86_64/setjmp.h: Likewise.
2745
2746 * include/grub/x86_64/time.h: Likewise.
2747
2748 * include/grub/x86_64/types.h: Likewise.
2749
2750 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2751 GRUB_TARGET_SIZEOF_VOID_P.
2752
2753 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2754 (grub_efi_locate_handle): Likewise.
2755 (grub_efi_open_protocol): Likewise.
2756 (grub_efi_set_text_mode): Likewise.
2757 (grub_efi_stall): Likewise.
2758 (grub_exit): Likewise.
2759 (grub_reboot): Likewise.
2760 (grub_halt): Likewise.
2761 (grub_efi_exit_boot_services): Likewise.
2762 (grub_get_rtc): Likewise.
2763
2764 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2765 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2766 (grub_efi_allocate_pages): Wrap efi calls.
2767 (grub_efi_free_pages): Wrap efi calls.
2768 (grub_efi_get_memory_map): Wrap efi calls.
2769
2770 * kern/x86_64/dl.c: New file.
2771
2772 * kern/x86_64/efi/callwrap.S: Likewise.
2773
2774 * kern/x86_64/efi/startup.S: Likewise.
2775
2776 * loader/efi/appleloader.c: Likewise.
2777
2778 * loader/efi/chainloader.c (cmdline): New variable.
2779 (grub_chainloader_unload): Wrap efi calls.
2780 (grub_chainloader_boot): Likewise.
2781 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2782 command line.
2783
2784 * loader/efi/chainloader_normal.c (chainloader_command):
2785 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2786 command line.
2787
2788 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2789 method.
2790 (grub_e820_add_region): New function.
2791 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2792 booting.
2793 (grub_find_video_card): New function.
2794 (grub_linux_setup_video): New function.
2795 (grub_rescue_cmd_linux): Probe for video information.
2796
2797 * normal/x86_64/setjmp.S: New file.
2798
2799 * term/efi/console.c (map_char): New function.
2800 (grub_console_putchar): Map unicode char.
2801 (grub_console_checkkey): Wrap efi calls.
2802 (grub_console_getkey): Likewise.
2803 (grub_console_getwh): Likewise.
2804 (grub_console_gotoxy): Likewise.
2805 (grub_console_cls): Likewise.
2806 (grub_console_setcolorstate): Likewise.
2807 (grub_console_setcursor): Likewise.
2808
2809 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2810
2811 2008-07-16 Pavel Roskin <proski@gnu.org>
2812
2813 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2814 format strings.
2815
2816 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2817 pointer, not an integer. This fixes a warning and prevents
2818 precision loss on 64-bit systems.
2819 (relocate_addresses): Remove unneeded cast.
2820
2821 2008-07-15 Pavel Roskin <proski@gnu.org>
2822
2823 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2824
2825 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2826
2827 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2828 Fix comparison between signed and unsigned.
2829
2830 * include/grub/i386/ieee1275/console.h: Declare
2831 grub_console_init() and grub_console_fini().
2832
2833 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2834 It's empty and unused.
2835
2836 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2837 beginning to avoid warnings with some compilers.
2838
2839 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2840 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2841
2842 2008-07-14 Pavel Roskin <proski@gnu.org>
2843
2844 * kern/env.c (grub_register_variable_hook): Don't copy empty
2845 string, it leaks memory. Pass "" to grub_env_set(), it should
2846 handle constant strings.
2847
2848 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2849 * commands/cmp.c (grub_cmd_cmp): Likewise.
2850 * kern/dl.c (grub_dl_flush_cache): Likewise.
2851 (grub_dl_load_core): Likewise.
2852 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2853 (grub_elf64_load_phdrs): Likewise.
2854
2855 2008-07-13 Pavel Roskin <proski@gnu.org>
2856
2857 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2858 between signed and unsigned.
2859 (LzmaEnc_Finish): Fix warning about an unused parameter.
2860
2861 2008-07-13 Bean <bean123ch@gmail.com>
2862
2863 * Makefile.in (enable_lzo): New rule.
2864
2865 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2866
2867 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2868
2869 * boot/i386/pc/lnxboot.S: #include <config.h>.
2870
2871 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2872 its value according to the compression algorithm used, lzo or lzma.
2873
2874 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2875 compression algorithm according to configure macro.
2876
2877 * kern/i386/pc/startup.S (codestart): Likewise.
2878
2879 * kern/i386/pc/lzma_decode.S: New file.
2880
2881 * include/grub/lib/LzFind.h: Likewise.
2882
2883 * include/grub/lib/LzHash.h: Likewise.
2884
2885 * include/grub/lib/LzmaDec.h: Likewise.
2886
2887 * include/grub/lib/LzmaEnc.h: Likewise.
2888
2889 * include/grub/lib/LzmaTypes.h: Likewise.
2890
2891 * lib/LzFind.c: Likewise.
2892
2893 * lib/LzmaDec.c: Likewise.
2894
2895 * lib/LzmaEnc.c: Likewise.
2896
2897 2008-07-13 Bean <bean123ch@gmail.com>
2898
2899 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2900 (grub_ext4_extent_header): New structure.
2901 (grub_ext4_extent): Likewise.
2902 (grub_ext4_extent_idx): Likewise.
2903 (grub_ext4_find_leaf): New function.
2904 (grub_ext2_read_block): Handle extents.
2905
2906 2008-07-12 Robert Millan <rmh@aybabtu.com>
2907
2908 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2909
2910 2008-07-11 Robert Millan <rmh@aybabtu.com>
2911
2912 * util/grub.d/40_custom.in: New file. Example on how to add custom
2913 entries to /etc/grub.d.
2914 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2915 40_custom (implicitly, by merging all the grub.d rules).
2916
2917 2008-07-11 Pavel Roskin <proski@gnu.org>
2918
2919 * commands/read.c (grub_getline): Fix invalid memory access.
2920 Don't add newline to the variable value.
2921
2922 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2923 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2924 (serial_hw_get_port): Check validity of the port number.
2925 (grub_cmd_serial): Check return value of serial_hw_get_port().
2926
2927 2008-07-07 Pavel Roskin <proski@gnu.org>
2928
2929 * boot/i386/pc/diskboot.S (notification_string): Replace
2930 "Loading kernel" with just "loading". This is shorter, less
2931 confusing and saves a few bytes for possible future changes.
2932
2933 2008-07-05 Pavel Roskin <proski@gnu.org>
2934
2935 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2936 size for ATAPI devices, they are undefined. Output sector
2937 number in decimal form.
2938
2939 * disk/ata.c: Use named constants for status bits.
2940
2941 2008-07-04 Pavel Roskin <proski@gnu.org>
2942
2943 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2944 grub_addr_t before casting it to the void pointer to fix a
2945 warning. Non-addressable regions are discarded earlier.
2946 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2947 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2948 (check_signature): Don't shadow table_header.
2949 (grub_linuxbios_table_iterate): Cast numeric constants to
2950 grub_linuxbios_table_header_t.
2951 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2952 grub_stop().
2953
2954 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2955 prevent warnings.
2956
2957 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2958 pointer, which can cause warnings. Support 64-bit addresses.
2959
2960 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2961 of sizeof(long). This fixes PowerPC image generation on x86_64.
2962
2963 2008-07-04 Robert Millan <rmh@aybabtu.com>
2964
2965 This fixes a performance issue when pc & gpt partmap iterators
2966 didn't abort iteration even after our hook found what it was
2967 looking for (often causing expensive probes of non-existent drives).
2968
2969 Some callers relied on previous buggy behaviour, since they would
2970 raise an error when their own hooks caused early abortion of its
2971 iteration.
2972
2973 * kern/device.c (grub_device_open): Improve error message.
2974 * disk/lvm.c (grub_lvm_open): Likewise.
2975 * disk/raid.c (grub_raid_open): Likewise.
2976
2977 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2978 when hook requests it, independently of grub_errno.
2979 (pc_partition_map_probe): Do not fail when find_func() caused
2980 early abortion of pc_partition_map_iterate().
2981
2982 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2983 when hook requests it, independently of grub_errno.
2984 (gpt_partition_map_probe): Do not fail when find_func() caused
2985 early abortion of gpt_partition_map_iterate().
2986
2987 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2988 when hook requests it, independently of grub_errno. Do not fail when
2989 part_map_iterate_hook() caused early abortion of p->iterate().
2990
2991 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2992 when grub_partition_iterate() returned with non-zero.
2993
2994 2008-07-03 Pavel Roskin <proski@gnu.org>
2995
2996 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2997 like we do in grub_ata_pio_read().
2998 (grub_ata_readwrite): Always write individual sectors. Fix the
2999 sector count for the remainder.
3000 (grub_ata_write): Enable writing to ATA devices. Correctly
3001 report error for ATAPI devices.
3002
3003 2008-07-02 Pavel Roskin <proski@gnu.org>
3004
3005 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3006 warning.
3007
3008 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3009 for every read sector, we already increment it for the whole
3010 batch. This fixes reading more than 256 sectors at once.
3011
3012 * util/grub-editenv.c (cmd_info): Cast argument to long
3013 explicitly. ptrdiff_t reduces to int on i386.
3014
3015 * util/grub-editenv.c (main): Be specific which parameter is
3016 missing.
3017
3018 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3019 (memdisk): Make memdisk_orig_addr a pointer.
3020
3021 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3022 for file offsets, use grub_off_t instead. Fix printf format
3023 warnings.
3024
3025 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3026 there. Real unexpected warnings should not drown in the noise
3027 about known problems.
3028
3029 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3030 grub_disk_addr_t for memory addresses.
3031
3032 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3033 explicitly to fix a warning.
3034
3035 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3036
3037 * Makefile.in (MODULE_LDFLAGS): New variable.
3038 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3039 the linker accepts --build-id=none.
3040 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3041 MODULE_LDFLAGS.
3042 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3043
3044 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3045 those in Linux XFS code. Provide a way to access 64-bit parent
3046 inode.
3047 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3048 the end of struct grub_xfs_dir_header.
3049
3050 2008-07-02 Bean <bean123ch@gmail.com>
3051
3052 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3053 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3054 and GRUB_IEEE1275_FLAG_NO_ANSI.
3055
3056 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3057 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3058 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3059
3060 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3061 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3062
3063 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3064 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3065
3066 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3067 esc sequence on non ANSI terminal.
3068 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3069
3070 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3071 beginning of file.
3072
3073 2008-07-02 Bean <bean123ch@gmail.com>
3074
3075 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3076 (grub_editenv_SOURCES): New variable.
3077 (pkglib_MODULES): Add loadenv.mod.
3078 (loadenv_mod_SOURCES): New variable.
3079 (loadenv_mod_CFLAGS): Likewise.
3080 (loadenv_mod_LDFLAGS): Likewise.
3081
3082 * include/grub/envblk.h: New file.
3083
3084 * util/envblk.c: New file.
3085
3086 * util/grub-editenv.c: New file.
3087
3088 * commands/loadenv.c: New file.
3089
3090 2008-07-01 Pavel Roskin <proski@gnu.org>
3091
3092 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3093 not unsigned char. This fixes warnings and is consistent with
3094 other tags.
3095
3096 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3097
3098 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3099
3100 * term/tparm.c (analyze): Always set *popcount.
3101
3102 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3103 cast to fix a warning.
3104
3105 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3106 cast to suppress a warning.
3107
3108 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3109 grub_fshelp_read_file() expects.
3110
3111 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3112 write uuid as a 32-bit value in CPU byte order, so declare and
3113 use it as such.
3114
3115 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3116 long if the format specifier expects it.
3117 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3118 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3119 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3120 long to fix a warning.
3121 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3122 grub_dprintf() arguments to fix warnings.
3123
3124 2008-06-30 Pavel Roskin <proski@gnu.org>
3125
3126 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3127 install_bsd_part immediately before core.img is embedded or
3128 modified on disk. This fixes core.img verification if core.img
3129 cannot be embedded.
3130
3131 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3132 core_path to calculate the blocklist.
3133 Patch from Javier Martín <lordhabbit@gmail.com>
3134
3135 2008-06-29 Robert Millan <rmh@aybabtu.com>
3136
3137 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3138 block to disk block.
3139 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3140 Patch from Niels Böhm <bitbucket@arcor.de>
3141
3142 2008-06-29 Robert Millan <rmh@aybabtu.com>
3143
3144 * util/update-grub_lib.in (font_path): Search for fonts in
3145 /boot/grub first, which is more likely to be readable (we aren't
3146 deciding where fonts live, just looking for them).
3147
3148 2008-06-26 Pavel Roskin <proski@gnu.org>
3149
3150 * util/biosdisk.c (read_device_map): Don't leave dead map
3151 entries for devices failing stat() check.
3152
3153 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3154 core_path_dev for the core.img path on the target device.
3155
3156 2008-06-26 Robert Millan <rmh@aybabtu.com>
3157
3158 * disk/fs_uuid.c: New file.
3159 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3160 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3161 (fs_uuid_mod_LDFLAGS): New variables.
3162 * include/grub/disk.h (grub_disk_dev_id): Add
3163 `GRUB_DISK_DEVICE_UUID_ID'.
3164 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3165 implement iterate().
3166
3167 2008-06-26 Robert Millan <rmh@aybabtu.com>
3168
3169 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3170 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3171 Linux image includes no initrd.
3172
3173 2008-06-21 Javier Martín <lordhabbit@gmail.com>
3174
3175 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3176 call to resolve the core image location that effectively appended the
3177 name twice.
3178
3179 2008-06-21 Robert Millan <rmh@aybabtu.com>
3180
3181 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3182 call from here ...
3183
3184 * util/grub.d/10_hurd.in: ... to here ...
3185 * util/grub.d/10_linux.in: ... and here.
3186
3187 2008-06-19 Robert Millan <rmh@aybabtu.com>
3188
3189 * kern/main.c (grub_main): Export `prefix' variable immediately
3190 after it has been set by grub_machine_set_prefix().
3191
3192 2008-06-19 Robert Millan <rmh@aybabtu.com>
3193
3194 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3195 search result when not saving to variable, not the other way around.
3196 When saving to variable, abort iteration as soon as a match is found.
3197
3198 2008-06-19 Robert Millan <rmh@aybabtu.com>
3199
3200 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3201 check for partition that provides /boot/grub. Its logic is flawed,
3202 as it prevents prepare_grub_to_access_device() from being called
3203 multiple times.
3204
3205 2008-06-19 Robert Millan <rmh@aybabtu.com>
3206
3207 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3208 "insmod" command directly when abstraction modules are needed,
3209 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3210 since it had already been processed).
3211
3212 2008-06-19 Pavel Roskin <proski@gnu.org>
3213
3214 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3215 changed. This is needed in case GRUB_LIBDIR changes.
3216 * conf/i386-ieee1275.rmk: Likewise.
3217 * conf/i386-linuxbios.rmk: Likewise.
3218 * conf/i386-pc.rmk: Likewise.
3219 * conf/powerpc-ieee1275.rmk: Likewise.
3220
3221 2008-06-18 Pavel Roskin <proski@gnu.org>
3222
3223 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3224 kernel_elf_symlist.c to symlist.c for consistency with other
3225 architectures. Update all users.
3226 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3227
3228 2008-06-18 Robert Millan <rmh@aybabtu.com>
3229
3230 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3231 it in prefix.
3232
3233 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3234 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3235 a RAID device, run setup() for all members independently on whether
3236 LVM abstraction is being used.
3237 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3238 If grub-mkimage has set `*install_dos_part == -2', don't override this
3239 value.
3240 Perform *install_dos_part adjustments independently on whether
3241 we're embedding or not.
3242 Clarify error message when image is too big for embedding.
3243 Remove duplicate *install_dos_part stanza.
3244
3245 2008-06-17 Robert Millan <rmh@aybabtu.com>
3246
3247 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3248 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3249 variables.
3250 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3251 values in grub_ofconsole_normal_color and
3252 grub_ofconsole_highlight_color (they're not directly related to
3253 background and foreground).
3254 (grub_ofconsole_setcolorstate): Extract background and foreground
3255 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3256
3257 2008-06-17 Robert Millan <rmh@aybabtu.com>
3258
3259 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3260 /boot/grub for the check in last commit, not /boot (they could be
3261 different partitions).
3262
3263 2008-06-16 Robert Millan <rmh@aybabtu.com>
3264
3265 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3266 asked to setup access for the same partition that provides /boot,
3267 don't bother using UUIDs since our root already has the value we
3268 want.
3269
3270 2008-06-16 Robert Millan <rmh@aybabtu.com>
3271
3272 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3273 I2O devices.
3274 Patch from Sven Mueller <sven@debian.org>.
3275
3276 2008-06-16 Robert Millan <rmh@aybabtu.com>
3277
3278 * util/update-grub.in: Check for $EUID instead of $UID.
3279 Reported by Vincent Zweije.
3280
3281 2008-06-16 Bean <bean123ch@gmail.com>
3282
3283 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3284 (grub_ext2_read_block): Likewise.
3285 (grub_ext2_read_inode): Likewise.
3286 (grub_ext2_mount): Likewise.
3287 (grub_ext2_close): Likewise.
3288 (grub_ext3_get_journal): Removed.
3289
3290 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3291 (grub_reiserfs_read_symlink): Likewise.
3292 (grub_reiserfs_mount): Likewise.
3293 (grub_reiserfs_open): Likewise.
3294 (grub_reiserfs_read): Likewise.
3295 (grub_reiserfs_close): Likewise.
3296 (grub_reiserfs_get_journal): Removed.
3297
3298 * fs/fshelp.c (grub_fshelp_read): Removed.
3299 (grub_fshelp_map_block): Likewise.
3300
3301 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3302 (grub_fshelp_journal): Likewise.
3303 (grub_fshelp_read): Likewise.
3304 (grub_fshelp_map_block): Likewise.
3305
3306 2008-06-16 Pavel Roskin <proski@gnu.org>
3307
3308 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3309 floating point anymore.
3310 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3311
3312 2008-06-15 Pavel Roskin <proski@gnu.org>
3313
3314 * commands/ls.c (grub_ls_list_files): Use integer calculations
3315 for human readable format, avoid floating point use.
3316 * kern/misc.c (grub_ftoa): Remove.
3317 (grub_vsprintf): Remove floating point support.
3318
3319 2008-06-15 Robert Millan <rmh@aybabtu.com>
3320
3321 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3322 devices.
3323 Reported by Max Vozeler.
3324
3325 2008-06-15 Robert Millan <rmh@aybabtu.com>
3326
3327 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3328 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3329 skipped later.
3330 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3331 the beginning of the prefix.
3332
3333 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3334 It is assumed that if we have a memdisk, grub-mkimage has set
3335 grub_prefix to include the "(memdisk)" drive in it.
3336
3337 2008-06-15 Robert Millan <rmh@aybabtu.com>
3338
3339 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3340 Initialize keyboard controller after registering the terminal, so that
3341 grub_printf() can be called from grub_keyboard_controller_init().
3342
3343 2008-06-15 Robert Millan <rmh@aybabtu.com>
3344
3345 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3346 extent-btree which is written as big endian on disk.
3347 Reported by Alain Greppin <al@chilibi.org>.
3348
3349 2008-06-14 Robert Millan <rmh@aybabtu.com>
3350
3351 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3352 * util/i386/pc/grub-install.in (modules): Likewise.
3353
3354 2008-06-13 Pavel Roskin <proski@gnu.org>
3355
3356 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3357
3358 2008-06-13 Bean <bean123ch@gmail.com>
3359
3360 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3361
3362 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3363
3364 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3365 to indicate sparse block.
3366
3367 2008-06-12 Pavel Roskin <proski@gnu.org>
3368
3369 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3370 number, grub_fshelp_read() does it for us.
3371
3372 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3373 linear disk read with journal translation.
3374 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3375 * include/grub/fshelp.h: Declare grub_fshelp_read().
3376
3377 2008-06-09 Pavel Roskin <proski@gnu.org>
3378
3379 * fs/minix.c (grub_minix_mount): Handle error reading
3380 superblock.
3381
3382 2008-06-08 Robert Millan <rmh@aybabtu.com>
3383
3384 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3385 don't append the RAID prefix afterwards.
3386 Reported by Clint Adams.
3387
3388 2008-06-08 Robert Millan <rmh@aybabtu.com>
3389
3390 Based on description from Pavel:
3391 * kern/disk.c (grub_disk_check_range): Rename to ...
3392 (grub_disk_adjust_range): ... this. Add a comment explaining the
3393 tasks performed by this function.
3394
3395 2008-06-08 Robert Millan <rmh@aybabtu.com>
3396
3397 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3398 `num_serial' (for consistency with other variables).
3399 (struct grub_ntfs_data): Add `uuid' member.
3400 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3401 (grub_ntfs_uuid): New function.
3402 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3403
3404 2008-06-07 Pavel Roskin <proski@gnu.org>
3405
3406 * util/biosdisk.c (open_device): Revert last change to the
3407 function, it broke installation. The sector needs to be
3408 different dependent on which device is opened.
3409
3410 2008-06-06 Robert Millan <rmh@aybabtu.com>
3411
3412 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3413 rest of GRUB, and breakage doesn't happen if its value were modified.
3414
3415 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3416 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3417 a constant (same value).
3418 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3419 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3420
3421 2008-06-06 Robert Millan <rmh@aybabtu.com>
3422
3423 * util/biosdisk.c (open_device): Do not modify sector offset when
3424 accessing a partition. kern/disk.c already handles this for us.
3425
3426 2008-06-06 Robert Millan <rmh@aybabtu.com>
3427
3428 * util/grub-emu.c (grub_machine_init): Move code in this function from
3429 here ...
3430 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3431 segfault in case grub_printf() is called).
3432
3433 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3434 grub_probe. Update all users not to explicitly add it again.
3435 (grub_device): New variable; contains corresponding device for grubdir.
3436 (fs_module, partmap_module, devabstraction_module): Pass
3437 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3438 every time.
3439
3440 2008-06-05 Robert Millan <rmh@aybabtu.com>
3441
3442 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3443 is found, print it (same layout as with labels).
3444
3445 2008-06-04 Robert Millan <rmh@aybabtu.com>
3446
3447 * util/biosdisk.c (get_drive): Rename to ...
3448 (find_grub_drive): ... this. Update all users.
3449
3450 (get_os_disk): Rename to ...
3451 (convert_system_partition_to_system_disk): ... this. Update all users.
3452
3453 (find_drive): Rename to ...
3454 (find_system_device): ... this. Update all users.
3455
3456 2008-06-04 Robert Millan <rmh@aybabtu.com>
3457
3458 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3459 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3460 (make_device_map): Likewise.
3461
3462 2008-06-01 Robert Millan <rmh@aybabtu.com>
3463
3464 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3465 before dereferencing it.
3466
3467 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3468 union with fat12/fat16-specific ones. Add some new fields, including
3469 `num_serial' for both versions.
3470 (struct grub_fat_data): Add `uuid' member.
3471 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3472 names. Initialize `data->uuid' using `num_serial'.
3473 (grub_fat_uuid): New function.
3474 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3475
3476 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3477 (grub_reiserfs_uuid): New function.
3478 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3479 member.
3480
3481 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3482 (grub_xfs_uuid): New function.
3483 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3484
3485 2008-06-01 Robert Millan <rmh@aybabtu.com>
3486
3487 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3488 code that is backward compatible with pre-uuid search command.
3489
3490 2008-05-31 Robert Millan <rmh@aybabtu.com>
3491
3492 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3493 floppies after everything else, to ensure floppy drive isn't accessed
3494 unnecessarily (patch from Bean).
3495
3496 2008-05-31 Robert Millan <rmh@aybabtu.com>
3497
3498 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3499 not print device names when we were asked to set a variable.
3500
3501 2008-05-31 Robert Millan <rmh@aybabtu.com>
3502
3503 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3504 using "cursor-on" and "cursor-off" commands (understood at least by
3505 the Open Firmware flavour on OLPC).
3506
3507 2008-05-31 Michael Gorven <michael@gorven.za.net>
3508
3509 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3510 on and off sequences.
3511
3512 2008-05-31 Robert Millan <rmh@aybabtu.com>
3513
3514 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3515 * util/update-grub.in: Likewise.
3516
3517 2008-05-30 Pavel Roskin <proski@gnu.org>
3518
3519 * util/biosdisk.c (linux_find_partition): Simplify logic and
3520 make the code more universal. Keep special processing for
3521 devfs, but use a simple rule for all other devices. If the
3522 device ends with a number, append 'p' and the partition number.
3523 Otherwise, append only the partition number.
3524
3525 2008-05-30 Robert Millan <rmh@aybabtu.com>
3526
3527 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3528 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3529 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3530 the `root' parameter to Linux.
3531
3532 2008-05-30 Robert Millan <rmh@aybabtu.com>
3533
3534 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3535 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3536 --fs_uuid with --fs-uuid.
3537 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3538 all filesystems support them).
3539
3540 2008-05-30 Robert Millan <rmh@aybabtu.com>
3541
3542 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3543 grub_printf() flags, since we're printing in units of 2 bytes.
3544
3545 2008-05-30 Robert Millan <rmh@aybabtu.com>
3546
3547 * util/grub.d/00_header.in: Remove obsolete comment referencing
3548 convert_system_path_to_grub_path().
3549 * util/update-grub.in: Likewise.
3550 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3551 (convert_system_path_to_grub_path): Add a warning message explaining
3552 that this function is deprecated. Rely on is_path_readable_by_grub()
3553 for the readability checks.
3554 (font_path): Use is_path_readable_by_grub() for the readability
3555 check rather than convert_system_path_to_grub_path().
3556
3557 2008-05-30 Robert Millan <rmh@aybabtu.com>
3558
3559 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3560 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3561 converting it first.
3562 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3563 grub.cfg for access to font file, and afterwards call it again to set
3564 the root device.
3565
3566 2008-05-30 Robert Millan <rmh@aybabtu.com>
3567
3568 * commands/search.c (options): Add --fs_uuid option.
3569 (search_fs_uuid): New function.
3570 (grub_cmd_search): Fix --set argument passing.
3571 Use search_fs_uuid() when requested via --fs_uuid.
3572 (grub_search_init): Update help message.
3573 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3574 and redeclare it as an array of 16-bit words.
3575 (grub_ext2_uuid): New function.
3576 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3577 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3578 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3579 (GRUB_DEVICE_BOOT_UUID): New variables.
3580 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3581 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3582 whenever possible.
3583 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3584 just assume `root' variable has the right value.
3585 * util/grub.d/10_linux.in: Likewise.
3586 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3587 via PRINT_FS_UUID.
3588 (main): Recognise `-t fs_uuid' argument.
3589
3590 2008-05-30 Robert Millan <rmh@aybabtu.com>
3591
3592 * util/biosdisk.c (map): Redefine structure to hold information
3593 about GRUB drive name.
3594 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3595 drive names.
3596 (call_hook): Remove.
3597 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3598 member. Assume drive has partitions.
3599 (grub_util_biosdisk_open): Access device names via `.device' struct
3600 member.
3601 (open_device): Likewise.
3602 (find_drive): Likewise.
3603 (read_device_map): Adjust map[] usage to match the new struct
3604 definition. Don't check for duplicates (still possible, but not cheap
3605 anymore).
3606 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3607 (make_device_name): Remove assumption of BIOS-like drive names.
3608
3609 2008-05-30 Pavel Roskin <proski@gnu.org>
3610
3611 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3612 compiling execute.c doesn't need grub_script.tab.h anymore.
3613 (normal/command.c_DEPENDENCIES): Likewise.
3614 (normal/function.c_DEPENDENCIES): Likewise.
3615 * conf/i386-ieee1275.rmk: Likewise.
3616 * conf/i386-linuxbios.rmk: Likewise.
3617 * conf/i386-pc.rmk: Likewise.
3618 * conf/powerpc-ieee1275.rmk: Likewise.
3619 * conf/sparc64-ieee1275.rmk: Likewise.
3620
3621 2008-05-29 Pavel Roskin <proski@gnu.org>
3622
3623 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3624 when scanning metadata for volume group name.
3625
3626 * include/grub/script.h: Don't include grub_script.tab.h. It's
3627 a generated file, which may only be included from the files with
3628 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3629 use union YYSTYPE, as the later allows forward declaration.
3630 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3631
3632 2008-05-29 Robert Millan <rmh@aybabtu.com>
3633
3634 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3635 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3636 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3637 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3638 scan codes.
3639
3640 2008-05-29 Robert Millan <rmh@aybabtu.com>
3641
3642 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3643 control key combinations.
3644
3645 2008-05-29 Robert Millan <rmh@aybabtu.com>
3646
3647 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3648 * util/ieee1275/grub-install.in: ... to here.
3649 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3650 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3651 (grub_install_SOURCES): Likewise.
3652
3653 2008-05-29 Robert Millan <rmh@aybabtu.com>
3654
3655 * fs/affs.c: Update copyright year.
3656 * fs/ext2.c: Likewise.
3657 * fs/fshelp.c: Likewise.
3658 * fs/hfsplus.c: Likewise.
3659 * fs/ntfs.c: Likewise.
3660 * fs/xfs.c: Likewise.
3661 * include/grub/fshelp.h: Likewise.
3662 * util/grub-mkdevicemap.c: Likewise.
3663
3664 2008-05-28 Robert Millan <rmh@aybabtu.com>
3665
3666 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3667 might need to be fatfs to support some firmware implementations
3668 (e.g. OFW or EFI).
3669
3670 2008-05-28 Robert Millan <rmh@aybabtu.com>
3671
3672 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3673 devices.
3674 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3675 (make_device_map): Likewise.
3676
3677 2008-05-20 Bean <bean123ch@gmail.com>
3678
3679 * fs/fshelp.c (grub_fshelp_map_block): New function.
3680 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3681 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3682
3683 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3684 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3685 (grub_fshelp_journal): New structure.
3686 (grub_fshelp_map_block): New function prototype.
3687 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3688 (grub_fshelp_map_block): Likewise.
3689
3690 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3691 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3692 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3693 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3694 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3695 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3696 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3697 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3698 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3699 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3700 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3701 (grub_ext2_sblock): New members for journal support.
3702 (grub_ext3_journal_header): New structure.
3703 (grub_ext3_journal_revoke_header): Likewise.
3704 (grub_ext3_journal_block_tag): Likewise.
3705 (grub_ext3_journal_sblock): Likewise.
3706 (grub_fshelp_node): New members logfile and journal.
3707 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3708 grub_fshelp_map_block to get real block number.
3709 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3710 number.
3711 (grub_ext2_read_inode): Likewise.
3712 (grub_ext3_get_journal): New function.
3713 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3714 (grub_ext2_close): Release memory used by journal.
3715
3716 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3717 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3718 (grub_reiserfs_transaction_header): Renamed to
3719 grub_reiserfs_description_block, replace field data with real_blocks.
3720 (grub_reiserfs_commit_block): New structure.
3721 (grub_reiserfs_data): New member journal.
3722 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3723 number.
3724 (grub_reiserfs_read_symlink): Likewise.
3725 (grub_reiserfs_iterate_dir): Likewise.
3726 (grub_reiserfs_open): Likewise.
3727 (grub_reiserfs_read): Likewise.
3728 (grub_reiserfs_get_journal): New function.
3729 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3730 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3731 using grub_reiserfs_get_journal.
3732 (grub_reiserfs_close): Release memory used by journal.
3733
3734 * fs/affs.c (grub_affs_read_block): Change block type to
3735 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3736
3737 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3738
3739 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3740
3741 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3742
3743 * fs/udf.c (grub_udf_read_block): Change block type to
3744 grub_disk_addr_t. Use type cast to avoid warning.
3745
3746 * fs/xfs.c (grub_xfs_read_block): Likewise.
3747
3748 2008-05-16 Christian Franke <franke@computer.org>
3749
3750 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3751 to ensure that break with ESC will always work.
3752 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3753 Remove ESC from keyboard queue.
3754
3755 2008-05-16 Christian Franke <franke@computer.org>
3756
3757 * util/biosdisk.c: [__CYGWIN__] Add includes.
3758 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3759 (get_os_disk): Move variable declarations to OS specific
3760 parts to avoid warning.
3761 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3762 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3763 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3764 Cygwin.
3765 * util/getroot.c: [__CYGWIN__] Add includes.
3766 (strip_extra_slashes): Fix "/" case.
3767 [__CYGWIN__] (get_win32_path): New function.
3768 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3769 [__CYGWIN__] (find_root_device): Disable.
3770 [__CYGWIN__] (get_bootsec_serial): New function.
3771 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3772 [__linux__] (grub_guess_root_device): Add early returns to simplify
3773 structure.
3774 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3775 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3776 check for Linux only.
3777
3778 2008-05-15 Bean <bean123ch@gmail.com>
3779
3780 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3781 keyboard hang problem in apple's intel mac.
3782
3783 2008-05-09 Robert Millan <rmh@aybabtu.com>
3784
3785 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3786 devices.
3787 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3788 (make_device_map): Likewise.
3789 Reported by Aurelien Jarno <aurel32@debian.org>
3790
3791 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3792
3793 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3794 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3795 (make_device_map): Output entries for xvd type disks.
3796
3797 2008-05-07 Robert Millan <rmh@aybabtu.com>
3798
3799 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3800 devices.
3801 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3802 (make_device_map): Likewise.
3803 Reported by Roland Dreier <rdreier@cisco.com>
3804
3805 2008-05-07 Robert Millan <rmh@aybabtu.com>
3806
3807 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3808 grub_strstr() call. Correct a few mistakes in failure path handling.
3809
3810 2008-05-06 Robert Millan <rmh@aybabtu.com>
3811
3812 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3813 Do not print a trailing slash (therefore, the root directory is an
3814 empty string).
3815 (convert_system_path_to_grub_path): Do not remove trailing slash
3816 from make_system_path_relative_to_its_root() output.
3817
3818 * util/i386/pc/grub-install.in: Add trailing slash to output from
3819 make_system_path_relative_to_its_root().
3820
3821 2008-05-06 Robert Millan <rmh@aybabtu.com>
3822
3823 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3824 ensures that output lines aren't intermangled with those sent to
3825 stderr (via grub_util_info()).
3826 * util/grub-probe.c (grub_refresh): Likewise.
3827 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3828
3829 2008-05-05 Christian Franke <franke@computer.org>
3830
3831 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3832 Add Cygwin device names.
3833 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3834 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3835 (check_device): Return error instead of success on empty name.
3836 (make_device_map): Move label inside linux specific code to
3837 prevent compiler warning.
3838
3839 2008-04-30 Robert Millan <rmh@aybabtu.com>
3840
3841 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3842 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3843 first boot option.
3844 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3845
3846 2008-04-29 Robert Millan <rmh@aybabtu.com>
3847
3848 * docs/grub.cfg: New file (example GRUB configuration).
3849
3850 2008-04-26 Robert Millan <rmh@aybabtu.com>
3851
3852 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3853 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3854 and `disk/ieee1275/nand.c'.
3855
3856 2008-04-25 Bean <bean123ch@gmail.com>
3857
3858 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3859 i386-linuxbios.
3860
3861 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3862 change the buffer size to 4096 for cdrom device.
3863
3864 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3865 and nand.mod.
3866 (_linux_mod_SOURCES): New variable.
3867 (_linux_mod_CFLAGS): Likewise.
3868 (_linux_mod_LDFLAGS): Likewise.
3869 (linux_mod_SOURCES): Likewise.
3870 (linux_mod_CFLAGS): Likewise.
3871 (linux_mod_LDFLAGS): Likewise.
3872 (nand_mod_SOURCES): Likewise.
3873 (nand_mod_CFLAGS): Likewise.
3874 (nand_mod_LDFLAGS): Likewise.
3875
3876 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3877 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3878 type property. (nand device in olpc don't have this property)
3879
3880 * include/grub/disk.h (grub_disk_dev_id): New macro
3881 GRUB_DISK_DEVICE_NAND_ID.
3882
3883 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3884 function prototype.
3885 (grub_rescue_cmd_initrd): Likewise.
3886
3887 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3888 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3889 ofw_cif_handler and ofw_idt, adjust padding number.
3890
3891 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3892 GRUB_MACHINE_IEEE1275 is defined.
3893
3894 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3895 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3896
3897 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3898 on nested function heap_init.
3899 (grub_upper_mem): New variable for i386-ieee1275.
3900 (grub_get_extended_memory): New function for i386-ieee1275.
3901 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3902
3903 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3904 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3905 property.
3906
3907 * loader/i386/ieee1275/linux.c: New file.
3908
3909 * loader/i386/ieee1275/linux_normal.c: New file.
3910
3911 * disk/ieee1275/nand.c: New file.
3912
3913 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3914
3915 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3916 value.
3917 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3918
3919 2008-04-18 Robert Millan <rmh@aybabtu.com>
3920
3921 Restructures early code path on ieee1275 to unify grub_main() as
3922 the first C function that is executed in every platform.
3923
3924 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3925 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3926 cmain().
3927 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3928 * kern/ieee1275/cmain.c (cmain): Rename to ...
3929 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3930 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3931 at the beginning.
3932
3933 2008-04-18 Robert Millan <rmh@aybabtu.com>
3934
3935 * util/update-grub.in: Fix syntax error when setting
3936 `GRUB_PRELOAD_MODULES'.
3937 Reported by Stephane Chazelas <stephane@artesyncp.com>
3938
3939 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3940
3941 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3942 section into account, newer toolchains generate unique build ids
3943 * configure.ac: remove the test for --build-id=none acceptance,
3944 we want build ids to be preserved
3945 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3946 far from other sections don't cause the raw binary images grow
3947 size
3948
3949 2008-04-15 Robert Millan <rmh@aybabtu.com>
3950
3951 * disk/lvm.c: Update copyright year.
3952 * kern/misc.c: Likewise.
3953
3954 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3955
3956 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3957 there is no memory left for physical volume name.
3958
3959 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3960
3961 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3962 volume name mapping to support bigger than 9 character names properly.
3963
3964 2008-04-13 Robert Millan <rmh@aybabtu.com>
3965
3966 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3967 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3968
3969 2008-04-13 Christian Franke <franke@computer.org>
3970
3971 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3972 to create a floppy emulation boot CD when non emulation mode
3973 does not work.
3974 Enable Joliet CD filesystem extension.
3975
3976 2008-04-13 Robert Millan <rmh@aybabtu.com>
3977
3978 * kern/misc.c (grub_strncat): Fix off-by-one error.
3979 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3980
3981 * kern/env.c (grub_env_context_close): Clear current context, not
3982 previous one.
3983 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3984
3985 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3986
3987 2008-04-13 Robert Millan <rmh@aybabtu.com>
3988
3989 Improve robustness when handling LVM.
3990
3991 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3992 (and leave `*p' unmodified).
3993 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3994 through it.
3995 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3996 iterating through it.
3997 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3998 through it.
3999 (grub_lvm_scan_device): Check the return value (and fail gracefully
4000 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4001 Don't assume `vg->pvs != NULL' when iterating through it.
4002
4003 2008-04-13 Robert Millan <rmh@aybabtu.com>
4004
4005 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4006 * genmk.rb (partmap): New variable.
4007 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4008 (#{partmap}): New target rule.
4009 * genpartmaplist.sh: New file.
4010 * Makefile.in (pkglib_DATA): Add partmap.lst.
4011 (partmap.lst): New target rule.
4012 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4013 modules (including all partition maps), instead of preloading them.
4014
4015 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4016
4017 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4018 `linux-boot-prober' (if installed) to detect other operating
4019 systems which are installed on the computer and add them to
4020 the boot menu.
4021 * conf/common.rmk: Build and install 30_os-prober.
4022
4023 2008-04-12 Robert Millan <rmh@aybabtu.com>
4024
4025 * kern/powerpc/ieee1275/init.c: Move from here ...
4026 * kern/ieee1275/init.c: ... to here. Update all users.
4027
4028 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4029 * kern/ieee1275/cmain.c: ... to here. Update all users.
4030
4031 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4032 * kern/ieee1275/openfw.c: ... to here. Update all users.
4033
4034 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4035 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4036
4037 2008-04-10 Pavel Roskin <proski@gnu.org>
4038
4039 * configure.ac: Always use "_cv_" in cache variables for
4040 compatibility with Autoconf 2.62.
4041
4042 2008-04-07 Robert Millan <rmh@aybabtu.com>
4043
4044 Revert grub/machine/init.h addition by Pavel (since it breaks on
4045 i386-ieee1275 and others):
4046 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4047 * util/powerpc/ieee1275/misc.c: Likewise.
4048
4049 2008-04-07 Robert Millan <rmh@aybabtu.com>
4050
4051 * util/grub-probe.c (probe): Improve error message.
4052
4053 2008-04-07 Robert Millan <rmh@aybabtu.com>
4054
4055 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4056 (this prevents the presence of a bogus entry from ruining the whole
4057 thing).
4058
4059 2008-04-06 Pavel Roskin <proski@gnu.org>
4060
4061 * util/biosdisk.c: Include grub/util/biosdisk.h.
4062 * util/grub-fstest.c (execute_command): Make static.
4063 * util/grub-mkdevicemap.c (check_device): Likewise.
4064 * util/i386/pc/misc.c: Include grub/machine/init.h.
4065 * util/powerpc/ieee1275/misc.c: Likewise.
4066 * util/lvm.c: Include grub/util/lvm.h.
4067 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4068 grub/cache.h.
4069 * util/raid.c: Include grub/util/raid.h.
4070 (grub_util_getdiskname): Make static.
4071
4072 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4073 grub_hostfs_fini(), as they are called from grub_init_all() and
4074 grub_fini_all() respectively. This fixes an infinite loop in
4075 grub-fstest due to double registration of hostfs.
4076 Reported by Christian Franke <Christian.Franke@t-online.de>
4077
4078 2008-04-05 Pavel Roskin <proski@gnu.org>
4079
4080 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4081 all 8 functions. Otherwise, probe function 0 only.
4082
4083 2008-04-04 Pavel Roskin <proski@gnu.org>
4084
4085 * commands/lspci.c (grub_lspci_iter): Print the bus number
4086 correctly.
4087
4088 * commands/lspci.c (grub_pci_classes): Fix typos.
4089 (grub_lspci_iter): Don't print func twice. Print vendor ID
4090 before device ID, as it's normally done.
4091
4092 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4093 Fix signedness warnings.
4094 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4095 Likewise.
4096 * util/ieee1275/get_disk_name.c: Include config.h so that
4097 _GNU_SOURCE is defined and getline() is declared. Mark an
4098 unused argument as such. Fix a signedness warning.
4099
4100 2008-04-02 Pavel Roskin <proski@gnu.org>
4101
4102 * genkernsyms.sh.in: Use more robust assignments for CC and
4103 srcdir. Quote srcdir.
4104 * gensymlist.sh.in: Likewise. Assert at the compile time that
4105 the symbol table is not empty.
4106
4107 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4108 * fs/cpio.c (grub_cpio_read): Likewise.
4109
4110 2008-04-01 Pavel Roskin <proski@gnu.org>
4111
4112 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4113 * disk/host.c (grub_host_open): Likewise.
4114 * disk/loopback.c (grub_loopback_open): Likewise.
4115 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4116 disk->id as in disk/host.c, not a multi-character constant.
4117
4118 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4119 later is obsolete, potentially dangerous and sets a bad example.
4120 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4121 * util/misc.c (grub_util_get_image_size): Likewise.
4122
4123 * disk/loopback.c (options): Improve help for "--partitions".
4124
4125 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4126 options to align them with the short options, e.g. "echo -e".
4127
4128 2008-03-31 Bean <bean123ch@gmail.com>
4129
4130 * video/reader/png.c (grub_png_data): New member is_16bit and
4131 image_data.
4132 (grub_png_decode_image_header): Detect 16 bit png image.
4133 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4134 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4135 (grub_video_reader_png): Release memory occupied by image_data.
4136
4137 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4138 4096 bytes.
4139 (grub_nfs_mount): Skip the test for sector per cluster.
4140
4141 * include/grub/ntfs.h (MAX_SPC): Removed.
4142
4143 2008-03-31 Bean <bean123ch@gmail.com>
4144
4145 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4146 (grub_probe_SOURCES): Add fs/afs.c.
4147 (grub_fstest_SOURCES): Likewise.
4148 (afs_mod_SOURCES): New variable.
4149 (afs_mod_CFLAGS): Likewise.
4150 (afs_mod_LDFLAGS): Likewise.
4151
4152 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4153 (grub_emu_SOURCES): Likewise.
4154
4155 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4156
4157 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4158
4159 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4160
4161 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4162
4163 * fs/afs.c: New file.
4164
4165 2008-03-30 Pavel Roskin <proski@gnu.org>
4166
4167 * disk/host.c: Include grub/misc.h to fix a warning.
4168 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4169 warnings about implicit declarations.
4170
4171 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4172 variable.
4173 * include/grub/i386/loader.h: Change declaration of
4174 grub_linux_boot() to match what grub_loader_set() expects.
4175 * util/getroot.c (grub_guess_root_device): Return const char* to
4176 fix a warning.
4177 * util/grub-probe.c (probe): Fix a warning about uninitialized
4178 abstraction_name variable.
4179 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4180 second argument as unused to fix a warning.
4181
4182 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4183 missing grub_error() call.
4184
4185 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4186 2.60 and newer uses it to define datadir.
4187
4188 * commands/sleep.c: Fix warning about implicit declaration.
4189 * disk/memdisk.c: Likewise.
4190 * loader/aout.c: Likewise.
4191 * loader/i386/bsd_normal.c: Likewise.
4192 * util/grub-probe.c: Likewise.
4193
4194 * commands/i386/cpuid.c (has_longmode): Make static.
4195 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4196 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4197
4198 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4199 GDT. This is more robust, as %ds can change.
4200 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4201 calling real_to_prot().
4202 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4203
4204 2008-03-28 Pavel Roskin <proski@gnu.org>
4205
4206 * kern/i386/pc/startup.S: Assert that uncompressed functions
4207 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4208 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4209 code, as they push parts of the code (error handlers) beyond
4210 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4211 code as correctness and size.
4212
4213 2008-03-28 Pavel Roskin <proski@gnu.org>
4214
4215 * kern/i386/pc/startup.S
4216 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4217 data block address to the real mode, keep offset minimal. This
4218 works around a bug in AWARD BIOS on old Athlon systems, which
4219 makes CD detection hang.
4220
4221 2008-03-26 Pavel Roskin <proski@gnu.org>
4222
4223 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4224 const.
4225 * include/grub/normal.h: Add grub_parse_color_name_pair()
4226 declaration.
4227
4228 2008-03-24 Bean <bean123ch@gmail.com>
4229
4230 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4231 (cd_count): Removed.
4232 (cd_drive): New variable.
4233 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4234 (grub_biosdisk_call_hook): Likewise.
4235 (grub_biosdisk_iterate): Change cdrom detection method.
4236 (grub_biosdisk_open): Replace cd_start with cd_drive.
4237 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4238 detect cdrom device.
4239
4240 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4241 Removed.
4242 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4243 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4244 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4245 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4246 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4247 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4248 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4249 (grub_biosdisk_cdrp): New structure.
4250 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4251
4252 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4253
4254 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4255 device.
4256
4257 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4258 New function.
4259
4260 2008-03-20 Robert Millan <rmh@aybabtu.com>
4261
4262 Remove 2 TiB limit in ata.mod.
4263 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4264 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4265 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4266 grub_uint64_t instead of grub_uint32_t.
4267
4268 2008-03-05 Bean <bean123ch@gmail.com>
4269
4270 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4271 (grub_multiboot): Set boot device.
4272
4273 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4274
4275 2008-03-02 Bean <bean123ch@gmail.com>
4276
4277 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4278 symlink_buffer.
4279
4280 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4281
4282 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4283 texinfo.tex.
4284
4285 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4286 modified.
4287
4288 * docs/fdl.texi: New file.
4289
4290 * docs/mdate-sh: New file. Copied from gnulib.
4291 * docs/texinfo.tex: Likewise.
4292
4293 * config.guess: Updated from gnulib.
4294 * install-sh: Likewise.
4295
4296 2008-02-28 Robert Millan <rmh@aybabtu.com>
4297
4298 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4299 (aout_mod_SOURCES): New variable.
4300 (aout_mod_CFLAGS): Likewise.
4301 (aout_mod_LDFLAGS): Likewise.
4302
4303 * conf/i386-ieee1275.rmk: Likewise.
4304
4305 2008-02-28 Robert Millan <rmh@aybabtu.com>
4306
4307 * util/update-grub.in: Reorganise terminal validity check. Accept
4308 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4309 Based on suggestion by Franklin PIAT.
4310
4311 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4312
4313 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4314 function.
4315 * util/getroot.c (grub_util_check_block_device): New function that
4316 returns the given argument if it is a block device and returns NULL else.
4317 * util/grub-probe.c (argument_is_device): New variable.
4318 (probe): Promote device_name from a variable to an argument. Receive
4319 device_name from grub_util_check_block_device() if path is NULL and from
4320 grub_guess_root_device() else. Do not free() device_name anymore.
4321 (options): Introduce new parameter '-d, --device'.
4322 (main): Add description of the new parameter to the help screen.
4323 Rename path variable to argument. Set argument_is_device if the '-d'
4324 option is given. Pass argument to probe() depending on
4325 argument_is_device.
4326
4327 2008-02-24 Bean <bean123ch@gmail.com>
4328
4329 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4330 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4331 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4332 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4333 (GRUB_ISO9660_VOLDESC_END): Likewise.
4334 (grub_iso9660_primary_voldesc): New member escape.
4335 (grub_iso9660_data): New member joliet.
4336 (grub_iso9660_convert_string): New function.
4337 (grub_iso9660_mount): Detect joliet extension.
4338 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4339 (grub_iso9660_iso9660_label): Likewise.
4340
4341 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4342 (grub_setup_SOURCES): Add fs/udf.c.
4343 (grub_fstest_SOURCES): Likewise.
4344 (udf_mod_SOURCES): New variable.
4345 (udf_mod_CFLAGS): Likewise.
4346 (udf_mod_LDFLAGS): Likewise.
4347
4348 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4349 (grub_emu_SOURCES): Likewise.
4350
4351 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4352
4353 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4354
4355 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4356
4357 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4358
4359 * fs/udf.c: New file.
4360
4361 2008-02-24 Robert Millan <rmh@aybabtu.com>
4362
4363 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4364 (normal/lexer.c_DEPENDENCIES): New variables.
4365 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4366 (normal/lexer.c_DEPENDENCIES): Likewise.
4367 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4368 (normal/lexer.c_DEPENDENCIES): Likewise.
4369 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4370 (normal/lexer.c_DEPENDENCIES): Likewise.
4371 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4372 (normal/lexer.c_DEPENDENCIES): Likewise.
4373 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4374 (normal/lexer.c_DEPENDENCIES): Likewise.
4375
4376 2008-02-23 Robert Millan <rmh@aybabtu.com>
4377
4378 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4379 since they were intended to be in hex. This didn't break previously
4380 because of a bug in gpt_partition_map_iterate() (see below).
4381
4382 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4383 when checking the validity of GPT header.
4384 Remove `partno', since it always provides the same information as `i'.
4385
4386 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4387
4388 * include/grub/efi/time.h: Fix a wrong comment.
4389
4390 2008-02-19 Pavel Roskin <proski@gnu.org>
4391
4392 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4393 message.
4394
4395 2008-02-19 Bean <bean123ch@gmail.com>
4396
4397 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4398 (aout_mod_SOURCES): New variable.
4399 (aout_mod_CFLAGS): Likewise.
4400 (aout_mod_LDFLAGS): Likewise.
4401 (_bsd_mod_SOURCES): New variable.
4402 (_bsd_mod_CFLAGS): Likewise.
4403 (_bsd_mod_LDFLAGS): Likewise.
4404 (bsd_mod_SOURCES): New variable.
4405 (bsd_mod_CFLAGS): Likewise.
4406 (bsd_mod_LDFLAGS): Likewise.
4407
4408 * include/grub/aout.h: New file.
4409
4410 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4411
4412 * include/grub/i386/bsd.h: New file.
4413
4414 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4415 to make it public.
4416
4417 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4418 function is called, so that it's possible to change it inside the hook.
4419 (grub_elf64_load): Likewise.
4420 (grub_elf_file): Don't close the file if elf header is not found.
4421 (grub_elf_close): Close the file if grub_elf_file fails (The new
4422 grub_elf_file won't close it).
4423 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4424 (grub_elf64_size): Likewise.
4425
4426 * kern/i386/loader.S (grub_unix_real_boot): New function.
4427
4428 * loader/aout.c: New file.
4429
4430 * loader/i386/bsd.c: New file.
4431
4432 * loader/i386/bsd_normal.c: New file.
4433
4434 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4435
4436 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4437 can test other formats.
4438
4439 2008-02-19 Robert Millan <rmh@aybabtu.com>
4440
4441 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4442 (grub_gpt_partition_type_empty): Redefine with macro from
4443 `<grub/gpt_partition.h>'.
4444 (gpt_partition_map_iterate): Adjust partition type comparison.
4445
4446 Export `entry' as partmap-specific `part.data' struct.
4447 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4448
4449 * include/grub/gpt_partition.h (grub_gpt_header)
4450 (grub_gpt_partentry): ... to here (new file).
4451
4452 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4453
4454 (grub_gpt_partition_type_bios_boot): New const variable, defined
4455 with macro from `<grub/gpt_partition.h>'.
4456
4457 (setup): Replace `first_start' with `embed_region', which keeps
4458 track of the embed region (and is partmap-agnostic).
4459
4460 Replace find_first_partition_start() with find_usable_region(),
4461 which finds a usable region for embedding using partmap-specific
4462 knowledge (supports PC/MSDOS and GPT).
4463
4464 Fix all assumptions that the embed region start at sector 1, using
4465 `embed_region.start' from now on. Similarly, use `embed_region.end'
4466 rather than `first_start' to calculate available size.
4467
4468 In grub_util_info() message, replace "into after the MBR" with an
4469 indication of the specific sector our embed region starts at.
4470
4471 2008-02-19 Robert Millan <rmh@aybabtu.com>
4472
4473 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4474 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4475 `commands/reboot.c'.
4476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4477 (halt_mod_SOURCES): Likewise.
4478 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4479 (halt_mod_SOURCES): Likewise.
4480
4481 2008-02-17 Christian Franke <franke@computer.org>
4482
4483 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4484
4485 2008-02-17 Robert Millan <rmh@aybabtu.com>
4486
4487 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4488 set `first_start' to 0 for non-PC/MSDOS partition maps.
4489
4490 2008-02-16 Robert Millan <rmh@aybabtu.com>
4491
4492 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4493 do not assume partition map is PC/MSDOS before performing checks that
4494 are specific to that layout.
4495
4496 2008-02-13 Robert Millan <rmh@aybabtu.com>
4497
4498 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4499 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4500 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4501
4502 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4503
4504 * configure.ac: Only a cosmetic change on the handling of
4505 -fno-stack-protector.
4506
4507 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
4508
4509 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4510 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4511 reboot.c.
4512 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4513 (halt_mod_SOURCES): New variable.
4514 (halt_mod_CFLAGS): Likewise.
4515 (halt_mod_LDFLAGS): Likewise.
4516 (reboot_mod_SOURCES): Likewise.
4517 (reboot_mod_CFLAGS): Likewise.
4518 (reboot_mod_LDFLAGS): Likewise.
4519
4520 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4521 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4522 reboot.c.
4523 (halt_mod_SOURCES): Likewise.
4524 (reboot_mod_SOURCES): Likewise.
4525
4526 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4527 commands/i386/pc/reboot.c by commands/reboot.c.
4528 (reboot_mod_SOURCES): Likewise.
4529
4530 * commands/i386/pc/reboot.c: merge this file ...
4531
4532 * commands/ieee1275/reboot.c: ... and this file ...
4533
4534 * commands/reboot.c: ... to this file.
4535 Add some precompiler directive to include the correct header for
4536 each machine.
4537
4538 * commands/ieee1275/halt.c: move this file ...
4539
4540 * commands/halt.c: ... to here.
4541 Add some precompiler directive to include the correct header for
4542 each machine.
4543
4544 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4545 (grub_halt): Likewise.
4546
4547 * kern/efi/efi.c (grub_reboot): New function.
4548 (grub_halt): Likewise.
4549
4550 2008-02-12 Robert Millan <rmh@aybabtu.com>
4551
4552 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4553 /dev (like it is done for /dev/mapper). This doesn't provide support
4554 for EVMS, but at least it is now easy to identify the problem when it
4555 arises.
4556
4557 2008-02-11 Robert Millan <rmh@aybabtu.com>
4558
4559 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4560 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4561 comparing it with -1, not 0.
4562
4563 2008-02-10 Robert Millan <rmh@aybabtu.com>
4564
4565 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4566 `disk/lvm.c'.
4567 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4568 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4569
4570 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4571 `disk/lvm.c' to the end of the list.
4572 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4573 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4574
4575 2008-02-10 Robert Millan <rmh@aybabtu.com>
4576
4577 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4578 grub_print_error() instead. This will let user know why we're entering
4579 rescue mode.
4580 Based on suggestions from Sam Morris.
4581
4582 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4583
4584 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4585 on remaining N args, instead of "--" arg N times.
4586
4587 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4588
4589 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4590 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4591 pattern for unknown glyphs.
4592
4593 2008-02-09 Robert Millan <rmh@aybabtu.com>
4594
4595 * configure.ac: Probe for `help2man'.
4596 * Makefile.in (builddir): New variable.
4597 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4598 or otherwise add a few flags/options to it.
4599 (install-local): For every executable utility or script that is
4600 installed, invoke $(HELP2MAN) to install a manpage based on --help
4601 output.
4602
4603 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4604 that it doesn't prevent --help from working in build tree.
4605
4606 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4607 with `bug-grub@gnu.org'.
4608 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4609 * util/update-grub.in (usage): New function.
4610 Implement proper argument check, with support for --help and --version
4611 (as well as existing -y).
4612
4613 2008-02-09 Christian Franke <franke@computer.org>
4614
4615 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4616 avoid overwriting previous output.
4617 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4618
4619 2008-02-09 Robert Millan <rmh@aybabtu.com>
4620
4621 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4622 drawing the menu.
4623
4624 2008-02-09 Robert Millan <rmh@aybabtu.com>
4625
4626 * commands/sleep.c: New file.
4627 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4628 (sleep_mod_SOURCES): New variable.
4629 (sleep_mod_CFLAGS): Likewise.
4630 (sleep_mod_LDFLAGS): Likewise.
4631
4632 2008-02-09 Robert Millan <rmh@aybabtu.com>
4633
4634 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4635 situations in which we can deduce the RAID size and the superblock
4636 doesn't match it.
4637
4638 2008-02-09 Robert Millan <rmh@aybabtu.com>
4639
4640 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4641 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4642 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4643
4644 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4645 and return a grub_diskmemberlist_t composed of physical array members.
4646 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4647
4648 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4649 prototype.
4650 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4651 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4652 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4653
4654 * util/grub-probe.c (probe): Move partmap probing code from here ...
4655 (probe_partmap): ... to here.
4656 (probe): Use probe_partmap() once for the disk we're probing, and
4657 additionally, when such disk contains a memberlist() struct member,
4658 once for each disk that is contained in the structure returned by
4659 memberlist().
4660
4661 2008-02-09 Robert Millan <rmh@aybabtu.com>
4662
4663 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4664 environment variable to 'all' in order to obtain debug output from
4665 non-util/ code.
4666 * util/i386/pc/grub-setup.c (main): Likewise.
4667
4668 2008-02-08 Robert Millan <rmh@aybabtu.com>
4669
4670 * disk/raid.c (grub_raid_scan_device): Check for
4671 `array->device[sb.this_disk.number]' rather than for
4672 `array->device[sb.this_disk.number]->name', since the latter is not
4673 guaranteed to be accessible.
4674
4675 2008-02-08 Robert Millan <rmh@aybabtu.com>
4676
4677 * disk/raid.c: Update copyright.
4678 * fs/cpio.c: Likewise.
4679 * include/grub/raid.h: Likewise.
4680 * loader/i386/pc/multiboot.c: Likewise.
4681 * util/hostfs.c: Likewise.
4682
4683 2008-02-08 Robert Millan <rmh@aybabtu.com>
4684
4685 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4686 to a grub_disk_t array.
4687 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4688 `device[x]'.
4689 (grub_raid_scan_device): Replace `device[x].name' accesses with
4690 `device[x]->name'. Simplify initialization of `array->device[x]'.
4691
4692 2008-02-08 Robert Millan <rmh@aybabtu.com>
4693
4694 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4695 grub_dprintf() calls.
4696 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4697 error message.
4698
4699 2008-02-07 Christian Franke <franke@computer.org>
4700
4701 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4702 instead of fseek and ftell to support large files.
4703 (grub_hostfs_read): Likewise.
4704
4705 2008-02-07 Robert Millan <rmh@aybabtu.com>
4706
4707 Patch from Jeroen Dekkers.
4708 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4709 failure, since successfully reading all array members might not be
4710 required.
4711
4712 2008-02-06 Robert Millan <rmh@aybabtu.com>
4713
4714 * util/grub-probe.c (probe): Simplify partmap probing (with the
4715 assumption that the first word up to the underscore equals to
4716 the module name).
4717
4718 2008-02-06 Christian Franke <franke@computer.org>
4719
4720 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4721 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4722 last block of a cpio or tar stream.
4723 Check for "TRAILER!!!" instead of any empty data
4724 block to detect last block of a cpio stream.
4725 (grub_cpio_dir): Fix constness of variable np.
4726 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4727 cpio or tar trailer is detected. This fixes a crash
4728 on open of a non existing file.
4729
4730 2008-02-05 Bean <bean123ch@gmail.com>
4731
4732 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4733 address of entry.
4734 (grub_multiboot_load_elf64): Likewise.
4735 (grub_multiboot): Initialize mbi structure.
4736
4737 * util/grub-fstest.c: Don't include unused header file script.h.
4738
4739 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4740 of file.
4741 (grub_fstest_SOURCES): Likewise.
4742
4743 2008-02-05 Robert Millan <rmh@aybabtu.com>
4744
4745 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4746 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4747 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4748 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4749
4750 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4751 (translation_table): Replace hardcoded values with macros
4752 provided by `<grub/term.h>'.
4753
4754 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4755 (keyboard_map): Correct/add a few values, with macros provided
4756 by `<grub/term.h>'.
4757 (keyboard_map_shift): Zero values that don't differ from their
4758 `keyboard_map' equivalents.
4759 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4760 Discard the second scan code that is always sent by Caps lock.
4761 Only use `keyboard_map_shift' when it provides a non-zero value,
4762 otherwise fallback to `keyboard_map'.
4763
4764 2008-02-04 Bean <bean123ch@gmail.com>
4765
4766 * Makefile.in (enable_grub_fstest): New variable.
4767
4768 * conf/common.rmk (grub_fstest_init.lst): New rule.
4769 (grub_fstest_init.h): Likewise.
4770 (grub_fstest_init.c): Likewise.
4771 (util/grub-fstest.c_DEPENDENCIES): New variable.
4772 (grub_fstest_SOURCES): Likewise.
4773
4774 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4775
4776 * util/grub-fstest.c: New file.
4777
4778 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4779
4780 Make grub-setup handle a separate root device.
4781
4782 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4783 so that the root device can be compared with the destination
4784 device.
4785 When embedding the core image, if the root and destination devices
4786 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4787 0xFF.
4788 When not embedding, set ROOT_DRIVE to 0xFF.
4789
4790 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4791
4792 Add support for having a grub directory in a different drive. This
4793 is still only the data handling part.
4794
4795 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4796 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4797 (grub_root_drive): New variable.
4798
4799 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4800 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4801 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4802 as it was.
4803
4804 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4805
4806 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4807 macro.
4808 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4809
4810 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4811 is bogus, because PXE booting does not specify any drive
4812 correctly.
4813
4814 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4815 am not sure if this is really correct.
4816
4817 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4818 is always identical to the boot drive when booting from a CD.
4819
4820 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4821 longer.
4822 (root_drive): New variable.
4823 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4824 (setup_sectors): Push %dx right after popping it, because %dh will
4825 be modified later.
4826 (copy_buffer): Restore %dx.
4827
4828 2008-02-03 Robert Millan <rmh@aybabtu.com>
4829
4830 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4831 use `cdboot.img' for cdrom images.
4832
4833 2008-02-03 Robert Millan <rmh@aybabtu.com>
4834
4835 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4836 only setup gfxterm when `font' command has succeeded.
4837
4838 2008-02-03 Robert Millan <rmh@aybabtu.com>
4839
4840 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4841 (grub_rescue_cmd_multiboot_loader)
4842 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4843
4844 2008-02-03 Pavel Roskin <proski@gnu.org>
4845
4846 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4847 %edx and %esi from stack only after grub_gate_a20() is called.
4848 grub_gate_a20() clobbers %edx.
4849
4850 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4851
4852 * configure.ac (AC_INIT): Bumped to 1.96.
4853
4854 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4855 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4856 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4857 video/readers/png.c.
4858
4859 2008-02-03 Bean <bean123ch@gmail.com>
4860
4861 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4862 (cdboot_img_SOURCES): New variable.
4863 (cdboot_img_ASFLAGS): New variable.
4864 (cdboot_img_LDFLAGS): New variable.
4865
4866 * boot/i386/pc/cdboot.S: New file.
4867
4868 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4869 (cd_count): Likewise.
4870 (grub_biosdisk_get_drive): Add support for cd device.
4871 (grub_biosdisk_call_hook): Likewise.
4872 (grub_biosdisk_iterate): Likewise.
4873 (grub_biosdisk_open): Likewise.
4874 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4875 (grub_biosdisk_rw): Support reading from cd device.
4876 (GRUB_MOD_INIT): Iterate cd devices.
4877
4878 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4879 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4880 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4881
4882 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4883
4884 2008-02-02 Robert Millan <rmh@aybabtu.com>
4885
4886 * commands/read.c: New file.
4887 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4888 (read_mod_SOURCES): New variable.
4889 (read_mod_CFLAGS): Likewise.
4890 (read_mod_LDFLAGS): Likewise.
4891
4892 2008-02-02 Robert Millan <rmh@aybabtu.com>
4893
4894 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4895 determining whether menu has to be displayed.
4896
4897 2008-02-02 Marco Gerards <marco@gnu.org>
4898
4899 * bus/pci.c: New file.
4900
4901 * include/grub/pci.h: Likewise.
4902
4903 * include/grub/i386/pc/pci.h: Likewise.
4904
4905 * commands/lspci.c: Likewise.
4906
4907 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4908 `lspci.mod'.
4909 (pci_mod_SOURCES): New variable.
4910 (pci_mod_CFLAGS): Likewise.
4911 (pci_mod_LDFLAGS): Likewise.
4912 (lspci_mod_SOURCES): Likewise.
4913 (lspci_mod_CFLAGS): Likewise.
4914 (lspci_mod_LDFLAGS): Likewise.
4915
4916 2008-02-02 Bean <bean123ch@gmail.com>
4917
4918 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4919 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4920
4921 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4922 (grub_xfs_btree_node): New structure.
4923 (grub_xfs_btree_root): New structure.
4924 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4925 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4926 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4927 (GRUB_XFS_EXTENT_SIZE): Likewise.
4928 (grub_xfs_read_block): Support btree format type.
4929 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4930 Use directory block as basic unit.
4931
4932 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4933
4934 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4935 __attribute__ ((__regparm__ (1))).
4936
4937 2008-02-01 Robert Millan <rmh@aybabtu.com>
4938
4939 Correct a mistake in previous commit.
4940
4941 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4942 top.
4943 (normal/command.c_DEPENDENCIES): New variable.
4944
4945 2008-02-01 Robert Millan <rmh@aybabtu.com>
4946
4947 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4948 top.
4949 (normal/command.c_DEPENDENCIES): New variable.
4950 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4951 * conf/i386-ieee1275.rmk: Likewise.
4952 * conf/i386-linuxbios.rmk: Likewise.
4953 * conf/i386-pc.rmk: Likewise.
4954 * conf/sparc64-ieee1275.rmk: Likewise.
4955 * conf/powerpc-ieee1275.rmk: Likewise.
4956 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4957
4958 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4959
4960 2008-02-01 Robert Millan <rmh@aybabtu.com>
4961
4962 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4963 call at beginning of function.
4964
4965 2008-01-31 Pavel Roskin <proski@gnu.org>
4966
4967 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4968 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4969 (grub_mkrescue_SOURCES): Likewise.
4970 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4971
4972 2008-01-30 Robert Millan <rmh@aybabtu.com>
4973
4974 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4975 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4976 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4977 (grub_probe_SOURCES): ... to here.
4978
4979 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4980 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4981 * conf/i386-ieee1275.rmk: Likewise.
4982 * conf/i386-linuxbios.rmk: Likewise.
4983 * conf/powerpc-ieee1275.rmk: Likewise.
4984
4985 2008-01-30 Tristan Gingold <gingold@free.fr>
4986
4987 * kern/rescue.c: Silently accept empty lines.
4988
4989 2008-01-29 Bean <bean123ch@gmail.com>
4990
4991 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4992 (real_code_2): Code cleanup and change comment style.
4993 (move_memory): Avoid using 32-bit address mode.
4994
4995 2008-01-29 Bean <bean123ch@gmail.com>
4996
4997 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4998 (png_mod_SOURCES): New variable.
4999 (png_mod_CFLAGS): Likewise.
5000 (png_mod_LDFLAGS): Likewise.
5001
5002 * video/readers/png.c: New file.
5003
5004 2008-01-28 Robert Millan <rmh@aybabtu.com>
5005
5006 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5007 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5008 `ifndef GRUB_MOD_GAP' hack.
5009 * util/elf/grub-mkimage.c (add_segments): Likewise.
5010
5011 2008-01-27 Robert Millan <rmh@aybabtu.com>
5012
5013 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5014 `GRUB_MOD_GAP' for platforms in which it's not defined.
5015 * util/elf/grub-mkimage.c (add_segments): Likewise.
5016
5017 2008-01-27 Robert Millan <rmh@aybabtu.com>
5018
5019 Get grub-emu to build again (including parallel builds).
5020
5021 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5022 Split into ...
5023 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5024 (normal/execute.c_DEPENDENCIES): ... this, ...
5025 (grub-emu_DEPENDENCIES): ... and this.
5026
5027 * conf/i386-efi.rmk: Likewise.
5028 * conf/i386-linuxbios.rmk: Likewise.
5029 * conf/i386-ieee1275.rmk: Likewise.
5030 * conf/powerpc-ieee1275.rmk: Likewise.
5031 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5032
5033 2008-01-27 Robert Millan <rmh@aybabtu.com>
5034
5035 * NEWS: Add a few items.
5036
5037 2008-01-27 Robert Millan <rmh@aybabtu.com>
5038
5039 Fix parallel builds with grub-emu. Based on earlier commit for
5040 grub-probe and grub-setup.
5041
5042 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5043 (util/grub-emu.c_DEPENDENCIES): ... this.
5044 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5045 (util/grub-emu.c_DEPENDENCIES): ... this.
5046 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5047 (util/grub-emu.c_DEPENDENCIES): ... this.
5048 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5049 (util/grub-emu.c_DEPENDENCIES): ... this.
5050 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5051 (util/grub-emu.c_DEPENDENCIES): ... this.
5052
5053 2008-01-27 Pavel Roskin <proski@gnu.org>
5054
5055 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5056 to create a gap between _end and the modules added to the image
5057 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5058 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5059 * util/elf/grub-mkimage.c (add_segments): Likewise.
5060
5061 2008-01-26 Pavel Roskin <proski@gnu.org>
5062
5063 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5064 just return an error.
5065
5066 2008-01-26 Bean <bean123ch@gmail.com>
5067
5068 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5069 (grub_reiserfs_get_item): Save offset of the next item.
5070 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5071
5072 2008-01-25 Robert Millan <rmh@aybabtu.com>
5073
5074 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5075 make all filesystem sources appear together (possibly fixing omissions
5076 while at it).
5077 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5078 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5079 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5080 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5081
5082 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5083 add `kern/file.c'.
5084 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5085 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5086 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5087 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5088
5089 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5090 (probe): Add a sanity check to make sure of our ability to read
5091 requested files when probing for filesystem type.
5092
5093 * genmk.rb: Update copyright year (2007).
5094
5095 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5096 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5097 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5098 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5099 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5100 : Remove function prototypes.
5101
5102 2008-01-25 Robert Millan <rmh@aybabtu.com>
5103
5104 Revert my previous commits (based on wrong assumption of how grub_errno
5105 works).
5106
5107 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5108 * kern/file.c (grub_file_open): Likewise.
5109
5110 2008-01-24 Pavel Roskin <proski@gnu.org>
5111
5112 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5113 that hang if GRUB tries to setup colors.
5114 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5115 colors for firmwares that don't support it.
5116 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5117 Recognize Open Hack'Ware, set flags to work around its
5118 limitations.
5119
5120 2008-01-24 Robert Millan <rmh@aybabtu.com>
5121
5122 * kern/file.c (grub_file_open): Do not account previous failures of
5123 unrelated functions when grub_errno is checked for.
5124 Reported by Oleg Strikov.
5125
5126 2008-01-24 Bean <bean123ch@gmail.com>
5127
5128 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5129 (grub_ufs_sblock): New member volume name.
5130 (grub_ufs_find_file): Fix string copy bug.
5131 (grub_ufs_label): Implement this function properly.
5132
5133 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5134 (grub_hfs_iterate_records): Use the correct file number for extents
5135 and catalog file. Fix problem in next index calculation.
5136 (grub_hfs_find_node): Replace recursive function call with loop.
5137 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5138
5139 2008-01-23 Robert Millan <rmh@aybabtu.com>
5140
5141 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5142 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5143 (grub_multiboot2_real_boot): New function prototype.
5144
5145 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5146 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5147
5148 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5149 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5150
5151 2008-01-23 Robert Millan <rmh@aybabtu.com>
5152
5153 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5154 #ifdef'ed out grub_printf().
5155
5156 2008-01-23 Robert Millan <rmh@aybabtu.com>
5157
5158 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5159 grub_dprintf calls, since they make "debug=all" mode unusable.
5160 (grub_console_checkkey): Likewise.
5161
5162 2008-01-23 Robert Millan <rmh@aybabtu.com>
5163
5164 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5165 `term/i386/pc/at_keyboard.c'.
5166 (pkglib_MODULES): Add `serial.mod'.
5167 (serial_mod_SOURCES): New variable.
5168 (serial_mod_CFLAGS): Likewise.
5169 (serial_mod_LDFLAGS): Likewise.
5170
5171 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5172 `<grub/powerpc/ieee1275/console.h>'.
5173 (grub_keyboard_controller_init): New function prototype.
5174 (grub_console_checkkey): Likewise.
5175 (grub_console_getkey): Likewise.
5176
5177 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5178 keyboard on i386.
5179
5180 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5181 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5182
5183 2008-01-23 Robert Millan <rmh@aybabtu.com>
5184
5185 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5186 present, "(memdisk)/boot/grub" becomes the default prefix.
5187
5188 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5189 a memdisk tarball with all the modules. Add --overlay=DIR option that
5190 allows users to overlay additional files into the image.
5191
5192 2008-01-23 Robert Millan <rmh@aybabtu.com>
5193
5194 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5195 and `machine/memory.h'.
5196 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5197 (_multiboot_mod_SOURCES): New variable.
5198 (_multiboot_mod_CFLAGS): Likewise.
5199 (_multiboot_mod_LDFLAGS): Likewise.
5200 (multiboot_mod_SOURCES): Likewise.
5201 (multiboot_mod_CFLAGS): Likewise.
5202 (multiboot_mod_LDFLAGS): Likewise.
5203
5204 * include/grub/i386/ieee1275/loader.h: New file.
5205
5206 * include/grub/i386/ieee1275/machine.h: Likewise.
5207
5208 * include/grub/i386/ieee1275/memory.h: Likewise.
5209
5210 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5211 variable declaration.
5212 (grub_os_area_size): Likewise.
5213
5214 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5215 (grub_lower_mem, grub_upper_mem): New variables.
5216 (grub_stop_floppy): New function (just to make
5217 grub_multiboot2_real_boot() happy).
5218
5219 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5220 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5221 (grub_stop): New function.
5222 Include `"../realmode.S"' and `"../loader.S"'.
5223
5224 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5225 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5226
5227 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5228 rely on grub_multiboot2_real_boot() for final boot.
5229
5230 2008-01-22 Robert Millan <rmh@aybabtu.com>
5231
5232 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5233 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5234 device that doesn't look like an SD card.
5235 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5236 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5237 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5238 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5239 found.
5240
5241 2008-01-22 Robert Millan <rmh@aybabtu.com>
5242
5243 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5244 avoid claiming over our own code.
5245
5246 2008-01-22 Bean <bean123ch@gmail.com>
5247
5248 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5249 (jpeg_mod_SOURCES): New variable.
5250 (jpeg_mod_CFLAGS): Likewise.
5251 (jpeg_mod_LDFLAGS): Likewise.
5252
5253 * video/readers/jpeg.c : New file.
5254
5255 2008-01-22 Bean <bean123ch@gmail.com>
5256
5257 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5258 there are no more items.
5259
5260 2008-01-21 Robert Millan <rmh@aybabtu.com>
5261
5262 * kern/mm.c (grub_mm_init_region): Improve debug message.
5263
5264 2008-01-21 Robert Millan <rmh@aybabtu.com>
5265
5266 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5267 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5268 address.
5269 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5270 a C macro.
5271 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5272 Indicates start of upper memory.
5273 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5274 (generate_image): Abort when image size is big enough to corrupt
5275 upper memory.
5276
5277 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5278 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5279 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5280 instead of hardcoding 0xA0000.
5281 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5282 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5283 instead of hardcoding 0xA0000.
5284
5285 2008-01-21 Robert Millan <rmh@aybabtu.com>
5286
5287 * disk/memdisk.c (memdisk_size): New variable.
5288 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5289 `memdisk_size'.
5290 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5291 image to dynamic memory.
5292 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5293 `memdisk_size'. Free memdisk block.
5294
5295 2008-01-21 Robert Millan <rmh@aybabtu.com>
5296
5297 Fix detection of very small filesystems (like tar).
5298
5299 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5300 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5301 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5302 a problem with this disk).
5303
5304 2008-01-21 Robert Millan <rmh@aybabtu.com>
5305
5306 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5307 on grub_biosdisk_rw_standard() error.
5308
5309 2008-01-21 Robert Millan <rmh@aybabtu.com>
5310
5311 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5312 recent changes.
5313 * kern/elf.c: Likewise.
5314 * kern/ieee1275/ieee1275.c: Likewise.
5315 * kern/powerpc/ieee1275/openfw.c: Likewise.
5316 * term/ieee1275/ofconsole.c: Likewise.
5317
5318 2008-01-21 Robert Millan <rmh@aybabtu.com>
5319
5320 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5321
5322 * include/grub/kernel.h (grub_arch_memdisk_addr)
5323 (grub_arch_memdisk_size): Moved from here ...
5324
5325 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5326 (grub_arch_memdisk_size): ... to here.
5327
5328 2008-01-21 Robert Millan <rmh@aybabtu.com>
5329
5330 Mostly based on bugfix from Bean.
5331
5332 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5333 attribute with hook() parameter.
5334 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5335 declaration.
5336 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5337 attribute with hook() parameter.
5338 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5339 declaration.
5340
5341 2008-01-21 Robert Millan <rmh@aybabtu.com>
5342
5343 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5344 (pkglib_MODULES): Add `memdisk.mod'.
5345 (memdisk_mod_SOURCES): New variable.
5346 (memdisk_mod_CFLAGS): Likewise.
5347 (memdisk_mod_LDFLAGS): Likewise.
5348
5349 * disk/memdisk.c: New file.
5350
5351 * include/grub/disk.h (grub_disk_dev_id): Add
5352 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5353
5354 * include/grub/i386/pc/kernel.h
5355 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5356 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5357 (grub_kernel_image_size): New variable declaration.
5358 (grub_total_module_size): Likewise.
5359 (grub_memdisk_image_size): Likewise.
5360
5361 * include/grub/i386/pc/memory.h
5362 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5363
5364 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5365 (grub_arch_memdisk_addr): New variable declaration.
5366 (grub_arch_memdisk_size): Likewise.
5367
5368 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5369 (grub_arch_memdisk_size): Likewise.
5370
5371 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5372 (codestart): Replace hardcoded `0x100000' with
5373 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5374
5375 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5376 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5377 not NULL, append the contents of the file it refers to, at the end of
5378 the compressed kernel image. Initialize `grub_memdisk_image_size'
5379 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5380 (options): Add "memdisk"|'m' option.
5381 (main): Parse --memdisk|-m option, and pass user-provided path as
5382 parameter to generate_image().
5383
5384 2008-01-20 Robert Millan <rmh@aybabtu.com>
5385
5386 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5387 grub_dprintf() calls from here ...
5388 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5389
5390 2008-01-20 Robert Millan <rmh@aybabtu.com>
5391
5392 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5393
5394 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5395 declaration.
5396 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5397 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5398 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5399 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5400 property).
5401 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5402 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5403
5404 2008-01-19 Robert Millan <rmh@aybabtu.com>
5405
5406 Get rid of confusing function (superseded by
5407 `grub_ieee1275_get_integer_property')
5408 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5409 prototype.
5410 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5411 function.
5412 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5413 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5414 in native endianness from grub_ieee1275_get_integer_property().
5415
5416 2008-01-19 Robert Millan <rmh@aybabtu.com>
5417
5418 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5419 command after "shut-down", since implementations differ on which
5420 the command for halt is.
5421
5422 2008-01-19 Robert Millan <rmh@aybabtu.com>
5423
5424 * include/grub/i386/linuxbios/console.h: Add header protection.
5425 (grub_keyboard_controller_init): New function prototype.
5426 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5427 (KEYBOARD_COMMAND_READ): Likewise.
5428 (KEYBOARD_COMMAND_WRITE): Likewise.
5429 (KEYBOARD_SCANCODE_SET1): Likewise.
5430 (grub_keyboard_controller_write): New function.
5431 (grub_keyboard_controller_read): Likewise.
5432 (grub_keyboard_controller_init): Likewise.
5433
5434 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5435 (grub_console_init): On coreboot/LinuxBIOS, call
5436 grub_keyboard_controller_init().
5437
5438 2008-01-19 Robert Millan <rmh@aybabtu.com>
5439
5440 PowerPC changes provided by Pavel Roskin.
5441
5442 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5443 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5444 don't rely on cmain() doing it.
5445 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5446 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5447
5448 2008-01-16 Robert Millan <rmh@aybabtu.com>
5449
5450 * include/grub/i386/linuxbios/memory.h
5451 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5452 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5453 receive `table_header' as argument. Instead, probe for it in the
5454 known memory ranges where it can be present.
5455 (grub_available_iterate): Do not pass a fixed `table_header' address
5456 to grub_linuxbios_table_iterate().
5457
5458 2008-01-15 Robert Millan <rmh@aybabtu.com>
5459
5460 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5461 * conf/i386-ieee1275.rmk: New file.
5462 * include/grub/i386/ieee1275/console.h: Likewise.
5463 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5464 * include/grub/i386/ieee1275/kernel.h: Likewise.
5465 * include/grub/i386/ieee1275/time.h: Likewise.
5466 * kern/i386/ieee1275/init.c: Likewise.
5467 * kern/i386/ieee1275/startup.S: Likewise.
5468
5469 2008-01-15 Robert Millan <rmh@aybabtu.com>
5470
5471 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5472 when pointers are 32-bit (but still do set it to one when they are
5473 64-bit).
5474
5475 2008-01-15 Robert Millan <rmh@aybabtu.com>
5476
5477 * include/grub/ieee1275/ieee1275.h
5478 (grub_ieee1275_get_integer_property): New function prototype.
5479
5480 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5481 (grub_ieee1275_get_integer_property): New function. Wraps around
5482 grub_ieee1275_get_property() to handle endianness.
5483
5484 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5485 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
5486 where appropriate.
5487 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5488 (grub_map): Likewise.
5489 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5490
5491 2008-01-15 Bean <bean123ch@gmail.com>
5492
5493 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5494 (grub_script_execute_cmdline): Reset grub_errno.
5495
5496 * normal/main.c (read_config_file): Reset grub_errno.
5497
5498 * normal/parse.y (script_init): New.
5499 (script): Move function and menuentry here.
5500 (delimiter): New.
5501 (command): Add delimiter at the end of command.
5502 (commands): Adjust to match the new command.
5503 (commandblock): Remove grub_script_lexer_record_start.
5504 (menuentry): Add grub_script_lexer_record_start, use the new commands.
5505 (if): Use the new commands.
5506
5507 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5508
5509 2008-01-15 Robert Millan <rmh@aybabtu.com>
5510
5511 * normal/menu.c (run_menu): Move timeout message from here ...
5512 (print_timeout): ... to here.
5513 (run_menu): Use print_timeout() once during initial draw to print
5514 the whole message, and again in every clock tick to update only
5515 the number of seconds.
5516
5517 2008-01-15 Robert Millan <rmh@aybabtu.com>
5518
5519 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5520 actual size of `available' from grub_ieee1275_get_property(), and
5521 restrict parsing to that bound.
5522
5523 2008-01-15 Christian Franke <franke@computer.org>
5524
5525 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5526 (argp_program_version): Remove variable.
5527 (argp_program_bug_address): Likewise.
5528 (options): Convert from struct argp_option to struct option.
5529 (struct arguments): Remove.
5530 (parse_opt): Remove.
5531 (usage): New function.
5532 (main): Replace struct args members by simple variables.
5533 Replace argp_parse() by getopt_long().
5534 Add switch to evaluate options.
5535 Add missing "(...)" around root_dev in prefix string.
5536
5537 2008-01-14 Robert Millan <rmh@aybabtu.com>
5538
5539 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5540 for grub_ieee1275_exit(), in order to improve portability.
5541
5542 2008-01-14 Robert Millan <rmh@aybabtu.com>
5543
5544 * util/grub.d/10_linux.in (prefix): Define.
5545 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5546
5547 2008-01-13 Pavel Roskin <proski@gnu.org>
5548
5549 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5550 grub_errno if no errors have been detected.
5551
5552 2008-01-12 Robert Millan <rmh@aybabtu.com>
5553
5554 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5555 (grub_util_get_dev_abstraction): New function prototype.
5556
5557 * util/getroot.c: Include `<grub/util/getroot.h>'
5558 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5559 (grub_util_get_dev_abstraction): ... here (new function).
5560
5561 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5562 `PRINT_ABSTRACTION'.
5563 (probe): Probe for abstraction type when requested.
5564 (main): Understand `--target=abstraction'.
5565
5566 * util/i386/efi/grub-install.in: Add abstraction module to core
5567 image when it is found to be necessary.
5568 * util/i386/pc/grub-install.in: Likewise.
5569 * util/powerpc/ieee1275/grub-install.in: Likewise.
5570
5571 * util/update-grub_lib.in (font_path): Return system path without
5572 converting to GRUB path.
5573 * util/update-grub.in: Convert system path returned by font_path()
5574 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5575 abstraction module is needed for loading fonts (if any). Export
5576 that as `GRUB_PRELOAD_MODULES'.
5577 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5578 insmod commands).
5579
5580 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5581
5582 Remove some unused code from reiserfs.
5583
5584 * fs/reiserfs.c (struct grub_reiserfs_key)
5585 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5586 (struct grub_reiserfs_node_body): Removed.
5587 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5588 Likewise.
5589 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5590 Likewise.
5591 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5592 Likewise.
5593 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5594 Likewise.
5595 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5596 Likewise.
5597 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5598 Likewise.
5599 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5600 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5601 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5602
5603 2008-01-10 Robert Millan <rmh@aybabtu.com>
5604
5605 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5606 Determines if a file is garbage left by packaging systems, etc.
5607 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5608 for processing /etc/grub.d scripts.
5609 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5610 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5611 as a condition for processing Linux images.
5612
5613 2008-01-10 Pavel Roskin <proski@gnu.org>
5614
5615 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5616 to compile reiserfs.c on PowerPC.
5617
5618 2008-01-10 Robert Millan <rmh@aybabtu.com>
5619
5620 * kern/device.c (grub_device_iterate): Do not abort device iteration
5621 when one of the devices cannot be opened.
5622 * kern/disk.c (grub_disk_open): Do not account previous failures of
5623 unrelated functions when grub_errno is checked for.
5624
5625 2008-01-08 Robert Millan <rmh@aybabtu.com>
5626
5627 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5628 `! grub_linux_is_bzimage', change order of address comparison to make
5629 it more intuitive, and improve "too big zImage" error message.
5630
5631 2008-01-08 Robert Millan <rmh@aybabtu.com>
5632
5633 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5634 `$(update-grub_DATA)'.
5635 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5636 targets.
5637
5638 2008-01-07 Robert Millan <rmh@aybabtu.com>
5639
5640 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5641 which instruction is modified by grub-setup during installation
5642 (since it wasn't obvious by only looking at this file).
5643
5644 2008-01-07 Robert Millan <rmh@aybabtu.com>
5645
5646 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5647 listing actual TODO items.
5648
5649 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5650
5651 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5652 correctly.
5653 (grub_reiserfs_get_key_offset): Likewise.
5654 (grub_reiserfs_set_key_offset): Likewise.
5655 (grub_reiserfs_set_key_type): Likewise.
5656 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5657
5658 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5659 better to remove the bitfield version completely.
5660
5661 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5662
5663 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5664 allocated from the heap, due to the fshelp implementation.
5665 (grub_reiserfs_dir): Free NODE, due to the same reason.
5666
5667 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5668
5669 Mostly from Vincent Pelletier:
5670
5671 * fs/reiserfs.c: New file.
5672
5673 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5674 (reiserfs_mod_SOURCES): New variable.
5675 (reiserfs_mod_CFLAGS): Likewise.
5676 (reiserfs_mod_LDFLAGS): Likewise.
5677
5678 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5679 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5680 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5681 normal/color.c.
5682
5683 2008-01-06 Robert Millan <rmh@aybabtu.com>
5684
5685 * normal/color.c: Remove `<grub/env.h>'.
5686
5687 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5688
5689 * include/grub/normal.h: Include <grub/env.h>.
5690
5691 2008-01-05 Robert Millan <rmh@aybabtu.com>
5692
5693 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5694 usage example with `(hd0,1)'.
5695 Reported by Samuel Thibault.
5696
5697 2008-01-05 Robert Millan <rmh@aybabtu.com>
5698
5699 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5700 (grub_linux_boot_zimage): Rename to ...
5701 (grub_linux_boot): ... this.
5702 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5703 (grub_linux_boot_zimage): Conditionalize zImage copy.
5704
5705 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5706 (grub_linux_boot_bzimage): Remove prototype.
5707 (grub_linux_boot_zimage): Rename to ...
5708 (grub_linux_boot): ... this.
5709
5710 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5711 (grub_linux_boot): Remove function.
5712
5713 2008-01-05 Robert Millan <rmh@aybabtu.com>
5714
5715 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5716 (grub_env_write_color_highlight): Likewise.
5717 (grub_wait_after_message): Likewise.
5718
5719 * normal/color.c: New file.
5720
5721 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5722 (normal_mod_DEPENDENCIES): Likewise.
5723
5724 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5725 (normal_mod_DEPENDENCIES): Likewise.
5726
5727 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5728 (normal_mod_DEPENDENCIES): Likewise.
5729
5730 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5731 (normal_mod_DEPENDENCIES): Likewise.
5732
5733 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5734 for waiting after a message is printed.
5735 * normal/main.c (read_config_file): Likewise.
5736 (grub_normal_init): Register grub_env_write_color_normal() and
5737 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5738 `color_highlight' variables as global.
5739
5740 * normal/menu.c (grub_wait_after_message): New function.
5741 (grub_color_menu_normal): New variable. Replaces ...
5742 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5743 (grub_color_menu_highlight): New variable. Replaces ...
5744 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5745 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5746 `GRUB_TERM_COLOR_STANDARD'.
5747 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5748 `normal_code' and `highlight_code' to `old_color_normal' and
5749 `old_color_highlight', respectively.
5750 (grub_menu_init_page): Update colors when drawing the menu, based on
5751 `menu_color_normal' and `menu_color_highlight' variables.
5752 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5753 a message is printed.
5754
5755 2008-01-05 Robert Millan <rmh@aybabtu.com>
5756
5757 * kern/env.c (grub_env_context_open): Propagate hooks for global
5758 variables to new context.
5759
5760 * kern/main.c (grub_set_root_dev): Export `root' variable.
5761
5762 2008-01-05 Robert Millan <rmh@aybabtu.com>
5763
5764 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5765 discs unconditionally, since udev and others have options to provide
5766 them.
5767
5768 2008-01-05 Robert Millan <rmh@aybabtu.com>
5769
5770 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5771
5772 2008-01-04 Christian Franke <franke@computer.org>
5773
5774 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5775 of eisa_mmap.
5776
5777 2008-01-03 Pavel Roskin <proski@gnu.org>
5778
5779 * kern/i386/linuxbios/init.c: Put "void" to all function
5780 declarations with no arguments.
5781 * kern/powerpc/ieee1275/init.c: Likewise.
5782 * term/i386/pc/at_keyboard.c: Likewise.
5783 * term/i386/pc/vga_text.c: Likewise.
5784 * util/grub-mkdevicemap.c: Likewise.
5785
5786 2008-01-02 Robert Millan <rmh@aybabtu.com>
5787
5788 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5789 message when loaded image is out of bounds.
5790 (grub_multiboot_load_elf64): Likewise.
5791
5792 2008-01-02 Pavel Roskin <proski@gnu.org>
5793
5794 * util/grub.d/10_linux.in: Try version without ".old" when
5795 looking for initrd. It's better to use initrd from the newer
5796 kernel of the same version than no initrd at all.
5797
5798 2008-01-01 Robert Millan <rmh@aybabtu.com>
5799
5800 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5801
5802 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5803
5804 * include/grub/video.h: Added grub_video_unmap_color and
5805 grub_video_get_active_render_target.
5806 (grub_video_adapter): Added unmap_color and get_active_render_target.
5807
5808 * video/video.c: Added grub_video_unmap_color and
5809 grub_video_get_active_render_target.
5810 (grub_video_get_info): Changed method to accept NULL pointer as an
5811 argument to allow detection of active video adapter.
5812
5813 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5814 grub_video_vbe_unmap_color_int.
5815 Added grub_video_vbe_unmap_color and
5816 grub_video_vbe_get_active_render_target.
5817 (grub_video_vbe_adapter): Added unmap_color and
5818 get_active_render_target.
5819
5820 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5821 with grub_video_vbe_unmap_color_int.
5822
5823 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5824 (DEFAULT_NORMAL_COLOR): Likewise.
5825 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5826 (DEFAULT_FG_COLOR): Removed.
5827 (DEFAULT_BG_COLOR): Likewise.
5828 (DEFAULT_CURSOR_COLOR): Changed value.
5829 (grub_virtual_screen): Added standard_color_setting,
5830 normal_color_setting, highlight_color_setting and term_color.
5831 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5832 (bitmap_width): Added.
5833 (bitmap_height): Likewise.
5834 (bitmap): Likewise.
5835 (set_term_color): Likewise.
5836 (grub_virtual_screen_setup): Changed to use new terminal coloring
5837 settings.
5838 (grub_gfxterm_init): Added init for bitmap.
5839 (grub_gfxterm_fini): Added destroy for bitmap.
5840 (redraw_screen_rect): Updated to use background bitmap and new
5841 terminal coloring.
5842 (scroll_up): Added optimization for case when there is no bitmap.
5843 (grub_gfxterm_cls): Fixed to use correct background color.
5844 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5845 coloring.
5846 (grub_virtual_screen_setcolor): Likewise.
5847 (grub_virtual_screen_getcolor): Added.
5848 (grub_gfxterm_background_image_cmd): Likewise.
5849 (grub_video_term): Added setcolor and getcolor.
5850 (MOD_INIT): Added registration of background_image command.
5851 (MOD_TERM): Added unregistration for background_image command.
5852
5853 2007-12-30 Pavel Roskin <proski@gnu.org>
5854
5855 * loader/multiboot_loader.c: Fix multiboot command
5856 unregistration. Fix all typos in the word "multiboot".
5857
5858 2007-12-29 Pavel Roskin <proski@gnu.org>
5859
5860 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5861 support for initrd names used in Fedora.
5862
5863 2007-12-26 Bean <bean123ch@gmail.com>
5864
5865 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5866 (cpio_mod_SOURCES): New variable.
5867 (cpio_mod_CFLAGS): Likewise.
5868 (cpio_mod_LDFLAGS): Likewise.
5869
5870 * fs/cpio.c: New file.
5871
5872 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5873
5874 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5875
5876 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5877
5878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5879
5880 2007-12-25 Robert Millan <rmh@aybabtu.com>
5881
5882 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5883 (grub_getcolor): New function.
5884
5885 * kern/term.c (grub_getcolor): New function.
5886 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5887 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5888 (print_entry): Set normal and highlight colors to
5889 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5890 respectively, before printing and restore them to old
5891 values afterwards.
5892 (grub_menu_init_page): Likewise. Fill an additional colored space
5893 that would otherwise be left blank.
5894
5895 * term/efi/console.c (grub_console_getcolor): New function.
5896 (struct grub_console_term.getcolor): New variable.
5897 * term/i386/pc/console.c (grub_console_getcolor): New function.
5898 (struct grub_console_term.getcolor): New variable.
5899 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5900 (struct grub_console_term.getcolor): New variable.
5901
5902 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5903 (struct grub_console_term.setcolor): Remove variable.
5904 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5905 (struct grub_console_term.setcolor): Remove variable.
5906 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5907 (struct grub_console_term.setcolor): Remove variable.
5908 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5909 (struct grub_console_term.setcolor): Remove variable.
5910
5911 2007-12-25 Robert Millan <rmh@aybabtu.com>
5912
5913 * configure.ac: Search for possible unifont.hex locations, and
5914 define UNIFONT_HEX if found.
5915
5916 * Makefile.in (UNIFONT_HEX): Define variable.
5917 (DATA): Rename to ...
5918 (PKGLIB): ... this. Update all users.
5919 (PKGDATA): New variable.
5920 (pkgdata_IMAGES): Rename to ...
5921 (pkglib_IMAGES): ... this. Update all users.
5922 (pkgdata_MODULES): Rename to ...
5923 (pkglib_MODULES): ... this. Update all users.
5924 (pkgdata_PROGRAMS): Rename to ...
5925 (pkglib_PROGRAMS): ... this. Update all users.
5926 (pkgdata_DATA): Rename to ...
5927 (pkglib_DATA): ... this. Update all users.
5928 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5929 (unicode.pff, ascii.pff): New rules.
5930 (all-local): Add `$(PKGDATA)' dependency.
5931 (install-local): Process `$(PKGDATA)'.
5932
5933 * util/update-grub_lib.in (font_path): Search for *.pff files in
5934 a few more locations, including `${pkgdata}'.
5935
5936 2007-12-23 Robert Millan <rmh@aybabtu.com>
5937
5938 Patch from Bean <bean123ch@gmail.com>:
5939 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5940 `size'.
5941
5942 2007-12-21 Bean <bean123ch@gmail.com>
5943
5944 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5945 (ntfscomp_mod_SOURCES): New variable.
5946 (ntfscomp_mod_CFLAGS): Likewise.
5947 (ntfscomp_mod_LDFLAGS): Likewise.
5948
5949 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5950 (grub_probe_SOURCES): Likewise.
5951 (grub_emu_SOURCES): Likewise.
5952
5953 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5954 (grub_emu_SOURCES): Likewise.
5955
5956 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5957 (grub_emu_SOURCES): Likewise.
5958
5959 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5960 (grub_emu_SOURCES): Likewise.
5961
5962 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5963 (read_run_list): Renamed to grub_ntfs_read_run_list.
5964 (decomp_nextvcn): Moved to ntfscomp.c.
5965 (decomp_getch): Likewise.
5966 (decomp_get16): Likewise.
5967 (decomp_block): Likewise.
5968 (read_block): Likewise.
5969 (read_data): Partially moved to ntfscomp.c.
5970 (fixup): Change unsigned to grub_uint16_t.
5971 (read_mft): Change unsigned long to grub_uint32_t.
5972 (read_attr): Likewise.
5973 (read_data): Likewise.
5974 (read_run_data): Likewise.
5975 (read_run_list): Likewise.
5976 (read_mft): Likewise.
5977
5978 * fs/ntfscomp.c: New file.
5979
5980 * include/grub/ntfs.h: New file.
5981
5982 2007-12-16 Robert Millan <rmh@aybabtu.com>
5983
5984 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5985 IDE disk check, since Linux is known to support 20 IDE disks.
5986 Reported by Colin Watson.
5987
5988 2007-12-15 Bean <bean123ch@gmail.com>
5989
5990 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5991 (lnxboot_img_SOURCES): New variable.
5992 (lnxboot_img_ASFLAGS): Likewise.
5993 (lnxboot_img_LDFLAGS): Likewise.
5994
5995 * boot/i386/pc/lnxboot.S: New file.
5996
5997 2007-11-24 Pavel Roskin <proski@gnu.org>
5998
5999 * configure.ac: Test if '--build-id=none' is supported by the
6000 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6001 objcopy to generate incorrect binary files (binutils
6002 2.17.50.0.18-1 as shipped by Fedora 8).
6003 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6004 linking, so that build ID doesn't break the test.
6005
6006 2007-11-24 Pavel Roskin <proski@gnu.org>
6007
6008 * include/grub/i386/time.h: use "void" in the argument list
6009 of grub_cpu_idle().
6010 * include/grub/powerpc/time.h: Likewise.
6011 * include/grub/sparc64/time.h: Likewise.
6012
6013 2007-11-18 Christian Franke <franke@computer.org>
6014
6015 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6016 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6017 This fixes the problem that function keys did not work in grub-emu.
6018
6019 2007-11-18 Christian Franke <franke@computer.org>
6020
6021 * disk/host.c (grub_host_open): Remove attribute unused from
6022 name parameter. Add check for "host". This fixes the problem
6023 that grub-emu does not find partitions.
6024
6025 2007-11-18 Christian Franke <franke@computer.org>
6026
6027 * util/hostfs.c (is_dir): New function.
6028 (grub_hostfs_dir): Handle missing dirent.d_type case.
6029 (grub_hostfs_read): Add missing fseek().
6030 (grub_hostfs_label): Clear label pointer. This fixes a crash
6031 of grub-emu on "ls (host)".
6032
6033 2007-11-18 Christian Franke <franke@computer.org>
6034
6035 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6036 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6037 to 64 bit boundary by default.
6038
6039 2007-11-18 Bean <bean123ch@gmail.com>
6040
6041 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6042 (hexdump_mod_SOURCES): New variable.
6043 (hexdump_mod_CFLAGS): Likewise.
6044 (hexdump_mod_LDFLAGS): Likewise.
6045
6046 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6047
6048 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6049
6050 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6051
6052 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6053
6054 * include/grub/hexdump.h: New file.
6055
6056 * commands/hexdump.c: New file.
6057
6058 2007-11-10 Robert Millan <rmh@aybabtu.com>
6059
6060 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6061 in grub_outb() calls.
6062 (beep_on): Likewise.
6063
6064 2007-11-10 Christian Franke <franke@computer.org>
6065
6066 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6067 (grub_menu_run): Likewise.
6068
6069 2007-11-10 Robert Millan <rmh@aybabtu.com>
6070
6071 * include/grub/i386/efi/machine.h: New file.
6072 * include/grub/i386/linuxbios/machine.h: Likewise.
6073 * include/grub/i386/pc/machine.h: Likewise.
6074 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6075 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6076
6077 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6078 (serial_hw_io_addr): New variable.
6079 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6080 instead of `(unsigned short *) 0x400'.
6081
6082 2007-11-10 Bean <bean123ch@gmail.com>
6083
6084 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6085
6086 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6087
6088 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6089 (vga_mod_SOURCES): Added.
6090 (vga_mod_CFLAGS): Likewise.
6091 (vga_mod_LDFLAGS): Likewise.
6092
6093 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6094 grub_outb() calls.
6095 (set_map_mask): Likewise.
6096 (set_read_map): Likewise.
6097 (set_read_address): Likewise.
6098 (vga_font): Removed variable.
6099 (get_vga_glyph): Removed function.
6100 (invalidate_char): Likewise.
6101 (write_char): Changed to use grub_font_get_glyph() for font
6102 information.
6103 (grub_vga_putchar): Likewise.
6104 (grub_vga_getcharwidth): Likewise.
6105
6106 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6107
6108 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6109 flags.
6110 (pxeboot_img_LDFLAGS): Likewise.
6111 (diskboot_img_LDFLAGS): Likewise.
6112 (kernel_img_LDFLAGS): Likewise.
6113
6114 2007-11-06 Robert Millan <rmh@aybabtu.com>
6115
6116 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6117 in grub_outb() calls.
6118 (serial_hw_init): Likewise.
6119
6120 2007-11-05 Robert Millan <rmh@aybabtu.com>
6121
6122 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6123 spaces. Skip non-regular files.
6124
6125 2007-11-05 Robert Millan <rmh@aybabtu.com>
6126
6127 * kern/disk.c (grub_disk_firmware_fini)
6128 (grub_disk_firmware_is_tainted): New variables.
6129
6130 * include/grub/disk.h (grub_disk_firmware_fini)
6131 (grub_disk_firmware_is_tainted): Likewise.
6132
6133 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6134 (grub_disk_biosdisk_fini): ... to here.
6135 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6136 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6137 is set. Register grub_disk_biosdisk_fini() in
6138 `grub_disk_firmware_fini'.
6139
6140 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6141 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6142 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6143 to finish existing firmware disk interface.
6144
6145 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6146 (ata_mod_SOURCES): New variable.
6147 (ata_mod_CFLAGS): Likewise.
6148 (ata_mod_LDFLAGS): Likewise.
6149
6150 2007-11-05 Robert Millan <rmh@aybabtu.com>
6151
6152 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6153 (grub_ata_wait): Reimplement using grub_millisleep().
6154
6155 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6156 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6157
6158 2007-11-03 Marco Gerards <marco@gnu.org>
6159
6160 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6161 (CRTC_ADDR_PORT): New macro.
6162 (CRTC_DATA_PORT): Likewise.
6163 (CRTC_CURSOR): Likewise.
6164 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6165 (CRTC_CURSOR_ADDR_LOW): Likewise.
6166 (update_cursor): New function.
6167 (grub_console_real_putchar): Call `update_cursor'.
6168 (grub_console_gotoxy): Likewise.
6169 (grub_console_cls): Set the default color when clearing the
6170 screen.
6171 (grub_console_setcursor): Implemented.
6172
6173 2007-11-03 Marco Gerards <marco@gnu.org>
6174
6175 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6176 become activate.
6177 (grub_ata_pio_write): Likewise.
6178
6179 (grub_atapi_identify): Wait after issuing an ATA command.
6180 (grub_atapi_packet): Likewise.
6181 (grub_ata_identify): Likewise.
6182 (grub_ata_readwrite): Likewise.
6183
6184 2007-11-03 Marco Gerards <marco@gnu.org>
6185
6186 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6187 (grub_ata_pio_write): Likewise.
6188 (grub_ata_readwrite): Use `grub_error', instead of
6189 returning `grub_errno'.
6190
6191 2007-11-03 Marco Gerards <marco@gnu.org>
6192
6193 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6194 grub_ata_pio_write once for every single sector, instead of for
6195 multiple sectors.
6196
6197 2007-10-31 Robert Millan <rmh@aybabtu.com>
6198
6199 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6200
6201 * conf/i386-linuxbios.rmk: New file.
6202
6203 * kern/i386/pc/hardware.c: Likewise.
6204 * term/i386/pc/at_keyboard.c: Likewise.
6205 * term/i386/pc/vga_text.c: Likewise.
6206
6207 * include/grub/i386/linuxbios/boot.h: Likewise.
6208 * include/grub/i386/linuxbios/console.h: Likewise.
6209 * include/grub/i386/linuxbios/init.h: Likewise.
6210 * include/grub/i386/linuxbios/kernel.h: Likewise.
6211 * include/grub/i386/linuxbios/loader.h: Likewise.
6212 * include/grub/i386/linuxbios/memory.h: Likewise.
6213 * include/grub/i386/linuxbios/serial.h: Likewise.
6214 * include/grub/i386/linuxbios/time.h: Likewise.
6215
6216 * kern/i386/linuxbios/init.c: Likewise.
6217 * kern/i386/linuxbios/startup.S: Likewise.
6218 * kern/i386/linuxbios/table.c: Likewise.
6219
6220 2007-10-31 Marco Gerards <marco@gnu.org>
6221
6222 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6223 (ata_mod_SOURCES): New variable.
6224 (ata_mod_CFLAGS): Likewise.
6225 (ata_mod_LDFLAGS): Likewise.
6226
6227 * disk/ata.c: New file.
6228
6229 * include/grub/disk.h (grub_disk_dev_id): Add
6230 `GRUB_DISK_DEV_ATA_ID'.
6231
6232 2007-10-31 Robert Millan <rmh@aybabtu.com>
6233
6234 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6235 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6236
6237 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6238 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6239
6240 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6241 `<grub/types.h>'.
6242
6243 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6244
6245 2007-10-27 Robert Millan <rmh@aybabtu.com>
6246
6247 * include/grub/types.h (ULONG_MAX): Define macro.
6248
6249 2007-10-22 Robert Millan <rmh@aybabtu.com>
6250
6251 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6252 `"../realmode.S"'.
6253 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6254
6255 2007-10-22 Robert Millan <rmh@aybabtu.com>
6256
6257 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6258 (pkgdata_MODULES): Add `biosdisk.mod'.
6259 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6260 variables.
6261
6262 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6263 (grub_biosdisk_init): Replace with ...
6264 (GRUB_MOD_INIT(biosdisk)): ... this.
6265 (grub_biosdisk_fini): Replace with ...
6266 (GRUB_MOD_FINI(biosdisk)): ... this.
6267
6268 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6269 (grub_machine_init): Remove call to grub_biosdisk_init().
6270 (grub_machine_fini): Remove call to grub_machine_fini().
6271
6272 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6273
6274 2007-10-22 Robert Millan <rmh@aybabtu.com>
6275
6276 * include/grub/time.h: New file.
6277 * include/grub/i386/time.h: Likewise.
6278 * include/grub/powerpc/time.h: Likewise.
6279 * include/grub/sparc64/time.h: Likewise.
6280
6281 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6282 instances to ...
6283 (KERNEL_MACHINE_TIME_HEADER): ... this.
6284 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6285 instances to ...
6286 (KERNEL_MACHINE_TIME_HEADER): ... this.
6287 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6288 instances to ...
6289 (KERNEL_MACHINE_TIME_HEADER): ... this.
6290
6291 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6292 (grub_millisleep): New function.
6293 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6294 (grub_millisleep): New function.
6295 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6296 Remove `grub/machine/time.h' include.
6297 (grub_millisleep): New function.
6298 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6299 Remove `grub/machine/time.h' include.
6300 (grub_millisleep): New function.
6301
6302 * include/grub/misc.h (grub_div_roundup): New function.
6303
6304 * kern/misc.c: Include `<grub/time.h>'.
6305 (grub_millisleep_generic): New function.
6306
6307 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6308 Add `time.h'.
6309 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6310 Add `time.h'.
6311 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6312 `machine/time.h'. Add `time.h'.
6313 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6314
6315 2007-10-21 Robert Millan <rmh@aybabtu.com>
6316
6317 * include/grub/misc.h (grub_max): New function.
6318
6319 2007-10-21 Robert Millan <rmh@aybabtu.com>
6320
6321 * util/misc.c (grub_util_info): Call fflush() before returning.
6322
6323 2007-10-20 Robert Millan <rmh@aybabtu.com>
6324
6325 * genmk.rb (Image): Copy `extra_flags' from here ...
6326 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6327
6328 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6329 to `argc' and `args' arguments.
6330
6331 2007-10-17 Robert Millan <rmh@aybabtu.com>
6332
6333 * kern/i386/loader.S: New file.
6334
6335 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6336 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6337 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6338 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6339 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6340 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6341 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6342 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6343 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6344 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6345 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6346 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6347 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6348 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6349
6350 * kern/i386/realmode.S: New file.
6351
6352 * kern/i386/pc/startup.S (protstack): Moved from here ...
6353 * kern/i386/realmode.S (protstack)... to here.
6354 * kern/i386/pc/startup.S (gdt): Moved from here ...
6355 * kern/i386/realmode.S (gdt)... to here.
6356 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6357 * kern/i386/realmode.S (prot_to_real)... to here.
6358
6359 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6360 `kern/i386/realmode.S'.
6361
6362 2007-10-17 Robert Millan <rmh@aybabtu.com>
6363
6364 * include/grub/i386/loader.h: New file.
6365
6366 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6367 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6368 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6369 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6370 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6371 * include/grub/i386/loader.h (grub_linux_prot_size)
6372 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6373 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6374 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6375 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6376
6377 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6378
6379 2007-10-15 Robert Millan <rmh@aybabtu.com>
6380
6381 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6382 filesystem when dev->disk is unset.
6383 Do probe for filesystem even when dev->disk->has_partitions is set.
6384 In case a filesystem is found, always report it.
6385 In case it isn't, if dev->disk->has_partitions is set, report that
6386 a partition table was found instead of reporting that no filesystem
6387 could be identified.
6388
6389 2007-10-12 Robert Millan <rmh@aybabtu.com>
6390
6391 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6392 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6393
6394 * include/grub/types.h (grub_host_to_target16): New macro.
6395 (grub_host_to_target32): Likewise.
6396 (grub_host_to_target64): Likewise.
6397 (grub_target_to_host16): Likewise.
6398 (grub_target_to_host32): Likewise.
6399 (grub_target_to_host64): Likewise.
6400
6401 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6402 Renamed from to ...
6403 (GRUB_MOD_ALIGN): ...this. Update all users.
6404
6405 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6406 grub_host_to_target32.
6407 Replace grub_be_to_cpu32 with grub_target_to_host32.
6408 (load_modules): Likewise.
6409 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6410 Replace grub_be_to_cpu32 with grub_target_to_host32.
6411 Replace grub_cpu_to_be16 with grub_host_to_target16.
6412 Replace grub_cpu_to_be32 grub_host_to_target32.
6413
6414 2007-10-12 Robert Millan <rmh@aybabtu.com>
6415
6416 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6417 * util/elf/grub-mkimage.c: ... here.
6418
6419 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6420 `util/powerpc/ieee1275/grub-mkimage.c'.
6421
6422 2007-10-07 Robert Millan <rmh@aybabtu.com>
6423
6424 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6425 and make it easier to figure out.
6426 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6427 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6428 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6429 leave us with less than HEAP_MIN_SIZE total heap.
6430 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6431
6432 2007-10-03 Robert Millan <rmh@aybabtu.com>
6433
6434 * include/grub/i386/io.h: New file.
6435 * commands/i386/pc/play.c (inb): Removed.
6436 (outb): Removed.
6437 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6438 with grub_outb().
6439 * term/i386/pc/serial.c (inb): Removed.
6440 (outb): Removed.
6441 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6442 with grub_outb().
6443 * term/i386/pc/vga.c (inb): Removed.
6444 (outb): Removed.
6445 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6446 with grub_outb().
6447
6448 2007-10-02 Robert Millan <rmh@aybabtu.com>
6449
6450 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6452 Reported by Marcin Kurek.
6453
6454 2007-09-07 Robert Millan <rmh@aybabtu.com>
6455
6456 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6457 SmartFirmware version updates (as released by Sven Luther), and avoid
6458 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6459 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6460 known broken.
6461
6462 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6463
6464 From Hitoshi Ozeki:
6465 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6466 when merging two regions.
6467
6468 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6469
6470 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6471 * normal/completion.c (grub_normal_do_completion): Likewise.
6472 Reported by Hitoshi Ozeki.
6473
6474 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6475
6476 Do not use devices at boot in chainloading.
6477
6478 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6479 (boot_part_addr): Likewise.
6480 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6481 with BOOT_DRIVE and BOOT_PART_ADDR.
6482 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6483 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6484
6485 2007-08-29 Robert Millan <rmh@aybabtu.com>
6486
6487 Patch from Simon Peter <dn.tlp@gmx.net>:
6488 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6489 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6490 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6491 util/i386/pc/grub-setup.c_DEPENDENCIES.
6492 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6493 util/grub-probe.c_DEPENDENCIES.
6494 * conf/powerpc-ieee1275.rmk: Likewise.
6495
6496 2007-08-28 Robert Millan <rmh@aybabtu.com>
6497
6498 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6499 to tell grub-mkdevicemap how to name devices.
6500 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6501 feature).
6502
6503 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6504 util/i386/get_disk_name.c.
6505 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6506 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6507 util/ieee1275/get_disk_name.c.
6508
6509 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6510
6511 * DISTLIST: Add util/i386/get_disk_name.c and
6512 util/ieee1275/get_disk_name.c.
6513
6514 * util/grub-mkdevicemap.c: Replace device naming logic with
6515 grub_util_get_disk_name() calls.
6516
6517 2007-08-20 Robert Millan <rmh@aybabtu.com>
6518
6519 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6520 (so that it works for both plural and singular quantities).
6521
6522 2007-08-05 Robert Millan <rmh@aybabtu.com>
6523
6524 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6525 so that [xz] isn't taken into account when determining order.
6526
6527 2007-08-02 Marco Gerards <marco@gnu.org>
6528
6529 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6530 `include/multiboot2.h', `include/grub/elfload.h',
6531 `include/multiboot.h', `include/grub/multiboot.h',
6532 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6533 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6534 `kern/elf.c', `loader/multiboot_loader.c',
6535 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6536 `loader/i386/pc/multiboot2.c',
6537 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6538 `util/i386/pc/grub-mkrescue.in'. Remove
6539 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6540 `include/grub/i386/pc/util/biosdisk.h' and
6541 `include/grub/powerpc/ieee1275/multiboot.h'.
6542
6543 2007-08-02 Bean <bean123ch@gmail.com>
6544
6545 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6546 (ntfs_mod_SOURCES): New variable.
6547 (ntfs_mod_CFLAGS): Likewise.
6548 (ntfs_mod_LDFLAGS): Likewise.
6549
6550 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6551 (grub_probe_SOURCES): Likewise.
6552 (grub_emu_SOURCES): Likewise.
6553
6554 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6555 (grub_emu_SOURCES): Likewise.
6556
6557 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6558 (grub_emu_SOURCES): Likewise.
6559
6560 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6561
6562 * fs/ntfs.c: New file.
6563
6564 2007-08-02 Bean <bean123ch@gmail.com>
6565
6566 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6567
6568 * file.h (grub_file): Likewise.
6569
6570 * fshelp.h (grub_fshelp_read_file): Likewise.
6571
6572 * util/i386/pc/grub-setup.c (setup): Likewise.
6573 (save_first_sector): Likewise.
6574 (save_blocklists): Likewise.
6575
6576 * fs/affs.c (grub_affs_read_file): Likewise.
6577
6578 * fs/ext2.c (grub_ext2_read_file): Likewise.
6579
6580 * fs/fat.c (grub_fat_read_data): Likewise.
6581
6582 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6583
6584 * fs/hfs.c (grub_hfs_read_file): Likewise.
6585
6586 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6587
6588 * fs/jfs.c (grub_jfs_read_file): Likewise.
6589
6590 * fs/minix.c (grub_minix_read_file): Likewise.
6591
6592 * fs/sfs.c (grub_sfs_read_file): Likewise.
6593
6594 * fs/ufs.c (grub_ufs_read_file): Likewise.
6595
6596 * fs/xfs.c (grub_xfs_read_file): Likewise.
6597
6598 * command/blocklist.c (read_blocklist): Likewise.
6599 (print_blocklist): Likewise.
6600
6601 2007-08-02 Marco Gerards <marco@gnu.org>
6602
6603 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6604 `util/hostfs.c'.
6605
6606 * disk/host.c: New file.
6607
6608 * util/hostfs.c: Likewise.
6609
6610 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6611 return `GRUB_ERR_BAD_FS'.
6612 * fs/sfs.c (grub_sfs_mount): Likewise.
6613 * fs/xfs.c (grub_xfs_mount): Likewise.
6614
6615 * include/grub/disk.h (enum grub_disk_dev_id): Add
6616 `GRUB_DISK_DEVICE_HOST_ID'.
6617
6618 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6619
6620 2007-07-24 Jerone Young <jerone@gmail.com>
6621
6622 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6623 modules for compilation.
6624 * conf/powerpc-ieee1275.rmk: Likewise.
6625
6626 * include/multiboot.h: Move multiboot definitions to one file. Rename
6627 many definitions to not get grub specific.
6628 * include/multiboot2.h: Create header with multiboot 2 definitions.
6629 * include/grub/multiboot.h: Header for grub specific function
6630 prototypes and definitions.
6631 * include/grub/multiboot2.h: Likewise.
6632 * include/grub/multiboot_loader.h: Likewise.
6633 * include/grub/i386/pc/multiboot.h: Removed.
6634 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6635
6636 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6637 and 2 to allow for one multiboot and module commands.
6638 * loader/multiboot2.c: Add multiboot2 functionality.
6639 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6640 and definition names.
6641 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6642 2 functions.
6643 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6644 ieee1275 specific multiboot2 code.
6645
6646 * kern/i386/pc/startup.S: Change headers and definition names for
6647 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6648
6649 2007-07-22 Robert Millan <rmh@aybabtu.com>
6650
6651 * geninitheader.sh: Process file specified in first parameter rather
6652 than hardcoding grub_modules_init.lst.
6653 * geninit.sh: Likewise. Also, construct header name dynamically rather
6654 than hardcoding grub_modules_init.h.
6655
6656 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6657 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6658 grub_probe_init.[ch] and grub_setup_init.[ch].
6659
6660 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6661 grub_modules_init.h with grub_emu_init.h.
6662 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6663 grub_probe_init.[ch] files.
6664 * conf/i386-efi.rmk: Likewise.
6665 * conf/i386-pc.rmk: Likewise.
6666 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6667 grub_setup_init.[ch] files.
6668
6669 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6670 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6671 to initialize modules rather than a list of hardcoded functions.
6672 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6673 grub_init_all() to initialize modules rather than a list of hardcoded
6674 functions.
6675
6676 2007-07-22 Robert Millan <rmh@aybabtu.com>
6677
6678 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6679 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6680
6681 2007-07-22 Robert Millan <rmh@aybabtu.com>
6682
6683 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6684 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6685 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6686 flag when running on SmartFirmware.
6687 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6688 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6689 was set.
6690
6691 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6692 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6693 rather than decreasing it.
6694
6695 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6696 there's not enough space to do it, fail in the same way as when it
6697 can't be done because there are no partitions.
6698
6699 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6700 when nvsetenv failed.
6701
6702 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6703
6704 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6705 because this rule is automatically generated.
6706 (grub-mkrescue): Removed for the same reason as above.
6707
6708 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6709
6710 Migrate to GNU General Public License Version 3.
6711
6712 * COPYING: Replaced with the plain text version of GPLv3.
6713
6714 * config.guess: Updated from gnulib.
6715 * config.sub: Likewise.
6716
6717 * geninit.sh: Output a GPLv3 copyright notice.
6718 * geninitheader.sh: Likewise.
6719 * genmodsrc.sh: Likewise.
6720 * gensymlist.sh.in: Likewise.
6721
6722 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6723 * boot/i386/pc/diskboot.S: Likewise.
6724 * boot/i386/pc/pxeboot.S: Likewise.
6725 * commands/blocklist.c: Likewise.
6726 * commands/boot.c: Likewise.
6727 * commands/cat.c: Likewise.
6728 * commands/cmp.c: Likewise.
6729 * commands/configfile.c: Likewise.
6730 * commands/echo.c: Likewise.
6731 * commands/help.c: Likewise.
6732 * commands/ls.c: Likewise.
6733 * commands/search.c: Likewise.
6734 * commands/terminal.c: Likewise.
6735 * commands/test.c: Likewise.
6736 * commands/videotest.c: Likewise.
6737 * commands/i386/cpuid.c: Likewise.
6738 * commands/i386/pc/halt.c: Likewise.
6739 * commands/i386/pc/play.c: Likewise.
6740 * commands/i386/pc/reboot.c: Likewise.
6741 * commands/i386/pc/vbeinfo.c: Likewise.
6742 * commands/i386/pc/vbetest.c: Likewise.
6743 * commands/ieee1275/halt.c: Likewise.
6744 * commands/ieee1275/reboot.c: Likewise.
6745 * commands/ieee1275/suspend.c: Likewise.
6746 * disk/loopback.c: Likewise.
6747 * disk/lvm.c: Likewise.
6748 * disk/raid.c: Likewise.
6749 * disk/efi/efidisk.c: Likewise.
6750 * disk/i386/pc/biosdisk.c: Likewise.
6751 * disk/ieee1275/ofdisk.c: Likewise.
6752 * font/manager.c: Likewise.
6753 * fs/affs.c: Likewise.
6754 * fs/ext2.c: Likewise.
6755 * fs/fat.c: Likewise.
6756 * fs/fshelp.c: Likewise.
6757 * fs/hfs.c: Likewise.
6758 * fs/hfsplus.c: Likewise.
6759 * fs/iso9660.c: Likewise.
6760 * fs/jfs.c: Likewise.
6761 * fs/minix.c: Likewise.
6762 * fs/sfs.c: Likewise.
6763 * fs/ufs.c: Likewise.
6764 * fs/xfs.c: Likewise.
6765 * hello/hello.c: Likewise.
6766 * include/grub/acorn_filecore.h: Likewise.
6767 * include/grub/arg.h: Likewise.
6768 * include/grub/bitmap.h: Likewise.
6769 * include/grub/boot.h: Likewise.
6770 * include/grub/cache.h: Likewise.
6771 * include/grub/device.h: Likewise.
6772 * include/grub/disk.h: Likewise.
6773 * include/grub/dl.h: Likewise.
6774 * include/grub/elfload.h: Likewise.
6775 * include/grub/env.h: Likewise.
6776 * include/grub/err.h: Likewise.
6777 * include/grub/file.h: Likewise.
6778 * include/grub/font.h: Likewise.
6779 * include/grub/fs.h: Likewise.
6780 * include/grub/fshelp.h: Likewise.
6781 * include/grub/gzio.h: Likewise.
6782 * include/grub/hfs.h: Likewise.
6783 * include/grub/kernel.h: Likewise.
6784 * include/grub/loader.h: Likewise.
6785 * include/grub/lvm.h: Likewise.
6786 * include/grub/misc.h: Likewise.
6787 * include/grub/mm.h: Likewise.
6788 * include/grub/net.h: Likewise.
6789 * include/grub/normal.h: Likewise.
6790 * include/grub/parser.h: Likewise.
6791 * include/grub/partition.h: Likewise.
6792 * include/grub/pc_partition.h: Likewise.
6793 * include/grub/raid.h: Likewise.
6794 * include/grub/rescue.h: Likewise.
6795 * include/grub/script.h: Likewise.
6796 * include/grub/setjmp.h: Likewise.
6797 * include/grub/symbol.h: Likewise.
6798 * include/grub/term.h: Likewise.
6799 * include/grub/terminfo.h: Likewise.
6800 * include/grub/tparm.h: Likewise.
6801 * include/grub/types.h: Likewise.
6802 * include/grub/video.h: Likewise.
6803 * include/grub/efi/api.h: Likewise.
6804 * include/grub/efi/chainloader.h: Likewise.
6805 * include/grub/efi/console.h: Likewise.
6806 * include/grub/efi/console_control.h: Likewise.
6807 * include/grub/efi/disk.h: Likewise.
6808 * include/grub/efi/efi.h: Likewise.
6809 * include/grub/efi/pe32.h: Likewise.
6810 * include/grub/efi/time.h: Likewise.
6811 * include/grub/i386/linux.h: Likewise.
6812 * include/grub/i386/setjmp.h: Likewise.
6813 * include/grub/i386/types.h: Likewise.
6814 * include/grub/i386/efi/kernel.h: Likewise.
6815 * include/grub/i386/efi/loader.h: Likewise.
6816 * include/grub/i386/efi/time.h: Likewise.
6817 * include/grub/i386/pc/biosdisk.h: Likewise.
6818 * include/grub/i386/pc/boot.h: Likewise.
6819 * include/grub/i386/pc/chainloader.h: Likewise.
6820 * include/grub/i386/pc/console.h: Likewise.
6821 * include/grub/i386/pc/init.h: Likewise.
6822 * include/grub/i386/pc/kernel.h: Likewise.
6823 * include/grub/i386/pc/loader.h: Likewise.
6824 * include/grub/i386/pc/memory.h: Likewise.
6825 * include/grub/i386/pc/multiboot.h: Likewise.
6826 * include/grub/i386/pc/serial.h: Likewise.
6827 * include/grub/i386/pc/time.h: Likewise.
6828 * include/grub/i386/pc/vbe.h: Likewise.
6829 * include/grub/i386/pc/vbeblit.h: Likewise.
6830 * include/grub/i386/pc/vbefill.h: Likewise.
6831 * include/grub/i386/pc/vbeutil.h: Likewise.
6832 * include/grub/i386/pc/vga.h: Likewise.
6833 * include/grub/ieee1275/ieee1275.h: Likewise.
6834 * include/grub/ieee1275/ofdisk.h: Likewise.
6835 * include/grub/powerpc/libgcc.h: Likewise.
6836 * include/grub/powerpc/setjmp.h: Likewise.
6837 * include/grub/powerpc/types.h: Likewise.
6838 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6839 * include/grub/powerpc/ieee1275/console.h: Likewise.
6840 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6841 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6842 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6843 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6844 * include/grub/powerpc/ieee1275/time.h: Likewise.
6845 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6846 * include/grub/sparc64/libgcc.h: Likewise.
6847 * include/grub/sparc64/setjmp.h: Likewise.
6848 * include/grub/sparc64/types.h: Likewise.
6849 * include/grub/sparc64/ieee1275/console.h: Likewise.
6850 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6851 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6852 * include/grub/sparc64/ieee1275/time.h: Likewise.
6853 * include/grub/util/biosdisk.h: Likewise.
6854 * include/grub/util/getroot.h: Likewise.
6855 * include/grub/util/lvm.h: Likewise.
6856 * include/grub/util/misc.h: Likewise.
6857 * include/grub/util/raid.h: Likewise.
6858 * include/grub/util/resolve.h: Likewise.
6859 * io/gzio.c: Likewise.
6860 * kern/device.c: Likewise.
6861 * kern/disk.c: Likewise.
6862 * kern/dl.c: Likewise.
6863 * kern/elf.c: Likewise.
6864 * kern/env.c: Likewise.
6865 * kern/err.c: Likewise.
6866 * kern/file.c: Likewise.
6867 * kern/fs.c: Likewise.
6868 * kern/loader.c: Likewise.
6869 * kern/main.c: Likewise.
6870 * kern/misc.c: Likewise.
6871 * kern/mm.c: Likewise.
6872 * kern/parser.c: Likewise.
6873 * kern/partition.c: Likewise.
6874 * kern/rescue.c: Likewise.
6875 * kern/term.c: Likewise.
6876 * kern/efi/efi.c: Likewise.
6877 * kern/efi/init.c: Likewise.
6878 * kern/efi/mm.c: Likewise.
6879 * kern/i386/dl.c: Likewise.
6880 * kern/i386/efi/init.c: Likewise.
6881 * kern/i386/efi/startup.S: Likewise.
6882 * kern/i386/pc/init.c: Likewise.
6883 * kern/i386/pc/lzo1x.S: Likewise.
6884 * kern/i386/pc/startup.S: Likewise.
6885 * kern/ieee1275/ieee1275.c: Likewise.
6886 * kern/powerpc/cache.S: Likewise.
6887 * kern/powerpc/dl.c: Likewise.
6888 * kern/powerpc/ieee1275/cmain.c: Likewise.
6889 * kern/powerpc/ieee1275/crt0.S: Likewise.
6890 * kern/powerpc/ieee1275/init.c: Likewise.
6891 * kern/powerpc/ieee1275/openfw.c: Likewise.
6892 * kern/sparc64/cache.S: Likewise.
6893 * kern/sparc64/dl.c: Likewise.
6894 * kern/sparc64/ieee1275/init.c: Likewise.
6895 * kern/sparc64/ieee1275/openfw.c: Likewise.
6896 * loader/efi/chainloader.c: Likewise.
6897 * loader/efi/chainloader_normal.c: Likewise.
6898 * loader/i386/efi/linux.c: Likewise.
6899 * loader/i386/efi/linux_normal.c: Likewise.
6900 * loader/i386/pc/chainloader.c: Likewise.
6901 * loader/i386/pc/chainloader_normal.c: Likewise.
6902 * loader/i386/pc/linux.c: Likewise.
6903 * loader/i386/pc/linux_normal.c: Likewise.
6904 * loader/i386/pc/multiboot.c: Likewise.
6905 * loader/i386/pc/multiboot_normal.c: Likewise.
6906 * loader/powerpc/ieee1275/linux.c: Likewise.
6907 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6908 * normal/arg.c: Likewise.
6909 * normal/cmdline.c: Likewise.
6910 * normal/command.c: Likewise.
6911 * normal/completion.c: Likewise.
6912 * normal/execute.c: Likewise.
6913 * normal/function.c: Likewise.
6914 * normal/lexer.c: Likewise.
6915 * normal/main.c: Likewise.
6916 * normal/menu.c: Likewise.
6917 * normal/menu_entry.c: Likewise.
6918 * normal/misc.c: Likewise.
6919 * normal/parser.y: Likewise.
6920 * normal/script.c: Likewise.
6921 * normal/i386/setjmp.S: Likewise.
6922 * normal/powerpc/setjmp.S: Likewise.
6923 * normal/sparc64/setjmp.S: Likewise.
6924 * partmap/acorn.c: Likewise.
6925 * partmap/amiga.c: Likewise.
6926 * partmap/apple.c: Likewise.
6927 * partmap/gpt.c: Likewise.
6928 * partmap/pc.c: Likewise.
6929 * partmap/sun.c: Likewise.
6930 * term/gfxterm.c: Likewise.
6931 * term/terminfo.c: Likewise.
6932 * term/efi/console.c: Likewise.
6933 * term/i386/pc/console.c: Likewise.
6934 * term/i386/pc/serial.c: Likewise.
6935 * term/i386/pc/vesafb.c: Likewise.
6936 * term/i386/pc/vga.c: Likewise.
6937 * term/ieee1275/ofconsole.c: Likewise.
6938 * util/biosdisk.c: Likewise.
6939 * util/console.c: Likewise.
6940 * util/genmoddep.c: Likewise.
6941 * util/getroot.c: Likewise.
6942 * util/grub-emu.c: Likewise.
6943 * util/grub-mkdevicemap.c: Likewise.
6944 * util/grub-probe.c: Likewise.
6945 * util/lvm.c: Likewise.
6946 * util/misc.c: Likewise.
6947 * util/raid.c: Likewise.
6948 * util/resolve.c: Likewise.
6949 * util/update-grub.in: Likewise.
6950 * util/update-grub_lib.in: Likewise.
6951 * util/grub.d/00_header.in: Likewise.
6952 * util/grub.d/10_hurd.in: Likewise.
6953 * util/grub.d/10_linux.in: Likewise.
6954 * util/i386/efi/grub-install.in: Likewise.
6955 * util/i386/efi/grub-mkimage.c: Likewise.
6956 * util/i386/pc/grub-install.in: Likewise.
6957 * util/i386/pc/grub-mkimage.c: Likewise.
6958 * util/i386/pc/grub-mkrescue.in: Likewise.
6959 * util/i386/pc/grub-setup.c: Likewise.
6960 * util/i386/pc/misc.c: Likewise.
6961 * util/powerpc/ieee1275/grub-install.in: Likewise.
6962 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6963 * util/powerpc/ieee1275/misc.c: Likewise.
6964 * video/bitmap.c: Likewise.
6965 * video/video.c: Likewise.
6966 * video/i386/pc/vbe.c: Likewise.
6967 * video/i386/pc/vbeblit.c: Likewise.
6968 * video/i386/pc/vbefill.c: Likewise.
6969 * video/i386/pc/vbeutil.c: Likewise.
6970 * video/readers/tga.c: Likewise.
6971
6972 2007-07-02 Robert Millan <rmh@aybabtu.com>
6973
6974 * conf/i386-efi.rmk: Replace obsolete reference to
6975 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6976 with util/getroot.c.
6977 * conf/powerpc-ieee1275.rmk: Likewise.
6978 * conf/sparc64-ieee1275.rmk: Likewise.
6979
6980 * util/grub-emu.c (main): Fix unchecked pointer handling.
6981
6982 2007-07-02 Robert Millan <rmh@aybabtu.com>
6983
6984 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6985 invocation to fail, in order to support partition-less media.
6986
6987 * util/i386/pc/grub-install.in: Likewise.
6988
6989 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6990 which fs or partmap modules are needed (akin to its sister scripts).
6991
6992 Also use grub-probe to get rid of unportable /proc/mounts check.
6993
6994 Print the same informational message that the other scripts do, before
6995 exiting.
6996
6997 2007-06-23 Robert Millan <rmh@aybabtu.com>
6998
6999 * util/update-grub_lib.in (font_path): New function. Determine whether
7000 a font file can be found and, if so, echo the GRUB path to it.
7001
7002 * util/update-grub.in: Handle multiple terminals depending on user
7003 input, platform availability and font file presence. Propagate
7004 variables of our findings to /etc/grub.d/ children.
7005
7006 * util/grub.d/00_header.in: Handle multiple terminals, based on
7007 environment setup by update-grub.
7008
7009 2007-06-23 Robert Millan <rmh@aybabtu.com>
7010
7011 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7012
7013 2007-06-21 Robert Millan <rmh@aybabtu.com>
7014
7015 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7016 indicate end of data section in kernel image.
7017 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7018 GRUB_KERNEL_MACHINE_DATA_END.
7019
7020 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7021 space for it.
7022 * kern/i386/efi/startup.S: Likewise.
7023
7024 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7025 during image generation. Implement --prefix option to override this
7026 patch.
7027 * util/i386/efi/grub-mkimage.c: Likewise.
7028
7029 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7030 code to make path relative to its root into a separate function.
7031
7032 * util/i386/pc/grub-install.in: Use newly provided
7033 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7034 pass the result to grub-install --prefix.
7035
7036 2007-06-13 Robert Millan <rmh@aybabtu.com>
7037
7038 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7039 DEFAULT_DEVICE_MAP.
7040 * util/grub-emu.c: Use above definitions from misc.h instead of
7041 defining them.
7042 * util/grub-mkdevicemap.c: Likewise.
7043 * util/i386/pc/grub-setup.c: Likewise.
7044 * util/grub-probe.c: Likewise.
7045 (probe): Abort with grub_util_error() when either
7046 grub_guess_root_device or grub_util_get_grub_dev fails.
7047
7048 2007-06-12 Robert Millan <rmh@aybabtu.com>
7049
7050 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7051 "pager" assignment.
7052 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7053 "pcdata".
7054 * util/grub-probe.c (probe): Likewise for "drive_name".
7055
7056 2007-06-11 Robert Millan <rmh@aybabtu.com>
7057
7058 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7059 not just the cdrom one.
7060
7061 2007-06-11 Robert Millan <rmh@aybabtu.com>
7062
7063 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7064 Add --pkglibdir=DIR option to override pkglibdir.
7065 Mention --image-type=TYPE in help output.
7066 Fix --grub-mkimage (it was a no-op).
7067 Abort gracefully when no parameter is given.
7068
7069 2007-06-11 Robert Millan <rmh@aybabtu.com>
7070
7071 * util/i386/pc/grub-mkrescue.in: New file.
7072 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7073 * Makefile.in: Handle bin_SCRIPTS.
7074
7075 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7076
7077 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7078 list of video modes.
7079
7080 2007-06-06 Robert Millan <rmh@aybabtu.com>
7081
7082 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7083 file doesn't exist, or if it is in a filesystem grub can't read.
7084
7085 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7086 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7087 header comment to fit in 80 columns when the variables are resolved.
7088
7089 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7090 could be identified by update-grub. Remove redundant check for
7091 unifont.pff existence (since convert_system_path_to_grub_path now
7092 handles that).
7093
7094 2007-06-04 Robert Millan <rmh@aybabtu.com>
7095
7096 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7097
7098 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7099
7100 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7101
7102 2007-06-04 Robert Millan <rmh@aybabtu.com>
7103
7104 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7105
7106 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7107 grub_apple_partition_map_fini.
7108
7109 * util/biosdisk.c
7110 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7111 to access >2 TiB disks).
7112
7113 Print disk->total_sectors with %llu instead of %lu, since this
7114 variable is always 64-bit (prevents wrong disk size from being displayed
7115 on either >2 TiB disk or big-endian CPU).
7116
7117 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7118 into a generic case that supports all (sane) partition maps.
7119
7120 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7121 breaks big-endian.
7122
7123 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7124 and grub_apple_partition_map_fini() after that.
7125
7126 2007-06-01 Robert Millan <rmh@aybabtu.com>
7127
7128 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7129
7130 * util/grub.d/00_header.in: Only enable gfxterm when
7131 convert_system_path_to_grub_path() succeeds.
7132
7133 2007-05-20 Robert Millan <rmh@aybabtu.com>
7134
7135 * util/update-grub_lib.in: New file.
7136 * DISTLIST: Add update-grub_lib.in.
7137 * conf/common.rmk: Generate update-grub_lib and install it in
7138 $(lib_DATA).
7139 * Makefile.in: Add install routine for $(lib_DATA).
7140
7141 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7142 function provided by update-grub_lib to support arbitrary paths of
7143 unifont.pff.
7144 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7145 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7146
7147 2007-05-19 Robert Millan <rmh@aybabtu.com>
7148
7149 * commands/i386/cpuid.c: New module.
7150 * DISTLIST: Add it.
7151 * conf/i386-efi.rmk: Enable cpuid.mod.
7152 * conf/i386-pc.rmk: Likewise.
7153
7154 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7155
7156 * kern/disk.c (grub_disk_read): Check return value of
7157 grub_realloc().
7158
7159 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7160
7161 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7162 arrays.
7163 * disk/raid.c (grub_raid_open): Likewise.
7164
7165 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7166
7167 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7168 stack instead of on the heap.
7169
7170 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7171 before doing a read on it.
7172
7173 * configure.ac: Only use -fno-stack-protector for the target
7174 environment.
7175
7176 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7177
7178 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7179 __attribute_ ((unused)) to mode_type argument.
7180
7181 * util/getroot.c (grub_guess_root_device): Fix #endif.
7182
7183 * kern/misc.c (memcmp): Fix prototype.
7184
7185 * include/grub/partition.h [GRUB_UTIL]
7186 (grub_gpt_partition_map_init): Add prototype.
7187 (grub_gpt_partition_map_fini): Likewise.
7188
7189 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7190 at the right place.
7191
7192 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7193 (grub_fat_read_data): Likewise.
7194 (grub_fat_find_dir): Likewise.
7195
7196 * font/manager.c (find_glyph): Make table a const.
7197 (grub_font_get_glyph): Remove bitmap from if statement.
7198
7199 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7200
7201 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7202 code, first search for device in /dev/mapper, then in /dev.
7203 (grub_util_get_grub_dev): New function.
7204 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7205 prototype.
7206 * util/grub-probe.c (probe): Remove check for RAID, call
7207 grub_util_get_grub_dev() instead of
7208 grub_util_biosdisk_get_grub_dev().
7209 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7210 grub_util_biosdisk_get_grub_dev().
7211 * util/i386/pc/grub-setup.c (main): Likewise.
7212
7213 2007-05-16 Robert Millan <rmh@aybabtu.com>
7214
7215 * DISTLIST: Update for the latest changes.
7216 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7217 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7218 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7219 grub/util/biosdisk.h.
7220 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7221 grub/util/biosdisk.h.
7222
7223 2007-05-16 Robert Millan <rmh@aybabtu.com>
7224
7225 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7226
7227 2007-05-16 Robert Millan <rmh@aybabtu.com>
7228
7229 * util/i386/efi/grub-install.in: New.
7230 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7231 newly added grub-install.
7232 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7233 include.
7234 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7235 grub/util/biosdisk.h.
7236 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7237 grub/util/biosdisk.h.
7238
7239 2007-05-16 Robert Millan <rmh@aybabtu.com>
7240
7241 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7242 * include/grub/util/biosdisk.h: ... here.
7243 * util/i386/pc/biosdisk.c: Moved to ...
7244 * util/biosdisk.c: ... here.
7245 * util/i386/pc/getroot.c: Moved to ...
7246 * util/getroot.c: ... here.
7247 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7248 * util/grub-mkdevicemap.c: ... here.
7249 * util/i386/pc/grub-probe.c: Moved to ...
7250 * util/grub-probe.c: ... here.
7251
7252 2007-05-15 Robert Millan <rmh@aybabtu.com>
7253
7254 * util/update-grub.in: Remove duplicated line in grub.cfg header
7255 message.
7256
7257 2007-05-13 Robert Millan <rmh@aybabtu.com>
7258
7259 * util/update-grub.in: Fix a few assumptions about the devices holding
7260 /, /boot and /boot/grub being the same.
7261 * util/grub.d/00_header.in: Likewise.
7262 * util/grub.d/10_hurd.in: Likewise.
7263 * util/grub.d/10_linux.in: Likewise.
7264
7265 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7266 patterns. Use that to define the `.old' suffix as older than `'.
7267
7268 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7269
7270 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7271 the grub.cfg header message.
7272
7273 2007-05-11 Robert Millan <rmh@aybabtu.com>
7274
7275 * util/update-grub.in: Create device.map if it doesn't already exist,
7276 before attempting to run grub-probe.
7277 Check for grub-probe and grub-mkdevicemap with the same code
7278 grub-install is using.
7279 Remove test mode.
7280
7281 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7282
7283 * Makefile.in: Add the datarootdir autoconf variable.
7284
7285 2007-05-09 Robert Millan <rmh@aybabtu.com>
7286
7287 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7288 fail gracefully if dev->disk->partition == NULL.
7289
7290 2007-05-07 Robert Millan <rmh@aybabtu.com>
7291
7292 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7293 determine partition map module.
7294 * util/i386/pc/grub-install.in: Use this feature to decide which
7295 partition module to load, instead of hardcoding pc and gpt.
7296
7297 2007-05-07 Robert Millan <rmh@aybabtu.com>
7298
7299 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7300 source directory differs from build directory.
7301
7302 2007-05-05 Robert Millan <rmh@aybabtu.com>
7303
7304 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7305 initialisation.
7306
7307 2007-05-05 Robert Millan <rmh@aybabtu.com>
7308
7309 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7310
7311 2007-05-05 Robert Millan <rmh@aybabtu.com>
7312
7313 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7314 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7315
7316 2007-05-05 Robert Millan <rmh@aybabtu.com>
7317
7318 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7319 (grub_probe_SOURCES): Likewise.
7320 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7321 GPT and initialize dos_part and bsd_part accordingly.
7322 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7323 install_bsd_part.
7324 (main): Activate gpt module for use during partition identification,
7325 and deactivate it afterwards.
7326 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7327 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7328 partition identification, and deactivate it afterwards.
7329
7330 2007-05-05 Robert Millan <rmh@aybabtu.com>
7331
7332 * term/i386/pc/console.c (grub_console_fini): Call
7333 grub_term_set_current() before grub_term_unregister().
7334
7335 2007-05-04 Robert Millan <rmh@aybabtu.com>
7336
7337 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7338 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7339 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7340 and update-grub_DATA.
7341 * conf/common.rmk: Build and install update-grub components.
7342 * conf/common.mk: Regenerate.
7343 * util/update-grub.in: New. Core of update-grub.
7344 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7345 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7346 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7347 * util/grub.d/README: New. Document grub.d directory layout.
7348
7349 2007-05-01 Robert Millan <rmh@aybabtu.com>
7350
7351 * util/grub-emu.c: Move initialization functions
7352 grub_util_biosdisk_init() and grub_init_all() before
7353 grub_util_biosdisk_get_grub_dev(), which relies on them.
7354
7355 2007-04-19 Robert Millan <rmh@aybabtu.com>
7356
7357 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7358 it is used later.
7359
7360 2007-04-18 Jerone Young <jerone@gmail.com>
7361
7362 * kernel/elf.c: Add missing parenthesis for conditional statement
7363 stanza.
7364
7365 2007-04-10 Jerone Young <jerone@gmail.com>
7366
7367 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7368 continue on and look for device node with real device name.
7369
7370 2007-04-10 Jerone Young <jerone@gmail.com>
7371
7372 * configure.ac: Add argument for autoconf to use transformation
7373 ability.
7374 * Makefile.in: Add autoconf package transformation code.
7375 * util/i386/pc/grub-install.in: Likewise.
7376 * util/powerpc/ieee1275/grub-install.in: Likewise.
7377
7378 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7379
7380 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7381 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7382 (EXT2_REVISION): Likewise.
7383 (EXT2_INODE_SIZE): Likewise.
7384 (struct grub_ext2_block_group): Added a missing member
7385 "used_dirs".
7386 (grub_ext2_read_inode): Divide by the inode size in a superblock
7387 instead of 128 to obtain INODES_PER_BLOCK.
7388 Use the macro EXT2_INODE_SIZE instead of directly using
7389 SBLOCK->INODE_SIZE.
7390
7391 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7392
7393 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7394 superblock instead of the structure size to compute an
7395 offset. This fixes the problem that GRUB could not read a
7396 filesystem when inode size is different from 128-byte.
7397
7398 2007-03-05 Marco Gerards <marco@gnu.org>
7399
7400 * normal/main.c (read_config_file): When "menu" is not set, create
7401 an initial context.
7402
7403 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7404
7405 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7406 (HEAP_LIMIT): New macro.
7407 (grub_claim_heap): Claim memory up to `heaplimit'.
7408
7409 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7410
7411 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7412 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7413 (_start): Likewise.
7414 (grub_arch_modules_addr): Return address after `_end'.
7415 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7416 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7417 (add_segments): Calculate `_end' from phdr size and location.
7418 (ALIGN_UP): Moved to ...
7419 * include/grub/misc.h: here.
7420 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7421 New macro.
7422 (GRUB_IEEE1275_MODULE_BASE): Removed.
7423
7424 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7425
7426 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7427 loop boundary.
7428
7429 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7430
7431 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7432 All users updated.
7433 (grub_elf64_load_hook_t): Likewise.
7434 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7435 debug output.
7436
7437 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7438
7439 * kern/mm.c: Update copyright.
7440 (grub_mm_debug): Correct syntax error.
7441 (grub_mm_dump_free): New function.
7442 (grub_debug_free): Call `grub_free'.
7443 * include/grub/mm.h: Update copyright.
7444 (grub_mm_dump_free): Add declaration.
7445
7446 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7447
7448 * include/grub/ieee1275/ieee1275.h: Update copyright.
7449 * kern/powerpc/ieee1275/init.c: Likewise.
7450 * kern/powerpc/ieee1275/openfw.c: Likewise.
7451
7452 * loader/powerpc/ieee1275/linux.c: Likewise.
7453 * include/grub/elfload.h: Likewise.
7454 * kern/elf.c: Likewise.
7455 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7456 callers.
7457 (grub_elf64_load): Likewise.
7458 (grub_elf32_load_segment): Move to a nested function.
7459 (grub_elf64_load_segment): Likewise.
7460
7461 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7462
7463 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7464 prototype.
7465 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7466 (grub_heap_len): Likewise.
7467 (HEAP_SIZE): New macro.
7468 (grub_claim_heap): New function.
7469 (grub_machine_init): Don't claim heap directly. Call
7470 `grub_claim_heap'.
7471 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7472 (grub_available_iterate): New function.
7473
7474 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7475
7476 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7477 * configure.ac: Use it for testing the HOST and TARGET compilers.
7478
7479 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7480
7481 * Makefile.in (enable_grub_emu): New variable.
7482 * configure.ac (--enable-grub-emu): New option.
7483 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7484 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7485 * conf/i386-pc.rmk: Likewise.
7486 * conf/powerpc-ieee1275.rmk: Likewise.
7487 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7488
7489 2006-12-12 Marco Gerards <marco@gnu.org>
7490
7491 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7492
7493 * kern/env.c (grub_env_unset): Don't free the member `value' when
7494 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7495 pointer.
7496
7497 * normal/main.c (current_menu): Removed.
7498 (free_menu): Unset the `menu' environment variable.
7499 (grub_normal_menu_addentry): Make use of the environment variable
7500 `menu', instead of using the global `current_menu'. Allocate
7501 memory for the sourcecode of this entry.
7502 (read_config_file): New argument `nested', changed all callers.
7503 Only in the case of a new context, initialize a new menu. Set the
7504 `menu' environment variable.
7505 (grub_normal_execute): Don't set and unset the environment
7506 variable `menu' here anymore. Only free the menu when leaving the
7507 context.
7508
7509 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7510 leak.
7511
7512 2006-12-11 Marco Gerards <marco@gnu.org>
7513
7514 * normal/menu_entry.c (run): Fix off by one bug so the last line
7515 is executed. Move the loader check to outside the loop.
7516
7517 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7518
7519 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7520
7521 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7522
7523 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7524 the number of sectors. Reported by Andrey Shuvikov
7525 <mr_hyro@yahoo.com>.
7526
7527 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7528
7529 * kern/disk.c (grub_disk_read): When there is a read error, always
7530 try to read only the necessary data.
7531
7532 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7533 disk/raid.c.
7534 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7535 prototype.
7536 [GRUB_UTIL] (grub_raid_fini): Likewise.
7537 [GRUB_UTIL] (grub_lvm_init): Likewise.
7538 [GRUB_UTIL] (grub_lvm_fini): Likewise.
7539 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7540 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7541 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7542 and grub_raid_fini().
7543
7544 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7545
7546 * include/grub/types.h (__unused): Rename to UNUSED.
7547 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7548 (grub_elf64_size): Likewise.
7549
7550 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7551
7552 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7553 grub_error_push and grub_error_pop in the error-handling path.
7554 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7555 length.
7556
7557 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7558
7559 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7560 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7561 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7562 (kernel_elf_SOURCES): Likewise.
7563 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7564 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7565 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7566 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7567 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7568 (elf_mod_SOURCES): New variable.
7569 (elf_mod_CFLAGS): Likewise.
7570 (elf_mod_LDFLAGS): Likewise.
7571 * include/grub/types.h (__unused): New macro.
7572 * include/grub/elfload.h: New file.
7573 * kern/elf.c: Likewise.
7574 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7575 (ELF32_LOADMASK): New macro.
7576 (ELF64_LOADMASK): Likewise.
7577 (vmlinux): Removed.
7578 (grub_linux_load32): New function.
7579 (grub_linux_load64): Likewise.
7580 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7581 Use grub_elf_t instead of grub_file_t.
7582
7583 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7584
7585 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7586 `catch_result' to struct set_color_args.
7587
7588 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7589
7590 * normal/menu.c: Include grub/script.h.
7591 * normal/menu_entry.c: Likewise.
7592 * include/grub/normal.h: Do not include grub/script.h.
7593
7594 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7595
7596 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7597
7598 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7599
7600 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7601 disk.
7602 (grub_disk_close): Print debug messages when closing a disk.
7603 (grub_disk_read): Print debug messages when disk read fails.
7604 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7605 filesystem type.
7606 * kern/partition.c: Include misc.h.
7607 (grub_partition_iterate): Print debug messages when detecting
7608 partition type.
7609
7610 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7611
7612 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7613 is negative.
7614 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7615
7616 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7617
7618 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7619 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7620
7621 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7622
7623 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7624 instead of sizeof(lv). Patch by Michael Guntsche.
7625
7626 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7627
7628 * disk/lvm.c: Rename VGS to VG_LIST.
7629 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7630 (grub_lvm_open): Likewise.
7631 Thanks to Michael Guntsche for finding this bug.
7632
7633 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7634
7635 * configure.ac (AC_INIT): Bumped to 1.95.
7636
7637 2006-10-14 Robert Millan <rmh@aybabtu.com>
7638
7639 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7640 with "/dev/.static/dev/md".
7641
7642 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7643
7644 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7645 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7646 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7647 DRIVE_NAME are always freed.
7648
7649 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7650 DOS_PART, as a DOS partition is counted from one instead of zero
7651 now. Reported by Robert Millan.
7652
7653 2006-10-14 Robert Millan <rmh@aybabtu.com>
7654
7655 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7656 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7657 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7658 string returned by grub_guess_root_device.
7659 * util/i386/pc/grub-setup.c: Likewise.
7660 * util/i386/pc/grub-probefs.c: Likewise.
7661
7662 * util/i386/pc/grub-probefs.c: Rename to ...
7663 * util/i386/pc/grub-probe.c: ... this.
7664 * DISTLIST: Remove grub-probefs, add grub-probe.
7665 * conf/i386-efi.rmk: Likewise.
7666 * conf/i386-pc.rmk: Likewise.
7667 * util/i386/pc/grub-install.in: Likewise.
7668
7669 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7670 choose which information we want to print.
7671
7672 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7673
7674 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7675 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7676 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7677 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7678 video/readers/tga.c and video/i386/pc/vbeutil.c.
7679
7680 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7681
7682 Added support for RAID and LVM.
7683
7684 * disk/lvm.c: New file.
7685 * disk/raid.c: Likewise.
7686 * include/grub/lvm.h: Likewise.
7687 * include/grub/raid.h: Likewise.
7688 * include/grub/util/lvm.h: Likewise.
7689 * include/grub/util/raid.h: Likewise.
7690 * util/lvm.c: Likewise.
7691 * util/raid.c: Likewise.
7692
7693 * include/grub/disk.h (grub_disk_dev_id): Add
7694 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7695 (grub_disk_get_size): New prototype.
7696 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7697 returns a partition.
7698 (grub_disk_get_size): New function.
7699
7700 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7701 verbatim if grub_install_dos_part is -2.
7702
7703 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7704 and LVM devices.
7705
7706 * util/i386/pc/grub-setup.c (setup): New argument
7707 MUST_EMBED. Force embedding of GRUB when the argument is
7708 true. Close FILE before returning.
7709 (main): Add support for RAID and LVM.
7710
7711 * conf/common.rmk: Add RAID and LVM modules.
7712 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7713 util/lvm.c.
7714 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7715
7716 * kern/misc.c (grub_strstr): New function.
7717 * include/grub/misc.h (grub_strstr): New prototype.
7718
7719 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7720
7721 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7722
7723 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7724
7725 * kern/misc.c (grub_strtoull): Guess the base only if not
7726 specified.
7727
7728 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7729
7730 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7731 PowerMac support.
7732
7733 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7734
7735 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7736
7737 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7738 Remove `flags' argument. All callers changed.
7739 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7740 (IEEE1275_IHANDLE_INVALID): New variable.
7741 (IEEE1275_CELL_INVALID): New variable.
7742 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7743 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7744 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7745 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7746 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7747 codes from Open Firmware. All callers updated.
7748 (grub_ieee1275_next_property): Directly return Open Firmware return
7749 code.
7750 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7751 Standardize error checking from `grub_ieee1275_get_property'.
7752 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7753 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7754
7755 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7756
7757 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7758 `instance_to_package_args' to `instance_to_path_args'.
7759
7760 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7761 `grub_ieee1275_chosen'.
7762
7763 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7764 `grub_ieee1275_interpret'.
7765
7766 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7767
7768 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7769
7770 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7771
7772 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7773 (__cmpdi): Likewise.
7774
7775 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7776 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7777 `grub_ssize_t'.
7778
7779 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7780
7781 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7782 to type `grub_ssize_t'.
7783 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7784
7785 2006-09-22 Marco Gerards <marco@gnu.org>
7786
7787 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7788 newlines.
7789
7790 2006-09-22 Marco Gerards <marco@gnu.org>
7791
7792 * commands/echo.c: New file.
7793
7794 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7795
7796 * conf/common.rmk (echo_mod_SOURCES): New variable.
7797 (echo_mod_CFLAGS): Likewise.
7798 (echo_mod_LDFLAGS): Likewise.
7799
7800 2006-09-22 Marco Gerards <marco@gnu.org>
7801
7802 * normal/main.c (get_line): Malloc memory instead of using
7803 preallocated memory. Removed the arguments `cmdline' and
7804 `max_len'. Updated all callers.
7805
7806 2006-09-22 Marco Gerards <marco@gnu.org>
7807
7808 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7809 (normal_mod_DEPENDENCIES): Likewise.
7810
7811 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7812 (normal_mod_DEPENDENCIES): Likewise.
7813
7814 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7815
7816 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7817
7818 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7819 programs.
7820 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7821 (normal_mod_DEPENDENCIES): Likewise.
7822 * conf/i386-pc.mk: Regenerate.
7823 * conf/i386-efi.mk: Likewise
7824 * conf/common.mk: Likewise.
7825 * conf/powerpc-ieee1275.mk: Likewise.
7826 * conf/sparc64-ieee1275.mk: Likewise.
7827
7828 2006-09-22 Robert Millan <rmh@aybabtu.com>
7829
7830 Sync with i386 version.
7831 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7832 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7833
7834 2006-09-21 Robert Millan <rmh@aybabtu.com>
7835
7836 Import from GRUB Legacy (lib/device.c):
7837 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7838 (init_device_map) [__linux__]: Add support for I2O devices.
7839
7840 2006-09-14 Marco Gerards <marco@gnu.org>
7841
7842 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7843 `-melf_i386'.
7844
7845 2006-09-14 Robert Millan <rmh@aybabtu.com>
7846
7847 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7848 /boot/grub/*.lst.
7849
7850 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7851
7852 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7853 before adding it to device.map.
7854
7855 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7856
7857 * genmk.rb: Let GCC generate dependencies the first time it
7858 compiles a file; using the -MD option.
7859 * conf/common.mk: Regenerate.
7860 * conf/i386-pc.mk: Likewise.
7861 * conf/i386-efi.mk: Likewise.
7862 * conf/powerpc-ieee1275.mk: Likewise.
7863 * conf/sparc64-ieee1275.mk: Likewise.
7864
7865 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7866
7867 Move the prototypes of grub_setjmp and grub_longjmp to
7868 cpu/setjmp.h, so that each architecture may specify different
7869 attributes.
7870
7871 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7872 (grub_longjmp): Likewise.
7873 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7874 (grub_longjmp): Likewise.
7875 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7876 (grub_longjmp): Likewise.
7877
7878 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7879 [!GRUB_UTIL] (grub_longjmp): Removed.
7880
7881 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7882
7883 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7884 "color!" method does not return any value.
7885
7886 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7887
7888 * include/grub/bitmap.h: New file.
7889
7890 * include/grub/i386/pc/vbeutil.h: Likewise.
7891
7892 * video/bitmap.c: Likewise.
7893
7894 * video/readers/tga.c: Likewise.
7895
7896 * video/i386/pc/vbeutil.c: Likewise.
7897
7898 * commands/videotest.c: Code cleanup and updated to reflect to new
7899 video API.
7900
7901 * term/gfxterm.c: Likewise.
7902
7903 * video/video.c: Likewise.
7904
7905 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7906 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7907 (bitmap_mod_SOURCES): New entry.
7908 (bitmap_mod_CFLAGS): Likewise.
7909 (bitmap_mod_LDFLAGS): Likewise.
7910 (tga_mod_SOURCES): Likewise.
7911 (tga_mod_CFLAGS): Likewise.
7912 (tga_mod_LDFLAGS): Likewise.
7913
7914 * include/grub/video.h (grub_video_blit_operators): New enum type.
7915 (grub_video_render_target): Changed as forward declaration and moved
7916 actual definition to be video driver specific.
7917 (grub_video_adapter.blit_bitmap): Added blitting operator.
7918 (grub_video_adapter.blit_render_target): Likewise.
7919 (grub_video_blit_bitmap): Likewise.
7920 (grub_video_blit_render_target): Likewise.
7921
7922 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7923 driver specific render target definition.
7924 (grub_video_vbe_map_rgba): Added driver internal helper.
7925 (grub_video_vbe_unmap_color): Updated to use
7926 grub_video_i386_vbeblit_info.
7927 (grub_video_vbe_get_video_ptr): Likewise.
7928
7929 * include/grub/i386/pc/vbeblit.h
7930 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7931 grub_video_i386_vbeblit_info.
7932 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7933 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7934 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7935 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7936 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7937 (grub_video_i386_vbeblit_index_index): Likewise.
7938 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7939 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7940 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7941 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7942 operator.
7943 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7944 operator.
7945
7946 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7947 include/grub/i386/pc/vbeblit.h.
7948
7949 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7950 Updated to use grub_video_i386_vbeblit_info.
7951 (grub_video_i386_vbefill_R8G8B8): Likewise.
7952 (grub_video_i386_vbefill_index): Likewise.
7953 (grub_video_i386_vbefill): Added generic filler.
7954
7955 * video/i386/pc/vbefill.c: Updated to reflect changes on
7956 include/grub/i386/pc/vbefill.h.
7957
7958 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7959 grub_video_i386_vbeblit_info.
7960 (grub_video_vbe_unmap_color): Likewise.
7961 (grub_video_vbe_blit_glyph): Likewise.
7962 (grub_video_vbe_scroll): Likewise.
7963 (grub_video_vbe_draw_pixel): Removed function.
7964 (grub_video_vbe_get_pixel): Likewise.
7965 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7966 updated code to use it.
7967 (common_blitter): Added common blitter for render target and bitmap.
7968 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7969 (grub_video_vbe_blit_render_target): Likewise.
7970
7971 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7972
7973 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7974 is in text mode if there is no console control protocol instance
7975 available.
7976
7977 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7978
7979 * include/grub/video.h: Code cleanup.
7980
7981 * include/grub/i386/pc/vbe.h: Likewise.
7982
7983 * video/i386/pc/vbe.c: Likewise.
7984
7985 * video/i386/pc/vbeblit.c: Likewise.
7986
7987 * video/i386/pc/vbefill.c: Likewise.
7988
7989 * video/video.c: Likewise. Also added more comments.
7990
7991 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7992
7993 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7994 (struct grub_biosdisk_dap): Likewise.
7995
7996 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7997 linkage settings for all functions.
7998
7999 2006-07-12 Marco Gerards <marco@gnu.org>
8000
8001 * configure.ac (--enable-mm-debug): Fix typo.
8002
8003 * genkernsyms.sh.in: Use proper quoting for `CC'.
8004
8005 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8006
8007 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8008 (normal_mod_ASFLAGS): Remove "-m32".
8009
8010 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8011
8012 * util/misc.c: Include config.h.
8013 [!HAVE_MEMALIGN]: Do not include malloc.h.
8014 (grub_memalign): Use posix_memalign, if present. Then, use
8015 memalign, if present. Otherwise, emit an error.
8016
8017 * util/grub-emu.c: Do not include malloc.h.
8018
8019 * include/grub/util/misc.h: Include unistd.h. This is required for
8020 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8021 D. Eades III <hde@foobar-qux.org>.
8022
8023 * configure.ac (AC_GNU_SOURCE): Added.
8024 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8025 type.
8026
8027 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8028
8029 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8030 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8031
8032 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8033
8034 * include/grub/types.h (grub_host_addr_t): Rename to
8035 grub_target_addr_t.
8036 (grub_host_off_t): Rename to grub_target_off_t.
8037 (grub_host_size_t): Rename to grub_target_size_t.
8038 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8039 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8040
8041 * include/grub/kernel.h (struct grub_module_header): Change type
8042 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8043 (grub_module_info): Likewise.
8044
8045 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8046
8047 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8048 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8049 Velazquez <jesus.velazquez@gmail.com>.
8050
8051 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8052
8053 Count partitions from 1 instead of 0 in the string representation
8054 of partitions. Still use 0-based internally.
8055
8056 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8057 (sun_partition_map_iterate): Use grub_partition_t instead of
8058 struct grub_partition *. Cast DESC->START_CYLINDER to
8059 grub_uint64_t after converting the endian.
8060 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8061 (sun_partition_map_get_name): Add 1 to P->INDEX.
8062
8063 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8064 PCDATA->DOS_PART.
8065 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8066
8067 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8068 zero instead of one.
8069 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8070 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8071
8072 * partmap/apple.c (apple_partition_map_iterate): Change the type
8073 of POS to unsigned.
8074 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8075 (apple_partition_map_get_name): Add 1 into P->INDEX.
8076
8077 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8078 of POS to unsigned.
8079 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8080 calculate the offset of a partition.
8081 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8082 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8083
8084 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8085 SECTOR to grub_disk_addr_t.
8086 (acorn_partition_map_iterate): Likewise.
8087 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8088 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8089 top.
8090 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8091
8092 * kern/i386/pc/init.c (make_install_device): Add 1 into
8093 GRUB_INSTALL_DOS_PART.
8094
8095 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8096 conditional.
8097
8098 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8099
8100 Clean up the code to support 64-bit addressing in disks and
8101 files. This change is not enough for filesystems yet.
8102
8103 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8104 type of "start" to grub_uint64_t.
8105 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8106 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8107 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8108 convert addresses.
8109
8110 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8111 to grub_disk_addr_t.
8112
8113 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8114 string.
8115
8116 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8117
8118 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8119 to char *.
8120
8121 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8122
8123 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8124
8125 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8126
8127 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8128 to grub_off_t, to detect an error from grub_file_seek.
8129 (grub_multiboot_load_elf32): Likewise.
8130
8131 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8132 maximum unsigned long value when an overflow is detected.
8133 (grub_strtoull): New function.
8134 (grub_divmod64): Likewise.
8135 (grub_lltoa): use grub_divmod64.
8136
8137 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8138 grub_disk_addr_t.
8139 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8140 the pointer to next character. Use grub_strtoull instead of
8141 grub_strtoul.
8142 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8143 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8144 respectively.
8145
8146 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8147 return value is signed.
8148 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8149 test if OFFSET is less than zero, as OFFSET is unsigned now.
8150
8151 * kern/disk.c (struct grub_disk_cache): Change the type of
8152 "sector" to grub_disk_addr_t.
8153 (grub_disk_cache_get_index): Change the type of SECTOR to
8154 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8155 unsigned after shifting.
8156 (grub_disk_cache_invalidate): Change the type of SECTOR to
8157 grub_disk_addr_t.
8158 (grub_disk_cache_unlock): Likewise.
8159 (grub_disk_cache_store): Likewise.
8160 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8161 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8162 grub_disk_addr_t and grub_uint64_t, respectively.
8163 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8164 body, as the value of OFFSET is tweaked by
8165 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8166 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8167 respectively.
8168 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8169 body, as the value of OFFSET is tweaked by
8170 grub_disk_check_range. Change the types of LEN and N to
8171 grub_size_t.
8172
8173 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8174 and "saved_offset" to grub_off_t.
8175 (test_header): Cast BUF to char *.
8176 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8177 to char *.
8178 (grub_gzio_read): Change the types of OFFSET and SIZE to
8179 grub_off_t and grub_size_t, respectively.
8180
8181 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8182 Removed.
8183 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8184 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8185 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8186 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8187 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8188
8189 * include/grub/types.h (grub_off_t): Unconditionally set to
8190 grub_uint64_t.
8191 (grub_disk_addr_t): Changed to grub_uint64_t.
8192
8193 * include/grub/partition.h (struct grub_partition): Change the
8194 types of "start", "len" and "offset" to grub_disk_addr_t,
8195 grub_uint64_t and grub_disk_addr_t, respectively.
8196 (grub_partition_get_start): Return grub_disk_addr_t.
8197 (grub_partition_get_len): Return grub_uint64_t.
8198
8199 * include/grub/misc.h (grub_strtoull): New prototype.
8200 (grub_divmod64): Likewise.
8201
8202 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8203 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8204 grub_off_t, respectively.
8205 All callers and references changed.
8206
8207 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8208 grub_size_t in "read".
8209 All callers and references changed.
8210
8211 * include/grub/file.h (struct grub_file): Change the types of
8212 "offset" and "size" to grub_off_t and grub_off_t,
8213 respectively. Change the type of SECTOR to grub_disk_addr_t in
8214 "read_hook".
8215 (grub_file_read): Change the type of LEN to grub_size_t.
8216 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8217 grub_off_t.
8218 (grub_file_size): Return grub_off_t.
8219 (grub_file_tell): Likewise.
8220 All callers and references changed.
8221
8222 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8223 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8224 "write".
8225 (struct grub_disk): Change the type of "total_sectors" to
8226 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8227 "read_hook".
8228 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8229 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8230 (grub_disk_write): Likewise.
8231 All callers and references changed.
8232
8233 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8234 char * for grub_strncmp to silence gcc.
8235 (grub_iso9660_mount): Likewise.
8236 (grub_iso9660_mount): Likewise.
8237 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8238 return statement.
8239 (grub_iso9660_iterate_dir): Likewise.
8240 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8241
8242 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8243 LEN to grub_disk_addr_t and grub_size_t, respectively.
8244
8245 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8246
8247 * fs/jfs.c (grub_jfs_read_file): Likewise.
8248
8249 * fs/minix.c (grub_jfs_read_file): Likewise.
8250
8251 * fs/sfs.c (grub_jfs_read_file): Likewise.
8252
8253 * fs/ufs.c (grub_jfs_read_file): Likewise.
8254
8255 * fs/xfs.c (grub_jfs_read_file): Likewise.
8256
8257 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8258 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8259 respectively.
8260
8261 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8262 BLKNR to -1 instead of returning GRUB_ERRNO.
8263 (grub_ext2_read_file): Change the types of SECTOR and
8264 LEN to grub_disk_addr_t and grub_size_t, respectively.
8265
8266 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8267 LEN to grub_disk_addr_t and grub_size_t, respectively.
8268
8269 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8270 grub_file_read.
8271
8272 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8273 string. Do not cast SECTOR explicitly.
8274
8275 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8276 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8277 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8278 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8279 over 2TB and LBA mode is not supported, raise an error.
8280 (get_safe_sectors): New function.
8281 (grub_biosdisk_read): Use get_safe_sectors.
8282 (grub_biosdisk_write): Likewise.
8283
8284 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8285 (grub_efidisk_write): Likewise.
8286
8287 * disk/loopback.c (delete_loopback): Cosmetic changes.
8288 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8289 correctly.
8290 (grub_loopback_open): Likewise.
8291 (grub_loopback_read): Likewise. Also, change the type of POS to
8292 grub_off_t, and fix the usage of grub_memset.
8293
8294 * commands/i386/pc/play.c: Include grub/machine/time.h.
8295
8296 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8297 print FILE->SIZE.
8298
8299 * commands/configfile.c: Include grub/env.h.
8300
8301 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8302 GRUB_ERRNO directly instead. Change the type of POS to
8303 grub_off_t. Follow the coding standard.
8304
8305 * commands/blocklist.c: Include grub/partition.h.
8306 (grub_cmd_blocklist): Return an error if the underlying device is
8307 not a disk. Take the starting sector of a partition into account,
8308 if a partition is used.
8309
8310 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8311 a length field.
8312 (lba_mode): Support 64-bit addresses.
8313 (chs_mode): Likewise.
8314 (copy_buffer): Adapted to the new offsets of a length field and a
8315 segment field.
8316 (blocklist_default_start): Allocate 64-bit space.
8317
8318 * boot/i386/pc/boot.S (force_lba): Removed.
8319 (boot_drive): Moved to under KERNEL_SECTOR.
8320 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8321 space.
8322 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8323 is useless.
8324 (lba_mode): Refactored to support a 64-bit address. More size
8325 optimization.
8326 (setup_sectors): Likewise.
8327
8328 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8329
8330 * DISTLIST: Added include/grub/i386/linux.h. Removed
8331 include/grub/i386/pc/linux.h
8332
8333 * configure.ac (AC_INIT): Bumped to 1.94.
8334
8335 * config.guess: Updated from gnulib.
8336 * config.sub: Likewise.
8337 * install-sh: Likewise.
8338 * mkinstalldirs: Likewise.
8339
8340 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8341
8342 * conf/common.rmk (grub_modules_init.lst): Depended on
8343 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8344 MODSRCFILES.
8345
8346 * genmk.rb (PModule::rule): Reverted the previous change.
8347
8348 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8349
8350 * conf/common.rmk (grub_modules_init.lst): Depends on
8351 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8352 that the target does not exist before producing.
8353 (grub_modules_init.h): Remove the target before generating.
8354 (grub_emu_init.c): Likewise.
8355
8356 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8357
8358 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8359
8360 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8361 for the target-specific tests. Make sure that we also have the
8362 up-to-date target variables for those tests.
8363
8364 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8365
8366 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8367 (PModule::rule): Likewise.
8368
8369 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8370
8371 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8372 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8373 target-specific flags should be prefixed.
8374 (PModule::rule): Likewise.
8375
8376 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8377
8378 * configure.ac (CMP): Check if cmp is available explicitly.
8379
8380 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8381
8382 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8383 (target_cpu): New variable.
8384 (pkglibdir): Use target_cpu instead of host_cpu.
8385
8386 * util/i386/pc/grub-install.in (host_cpu): Removed.
8387 (target_cpu): New variable.
8388 (pkglibdir): Use target_cpu instead of host_cpu.
8389
8390 * util/genmoddep.c: Removed.
8391
8392 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8393 instead of GRUB_HOST_SIZEOF_VOID_P.
8394 * kern/dl.c: Likewise.
8395
8396 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8397 ...
8398 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8399 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8400 (GRUB_TARGET_SIZEOF_LONG): ... this.
8401 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8402 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8403 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8404 to ...
8405 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8406 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8407 (GRUB_TARGET_SIZEOF_LONG): ... this.
8408 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8409 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8410 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8411 to ...
8412 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8413 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8414 (GRUB_TARGET_SIZEOF_LONG): ... this.
8415 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8416 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8417
8418 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8419 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8420 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8421 instead of GRUB_HOST_SIZEOF_LONG.
8422 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8423 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8424 GRUB_CPU_WORDS_BIGENDIAN.
8425 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8426 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8427 grub_host_ssize_t.
8428
8429 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8430 (genmoddep_SOURCES): Likewise.
8431 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8432 (genmoddep_SOURCES): Likewise.
8433 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8434 (genmoddep_SOURCES): Likewise.
8435 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8436 Likewise.
8437 (genmoddep_SOURCES): Likewise.
8438
8439 * genmoddep.awk: New file.
8440
8441 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8442 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8443 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8444 (PModule::rule): Likewise.
8445 (Program::rule): Likewise.
8446 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8447 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8448 respectively.
8449
8450 * configure.ac: Rewritten intensively to use host and target
8451 instead of build and host, respectively.
8452
8453 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8454 (host_cpu): Removed.
8455 (target_cpu): New variable.
8456 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8457 (BUILD_CC): Removed.
8458 (BUILD_CFLAGS): Likewise.
8459 (BUILD_CPPFLAGS): Likewise.
8460 (TARGET_CC): New variable.
8461 (TARGET_CFLAGS): Likewise.
8462 (TARGET_CPPFLAGS): Likewise.
8463 (TARGET_LDFLAGS): Likewise.
8464 (AWK): Likewise.
8465 (include): Use target_cpu instead of host_cpu.
8466 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
8467
8468 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8469
8470 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8471
8472 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8473 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8474 field 'false' to 'exec_on_false'.
8475 (grub_script_create_cmdif): Renamed argument names to reflect above
8476 changes.
8477
8478 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8479
8480 * normal/script.c (grub_script_create_cmdif): Likewise.
8481
8482 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8483
8484 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8485 top.
8486 (grub_hfsplus_btree_recptr): Likewise.
8487 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8488 FILEBLOCK both to pass a block number and store next block
8489 number.
8490 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8491 overflow file correctly. Specify errors appropriately, because
8492 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8493 grub_hfsplus_btree_recptr to get the pointer to a found key.
8494 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8495 is found.
8496
8497 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8498 linux.mod.
8499 (_linux_mod_SOURCES): New variable.
8500 (_linux_mod_CFLAGS): Likewise.
8501 (_linux_mod_LDFLAGS): Likewise.
8502 (linux_mod_SOURCES): Likewise.
8503 (linux_mod_CFLAGS): Likewise.
8504 (linux_mod_LDFLAGS): Likewise.
8505
8506 * DISTLIST: Added loader/i386/efi/linux.c,
8507 loader/i386/efi/linux_normal.c and
8508 include/grub/i386/efi/loader.h.
8509
8510 * loader/i386/efi/linux.c: New file.
8511 * loader/i386/efi/linux_normal.c: Likewise.
8512 * include/grub/i386/efi/loader.h: Likewise.
8513
8514 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8515
8516 * commands/blocklist.c: New file.
8517
8518 * DISTLIST: Added commands/blocklist.c.
8519
8520 * term/efi/console.c (grub_console_highlight_color): Use a lighter
8521 color for the background, and a darker color for the foreground.
8522 (grub_console_checkkey): Return READ_KEY.
8523 (grub_console_cls): Set the background to
8524 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8525
8526 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8527
8528 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8529 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8530
8531 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8532 prototype.
8533
8534 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8535 BG. The spec is wrong again.
8536
8537 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8538 prototype.
8539 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8540
8541 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8542 commands/blocklist.c.
8543 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8544
8545 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8546 (blocklist_mod_SOURCES): New variable.
8547 (blocklist_mod_CFLAGS): Likewise.
8548 (blocklist_mod_LDFLAGS): Likewise.
8549
8550 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8551
8552 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8553 duplication.
8554 (lba_mode): Use %eax more intensively to reduce the code size.
8555
8556 2006-05-20 Marco Gerards <marco@gnu.org>
8557
8558 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8559
8560 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8561 for `menuentry'.
8562 (script): Accept leading newlines.
8563 (newlines): New rule to describe 0 or more newlines.
8564 (commands): Accept `command' with trailing newline. Fixed the
8565 order in which arguments were passed to `grub_script_add_cmd'.
8566 Accept commands separated by newlines.
8567 (function): Changed to accept newlines.
8568 (menuentry) Rewritten.
8569
8570 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8571 front of the list, instead of to the end.
8572
8573 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8574
8575 * util/i386/pc/grub-install.in (bindir): New variable.
8576 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8577 Shaver <lbgwjl@gmail.com>.
8578
8579 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8580
8581 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8582 grub/machine/linux.h
8583 * loader/i386/pc/linux.c: Likewise.
8584
8585 * include/grub/i386/pc/linux.h: Moved to ...
8586 * include/grub/i386/linux.h: ... here.
8587
8588 * include/grub/i386/linux.h (struct linux_kernel_params): New
8589 struct.
8590
8591 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8592
8593 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8594 checking.
8595 (grub_video_vbe_blit_glyph): Likewise.
8596 (grub_video_vbe_blit_bitmap): Likewise.
8597 (grub_video_vbe_blit_render_target): Likewise.
8598
8599 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8600
8601 * configure.ac (--with-platform): Properly quote the square
8602 brackets.
8603
8604 2006-05-08 Marco Gerards <marco@gnu.org>
8605
8606 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8607 this...
8608 (kernel_elf_HEADERS): ...to this. Updated all users.
8609 (grubof_symlist.c): Renamed from this...
8610 (kernel_elf_symlist.c): ...to this. Updated all users.
8611 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8612 (grubof_SOURCES): Renamed from this...
8613 (kernel_elf_SOURCES): ...to this.
8614 (grubof_HEADERS): Renamed from this...
8615 (kernel_elf_HEADERS): ...to this.
8616 (grubof_CFLAGS): Renamed from this...
8617 (kernel_elf_CFLAGS): ...to this.
8618 (grubof_ASFLAGS): Renamed from this...
8619 (kernel_elf_ASFLAGS): ...to this.
8620 (grubof_LDFLAGS): Renamed from this...
8621 (kernel_elf_LDFLAGS): ...to this.
8622
8623 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8624 this...
8625 (kernel_elf_HEADERS): ...to this. Updated all users.
8626 (grubof_symlist.c): Renamed from this...
8627 (kernel_elf_symlist.c): ...to this. Updated all users.
8628 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8629 (grubof_SOURCES): Renamed from this...
8630 (kernel_elf_SOURCES): ...to this.
8631 (grubof_HEADERS): Renamed from this...
8632 (kernel_elf_HEADERS): ...to this.
8633 (grubof_CFLAGS): Renamed from this...
8634 (kernel_elf_CFLAGS): ...to this.
8635 (grubof_ASFLAGS): Renamed from this...
8636 (kernel_elf_ASFLAGS): ...to this.
8637 (grubof_LDFLAGS): Renamed from this...
8638 (kernel_elf_LDFLAGS): ...to this.
8639
8640 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8641 `kernel.elf' instead of `grubof'.
8642
8643 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8644
8645 Add --with-platform to configure. Use pkglibdir instead of
8646 pkgdatadir. This is reported by Roger Leigh.
8647
8648 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8649 (host_vendor): Likewise.
8650 (host_os): Likewise.
8651 (pkgdatadir): Likewise.
8652 (platform): New variable.
8653 (pkglibdir): Likewise.
8654 Use PKGLIBDIR instead of PKGDATADIR.
8655
8656 * util/i386/pc/grub-install.in (datadir): Removed.
8657 (host_vendor): Likewise.
8658 (host_os): Likewise.
8659 (pkgdatadir): Likewise.
8660 (platform): New variable.
8661 (pkglibdir): Likewise.
8662 Use PKGLIBDIR instead of PKGDATADIR.
8663
8664 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8665 instead of GRUB_DATADIR.
8666 (main): Likewise.
8667 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8668 (main): Likewise.
8669 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8670 (main): Likewise.
8671
8672 * configure.ac (--with-platform): New option.
8673 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8674
8675 * Makefile.in: Include a makefile based on PLATFORM instead of
8676 HOST_VENDOR.
8677 (pkgdatadir): Not appended by the machine type.
8678 (pkglibdir): Appended by the machine type.
8679 (host_vendor): Removed.
8680 (platform): New variable.
8681 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8682 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8683 (uninstall): Likewise.
8684
8685 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8686
8687 Use the environment context in the menu. Remove the commands
8688 "default" and "timeout", and use variables instead.
8689
8690 * normal/menu.c: Include grub/env.h.
8691 (print_entry): Cast TITLE to silence gcc.
8692 (get_timeout): New function.
8693 (set_timeout): Likewise.
8694 (get_entry_number): Likewise.
8695 (run_menu): Use a default entry, a fallback entry and a timeout
8696 in the environment variables "default", "fallback" and
8697 "timeout". Also, tweak the default entry if it is not within the
8698 current menu entries.
8699 (grub_menu_run): Use a fallback entry in the environment variable
8700 "fallback".
8701
8702 * normal/main.c (read_config_file): Do not initialize
8703 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8704 NEWMENU->TIMEOUT.
8705 (grub_normal_execute): Use a data slot to store the menu.
8706
8707 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8708 fallback_entry and timeout.
8709 (struct grub_menu_list): Removed.
8710 (grub_menu_list_t): Likewise.
8711 (struct grub_context): Likewise.
8712 (grub_context_t): Likewise.
8713 (grub_context_get): Likewise.
8714 (grub_context_get_current_menu): Likewise.
8715 (grub_context_push_menu): Likewise.
8716 (grub_context_pop_menu): Likewise.
8717 (grub_default_init): Likewise.
8718 (grub_default_fini): Likewise.
8719 (grub_timeout_init): Likewise.
8720 (grub_timeout_fini): Likewise.
8721
8722 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8723 and timeout.mod.
8724 (normal_mod_SOURCES): Removed normal/context.c.
8725
8726 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8727 commands/default.c, commands/timeout.c and normal/context.c.
8728 (normal_mod_SOURCES): Removed normal/context.c.
8729
8730 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8731 commands/timeout.c and normal/context.c.
8732 (normal_mod_SOURCES): Removed normal/context.c.
8733
8734 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8735 commands/default.c, commands/timeout.c and normal/context.c.
8736 (normal_mod_SOURCES): Removed normal/context.c.
8737
8738 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8739 timeout.mod.
8740 (default_mod_SOURCES): Removed.
8741 (default_mod_CFLAGS): Likewise.
8742 (default_mod_LDFLAGS): Likewise.
8743 (timeout_mod_SOURCES): Removed.
8744 (timeout_mod_CFLAGS): Likewise.
8745 (timeout_mod_LDFLAGS): Likewise.
8746
8747 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8748 normal/context.c.
8749
8750 * commands/default.c: Removed.
8751 * commands/timeout.c: Likewise.
8752 * normal/context.c: Likewise.
8753
8754 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8755
8756 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8757
8758 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8759
8760 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8761 "next" to "prev" for readability.
8762 (struct grub_env_sorted_var): New struct.
8763 (grub_env_context): Renamed to ...
8764 (initial_context): ... this.
8765 (grub_env_var_context): Renamed to ...
8766 (current_context): ... this.
8767 (grub_env_find): Look only at CURRENT_CONTEXT.
8768 (grub_env_context_open): Rewritten to copy exported variables from
8769 previous context.
8770 (grub_env_context_close): Rewritten according to the new
8771 scheme. Also, add an assertion to prevent the initial context from
8772 removed.
8773 (grub_env_insert): Removed the code for the sorted list.
8774 (grub_env_remove): Likewise.
8775 (grub_env_export): Simply mark the variable with
8776 GRUB_ENV_VAR_GLOBAL.
8777 (grub_env_set): A cosmetic change for naming consistency.
8778 (grub_env_get): Likewise.
8779 (grub_env_unset): Likewise.
8780 (grub_env_iterate): Rewritten to sort variables within this
8781 function.
8782 (grub_register_variable_hook): Fixed for naming consistency. Call
8783 grub_env_find again, only if NAME is not found at the first time.
8784 (mangle_data_slot_name): New function.
8785 (grub_env_set_data_slot): Likewise.
8786 (grub_env_get_data_slot): Likewise.
8787 (grub_env_unset_data_slot): Likewise.
8788
8789 * include/grub/env.h (grub_env_var_type): New enum.
8790 (GRUB_ENV_VAR_LOCAL): New constant.
8791 (GRUB_ENV_VAR_GLOBAL): Likewise.
8792 (GRUB_ENV_VAR_DATA): Likewise.
8793 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8794 "type".
8795 (grub_env_set): Replace VAR with NAME for consistency.
8796 (grub_register_variable_hook): Likewise.
8797 (grub_env_export): Specify the name of the argument.
8798 (grub_env_set_data_slot): New prototype.
8799 (grub_env_get_data_slot): Likewise.
8800 (grub_env_unset_data_slot): Likewise.
8801
8802 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8803
8804 Extend the loader so that GRUB can accept a loader which comes
8805 back to GRUB when a loaded image exits. Also, this change adds
8806 support for a chainloader on EFI.
8807
8808 * term/efi/console.c: Include grub/misc.h.
8809 (grub_console_checkkey): Display a scan code on the top for
8810 debugging. This will be removed once the EFI port gets stable.
8811 Correct the scan code mapping.
8812
8813 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8814 allocate memory from larger regions, in order to reduce the number
8815 of allocated regions. Otherwise, the MacOSX loader panics.
8816 (filter_memory_map): Avoid less than 1MB for compatibility with
8817 other loaders.
8818 (add_memory_regions): Allocate from the tail of a region, if
8819 possible, to avoid allocating a region near to 1MB, for the MacOSX
8820 loader.
8821
8822 * kern/efi/init.c (grub_efi_set_prefix): Specify
8823 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8824
8825 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8826 argument IMAGE_HANDLE and specify it to get a loaded image.
8827 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8828 grub_efi_get_loaded_image.
8829 (grub_efi_get_filename): Divide the length by the size of
8830 grub_efi_char16_t.
8831 (grub_efi_get_device_path): New function.
8832 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8833 the length by the size of grub_efi_char16_t for a file path device
8834 path node.
8835
8836 * kern/loader.c (grub_loader_noreturn): New variable.
8837 (grub_loader_set): Accept a new argument NORETURN. Set
8838 GRUB_LOADER_NORETURN to NORETURN.
8839 All callers changed.
8840 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8841 grub_machine_fini.
8842
8843 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8844 prototype.
8845 (grub_efi_get_loaded_image): Take an argument to specify an image
8846 handle.
8847
8848 * include/grub/loader.h (grub_loader_set): Added one more argument
8849 NORETURN.
8850
8851 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8852 instead of grub_efi_open_protocol.
8853 (grub_efidisk_get_device_name): Likewise.
8854 (grub_efidisk_close): Print a newline.
8855 (grub_efidisk_get_device_handle): Fixed to use
8856 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8857 GRUB_EFI_DEVICE_PATH_TYPE.
8858
8859 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8860 * kern/efi/efi.c (device_path_guid): ... here.
8861
8862 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8863 chain.mod.
8864 (kernel_mod_HEADERS): Added efi/disk.h.
8865 (_chain_mod_SOURCES): New variable.
8866 (_chain_mod_CFLAGS): Likewise.
8867 (_chain_mod_LDFLAGS): Likewise.
8868 (chain_mod_SOURCES): Likewise.
8869 (chain_mod_CFLAGS): Likewise.
8870 (chain_mod_LDFLAGS): Likewise.
8871
8872 * DISTLIST: Added include/grub/efi/chainloader.h,
8873 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8874
8875 * include/grub/efi/chainloader.h: New file.
8876 * loader/efi/chainloader.c: Likewise.
8877 * loader/efi/chainloader_normal.c: Likewise.
8878
8879 2006-04-30 Marco Gerards <marco@gnu.org>
8880
8881 * commands/configfile.c (grub_cmd_source): New function.
8882 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8883 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8884
8885 2006-04-30 Marco Gerards <marco@gnu.org>
8886
8887 * normal/execute.c (grub_script_execute_cmd): Change the return
8888 type to `grub_err_t'. Correctly return the error.
8889 (grub_script_execute_cmdline): In case a command line is not a
8890 command or a function, try to interpret it as an assignment.
8891
8892 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8893
8894 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8895 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8896 skip a node whose name is obviously invalid as UTF-16,
8897 i.e. contains a NUL character. Stop the iteration when the last
8898 directory entry is found. Instead of using the return value of
8899 grub_hfsplus_btree_iterate_node, store the value in RET and use
8900 it, because the iterator can be stopped by the last directory
8901 entry.
8902
8903 2006-04-30 Marco Gerards <marco@gnu.org>
8904
8905 * include/grub/env.h (grub_env_export): New prototype. Reported
8906 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8907
8908 2006-04-30 Marco Gerards <marco@gnu.org>
8909
8910 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8911 size of the extents in a catalog file record.
8912
8913 2006-04-29 Marco Gerards <marco@gnu.org>
8914
8915 * commands/configfile.c (grub_cmd_configfile): Execute the
8916 configfile within its own context.
8917
8918 * include/grub/env.h (grub_env_context_open): New prototype.
8919 (grub_env_context_close): Likewise.
8920
8921 * kern/env.c (grub_env): Removed.
8922 (grub_env_sorted): Likewise.
8923 (grub_env_context): New variable.
8924 (grub_env_var_context): Likewise.
8925 (grub_env_find): Search both the active context and the global
8926 context.
8927 (grub_env_context_open): New function.
8928 (grub_env_context_close): Likewise.
8929 (grub_env_insert): Likewise.
8930 (grub_env_remove): Likewise.
8931 (grub_env_export): Likewise.
8932 (grub_env_set): Changed to use helper functions to avoid code
8933 duplication.
8934 (grub_env_iterate): Rewritten so both the current context and the
8935 global context are being used.
8936
8937 * normal/command.c (export_command): New function.
8938 (grub_command_init): Register the `export' function.
8939
8940 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8941
8942 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8943 explicitly to suppress gcc's warnings.
8944 * fs/fat.c (grub_fat_find_dir): Likewise.
8945 (grub_fat_label): Likewise.
8946 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8947 (grub_xfs_mount): Likewise.
8948 (grub_xfs_label): Likewise.
8949 * fs/affs.c (grub_affs_mount): Likewise.
8950 (grub_affs_label): Likewise.
8951 (grub_affs_iterate_dir): Likewise.
8952 * fs/sfs.c (grub_sfs_mount): Likewise.
8953 (grub_sfs_iterate_dir): Likewise.
8954 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8955 * fs/hfs.c (grub_hfs_mount): Likewise.
8956 (grub_hfs_cmp_catkeys): Likewise.
8957 (grub_hfs_find_dir): Likewise.
8958 (grub_hfs_dir): Likewise.
8959 (grub_hfs_label): Likewise.
8960 * fs/jfs.c (grub_jfs_mount): Likewise.
8961 (grub_jfs_opendir): Likewise.
8962 (grub_jfs_getent): Likewise.
8963 (grub_jfs_lookup_symlink): Likewise.
8964 (grub_jfs_label): Likewise.
8965 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8966 (grub_hfsplus_iterate_dir): Likewise.
8967 (grub_hfsplus_btree_iterate_node): Made static.
8968
8969 * util/grub-emu.c (prefix): New variable.
8970 (grub_machine_set_prefix): New function.
8971 (main): Do not set the environment variable "prefix" here. Only
8972 set PREFIX, which is used later by grub_machine_set_prefix.
8973
8974 * include/grub/video.h: Do not include grub/symbol.h.
8975 (grub_video_register): Not exported. This symbol is not defined in
8976 the kernel.
8977 (grub_video_unregister): Likewise.
8978 (grub_video_iterate): Likewise.
8979 (grub_video_setup): Likewise.
8980 (grub_video_restore): Likewise.
8981 (grub_video_get_info): Likewise.
8982 (grub_video_get_blit_format): Likewise.
8983 (grub_video_set_palette): Likewise.
8984 (grub_video_get_palette): Likewise.
8985 (grub_video_set_viewport): Likewise.
8986 (grub_video_get_viewport): Likewise.
8987 (grub_video_map_color): Likewise.
8988 (grub_video_map_rgb): Likewise.
8989 (grub_video_map_rgba): Likewise.
8990 (grub_video_fill_rect): Likewise.
8991 (grub_video_blit_glyph): Likewise.
8992 (grub_video_blit_bitmap): Likewise.
8993 (grub_video_blit_render_target): Likewise.
8994 (grub_video_scroll): Likewise.
8995 (grub_video_swap_buffers): Likewise.
8996 (grub_video_create_render_target): Likewise.
8997 (grub_video_delete_render_target): Likewise.
8998 (grub_video_set_active_render_target): Likewise.
8999
9000 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9001 Undefined.
9002 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9003
9004 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9005 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9006 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9007 instead of $(srcdir)/genkernsyms.sh.
9008
9009 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9010 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9011 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9012 instead of $(srcdir)/genkernsyms.sh.
9013
9014 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9015 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9016 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9017 instead of $(srcdir)/genkernsyms.sh.
9018
9019 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9020 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9021 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9022 instead of $(srcdir)/genkernsyms.sh.
9023
9024 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9025 genkernsyms.sh.
9026
9027 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9028 genkernsyms.sh.
9029 (gensymlist.sh): New target.
9030 (genkernsyms.sh): Likewise.
9031
9032 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9033 genkernsyms.sh.in and gensymlist.sh.in.
9034
9035 * genkernsyms.sh: Removed.
9036 * gensymlist.sh: Likewise.
9037
9038 * genkernsyms.sh.in: New file.
9039 * gensymlist.sh.in: Likewise.
9040
9041 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9042
9043 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9044 clobber "prefix", since we may have already set it manually.
9045
9046 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9047
9048 * kern/misc.c (abort): New alias for grub_abort.
9049
9050 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9051
9052 A new machine-specific function "grub_machine_set_prefix" is
9053 defined. This is called after loading modules, so that a prefix
9054 initialization can use modules. Also, this change adds an
9055 intensive debugging feature for the memory manager via the
9056 configure option "--enable-mm-debug".
9057
9058 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9059 PART.LEN.
9060
9061 * kern/sparc64/ieee1275/init.c (abort): Removed.
9062 (grub_stop): Likewise.
9063 (grub_exit): New function.
9064 (grub_set_prefix): Renamed to ...
9065 (grub_machine_set_prefix): ... this.
9066 (grub_machine_init): Do not call grub_set_prefix.
9067
9068 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9069 (grub_machine_set_prefix): ... this.
9070 (grub_machine_init): Do not call grub_set_prefix.
9071
9072 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9073 (grub_machine_init): Do not set the prefix here.
9074
9075 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9076
9077 * kern/efi/init.c: Include grub/mm.h.
9078 (grub_efi_set_prefix): New function.
9079
9080 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9081 (grub_efi_get_filename): New function.
9082 (grub_print_device_path): Renamed to ...
9083 (grub_efi_print_device_path): ... this.
9084
9085 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9086 [MM_DEBUG] (grub_realloc): Likewise.
9087 [MM_DEBUG] (grub_free): Likewise.
9088 [MM_DEBUG] (grub_memalign): Likewise.
9089 [MM_DEBUG] (grub_mm_debug): New variable.
9090 [MM_DEBUG] (grub_debug_malloc): New function.
9091 [MM_DEBUG] (grub_debug_free): New function.
9092 [MM_DEBUG] (grub_debug_realloc): New function.
9093 [MM_DEBUG] (grub_debug_memalign): New function.
9094
9095 * kern/misc.c (grub_abort): Print a newline to distinguish
9096 the message.
9097
9098 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9099 grub_set_root_dev after loading modules. This is necessary when
9100 setting a prefix depends on modules.
9101
9102 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9103 (grub_efi_print_device_path): ... this.
9104 (grub_efi_get_filename): New prototype.
9105 (grub_efi_set_prefix): Likewise.
9106
9107 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9108 and grub/disk.h.
9109 (grub_efidisk_get_device_handle): New prototype.
9110 (grub_efidisk_get_device_name): Likewise.
9111
9112 * include/grub/mm.h: Include config.h.
9113 (MM_DEBUG): Removed.
9114 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9115 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9116 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9117 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9118 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9119 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9120 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9121 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9122 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9123
9124 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9125
9126 * disk/efi/efidisk.c: Include grub/partition.h.
9127 (iterate_child_devices): New function.
9128 (add_device): First, compare only last device path nodes, so that
9129 devices are sorted by the types.
9130 (grub_efidisk_get_device_handle): New function.
9131 (grub_efidisk_get_device_name): Likewise.
9132
9133 * configure.ac (--enable-mm-debug): New option to enable the
9134 memory manager debugging feature. This makes the binary much
9135 bigger, so is disabled by default.
9136
9137 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9138
9139 Use grub_abort instead of grub_stop, and grub_exit must be
9140 define in each architecture now. Also, this change adds support
9141 for EFI disks.
9142
9143 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9144 (grub_getkey): New function.
9145 (grub_term_get_current): Likewise.
9146
9147 * util/i386/pc/grub-setup.c: Include grub/term.h.
9148 (grub_getkey): New function.
9149 (grub_term_get_current): Likewise.
9150
9151 * util/misc.c (grub_stop): Renamed to ...
9152 (grub_exit): ... this.
9153
9154 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9155 (grub_exit): ... this.
9156 (grub_machine_init): Use grub_abort instead of abort.
9157 (grub_stop): Removed.
9158
9159 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9160 abort.
9161
9162 * kern/i386/pc/startup.S (grub_exit): New function.
9163 (cold_reboot): New label.
9164
9165 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9166 (grub_efi_init): Call grub_efidisk_init.
9167 (grub_efi_fini): Call grub_efidisk_fini.
9168
9169 * kern/efi/efi.c: Include grub/mm.h.
9170 (grub_efi_console_control_guid): Renamed to ...
9171 (console_control_guid): ... this.
9172 (grub_efi_loaded_image_guid): Renamed to ...
9173 (loaded_image_guid): ... this.
9174 (grub_efi_locate_handle): New function.
9175 (grub_efi_open_protocol): Likewise.
9176 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9177 GRUB_EFI_CONSOLE_CONTROL_GUID.
9178 (grub_efi_exit): Removed.
9179 (grub_stop): Likewise.
9180 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9181 (grub_exit): New function.
9182 (grub_print_device_path): Likewise.
9183
9184 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9185 (grub_enter_rescue_mode): Register "exit".
9186
9187 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9188 (grub_abort): New function.
9189
9190 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9191
9192 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9193
9194 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9195
9196 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9197 (grub_print_device_path): New prototype.
9198 (grub_efi_locate_handle): Likewise.
9199 (grub_efi_open_protocol): Likewise.
9200
9201 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9202 * disk/efi/efidisk.c: Likewise.
9203
9204 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9205
9206 * include/grub/efi/console_control.h
9207 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9208
9209 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9210 last 8 bytes as an array.
9211 (GRUB_EFI_DISK_IO_GUID): New macro.
9212 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9213 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9214 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9215 grub_uint8_t.
9216 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9217 (struct grub_efi_device_path): Rename the member "sub_type" to
9218 "subtype".
9219 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9220 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9221 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9222 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9223 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9224 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9225 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9226 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9227 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9228 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9229 (struct grub_efi_pci_device_path): New structure.
9230 (grub_efi_pci_device_path_t): New type.
9231 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9232 (struct grub_efi_pccard_device_path): New structure.
9233 (grub_efi_pccard_device_path_t): New type.
9234 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9235 (struct grub_efi_memory_mapped_device_path): New structure.
9236 (grub_efi_memory_mapped_device_path_t): New type.
9237 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9238 (struct grub_efi_vendor_device_path): New structure.
9239 (grub_efi_vendor_device_path_t): New type.
9240 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9241 (struct grub_efi_controller_device_path): New structure.
9242 (grub_efi_controller_device_path_t): New type.
9243 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9244 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9245 (struct grub_efi_acpi_device_path): New structure.
9246 (grub_efi_acpi_device_path_t): New type.
9247 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9248 (struct grub_efi_expanded_acpi_device_path): New structure.
9249 (grub_efi_expanded_acpi_device_path_t): New type.
9250 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9251 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9252 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9253 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9254 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9255 (struct grub_efi_atapi_device_path): New structure.
9256 (grub_efi_atapi_device_path_t): New type.
9257 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9258 (struct grub_efi_fibre_channel_device_path): New structure.
9259 (grub_efi_fibre_channel_device_path_t): New type.
9260 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9261 (struct grub_efi_1394_device_path): New structure.
9262 (grub_efi_1394_device_path_t): New type.
9263 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9264 (struct grub_efi_usb_device_path): New structure.
9265 (grub_efi_usb_device_path_t): New type.
9266 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9267 (struct grub_efi_usb_class_device_path): New structure.
9268 (grub_efi_usb_class_device_path_t): New type.
9269 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9270 (struct grub_efi_i2o_device_path): New structure.
9271 (grub_efi_i2o_device_path_t): New type.
9272 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9273 (struct grub_efi_mac_address_device_path): New structure.
9274 (grub_efi_mac_address_device_path_t): New type.
9275 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9276 (struct grub_efi_ipv4_device_path): New structure.
9277 (grub_efi_ipv4_device_path_t): New type.
9278 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9279 (struct grub_efi_ipv6_device_path): New structure.
9280 (grub_efi_ipv6_device_path_t): New type.
9281 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9282 (struct grub_efi_infiniband_device_path): New structure.
9283 (grub_efi_infiniband_device_path_t): New type.
9284 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9285 (struct grub_efi_uart_device_path): New structure.
9286 (grub_efi_uart_device_path_t): New type.
9287 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9288 (struct grub_efi_vendor_messaging_device_path): New structure.
9289 (grub_efi_vendor_messaging_device_path_t): New type.
9290 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9291 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9292 (struct grub_efi_hard_drive_device_path): New structure.
9293 (grub_efi_hard_drive_device_path_t): New type.
9294 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9295 (struct grub_efi_cdrom_device_path): New structure.
9296 (grub_efi_cdrom_device_path_t): New type.
9297 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9298 (struct grub_efi_vendor_media_device_path): New structure.
9299 (grub_efi_vendor_media_device_path_t): New type.
9300 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9301 (struct grub_efi_file_path_device_path): New structure.
9302 (grub_efi_file_path_device_path_t): New type.
9303 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9304 (struct grub_efi_protocol_device_path): New structure.
9305 (grub_efi_protocol_device_path_t): New type.
9306 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9307 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9308 (struct grub_efi_bios_device_path): New structure.
9309 (grub_efi_bios_device_path_t): New type.
9310 (struct grub_efi_disk_io): New structure.
9311 (grub_efi_disk_io_t): New type.
9312 (struct grub_efi_block_io_media): New structure.
9313 (grub_efi_block_io_media_t): New type.
9314 (struct grub_efi_block_io): New structure.
9315 (grub_efi_block_io_t): New type.
9316
9317 * include/grub/misc.h (grub_stop): Removed.
9318 (grub_exit): New prototype.
9319 (grub_abort): Likewise.
9320
9321 * include/grub/disk.h (enum grub_disk_dev_id): Added
9322 GRUB_DISK_DEVICE_EFIDISK_ID.
9323
9324 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9325 disk/efi/efidisk.c.
9326 (kernel_syms.lst): Remove the target if an error occurs.
9327
9328 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9329
9330 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9331 as it was simply too buggy.
9332
9333 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9334
9335 * kern/misc.c (grub_lltoa): New function.
9336 (grub_vsprintf): Added support for the long long suffix,
9337 i.e. "ll".
9338
9339 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9340
9341 * Makefile.in (LDFLAGS): Add variable.
9342 (LD): Remove variable.
9343 * configure.ac: Add -m32 to LDFLAGS.
9344 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9345 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9346 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9347 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9348 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9349 variables.
9350 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9351 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9352 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9353
9354 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9355
9356 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9357 length for unknown glyph.
9358
9359 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9360
9361 Add support for pre-loaded modules into the EFI port.
9362
9363 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9364 completely. Accept one more argument DIR. The caller has changed.
9365
9366 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9367
9368 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9369 (grub_efi_loaded_image_guid): New variable.
9370 (grub_efi_get_loaded_image): New function.
9371 (grub_arch_modules_addr): Likewise.
9372
9373 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9374 prototype.
9375
9376 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9377 (struct grub_efi_loaded_image): New structure.
9378 (grub_efi_loaded_image_t): New type.
9379
9380 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9381
9382 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9383 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9384 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9385
9386 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9387
9388 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9389
9390 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9391
9392 * DISTLIST: Added include/grub/efi/console.h,
9393 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9394 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9395
9396 * include/grub/efi/console.h: New file.
9397 * include/grub/efi/time.h: Likewise.
9398 * include/grub/i386/efi/kernel.h: Likewise.
9399 * kern/efi/init.c: Likewise.
9400 * kern/efi/mm.c: Likewise.
9401 * term/efi/console.c: Likewise.
9402
9403 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9404 (grub_stop): Removed.
9405 (grub_get_rtc): Likewise.
9406 (grub_machine_init): Simply call grub_efi_init.
9407 (grub_machine_fini): Call grub_efi_fini.
9408
9409 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9410 (grub_efi_output_string): Removed.
9411 (grub_efi_stall): New function.
9412 (grub_stop): Likewise.
9413 (grub_get_rtc): Likewise.
9414
9415 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9416 (grub_efi_stall): New prototype.
9417 (grub_efi_allocate_pages): Likewise.
9418 (grub_efi_free_pages): Likewise.
9419 (grub_efi_get_memory_map): Likewise.
9420 (grub_efi_mm_init): Likewise.
9421 (grub_efi_mm_fini): Likewise.
9422 (grub_efi_init): Likewise.
9423 (grub_efi_fini): Likewise.
9424
9425 * include/grub/i386/efi/time.h: Do not include
9426 grub/symbol.h. Include grub/efi/time.h.
9427 (GRUB_TICKS_PER_SECOND): Removed.
9428 (grub_get_rtc): Likewise.
9429
9430 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9431 Added padding. The EFI spec is buggy.
9432 (GRUB_EFI_BLACK): New macro.
9433 (GRUB_EFI_BLUE): Likewise.
9434 (GRUB_EFI_GREEN): Likewise.
9435 (GRUB_EFI_CYAN): Likewise.
9436 (GRUB_EFI_RED): Likewise.
9437 (GRUB_EFI_MAGENTA): Likewise.
9438 (GRUB_EFI_BROWN): Likewise.
9439 (GRUB_EFI_LIGHTGRAY): Likewise.
9440 (GRUB_EFI_BRIGHT): Likewise.
9441 (GRUB_EFI_DARKGRAY): Likewise.
9442 (GRUB_EFI_LIGHTBLUE): Likewise.
9443 (GRUB_EFI_LIGHTGREEN): Likewise.
9444 (GRUB_EFI_LIGHTCYAN): Likewise.
9445 (GRUB_EFI_LIGHTRED): Likewise.
9446 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9447 (GRUB_EFI_YELLOW): Likewise.
9448 (GRUB_EFI_WHITE): Likewise.
9449 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9450 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9451 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9452 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9453 (GRUB_EFI_BACKGROUND_RED): Likewise.
9454 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9455 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9456 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9457 (GRUB_EFI_TEXT_ATTR): Likewise.
9458
9459 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9460 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9461 (kernel_mod_HEADERS): Added efi/time.h.
9462
9463 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9464
9465 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9466 include/grub/efi/api.h, include/grub/efi/console_control.h,
9467 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9468 include/grub/i386/efi/time.h, kern/efi/efi.c,
9469 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9470 and util/i386/efi/grub-mkimage.c.
9471
9472 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9473
9474 * genmk.rb (PModule#rule): Do not export symbols if
9475 #{prefix}_EXPORTS is set to "no".
9476
9477 * conf/i386-efi.mk: New file.
9478 * conf/i386-efi.rmk: Likewise.
9479 * include/grub/efi/api.h: Likewise.
9480 * include/grub/efi/console_control.h: Likewise.
9481 * include/grub/efi/efi.h: Likewise.
9482 * include/grub/efi/pe32.h: Likewise.
9483 * include/grub/i386/efi/time.h: Likewise.
9484 * kern/efi/efi.c: Likewise.
9485 * kern/i386/efi/init.c: Likewise.
9486 * kern/i386/efi/startup.S: Likewise.
9487 * util/i386/efi/grub-mkimage.c: Likewise.
9488
9489 2006-04-17 Marco Gerards <marco@gnu.org>
9490
9491 * include/grub/script.h: Include <grub/parser.h> and
9492 "grub_script.tab.h".
9493 (struct grub_lexer_param): New struct.
9494 (struct grub_parser_param): Likewise.
9495 (grub_script_create_arglist): Pass the state in an argument.
9496 (grub_script_add_arglist): Likewise.
9497 (grub_script_create_cmdline): Likewise.
9498 (grub_script_create_cmdblock): Likewise.
9499 (grub_script_create_cmdif): Likewise.
9500 (grub_script_create_cmdmenu): Likewise.
9501 (grub_script_add_cmd): Likewise.
9502 (grub_script_arg_add): Likewise.
9503 (grub_script_lexer_ref): Likewise.
9504 (grub_script_lexer_deref): Likewise.
9505 (grub_script_lexer_record_start): Likewise.
9506 (grub_script_lexer_record_stop): Likewise.
9507 (grub_script_mem_record): Likewise.
9508 (grub_script_mem_record_stop): Likewise.
9509 (grub_script_malloc): Likewise.
9510 (grub_script_yylex): Likewise.
9511 (grub_script_yyparse): Likewise.
9512 (grub_script_yyerror): Likewise.
9513 (grub_script_yylex): Likewise.
9514 (grub_script_lexer_init): Return the state.
9515
9516 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9517 (grub_script_lexer_done): Likewise.
9518 (grub_script_lexer_getline): Likewise.
9519 (grub_script_lexer_refs): Likewise.
9520 (script): Likewise.
9521 (newscript): Likewise.
9522 (record): Likewise.
9523 (recording): Likewise.
9524 (recordpos): Likewise.
9525 (recordlen): Likewise.
9526 (grub_script_lexer_init): Return the state instead of setting
9527 global variables.
9528 (grub_script_lexer_ref): Use the newly added argument for state
9529 instead of globals.
9530 (grub_script_lexer_deref): Likewise.
9531 (grub_script_lexer_record_start): Likewise.
9532 (grub_script_lexer_record_stop): Likewise.
9533 (recordchar): Likewise.
9534 (nextchar): Likewise.
9535 (grub_script_yylex2): Likewise.
9536 (grub_script_yylex): Likewise.
9537 (grub_script_yyerror): Likewise.
9538
9539 * normal/parser.y (func_mem): Removed variable.
9540 (menu_entry): Likewise.
9541 (err): Likewise.
9542 (%lex-param): New parser option.
9543 (%parse-param): Likewise.
9544 (script): Always return the AST.
9545 (argument): Pass the state around.
9546 (arguments): Likewise.
9547 (grubcmd): Likewise.
9548 (commands): Likewise.
9549 (function): Likewise.
9550 (menuentry): Likewise.
9551 (if_statement): Likewise.
9552 (if): Likewise.
9553
9554 * normal/script.c (grub_script_memused): Removed variable.
9555 (grub_script_parsed): Likewise.
9556 (grub_script_malloc): Added a state argument. Use that instead of
9557 global variables.
9558 (grub_script_mem_record): Likewise.
9559 (grub_script_mem_record_stop): Likewise.
9560 (grub_script_arg_add): Likewise.
9561 (grub_script_add_arglist): Likewise.
9562 (grub_script_create_cmdline): Likewise.
9563 (grub_script_create_cmdif): Likewise.
9564 (grub_script_create_cmdmenu): Likewise.
9565 (grub_script_add_cmd): Likewise.
9566 (grub_script_parse): Setup the state before calling the parser.
9567
9568 2006-04-16 Marco Gerards <marco@gnu.org>
9569
9570 * normal/command.c (grub_command_init): Remove the title command.
9571
9572 * normal/lexer.c (grub_script_yylex): Renamed from this...
9573 (grub_script_yylex2): ... to this.
9574 (grub_script_yylex): New function. Temporary
9575 introduced to filter some tokens.
9576 (grub_script_yyerror): Print a newline.
9577
9578 * normal/main.c (read_config_file): Output information about the
9579 lines that contain errors. Wait for a key after all lines have
9580 been processed. Don't return an empty menu.
9581
9582 * normal/parser.y (func_mem): Don't initialize.
9583 (menu_entry): Likewise.
9584 (err): New variable.
9585 (script): Don't return anything when an error was encountered.
9586 (ws, returns): Removed rules.
9587 (argument): Disabled concatenated variable support.
9588 (arguments): Remove explicit separators.
9589 (grubcmd): Likewise.
9590 (function): Likewise.
9591 (menuentry): Likewise.
9592 (if): Likewise.
9593 (commands): Likewise. Add error handling.
9594
9595 * normal/script.c (grub_script_create_cmdline): If
9596 `grub_script_parsed' is 0, assume the parser encountered an error.
9597
9598 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9599
9600 * configure.ac: Add support for EFI. Fix the typo
9601 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9602
9603 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9604
9605 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9606 foreign multibyte characters should be shown correctly.
9607
9608 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9609
9610 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9611 calculation.
9612 (read_config_file): Made it to close file before returning.
9613
9614 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9615
9616 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9617 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9618 video/i386/pc/vbefill.c.
9619
9620 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9621 video/i386/pc/vbefill.c.
9622
9623 * include/grub/video.h (grub_video_blit_format): New enum.
9624 (grub_video_mode_info): Added new member blit_format.
9625 (grub_video_get_blit_format): New function prototype.
9626
9627 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9628 function prototype.
9629 (grub_video_vbe_map_rgb): Likewise.
9630 (grub_video_vbe_unmap_color): Likewise.
9631
9632 * include/grub/i386/pc/vbeblit.h: New file.
9633
9634 * include/grub/i386/pc/vbefill.h: New file.
9635
9636 * video/video.c (grub_video_get_blit_format): New function.
9637 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9638 (grub_video_vbe_map_rgb): Likewise.
9639 (grub_video_vbe_unmap_color): Likewise.
9640
9641 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9642 optimized fills.
9643 (grub_video_vbe_blit_render_target): Changed to use more optimized
9644 blits.
9645 (grub_video_vbe_setup): Added detection for optimized settings.
9646 (grub_video_vbe_create_render_target): Likewise.
9647
9648 * video/i386/pc/vbeblit.c: New file.
9649
9650 * video/i386/pc/vbefill.c: New file.
9651
9652 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9653
9654 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9655 here...
9656
9657 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9658 parsing to support both hex and dec ranges. If filename was missing
9659 show usage information.
9660
9661 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9662
9663 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9664 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9665
9666 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9667 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9668 (video_mod_SOURCES): Added.
9669 (video_mod_CFLAGS): Likewise.
9670 (video_mod_LDFLAGS): Likewise.
9671 (gfxterm_mod_SOURCES): Likewise.
9672 (gfxterm_mod_CFLAGS): Likewise.
9673 (gfxterm_mod_LDFLAGS): Likewise.
9674 (videotest_mod_SOURCES): Likewise.
9675 (videotest_mod_CFLAGS): Likewise.
9676 (videotest_mod_LDFLAGS): Likewise.
9677 (vesafb_mod_SOURCES): Removed.
9678 (vesafb_mod_CFLAGS): Likewise.
9679 (vesafb_mod_LDFLAGS): Likewise.
9680 (vga_mod_SOURCES): Likewise.
9681 (vga_mod_CFLAGS): Likewise.
9682 (vga_mod_LDFLAGS): Likewise.
9683
9684 * commands/videotest.c: New file.
9685
9686 * font/manager.c (fill_with_default_glyph): Modified to use
9687 grub_font_glyph.
9688 (grub_font_get_glyph): Likewise.
9689 (fontmanager): Renamed from this...
9690 (font_manager): ... to this.
9691
9692 * include/grub/font.h (grub_font_glyph): Added new structure.
9693 (grub_font_get_glyph): Modified to use grub_font_glyph.
9694
9695 * include/grub/misc.h (grub_abs): Added as inline function.
9696
9697 * include/grub/video.h: New file.
9698
9699 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9700 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9701 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9702 (grub_vbe_get_controller_info): Renamed from this...
9703 (grub_vbe_bios_get_controller_info): ... to this.
9704 (grub_vbe_get_mode_info): Renamed from this...
9705 (grub_vbe_bios_get_mode_info): ... to this.
9706 (grub_vbe_set_mode): Renamed from this...
9707 (grub_vbe_bios_set_mode): ... to this.
9708 (grub_vbe_get_mode): Renamed from this...
9709 (grub_vbe_bios_get_mode): ... to this.
9710 (grub_vbe_set_memory_window): Renamed from this...
9711 (grub_vbe_bios_set_memory_window): ... to this.
9712 (grub_vbe_get_memory_window): Renamed from this...
9713 (grub_vbe_bios_get_memory_window): ... to this.
9714 (grub_vbe_set_scanline_length): Renamed from this...
9715 (grub_vbe_set_scanline_length): ... to this.
9716 (grub_vbe_get_scanline_length): Renamed from this...
9717 (grub_vbe_bios_get_scanline_length): ... to this.
9718 (grub_vbe_set_display_start): Renamed from this...
9719 (grub_vbe_bios_set_display_start): ... to this.
9720 (grub_vbe_get_display_start): Renamed from this...
9721 (grub_vbe_bios_get_display_start): ... to this.
9722 (grub_vbe_set_palette_data): Renamed from this...
9723 (grub_vbe_bios_set_palette_data): ... to this.
9724 (grub_vbe_set_pixel_rgb): Removed.
9725 (grub_vbe_set_pixel_index): Likewise.
9726
9727 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9728 from this...
9729 (grub_vbe_bios_get_controller_info): ... to this.
9730 (grub_vbe_get_mode_info): Renamed from this...
9731 (grub_vbe_bios_get_mode_info): ... to this.
9732 (grub_vbe_set_mode): Renamed from this...
9733 (grub_vbe_bios_set_mode): ... to this.
9734 (grub_vbe_get_mode): Renamed from this...
9735 (grub_vbe_bios_get_mode): ... to this.
9736 (grub_vbe_set_memory_window): Renamed from this...
9737 (grub_vbe_bios_set_memory_window): ... to this.
9738 (grub_vbe_get_memory_window): Renamed from this...
9739 (grub_vbe_bios_get_memory_window): ... to this.
9740 (grub_vbe_set_scanline_length): Renamed from this...
9741 (grub_vbe_set_scanline_length): ... to this.
9742 (grub_vbe_get_scanline_length): Renamed from this...
9743 (grub_vbe_bios_get_scanline_length): ... to this.
9744 (grub_vbe_set_display_start): Renamed from this...
9745 (grub_vbe_bios_set_display_start): ... to this.
9746 (grub_vbe_get_display_start): Renamed from this...
9747 (grub_vbe_bios_get_display_start): ... to this.
9748 (grub_vbe_set_palette_data): Renamed from this...
9749 (grub_vbe_bios_set_palette_data): ... to this.
9750 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9751 getting corrupted after calling it. Added more pushes and pops.
9752 (grub_vbe_bios_set_mode): Likewise.
9753 (grub_vbe_bios_get_mode): Likewise.
9754 (grub_vbe_bios_get_memory_window): Likewise.
9755 (grub_vbe_bios_set_scanline_length): Likewise.
9756 (grub_vbe_bios_get_scanline_length): Likewise.
9757 (grub_vbe_bios_get_display_start): Likewise.
9758 (grub_vbe_bios_set_palette_data): Likewise.
9759
9760 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9761 (cl_insert): Likewise.
9762 (cl_delete): Likewise.
9763
9764 * term/gfxterm.c: New file.
9765
9766 * term/i386/pc/vesafb.c: Removed file.
9767
9768 * video/video.c: New file.
9769
9770 * video/i386/pc/vbe.c (real2pm): Added new function.
9771 (grub_video_vbe_draw_pixel): Likewise.
9772 (grub_video_vbe_get_video_ptr): Likewise.
9773 (grub_video_vbe_get_pixel): Likewise
9774 (grub_video_vbe_init): Likewise.
9775 (grub_video_vbe_fini): Likewise.
9776 (grub_video_vbe_setup): Likewise.
9777 (grub_video_vbe_get_info): Likewise.
9778 (grub_video_vbe_set_palette): Likewise.
9779 (grub_video_vbe_get_palette): Likewise.
9780 (grub_video_vbe_set_viewport): Likewise.
9781 (grub_video_vbe_get_viewport): Likewise.
9782 (grub_video_vbe_map_color): Likewise.
9783 (grub_video_vbe_map_rgb): Likewise.
9784 (grub_video_vbe_map_rgba): Likewise.
9785 (grub_video_vbe_unmap_color): Likewise.
9786 (grub_video_vbe_fill_rect): Likewise.
9787 (grub_video_vbe_blit_glyph): Likewise.
9788 (grub_video_vbe_blit_bitmap): Likewise.
9789 (grub_video_vbe_blit_render_target): Likewise.
9790 (grub_video_vbe_scroll): Likewise.
9791 (grub_video_vbe_swap_buffers): Likewise.
9792 (grub_video_vbe_create_render_target): Likewise.
9793 (grub_video_vbe_delete_render_target): Likewise.
9794 (grub_video_vbe_set_active_render_target): Likewise.
9795 (grub_vbe_set_pixel_rgb): Remove function.
9796 (grub_vbe_set_pixel_index): Likewise.
9797 (index_color_mode): Remove static variable.
9798 (active_mode): Likewise.
9799 (framebuffer): Likewise.
9800 (bytes_per_scan_line): Likewise.
9801 (grub_video_vbe_adapter): Added new static variable.
9802 (framebuffer): Likewise.
9803 (render_target): Likewise.
9804 (initial_mode): Likewise.
9805 (mode_in_use): Likewise.
9806 (mode_list): Likewise.
9807
9808 2006-03-10 Marco Gerards <marco@gnu.org>
9809
9810 * configure.ac (AC_INIT): Bumped to 1.93.
9811
9812 * DISTLIST: Added `include/grub/hfs.h'.
9813
9814 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9815
9816 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9817 18H, which might help the BIOS falling back to next boot media.
9818
9819 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9820
9821 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9822 Poe Chen <poe.poechen@gmail.com>.
9823
9824 2006-01-17 Marco Gerards <marco@gnu.org>
9825
9826 * include/grub/normal.h: Include <grub/script.h>.
9827 (grub_command_list): Removed struct.
9828 (grub_command_list_t): Removed type.
9829 (grub_menu_entry): Remove members `num' and `command_list'. Add
9830 members `commands' and `sourcecode'.
9831 * include/grub/script.h: Add inclusion guards.
9832 (grub_script_cmd_menuentry): New struct.
9833 (grub_script_execute_menuentry): New prototype.
9834 (grub_script_lexer_record_start): Likewise.
9835 (grub_script_lexer_record_stop): Likewise.
9836 * normal/execute.c (grub_script_execute_menuentry): New function.
9837 * normal/lexer.c (record, recording, recordpos, recordlen): New
9838 variables.
9839 (grub_script_lexer_record_start): New function.
9840 (grub_script_lexer_record_stop): Likewise.
9841 (recordchar): Likewise.
9842 (nextchar): Likewise.
9843 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9844 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9845 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9846 (current_menu): New variable.
9847 (free_menu): Mainly rewritten.
9848 (grub_normal_menu_addentry): New function.
9849 (read_config_file): Rewritten.
9850 * normal/menu.c (run_menu_entry): Mainly rewritten.
9851 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9852 the menu entry.
9853 (run): Mainly rewritten.
9854 * normal/parser.y (menu_entry): New variable.
9855 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9856 (menuentry): New rule.
9857 (command): Add `menuentry'.
9858 (if_statement): Allow additional returns before `fi'.
9859 * normal/script.c (grub_script_create_cmdmenu): New function.
9860
9861 2006-01-03 Marco Gerards <marco@gnu.org>
9862
9863 * INSTALL: GNU Bison is required.
9864 * configure.ac: Rewritten the test to detect Bison.
9865 * Makefile.in (YACC): New variable. Reported by Xun Sun
9866 <xun.sun.cn@gmail.com>.
9867
9868 2006-01-03 Marco Gerards <marco@gnu.org>
9869
9870 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9871 the HFS+ filesystem to filesystem blocks.
9872 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9873 GCC warning is silenced.
9874
9875 2006-01-03 Marco Gerards <marco@gnu.org>
9876
9877 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9878 read from disk from big endian to host byte order.
9879
9880 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9881
9882 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9883 documentation.
9884 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9885 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9886 embedded HFS+ filesystem.
9887 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9888 (grub_hfs_sblock): Move from here...
9889 * include/grub/hfs.h: To here... New file.
9890 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9891 documentation.
9892 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9893 New macros.
9894 (grub_hfsplus_volheader): Change type of member `magic' to
9895 `grub_uint16_t'.
9896 (grub_hfsplus_data): Add new member `embedded_offset'.
9897 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9898 returned block.
9899 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9900 Calculate the offset.
9901
9902 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9903
9904 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9905 Removed.
9906 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9907
9908 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9909
9910 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9911 ENV->NAME is NULL after allocating ENV->VALUE.
9912
9913 2005-12-25 Marco Gerards <marco@gnu.org>
9914
9915 * kern/env.c (grub_env_set): Rewritten the error handling code.
9916
9917 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9918
9919 * geninit.sh: Made more robust, and more portable.
9920
9921 2005-12-25 Marco Gerards <marco@gnu.org>
9922
9923 Add support for Apple HFS+ filesystems.
9924
9925 * fs/hfsplus.c: New file.
9926
9927 * DISTLIST: Added `fs/hfsplus.c'.
9928
9929 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9930 (hfsplus_mod_SOURCES): New variable.
9931 (hfsplus_mod_CFLAGS): Likewise.
9932 (hfsplus_mod_LDFLAGS): Likewise.
9933 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9934 (grub_setup_SOURCES): Likewise.
9935 (grub_mkdevicemap_SOURCES): Likewise.
9936 (grub_emu_SOURCES): Likewise.
9937 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9938
9939 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9940
9941 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9942
9943 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9944
9945 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9946 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9947 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9948 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9949 normal/lexer.c, normal/parser.y, normal/script.c, and
9950 partmap/gpt.c.
9951 Removed kern/sparc64/cache.c.
9952
9953 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9954 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9955 grub_emu_init.c.
9956
9957 * configure.ac (AC_INIT): Bumped to 1.92.
9958
9959 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9960
9961 * kern/err.c (grub_error_push): Added new function to support error
9962 stacks.
9963 (grub_error_pop): Likewise.
9964 (grub_error_stack_items): New local variable to support error stacks.
9965 (grub_error_stack_pos): Likewise.
9966 (grub_error_stack_assert): Likewise.
9967 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9968 stack depth.
9969 (grub_print_error): Added support to print errors from error stack.
9970
9971 * include/grub/err.h (grub_error_push): Added function prototype.
9972 (grub_error_pop): Likewise.
9973
9974 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9975
9976 * configure.ac: Accept `powerpc64' as host_cpu.
9977 (amd64): Rename to `biarch32'.
9978
9979 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9980 non-cacheline-aligned addresses.
9981
9982 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9983 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9984 if `size' is non-zero.
9985
9986 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9987
9988 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9989 and `cd' to make sure the filename is not prefixed with a
9990 directory name.
9991 (pkgdata_MODULES): Add `gpt.mod'.
9992 (gpt_mod_SOURCES): New variable.
9993 (gpt_mod_CFLAGS): Likewise.
9994 (gpt_mod_LDFLAGS): Likewise.
9995
9996 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9997
9998 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9999 New macro.
10000
10001 * partmap/gpt.c: New file.
10002
10003 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10004 GPT partition map is detected.
10005
10006 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10007
10008 * commands/i386/pc/play.c: New file.
10009 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10010 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10011 macros.
10012
10013 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10014
10015 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10016 ((unused))' to silence gcc warning.
10017
10018 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10019
10020 * configure.ac: Correct `AC_PROG_YACC' test.
10021
10022 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10023
10024 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10025 check before installing files.
10026
10027 2005-11-22 Mike Small <smallm@panix.com>
10028
10029 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10030 number regex so multidigit numbers are recognized correctly.
10031
10032 2005-11-22 Mike Small <smallm@panix.com>
10033
10034 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10035 debugging message before attempting to claim memory.
10036 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10037 multiple addresses in case of failure.
10038
10039 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10040
10041 * term/tparm.c (get_space): Remove empty `if' statement.
10042
10043 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10044
10045 * kern/parser.c (check_varstate): Rename `state' to 's'.
10046
10047 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10048
10049 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10050 variable definitions to the beginning of each function. Sort stack
10051 variables by size.
10052 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10053 `buf' argument to `char *'.
10054
10055 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10056
10057 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10058 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10059 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10060 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10061 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10062 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10063 configfile.mod, search.mod, gzio.mod and test.mod.
10064 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10065 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10066 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10067 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10068 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10069 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10070 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10071 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10072 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10073 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10074 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10075 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10076 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10077 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10078 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10079 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10080 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10081 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10082 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10083 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10084 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10085 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10086 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10087
10088 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10089 `grep --include'.
10090 (pkgdata_MODULES): Add test.mod.
10091
10092 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10093
10094 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10095 appending to variables with "+=".
10096 (PModule): Use full pathname to generate *.lst filenames.
10097
10098 * Makefile.in: Fixed list rules moved from genmk.rb.
10099 (.DELETE_ON_ERROR): New special target.
10100 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10101
10102 * conf/i386-pc.rmk: Include conf/common.mk.
10103 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10104 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10105 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10106 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10107 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10108 configfile.mod, search.mod, gzio.mod and test.mod.
10109 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10110 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10111 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10112 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10113 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10114 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10115 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10116 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10117 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10118 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10119 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10120 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10121 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10122 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10123 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10124 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10125 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10126 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10127 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10128 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10129 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10130 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10131 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10132 here...
10133 * conf/common.rmk: ... to here. New file.
10134
10135 * conf/common.mk: New file.
10136
10137 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10138
10139 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10140 (grub_script.tab.c): ... here.
10141
10142 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10143 (grub_script.tab.c): ... here.
10144
10145 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10146 (grub_script.tab.c): ... here.
10147
10148 * normal/command.c (grub_command_find): Fixed a memory leak of
10149 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10150
10151 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10152
10153 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10154 "@" which marks the start of a comment on ARM.
10155 (VARIABLE): Likewise.
10156
10157 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10158
10159 Add support for Linux/ADFS partition tables.
10160
10161 * partmap/acorn.c: New file.
10162
10163 * include/grub/acorn_filecore.h: Likewise.
10164
10165 * DISTLIST: Added `partmap/acorn.c' and
10166 `include/grub/acorn_filecore.h'.
10167
10168 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10169 `partmap/acorn.c'.
10170 (pkgdata_MODULES): Add `acorn.mod'.
10171 (acorn_mod_SOURCES): New variable.
10172 (acorn_mod_CFLAGS): Likewise.
10173
10174 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10175 `partmap/acorn.c'.
10176 (pkgdata_MODULES): Add `acorn.mod'.
10177 (acorn_mod_SOURCES): New variable.
10178 (acorn_mod_CFLAGS): Likewise.
10179
10180 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10181 (pkgdata_MODULES): Add `acorn.mod'.
10182 (acorn_mod_SOURCES): New variable.
10183 (acorn_mod_CFLAGS): Likewise.
10184 (acorn_mod_LDFLAGS): Likewise.
10185
10186 * include/types.h (grub_disk_addr_t): New typedef.
10187
10188 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10189
10190 * geninit.sh: New file.
10191
10192 * geninitheader.sh: Likewise.
10193
10194 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10195 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10196 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10197 * commands/configfile.c (grub_configfile_init)
10198 (grub_configfile_fini): Likewise.
10199 * commands/default.c (grub_default_init, grub_default_fini):
10200 Likewise.
10201 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10202 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10203 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10204 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10205 Likewise.
10206 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10207 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10208 Likewise.
10209 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10210 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10211 Likewise.
10212 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10213 Likewise.
10214 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10215 Likewise.
10216 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10217 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10218 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10219 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10220 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10221 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10222 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10223 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10224 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10225 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10226 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10227 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10228 * partmap/amiga.c (grub_amiga_partition_map_init)
10229 (grub_amiga_partition_map_fini): Likewise.
10230 * partmap/apple.c (grub_apple_partition_map_init)
10231 (grub_apple_partition_map_fini): Likewise.
10232 * partmap/pc.c (grub_pc_partition_map_init)
10233 (grub_pc_partition_map_fini): Likewise.
10234 * partmap/sun.c (grub_sun_partition_map_init,
10235 grub_sun_partition_map_fini): Likewise.
10236 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10237 Likewise.
10238
10239 * util/grub-emu.c: Include <grub_modules_init.h>.
10240 (main): Don't initialize and de-initialize any modules directly,
10241 use `grub_init_all' and `grub_fini_all' instead.
10242
10243 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10244 `grub_vesafb_mod_init'.
10245 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10246 all users.
10247 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10248 `grub_vga_mod_init'. Updated all users.
10249 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10250
10251 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10252 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10253 rules.
10254
10255 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10256 Generate a function to initialize the module in utilities.
10257 Updated all callers.
10258 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10259 initialize the module in utilities. Updated all callers.
10260
10261 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10262
10263 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10264 escape sequence and a literal ^L to clear the screen.
10265
10266 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10267 when returning from Open Firmware.
10268
10269 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10270
10271 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10272 (grub_ofconsole_height): Likewise.
10273 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10274 manually insert a '\n'.
10275 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10276 `grub_ofconsole_height'. Return early if these are already set.
10277
10278 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10279
10280 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10281 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10282 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10283 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10284 and `normal/script.c'.
10285 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10286 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10287 (test_mod_SOURCES): New variable.
10288 (test_mod_CFLAGS): Likewise.
10289 (test_mod_LDFLAGS): Likewise.
10290 (pkgdata_MODULES): Add `test.mod'.
10291 (grub_script.tab.c): New rule.
10292 (grub_script.tab.h): Likewise.
10293
10294 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10295
10296 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10297 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10298 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10299 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10300 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10301 (test_mod_SOURCES): New variable.
10302 (test_mod_CFLAGS): Likewise.
10303 (pkgdata_MODULES): Add `test.mod'.
10304 (grub_script.tab.c): New rule.
10305 (grub_script.tab.h): Likewise.
10306
10307 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10308
10309 Add initial scripting support.
10310
10311 * commands/test.c: New file.
10312 * include/grub/script.h: Likewise.
10313 * normal/execute.c: Likewise.
10314 * normal/function.c: Likewise.
10315 * normal/lexer.c: Likewise.
10316 * normal/parser.y: Likewise.
10317 * normal/script.c: Likewise.
10318
10319 * configure.ac: Add `AC_PROG_YACC' test.
10320
10321 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10322 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10323 `normal/function.c' and `normal/script.c'.
10324 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10325 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10326 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10327 variables.
10328 (pkgdata_MODULES): Add `test.mod'.
10329 (grub_script.tab.c): New rule.
10330 (grub_script.tab.h): Likewise.
10331
10332 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10333
10334 * include/grub/normal.h (grub_test_init): New prototype.
10335 (grub_test_fini): Likewise.
10336
10337 * normal/command.c: Include <grub/script.h>.
10338 (grub_command_execute): Rewritten.
10339
10340 * util/grub-emu.c (main): Call `grub_test_init' and
10341 `grub_test_fini'.
10342
10343 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10344
10345 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10346 to 0.
10347 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10348 there are no pending characters.
10349
10350 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10351
10352 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10353 `grub_strndup' to drop device arguments. Replace unnecessary
10354 `grub_strndup' with `grub_strdup'.
10355
10356 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10357
10358 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10359 `debug' environment variable has been set.
10360
10361 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10362
10363 * Makefile.in (install-local): Use $(DATA).
10364 (uninstall): Likewise.
10365 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10366 (sbin_UTILITIES): ... to here.
10367 (sbin_SCRIPTS): New variable.
10368 (grub_install_SOURCES): New variable.
10369 * util/powerpc/ieee1275/grub-install.in: New file.
10370 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10371 variable.
10372 (add_segments): Call `grub_util_get_path'.
10373
10374 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10375
10376 From Timothy Baldwin:
10377 * commands/ls.c (grub_ls_list_files): Close FILE with
10378 grub_file_close.
10379 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10380
10381 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10382
10383 * include/grub/parser.h: New file.
10384
10385 * kern/parser.c: Likewise.
10386
10387 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10388 (grub_setup_SOURCES): Likewise.
10389 (grub_probefs_SOURCES): Likewise.
10390 (grub_emu_SOURCES): Likewise.
10391 (kernel_img_HEADERS): Add `parser.h'.
10392
10393 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10394 (grub_emu_SOURCES): Add `kern/parser.c'.
10395 (grubof_SOURCES): Likewise.
10396
10397 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10398 (grubof_SOURCES): Add `kern/parser.c'.
10399
10400 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10401
10402 * kern/misc.c (grub_split_cmdline): Removed function.
10403
10404 * kern/rescue.c: Include <grub/parser.h>.
10405 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10406 of `grub_split_cmdline'.
10407
10408 * normal/command.c: Include <grub/parser.h>.
10409 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10410 of `grub_split_cmdline'.
10411
10412 * normal/completion.c: Include <grub/parser.h>.
10413 (cmdline_state): New variable.
10414 (iterate_dir): End the filename with a quote depending on the
10415 command line state.
10416 (get_state): new function.
10417 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10418 split the arguments and determine the current argument. When the
10419 argument string is not quoted, escape all spaces.
10420
10421 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10422
10423 * normal/sparc64/setjmp.S: New file.
10424
10425 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10426
10427 * include/grub/sparc64/libgcc.h: New file.
10428 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10429 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10430 normal/sparc64/setjmp.c.
10431
10432 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10433
10434 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10435 * kern/sparc64/cache.S: New file.
10436 * kern/sparc64/cache.c: Removed.
10437 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10438 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10439 -mtune=ultrasparc.
10440 (COMMON_LDFLAGS): Add -melf64_sparc.
10441 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10442 (grubof_SOURCES): Use cache.S instead of cache.c.
10443 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10444 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10445 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10446 commented though.
10447 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10448 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10449 (linux_mod_CFLAGS): Commented out.
10450 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10451 out because module isn't built.
10452 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10453 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10454 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10455 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10456 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10457 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10458 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10459 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10460 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10461 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10462 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10463 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10464 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10465 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10466
10467 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10468
10469 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10470 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10471 longer, because HFS should not be used on PC.
10472
10473 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10474
10475 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10476 consistently within the loop.
10477
10478 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
10479
10480 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10481 directory can not be read.
10482
10483 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10484
10485 * configure.ac (AC_INIT): Increase the version number to 1.91.
10486
10487 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10488 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10489 term/i386/pc/serial.c.
10490
10491 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10492
10493 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10494 file size must be permitted.
10495
10496 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10497 between %ah and %al.
10498
10499 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10500
10501 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10502 grub_uint64_t.
10503 Call the hook with a NUL-terminated filename.
10504 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10505 grub_cpu_to_be32.
10506
10507 * kern/term.c (cursor_state): New variable.
10508 (grub_term_set_current): Reset the cursor state on a new
10509 terminal.
10510 (grub_setcursor): Rewritten to use CURSOR_STATE.
10511 (grub_getcursor): New function.
10512
10513 * include/grub/term.h (grub_getcursor): New prototype.
10514
10515 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10516 integers on ARM. Reported by Timothy Baldwin
10517 <T.E.Baldwin99@members.leeds.ac.uk>.
10518
10519 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
10520
10521 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10522 allocated.
10523 (grub_sfs_dir): Likewise.
10524
10525 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
10526
10527 Add support for the SFS filesystem.
10528
10529 * fs/sfs.c: New file.
10530
10531 * DISTLIST: Added `fs/sfs.c'.
10532
10533 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10534 (grub_probefs_SOURCES): Likewise.
10535 (grub_emu_SOURCES): Likewise.
10536 (pkgdata_MODULES): Add `sfs.mod'.
10537 (sfs_mod_SOURCES): New variable.
10538 (sfs_mod_CFLAGS): Likewise.
10539 (sfs_mod_LDFLAGS): Likewise.
10540
10541 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10542 (pkgdata_MODULES): Add `sfs.mod'.
10543 (sfs_mod_SOURCES): New variable.
10544 (sfs_mod_CFLAGS): Likewise.
10545
10546 * util/grub-emu.c (main): Call `grub_sfs_init' and
10547 `grub_sfs_fini'.
10548
10549 * include/grub/fs.h (grub_sfs_init): New prototype.
10550 (grub_sfs_fini): Likewise.
10551
10552 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10553
10554 Add support for the AFFS filesystem.
10555
10556 * fs/affs.c: New file.
10557
10558 * DISTLIST: Added `fs/affs.c'.
10559
10560 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10561 (grub_probefs_SOURCES): Likewise.
10562 (grub_emu_SOURCES): Likewise.
10563 (pkgdata_MODULES): Add `affs.mod'.
10564 (affs_mod_SOURCES): New variable.
10565 (affs_mod_CFLAGS): Likewise.
10566 (affs_mod_LDFLAGS): Likewise.
10567
10568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10569 (pkgdata_MODULES): Add `affs.mod'.
10570 (affs_mod_SOURCES): New variable.
10571 (affs_mod_CFLAGS): Likewise.
10572
10573 * util/grub-emu.c (main): Call `grub_affs_init' and
10574 `grub_affs_fini'.
10575
10576 * include/grub/fs.h (grub_affs_init): New prototype.
10577 (grub_affs_fini): Likewise.
10578
10579 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10580
10581 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10582
10583 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10584
10585 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10586 `-m32' to CFLAGS.
10587
10588 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10589 linking.
10590
10591 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10592 (COMMON_LDFLAGS): New variable.
10593 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10594 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10595 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10596 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10597 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10598 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10599 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10600 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10601 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10602 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10603 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10604 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10605 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10606 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10607 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10608 variables.
10609 (normal_mod_ASFLAGS): Add `-m32'.
10610
10611 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10612 (grub_host_size_t, grub_host_ssize_t): New types.
10613 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10614 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10615 `GRUB_HOST_SIZEOF_VOID_P'.
10616
10617 * include/grub/kernel.h (struct grub_module_header): Type of
10618 member offset changed to `grub_host_off_t'. Type of member size
10619 changed to `grub_host_size_t'.
10620 (struct grub_module_info): Type of member offset changed to
10621 `grub_host_off_t'. Type of member size changed to
10622 `grub_host_size_t'.
10623
10624 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10625
10626 Make GRUB's kernel compliant to Multiboot Specification.
10627
10628 * kern/i386/pc/startup.S (multiboot_header): New label.
10629 (multiboot_entry): Likewise.
10630 (multiboot_trampoline): Likewise.
10631
10632 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10633 Increased to 0x4A0.
10634
10635 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10636 put parentheses after a question mark.
10637 [!GRUB_UTIL] (my_mod): New variable.
10638
10639 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10640
10641 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10642
10643 Adds support for the XFS filesystem. Btrees are not supported
10644 yet.
10645
10646 * fs/xfs.c: New file.
10647
10648 * DISTLIST: Added `fs/xfs.c'.
10649
10650 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10651 (grub_probefs_SOURCES): Likewise.
10652 (grub_emu_SOURCES): Likewise.
10653 (pkgdata_MODULES): Add `xfs.mod'.
10654 (xfs_mod_SOURCES): New variable.
10655 (xfs_mod_CFLAGS): Likewise.
10656
10657 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10658 (pkgdata_MODULES): Add `xfs.mod'.
10659 (xfs_mod_SOURCES): New variable.
10660 (xfs_mod_CFLAGS): Likewise.
10661
10662 * util/grub-emu.c (main): Call `grub_xfs_init' and
10663 `grub_xfs_fini'.
10664
10665 * include/grub/fs.h (grub_xfs_init): New prototype.
10666 (grub_xfs_fini): Likewise.
10667
10668
10669 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10670
10671 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10672 color modes, allow greater than 16 colors to be configured as
10673 a default palette.
10674
10675 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10676
10677 * normal/completion.c (complete_arguments): Add the qualifier
10678 const into OPTIONS.
10679
10680 From Omniflux <omniflux+lists@omniflux.com>:
10681 * include/grub/terminfo.h: New file.
10682 * include/grub/tparm.h: Likewise.
10683 * include/grub/i386/pc/serial.h: Likewise.
10684 * term/terminfo.c: Likewise.
10685 * term/tparm.c: Likewise.
10686 * term/i386/pc/serial.c: Likewise.
10687 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10688 serial.mod.
10689 (terminfo_mod_SOURCES): New variable.
10690 (terminfo_mod_CFLAGS): Likewise.
10691 (serial_mod_SOURCES): Likewise.
10692 (serial_mod_CFLAGS): Likewise.
10693
10694 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10695
10696 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10697 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10698 and kern/powerpc/ieee1275/cmain.c, respectively.
10699
10700 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10701 * kern/powerpc/ieee1275/crt0.S: ... here.
10702
10703 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10704 * kern/powerpc/ieee1275/cmain.c: ... here.
10705
10706 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10707 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10708 instead of boot/powerpc/ieee1275/crt0.S and
10709 boot/powerpc/ieee1275/cmain.c, respectively.
10710
10711 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10712 sectors. It was not used anyway.
10713
10714 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10715
10716 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10717 `unused parameter' warning.
10718
10719 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10720
10721 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10722 function.
10723 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10724 getcharwidth.
10725
10726 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10727
10728 * include/grub/normal.h (enum grub_completion_type): Added
10729 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10730
10731 * normal/cmdline.c (print_completion): Handle
10732 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10733 * normal/menu_entry.c (store_completion): Likewise.
10734
10735 * normal/completion.c (complete_arguments): New function.
10736 (grub_normal_do_completion): Call `complete_arguments' when the
10737 current words start with a dash.
10738
10739 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10740
10741 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10742 `gzio.mod' instead of `io.mod').
10743
10744 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10745
10746 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10747 (DISTDIRS): Added io and video.
10748 Rewrite the search routine to make an output consistently.
10749
10750 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10751 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10752 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10753 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10754 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10755 util/powerpc/ieee1275/misc.c.
10756
10757 * include/grub/gzio.h: New file.
10758 * io/gzio.c: Likewise.
10759
10760 * kern/file.c (grub_file_close): Call grub_device_close only if
10761 FILE->DEVICE is not NULL.
10762
10763 * include/grub/mm.h [!NULL] (NULL): New macro.
10764
10765 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10766
10767 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10768 (pkgdata_MODULES): Added gzio.mod.
10769 (gzio_mod_SOURCES): New variable.
10770 (gzio_mod_CFLAGS): Likewise.
10771
10772 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10773 (pkgdata_MODULES): Added gzio.mod.
10774 (gzio_mod_SOURCES): New variable.
10775 (gzio_mod_CFLAGS): Likewise.
10776
10777 * commands/cat.c: Include grub/gzio.h.
10778 (grub_cmd_cat): Use grub_gzfile_open instead of
10779 grub_file_open.
10780
10781 * commands/cmp.c: Include grub/gzio.h.
10782 (grub_cmd_cmp): Use grub_gzfile_open instead of
10783 grub_file_open.
10784
10785 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10786 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10787 grub_file_open.
10788 (grub_rescue_cmd_module): Likewise.
10789
10790 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10791
10792 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10793 kern/sparc64/ieee1275/init.c because it contains _start.
10794 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10795
10796 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10797
10798 * configure.ac: Add support for sparc64 host with ieee1275
10799 firmware.
10800 * configure: Generated from configure.ac.
10801 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10802 instead of int.
10803 (grub_ofdisk_read): Likewise.
10804 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10805 pointers as (void *) to remove a warning.
10806 (grub_ofdisk_close): Likewise.
10807 (grub_ofdisk_read): Likewise.
10808 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10809 returns, so make it return void to remove a warning.
10810 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10811 Corresponding prototype change.
10812 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10813 values, and cast the pointers as (void *) to remove a warning.
10814 (grub_mm_dump): Likewise.
10815 * conf/sparc64-ieee1275.mk: New file.
10816 * conf/sparc64-ieee1275.rmk: Likewise.
10817 * include/grub/sparc64/setjmp.h: Likewise.
10818 * include/grub/sparc64/types.h: Likewise.
10819 * include/grub/sparc64/ieee1275/console.h: Likewise.
10820 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10821 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10822 * include/grub/sparc64/ieee1275/time.h: Likewise.
10823 * kern/sparc64/cache.c: Likewise.
10824 * kern/sparc64/dl.c: Likewise.
10825 * kern/sparc64/ieee1275/init.c: Likewise.
10826 * kern/sparc64/ieee1275/openfw.c: Likewise.
10827
10828 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10829
10830 * util/console.c (grub_ncurses_putchar): If C is greater than
10831 0x7f, set C to a question mark.
10832 (grub_ncurses_getcharwidth): New function.
10833 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10834 getcharwidth.
10835
10836 * normal/menu.c (print_entry): Made aware of Unicode. First,
10837 convert TITLE to UCS-4, and predict the cursor position by
10838 grub_getcharwidth.
10839
10840 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10841 const to SRC.
10842 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10843
10844 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10845
10846 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10847 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10848 grub_strcat.
10849
10850 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10851 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10852 grub_strcpy and grub_strlen. Take it into account that a space
10853 character is inserted as a delimiter.
10854
10855 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10856
10857 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10858 invalid magic in the error.
10859
10860 * commands/search.c: New file.
10861
10862 * util/grub-emu.c (main): Call grub_search_init and
10863 grub_search_fini.
10864
10865 * kern/rescue.c (grub_rescue_print_disks): Removed.
10866 (grub_rescue_print_devices): New function.
10867 (grub_rescue_cmd_ls): Use grub_device_iterate with
10868 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10869 grub_rescue_print_disks.
10870
10871 * kern/partition.c (grub_partition_iterate): Return the result of
10872 PARTMAP->ITERATE instead of GRUB_ERRNO.
10873
10874 * kern/device.c: Include grub/partition.h.
10875 (grub_device_iterate): New function.
10876
10877 * include/grub/partition.h (grub_partition_iterate): Return int
10878 instead of grub_err_t.
10879
10880 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10881 prototype.
10882 [GRUB_UTIL] (grub_search_fini): Likewise.
10883
10884 * include/grub/device.h (grub_device_iterate): New prototype.
10885
10886 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10887 commands/search.c.
10888 (pkgdata_MODULES): Added search.mod.
10889 (search_mod_SOURCES): New variable.
10890 (search_mod_CFLAGS): Likewise.
10891
10892 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10893 (pkgdata_MODULES): Added search.mod.
10894 (search_mod_SOURCES): New variable.
10895 (search_mod_CFLAGS): Likewise.
10896
10897 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10898 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10899 All callers changed.
10900
10901 * DISTLIST: Added commands/search.c.
10902
10903 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10904
10905 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10906 conversion.
10907 (grub_getcharwidth): New function.
10908
10909 * kern/misc.c (grub_utf8_to_ucs4): New function.
10910
10911 * include/grub/term.h (struct grub_term): Added a new member
10912 "getcharwidth".
10913 (grub_getcharwidth): New prototype.
10914
10915 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10916
10917 * term/i386/pc/console.c (map_char): New function. Segregated from
10918 grub_console_putchar.
10919 (grub_console_putchar): Use map_char.
10920 (grub_console_getcharwidth): New function.
10921 (grub_console_term): Specified grub_console_getcharwidth as
10922 getcharwidth.
10923
10924 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10925 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10926
10927 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10928 GRUB_ERRNO.
10929 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10930 on grub_strtoul completely.
10931 (write_char): Declare local variables in the beginning of the
10932 function.
10933 (grub_vesafb_getcharwidth): New function.
10934 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10935 getcharwidth.
10936
10937 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10938
10939 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10940 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10941 commands/i386/pc/vbetest.c.
10942
10943 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10944 call grub_vbe_get_controller_info again, because the returned
10945 information is volatile.
10946 (grub_vbe_set_video_mode): Mostly rewritten.
10947 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10948 grub_vbe_status_t correctly.
10949 (grub_vbe_get_video_mode_info): Likewise.
10950 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10951 several if statements.
10952
10953 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10954 * commands/i386/pc/vbeinfo.c: ... this.
10955
10956 * commands/i386/pc/vbe_test.c: Renamed to ...
10957 * commands/i386/pc/vbetest.c: ... this.
10958
10959 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10960 ...
10961 (grub_cmd_vbeinfo): ... this. Save video modes before
10962 iterating. Skip a video mode, if it is not available, not enough
10963 information is given or it is monochrome. Show the memory
10964 model. Leave the interpretation of MODEVAR to grub_strtoul
10965 completely.
10966 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10967 (GRUB_MOD_FINI): Likewise.
10968
10969 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10970 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10971 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10972 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10973 grub_strtoul completely.
10974 (real2pm): Removed.
10975 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10976 (GRUB_MOD_FINI): Likewise.
10977
10978 * normal/misc.c: Include grub/mm.h.
10979
10980 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10981 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10982 (vbe_list_modes_mod_SOURCES): Removed.
10983 (vbe_list_modes_mod_CFLAGS): Likewise.
10984 (vbe_test_mod_SOURCES): Likewise.
10985 (vbe_test_mod_CFLAGS): Likewise.
10986 (vbeinfo_mod_SOURCES): New variable.
10987 (vbeinfo_mod_CFLAGS): Likewise.
10988 (vbetest_mod_SOURCES): Likewise.
10989 (vbetest_mod_CFLAGS): Likewise.
10990
10991 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10992
10993 * normal/misc.c: New file.
10994
10995 * DISTLIST: Added normal/misc.c.
10996
10997 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10998 DISK to HOOK. Call HOOK with DISK.
10999 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11000 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11001 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11002
11003 * normal/menu_entry.c (struct screen): Added a new member
11004 "completion_shown".
11005 (completion_buffer): New global variable.
11006 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11007 (store_completion): New function.
11008 (complete): Likewise.
11009 (clear_completions): Likewise.
11010 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11011 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11012 a tab, call complete.
11013
11014 * normal/completion.c (disk_dev): Removed.
11015 (print_simple_completion): Likewise.
11016 (print_partition_completion): Likewise.
11017 (print_func): New global variable.
11018 (add_completion): Do not take the arguments WHAT or PRINT any
11019 longer. Added a new argument TYPE. Instead of printing directly,
11020 call PRINT_FUNC if not NULL.
11021 All callers changed.
11022 (complete_device): Use a local variable DEV instead of
11023 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11024 (grub_normal_do_completion): Take a new argument HOOK. Do not
11025 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11026 empty string, return NULL instead.
11027 All callers changed.
11028
11029 * normal/cmdline.c (print_completion): New function.
11030
11031 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11032 to HOOK.
11033 All callers changed.
11034
11035 * kern/disk.c (grub_print_partinfo): Removed.
11036
11037 * include/grub/partition.h (struct grub_partition_map): Add a new
11038 argument DISK into HOOK of ITERATE.
11039 (grub_partition_iterate): Add a new argument DISK to HOOK.
11040
11041 * include/grub/normal.h (enum grub_completion_type): New enum.
11042 (grub_completion_type_t): New type.
11043 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11044 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11045 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11046 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11047 (grub_normal_do_completion): Added a new argument HOOK.
11048 (grub_normal_print_device_info): New prototype.
11049
11050 * include/grub/disk.h (grub_print_partinfo): Removed.
11051
11052 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11053 (normal_mod_SOURCES): Likewise.
11054 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11055 (normal_mod_SOURCES): Likewise.
11056
11057 * commands/ls.c (grub_ls_list_disks): Use
11058 grub_normal_print_device_info instead of grub_print_partinfo. Free
11059 PNAME.
11060 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11061 duplicating the code.
11062
11063 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11064
11065 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11066 follow GCS more precisely.
11067 * commands/i386/pc/vbe_test.c: Likewise.
11068 * include/grub/i386/pc/vbe.h: Likewise.
11069 * term/i386/pc/vesafb.c: Likewise.
11070 * video/i386/pc/vbe.c: Likewise.
11071
11072 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11073
11074 * DISTLIST: Added term/i386/pc/vesafb.c
11075 DISTLIST: Added video/i386/pc/vbe.c
11076 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11077 DISTLIST: Added commands/i386/pc/vbe_test.c.
11078 * commands/i386/pc/vbe_list_modes.c: New file.
11079 * commands/i386/pc/vbe_test.c: Likewise.
11080 * term/i386/pc/vesafb.c: Likewise.
11081 * video/i386/pc/vbe.c: Likewise.
11082 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11083 (grub_vbe_probe) Added prototype.
11084 (grub_vbe_set_video_mode) Likewise.
11085 (grub_vbe_get_video_mode) Likewise.
11086 (grub_vbe_get_video_mode_info) Likewise.
11087 (grub_vbe_set_pixel_rgb) Likewise.
11088 (grub_vbe_set_pixel_index) Likewise.
11089 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11090 (pkgdata_MODULES): Added vesafb.mod.
11091 (pkgdata_MODULES): Added vbe_list_modes.mod.
11092 (pkgdata_MODULES): Added vbe_test.mod.
11093 (vbe_mod_SOURCES): Added.
11094 (vbe_mod_CFLAGS): Likewise.
11095 (vesafb_mod_SOURCES): Likewise.
11096 (vesafb_mod_CFLAGS): Likewise.
11097 (vbe_list_modes_mod_SOURCES): Likewise.
11098 (vbe_list_modes_mod_CFLAGS): Likewise.
11099 (vbe_test_mod_SOURCES): Likewise.
11100 (vbe_test_mod_CFLAGS): Likewise.
11101
11102 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11103
11104 * normal/command.c (grub_command_execute): If INTERACTIVE is
11105 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11106 CMDLINE. Disable the pager if INTERACTIVE is true.
11107 All callers are changed.
11108
11109 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11110 before reading a config file.
11111 * normal/main.c (read_config_file): Even if a command is not
11112 found, register it if it is within an entry.
11113
11114 * util/grub-emu.c: Include sys/types.h and unistd.h.
11115 (options): Added --hold.
11116 (struct arguments): Added a new member "hold".
11117 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11118 missing.
11119 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11120 cleared by a debugger, if it is not zero.
11121
11122 * include/grub/normal.h (grub_command_execute): Add an argument
11123 INTERACTIVE.
11124
11125 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11126
11127 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11128
11129 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11130
11131 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11132 program with another one, because the old one didn't detect a bug
11133 in gcc-3.4. Always use regparm 2, because the new test is still
11134 not enough for gcc-4.0. Someone must investigate a simple test
11135 case which detects a bug in gcc-4.0.
11136
11137 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11138
11139 * DISTLIST: Added normal/completion.c.
11140
11141 * normal/completion.c: New file.
11142
11143 * term/i386/pc/console.c (grub_console_getwh): New function.
11144 (grub_console_term): Assign grub_console_getwh to getwh.
11145
11146 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11147 function is defined in normal/completion.c as
11148 grub_normal_do_completion.
11149 (grub_cmdline_get): Use grub_normal_do_completion instead of
11150 grub_tab_complete.
11151
11152 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11153 returns non-zero, otherwise return 0.
11154 (grub_partition_iterate): First, probe the partition map. Then,
11155 call ITERATE only for this partition map.
11156
11157 * kern/misc.c (grub_strncmp): Rewritten.
11158
11159 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11160 returns non-zero. Otherwise return 0.
11161
11162 * include/grub/partition.h (grub_partition_map_iterate): Return
11163 int instead of void.
11164
11165 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11166
11167 * include/grub/misc.h (grub_strncmp): Change the type of N to
11168 grub_size_t.
11169
11170 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11171 of void.
11172
11173 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11174 unsigned explicitly before comparing it with I.
11175
11176 * kern/main.c (grub_env_write_root): Add the attribute unused into
11177 VAR.
11178
11179 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11180 normal/completion.c.
11181 (normal_mod_SOURCES): Likewise.
11182 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11183 (normal_mod_SOURCES): Likewise.
11184
11185 * normal/command.c (grub_iterate_commands): If ITERATE returns
11186 non-zero, return one immediately.
11187
11188 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11189
11190 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11191 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11192 descriptions.
11193 (grub_vbe_get_controller_info): New function.
11194 (grub_vbe_get_mode_info): Likewise.
11195 (grub_vbe_set_mode): Likewise.
11196 (grub_vbe_get_mode): Likewise.
11197 (grub_vbe_set_memory_window): Likewise.
11198 (grub_vbe_get_memory_window): Likewise.
11199 (grub_vbe_set_scanline_length): Likewise.
11200 (grub_vbe_get_scanline_length): Likewise.
11201 (grub_vbe_set_display_start): Likewise.
11202 (grub_vbe_get_display_start): Likewise.
11203 (grub_vbe_set_palette_data): Likewise.
11204 * include/grub/i386/pc/vbe.h: New file.
11205
11206 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11207
11208 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11209 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11210 * DISTLIST: Likewise.
11211 * kern/ieee1275/of.c: Moved to ...
11212 * kern/ieee1275/ieee1275.c: ... here.
11213
11214 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11215
11216 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11217 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11218 Pass 0 as `end' parameter to grub_strtoul().
11219
11220 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11221
11222 * include/grub/powerpc/ieee1275/console.h: Do not include
11223 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11224 ifdef.
11225 (grub_console_cur_color): Remove i386-specific prototype.
11226 (grub_console_real_putchar): Likewise.
11227 (grub_console_checkkey): Likewise.
11228 (grub_console_getkey): Likewise.
11229 (grub_console_getxy): Likewise.
11230 (grub_console_gotoxy): Likewise.
11231 (grub_console_cls): Likewise.
11232 (grub_console_setcursor): Likewise.
11233 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11234 Include <grub/machine/console.h>.
11235 * term/ieee1275/ofconsole.c: Likewise.
11236
11237 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11238
11239 * Makefile.in (LIBLZO): New variable.
11240
11241 * configure.ac: Check for LZO version 2.
11242
11243 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11244 lzo/lzo1x.h instead of lzo1x.h.
11245
11246 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11247 of -llzo.
11248
11249 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11250 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11251
11252 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11253 copying the data from PARTITION to P.
11254
11255 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11256
11257 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11258 negative, unload the module.
11259
11260 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11261 map is "pc_partition_map" but not "pc".
11262 (usage): Fix the description. The options are --boot-image and
11263 --core-image but not --boot-file or --core-file.
11264 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11265 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11266 DEFAULT_DIRECTORY.
11267
11268 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11269 --core-file. Specify INSTALL_DEVICE as an argument.
11270
11271 * util/console.c: Include config.h.
11272 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11273 [HAVE_NCURSES_H]: Include ncurses.h.
11274 [HAVE_CURSES_H]: Include curses.h.
11275 [!A_NORMAL] (A_NORMAL): Defined as zero.
11276 [!A_STANDOUT] (A_STANDOUT): Likewise.
11277
11278 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11279 -lncurses.
11280 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11281
11282 * configure.ac: Check for curses libraries and headers.
11283
11284 * Makefile.in (LIBCURSES): New variable.
11285
11286 * genmk.rb (Script::rule): Set the executable bits.
11287
11288 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11289 name of the PC partition map is "pc_partition_map" but not "pc".
11290
11291 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11292
11293 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11294 (modules): Likewise.
11295 (usage): Added descriptions for --modules and --grub-probefs.
11296 Handle --modules and --grub-probefs. Save the arguments in MODULES
11297 and GRUB_PROBEFS, respectively.
11298 Auto-detect a filesystem module against GRUBDIR. If the result is
11299 empty and modules are not specified explicitly, abort the
11300 installation. Add the result to MODULES.
11301
11302 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11303 disk/powerpc/ieee1275/ofdisk.c,
11304 include/grub/powerpc/ieee1275/init.h and
11305 term/powerpc/ieee1275/ofconsole.c.
11306 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11307 term/ieee1275/ofconsole.c.
11308
11309 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11310
11311 * COPYING: Upgraded to the latest version. Only the address of the
11312 FSF office has changed.
11313
11314 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11315
11316 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11317 kern/ieee1275.c with kern/ieee1275/of.c.
11318
11319 * kern/ieee1275.c: Moved to ...
11320 * kern/ieee1275/of.c: ... here.
11321
11322 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11323
11324 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11325 readability.
11326
11327 * config.guess: Updated to the latest version from gnulib.
11328 * config.sub: Likewise.
11329 * install.sh: Likewise.
11330 * mkinstalldirs: Likewise.
11331
11332 * include/grub/console.h: Removed. This file is arch-specific. Do
11333 not put this in include/grub.
11334
11335 * include/grub/i386/pc/console.h: Resurrected.
11336
11337 * util/console.c: Include grub/machine/console.h instead of
11338 grub/console.h.
11339 * util/grub-emu.c: Likewise.
11340
11341 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11342
11343 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11344 hardcoded value.
11345
11346 From Vincent Pelletier <subdino2004@yahoo.fr>
11347 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11348 Redefined to use grub_getwh.
11349 (grub_term): New member named getwh.
11350 (grub_getwh): New prototype.
11351 * kern/term.c (grub_getwh): New function.
11352 * term/i386/pc/console.c (grub_console_getwh): New function.
11353 (grub_console_term): New member `getwh'.
11354 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11355 (grub_vga_term): New member `getwh'.
11356 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11357 grub_ssize_t.
11358 (grub_ofconsole_getw): New function.
11359 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11360 (grub_ofconsole_term): New field named getwh and new initial
11361 value.
11362
11363 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11364
11365 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11366 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11367 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11368 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11369 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11370 of <grub/machine/ieee1275.h>.
11371 * commands/ieee1275/reboot.c: Likewise.
11372 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11373 * kern/ieee1275.c: ... to here. All users updated. Change all
11374 parameter structs to use new type `grub_ieee1275_cell_t'.
11375 * term/powerpc/ieee1275/ofconsole.c: Move ...
11376 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11377 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11378 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11379 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11380 to return int.
11381 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11382 Remove unused prototypes. All users updated.
11383 * include/grub/powerpc/ieee1275/console.h: Removed.
11384 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11385 `grub_ieee1275_cell_t'.
11386 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11387 Cast comparisons with -1 to the correct type.
11388 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11389 type to match `grub_ieee1275_entry_fn'.
11390
11391 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11392
11393 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11394
11395 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11396 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11397 partmap/sun.c.
11398 (grub_probefs_SOURCES): New variable.
11399
11400 * util/i386/pc/grub-probefs.c: New file.
11401
11402 * util/i386/pc/grub-setup.c (main): Call
11403 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11404 grub_hfs_init and grub_jfs_init to initialize the system. Call
11405 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11406 grub_pc_partition_map_fini to finish the system.
11407
11408 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11409
11410 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11411 function.
11412 (grub_multiboot_load_elf32): Likewise.
11413 (grub_multiboot_is_elf64): Likewise.
11414 (grub_multiboot_load_elf64): Likewise.
11415 (grub_multiboot_load_elf): Likewise.
11416 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11417 an ELF32 or ELF64 file.
11418 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11419
11420 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11421 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11422 NULL before calling FS->LABEL.
11423 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11424 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11425 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11426 before calling FS->LABEL.
11427
11428 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11429
11430 * util/i386/pc/grub-install.in (datadir): New variable.
11431 (libdir): Removed.
11432 (pkgdatadir): New variable.
11433 (pkglibdir): Removed.
11434
11435 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11436
11437 * DISTLIST: Added util/i386/pc/grub-install.in.
11438
11439 * util/i386/pc/grub-install.in: New file.
11440
11441 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11442 (grub_install_SOURCES): Likewise.
11443
11444 * genmk.rb: Added support for scripts.
11445 (Script): New class.
11446 (scripts): New variable.
11447
11448 * Makefile.in (install-local): Install sbin_SCRIPTS by
11449 INSTALL_SCRIPT.
11450 (uninstall): Remove sbin_SCRIPTS.
11451
11452 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11453 device, try to get a GRUB device by
11454 grub_util_biosdisk_get_grub_dev.
11455 Free DEST_DEV.
11456
11457 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11458 description for --device-map.
11459
11460 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11461
11462 Change the semantics of variable hooks. They now return strings
11463 instead of error values.
11464
11465 * util/i386/pc/grub-setup.c: Include grub/env.h.
11466 (setup): Use grub_device_set_root instead of grub_env_set.
11467
11468 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11469 grub_env_get instead of grub_device_set_root and
11470 grub_device_get_root, respectively.
11471
11472 * kern/main.c (grub_env_write_root): New function.
11473 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11474 grub_env_set instead of grub_device_set_root.
11475
11476 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11477 many variables.
11478 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11479 rather than calling ENV->WRITE_HOOK afterwards.
11480 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11481 passing a pointer of a pointer.
11482 (grub_register_variable_hook): Change the types of "read_hook" and
11483 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11484 respectively.
11485 Allocate the default empty string on the heap, because this string
11486 may be freed later.
11487
11488 * kern/device.c: Include grub/env.h.
11489 (grub_device_set_root): Removed.
11490 (grub_device_get_root): Likewise.
11491 (grub_device_open): Use grub_env_get instead of
11492 grub_device_get_root.
11493
11494 * include/grub/env.h (grub_env_read_hook_t): New type.
11495 (grub_env_write_hook_t): Likewise.
11496 (grub_env_var): Change the types of "read_hook" and "write_hook"
11497 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11498 (grub_register_variable_hook): Likewise.
11499
11500 * include/grub/device.h (grub_device_set_root): Removed.
11501 (grub_device_set_root): Likewise.
11502
11503 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11504 make sure that DIRNAME terminates with '/', so that
11505 grub_fat_find_dir will fail if PATH is not a directory.
11506
11507 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11508 from DIRNAME.
11509 Use the qualifier auto for print_files and print_files_long.
11510 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11511 as a regular file.
11512 Put a newline only if there is no error.
11513 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11514 used.
11515
11516 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11517
11518 * kern/partition.c (grub_partition_probe): Initialize PART to
11519 NULL. Otherwise, when no partition map is registered, this returns
11520 a garbage.
11521
11522 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11523
11524 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11525 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11526 valid.
11527
11528 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11529
11530 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11531 information on each device, if it does not have partitions. Print
11532 "Device" instead of "Disk", because this function is not specific
11533 to disk devices.
11534
11535 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11536 static to ensure that it is put on the memory rather than a
11537 register.
11538
11539 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11540
11541 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11542 (grub_cat_init): Likewise.
11543 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11544 (options): Likewise.
11545 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11546 (grub_configfile_init): Likewise.
11547 * font/manager.c (GRUB_MOD_INIT): Likewise.
11548 * commands/help.c (GRUB_MOD_INIT): Likewise.
11549 (grub_help_init): Likewise.
11550 * normal/command.c (grub_command_init): Likewise.
11551 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11552 * disk/loopback.c (grub_loop_init): Likewise.
11553 (GRUB_MOD_INIT): Likewise.
11554 * commands/ls.c (grub_ls_init): Likewise.
11555 (GRUB_MOD_INIT): Likewise.
11556 (options): Likewise.
11557 * commands/boot.c (grub_boot_init): Likewise.
11558 (GRUB_MOD_INIT): Likewise.
11559 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11560 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11561 (GRUB_MOD_INIT): Likewise.
11562 * commands/cmp.c (grub_cmp_init): Likewise.
11563 (GRUB_MOD_INIT): Likewise.
11564
11565 * normal/arg.c: Use <> instead of "" to include header files.
11566 (SHORT_ARG_HELP): New macro.
11567 (SHORT_ARG_USAGE): Likewise.
11568 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11569 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11570 descriptions.
11571 (find_short): Check if C is 'h' or 'u' explicitly.
11572 (grub_arg_show_help): Use space characters instead of tabs. Treat
11573 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11574 are shown with --help and --usage only if they are not used for
11575 the command itself.
11576 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11577 'h' and 'u'.
11578
11579 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11580 const into "longarg". Change the type of "shortarg" to int.
11581
11582 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11583
11584 * boot/i386/pc/boot.S (boot_drive_check): New label.
11585
11586 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11587 macro.
11588
11589 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11590 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11591
11592 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11593
11594 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11595 When turning off Gate A20, skip the check and return immediately,
11596 because this is not fatal usually.
11597
11598 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11599
11600 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11601 be 0x7C00 instead of 0x8000.
11602
11603 * boot/i386/pc/pxeboot.S: Rewritten.
11604
11605 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11606 EXT_C.
11607 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11608 result.
11609
11610 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11611
11612 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11613 robustness. This routine now supports a BIOS call and System
11614 Control Port A to modify the gate A20.
11615
11616 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11617 Increased to 0x440.
11618
11619 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11620
11621 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11622 device path and resulting ihandle.
11623 (grub_ofdisk_close): dprintf the ihandle being closed.
11624 (grub_ofdisk_read): dprintf function parameters.
11625 * kern/mm.c (grub_mm_init_region): Likewise.
11626 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11627 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11628 size, and boot arguments.
11629 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11630 before loading into memory.
11631 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11632 before loading into memory.
11633
11634 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11635
11636 * kern/mm.c: Added much documentation.
11637 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11638 8, set to 5 instead of 8.
11639
11640 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11641
11642 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11643
11644 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11645 (grub_mkdevicemap_SOURCES): New variable.
11646
11647 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11648 lib/device.c of GRUB Legacy.
11649
11650 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11651
11652 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11653 instead of PATH is NULL.
11654
11655 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11656
11657 * commands/cmp.c (BUFFER_SIZE): New macro.
11658 (grub_cmd_cmp): Close the right file at the right time. Compare
11659 only data just read. Don't report files of different size as
11660 identical. Dynamically allocate buffers. Move variable
11661 declarations at the beginning of function.
11662
11663 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11664
11665 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11666 reverse.
11667
11668 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11669
11670 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11671 when backspace is pressed at beginning of line.
11672
11673 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11674
11675 * DISTLIST: Added genfslist.sh.
11676
11677 * normal/main.c (fs_module_list): New variable.
11678 (autoload_fs_module): New function.
11679 (read_fs_list): Likewise.
11680 (grub_normal_execute): Call read_fs_list.
11681
11682 * kern/fs.c (grub_fs_autoload_hook): New variable.
11683 (grub_fs_probe): Added support for auto-loading.
11684
11685 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11686 (grub_fs_module_list_t): New type.
11687
11688 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11689 (grub_fs_autoload_hook): New prototype.
11690
11691 * genfslist.sh: New file.
11692
11693 * genmk.rb: Added a rule to generate a filesystem list.
11694
11695 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11696
11697 * configure.ac: Fix the test for cross-compiling.
11698
11699 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11700 define GRUB_UTIL anymore.
11701
11702 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11703 so this function works on other systems than just big endian.
11704 (load_modules): Likewise.
11705 (add_segments): Likewise.
11706
11707 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11708
11709 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11710 contains `l' modifier, get a long from va_arg().
11711
11712 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11713
11714 * kern/mm.c (grub_free): If the next free block which is being
11715 merged is the first free block, set the first block to the block
11716 being freed.
11717 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11718
11719 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11720
11721 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11722 `grub_ieee1275_chosen'.
11723
11724 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11725
11726 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11727 (grub_ieee1275_chosen): New variable.
11728 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11729 `chosen'.
11730 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11731 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11732 Rename first argument to `phandle' for consistency.
11733 (grub_ieee1275_get_property_length): Likewise.
11734 (grub_ieee1275_next_property): Likewise. Change type of first argument
11735 to grub_ieee1275_phandle_t.
11736 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11737 Move export next to declaration.
11738 (grub_ieee1275_chosen): New variable.
11739 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11740 Correct cosmetic typo.
11741 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11742 `grub_ieee1275_chosen'.
11743 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11744 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11745 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11746 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11747 `grub_ieee1275_chosen'.
11748
11749 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11750
11751 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11752 /chosen/bootargs.
11753 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11754 /chosen/bootargs as "variable=value" pairs.
11755
11756 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11757
11758 * include/grub/misc.h (grub_dprintf): New macro.
11759 (grub_real_dprintf): New prototype.
11760 (grub_strword): Likewise.
11761 (grub_iswordseparator): Likewise.
11762 * kern/misc.c (grub_real_dprintf): New function.
11763 (grub_strword): Likewise.
11764 (grub_iswordseparator): Likewise.
11765
11766 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11767
11768 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11769 (roundup): Remove macro.
11770 (grub_ieee1275_flags): Make static.
11771 (grub_ieee1275_realmode): Remove.
11772 (grub_ieee1275_test_flag): New function.
11773 (grub_ieee1275_set_flag): Likewise.
11774 (find_options): Rename to `grub_ieee1275_find_options'; update
11775 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11776 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11777 (cmain): New prototype.
11778 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11779 `grub_ieee1275_flags' directly.
11780 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11781 machine/biosdisk.h.
11782 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11783 Don't include grub/machine/init.h.
11784 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11785 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11786 Remove prototype.
11787 (grub_ieee1275_realmode): Likewise.
11788 (grub_ieee1275_flag): New enum.
11789 (grub_ieee1275_test_flag): New prototype.
11790 (grub_ieee1275_set_flag): New prototype.
11791 * include/grub/powerpc/ieee1275/init.h: Remove file.
11792 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11793 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11794 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11795 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11796 comment.
11797 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11798 `grub_ieee1275_test_flag'.
11799 (grub_ieee1275_encode_devname): Likewise.
11800
11801 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11802
11803 * include/grub/powerpc/ieee1275/ieee1275.h
11804 (grub_ieee1275_encode_devname): New prototype.
11805 (grub_ieee1275_get_filename): Likewise.
11806 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11807 function.
11808 (grub_set_prefix): Likewise.
11809 (grub_machine_init): Call grub_set_prefix.
11810 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11811 (grub_parse_type): New enum.
11812 (grub_ieee1275_get_devargs): New function.
11813 (grub_ieee1275_get_devname): Likewise.
11814 (grub_ieee1275_parse_args): Likewise.
11815 (grub_ieee1275_get_filename): Likewise.
11816 (grub_ieee1275_encode_devname): Likewise.
11817
11818 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11819
11820 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11821 `grub_loader_unset'.
11822
11823 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11824
11825 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11826 instead of grub_ieee1275_interpret.
11827 (grub_halt_init): New function.
11828 (grub_halt_fini): Likewise.
11829 (GRUB_MOD_INIT): Correct message grammar.
11830 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11831 instead of grub_ieee1275_interpret.
11832 (grub_reboot_init): New function.
11833 (grub_reboot_fini): Likewise.
11834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11835 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11836 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11837 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11838 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11839 function.
11840 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11841 Add prototype.
11842 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11843 prototype.
11844 (grub_halt): Likewise.
11845 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11846 (cmain): Remove __attribute__((unused)).
11847 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11848 (grub_heap_len): Likewise.
11849 (grub_machine_fini): New function.
11850 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11851 (grub_halt): Likewise.
11852 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11853 function.
11854 * util/powerpc/ieee1275/misc.c: New file.
11855
11856 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11857
11858 * DISTLIST: New file.
11859 * gendistlist.sh: Likewise.
11860
11861 * Makefile.in (COMMON_DISTFILES): Removed.
11862 (BOOT_DISTFILES): Likewise.
11863 (CONF_DISTFILES): Likewise.
11864 (DISK_DISTFILES): Likewise.
11865 (FS_DISTFILES): Likewise.
11866 (INCLUDE_DISTFILES): Likewise.
11867 (KERN_DISTFILES): Likewise.
11868 (LOADER_DISTFILES): Likewise.
11869 (TERM_DISTFILES): Likewise.
11870 (UTIL_DISTFILES): Likewise.
11871 (DISTFILES): Likewise.
11872 (uninstall): Uninstall files in $(pkgdata_DATA).
11873 (DISTLIST): New target.
11874 (distdir): Use the contents of the file DISTLIST to get a list of
11875 distributed files.
11876
11877 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11878
11879 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11880 descriptor. This is ported from GRUB Legacy.
11881
11882 * gencmdlist.sh: Added an extra semicolon to make it work with
11883 old sed versions. Reported by Robert Bihlmeyer
11884 <robbe@orcus.priv.at>.
11885
11886 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11887
11888 Automatic loading of commands is supported.
11889
11890 * normal/main.c (read_command_list): New function.
11891 (grub_normal_execute): Call read_command_list.
11892
11893 * normal/command.c (grub_register_command): Return zero or CMD.
11894 Allocate CMD->NAME from the heap.
11895 Initialize CMD->MODULE_NAME to zero.
11896 Find the same name as well. If the same command is found and it is
11897 a dummy command, overwrite members. If it is not a dummy command,
11898 return zero.
11899 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11900 (grub_command_find): If a dummy command is found, load a module
11901 and retry to find a command only once.
11902
11903 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11904 make sure that each command is loaded.
11905
11906 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11907 macro.
11908 (struct grub_command): Remove const from the member `name'.
11909 Add a new member `module_name'.
11910 (grub_register_command): Return grub_command_t.
11911
11912 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11913 sure that each command is loaded.
11914
11915 * genmk.rb (PModule::rule): Specify a module name without the
11916 suffix ".mod" to gencmdlist.sh.
11917
11918 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11919
11920 * gencmdlist.sh: New file.
11921
11922 * genmk.rb (PModule::rule): Generate a rule for a command list.
11923 Clean command.lst.
11924 Generate command.lst from $(COMMANDFILES).
11925
11926 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11927 (DATA): Added $(pkgdata_DATA).
11928 (install-local): Install files in $(pkgdata_DATA).
11929
11930 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11931
11932 * term/i386/pc/vga.c (debug_command): Removed.
11933 (GRUB_MOD_INIT): Do not register the command "debug".
11934
11935 From Hollis Blanchard:
11936 * commands/configfile.c: New file.
11937 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11938 commands/configfile.c.
11939 (pkgdata_MODULES): Added configfile.mod.
11940 (configfile_mod_SOURCES): New variable.
11941 (configfile_mod_CFLAGS): Likewise.
11942 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11943 commands/configfile.c.
11944 (pkgdata_MODULES): Added configfile.mod.
11945 (configfile_mod_SOURCES): New variable.
11946 (configfile_mod_CFLAGS): Likewise.
11947 * util/grub-emu.c (main): Call grub_configfile_init and
11948 grub_configfile_fini.
11949 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11950 prototype.
11951 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11952
11953 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11954
11955 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11956 address.
11957
11958 * commands/help.c (grub_cmd_help): Do not print newlines after
11959 the last command in print_command_help.
11960
11961 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11962
11963 * commands/default.h: New file.
11964 * commands/timeout.h: Likewise.
11965 * normal/context.c: Likewise.
11966
11967 * util/misc.c: Do not include sys/times.h.
11968 Include sys/time.h and grub/machine/time.h.
11969 (grub_get_rtc): Rewritten with gettimeofday.
11970
11971 * util/grub-emu.c (main): Call grub_default_init and
11972 grub_timeout_init before grub_normal_init, and call
11973 grub_timeout_fini and grub_default_fini after grub_main.
11974
11975 * util/console.c (grub_ncurses_checkkey): Return the read
11976 character or -1.
11977
11978 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11979 timeouts.
11980
11981 * normal/main.c (read_config_file): Push MENU. If this fails,
11982 print an error and wait for a user input.
11983 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11984 If a menu is empty or an error occurs, pop MENU.
11985 (grub_normal_execute): Pop and free MENU after grub_menu_run
11986 returns.
11987
11988 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11989
11990 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11991 include time.h.
11992 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11993 without GRUB_UTIL.
11994 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11995 time.h.
11996 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11997 without GRUB_UTIL.
11998
11999 * include/grub/normal.h (struct grub_menu_list): New struct.
12000 (grub_menu_list_t): New type.
12001 (struct grub_context): New struct.
12002 (grub_context_t): New type.
12003 (grub_register_command): Got rid of EXPORT_FUNC.
12004 (grub_unregister_command): Likewise.
12005 (grub_context_get): New prototype.
12006 (grub_context_get_current_menu): Likewise.
12007 (grub_context_push_menu): Likewise.
12008 (grub_context_pop_menu): Likewise.
12009 [GRUB_UTIL] (grub_default_init): Likewise.
12010 [GRUB_UTIL] (grub_default_fini): Likewise.
12011 [GRUB_UTIL] (grub_timeout_init): Likewise.
12012 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12013
12014 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12015 commands/timeout.c and normal/context.c.
12016 (pkgdata_MODULES): Added default.mod and timeout.mod.
12017 (normal_mod_SOURCES): Added normal/context.c.
12018 (default_mod_SOURCES): New variable.
12019 (default_mod_CFLAGS): Likewise.
12020 (timeout_mod_SOURCES): Likewise.
12021 (timeout_mod_CFLAGS): Likewise.
12022 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12023 conf/i386-pc.rmk.
12024 (pkgdata_MODULES): Added default.mod and timeout.mod.
12025 (normal_mod_SOURCES): Added normal/context.c.
12026 (default_mod_SOURCES): New variable.
12027 (default_mod_CFLAGS): Likewise.
12028 (timeout_mod_SOURCES): Likewise.
12029 (timeout_mod_CFLAGS): Likewise.
12030
12031 * Makefile.in (all-local): Added $(MKFILES).
12032
12033 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12034
12035 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12036 (grub_emu_SOURCES): Likewise.
12037 (pkgdata_MODULES): Add `sun.mod'.
12038 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12039 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12040 `partmap/sun.c'.
12041 (pkgdata_MODULES): Add `sun.mod'.
12042 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12043 * include/grub/partition.h (grub_sun_partition_map_init): New
12044 prototype.
12045 (grub_sun_partition_map_fini): Likewise.
12046 * partmap/sun.c: New file.
12047 * util/grub-emu.c (main): Initialize and de-initialize the sun
12048 partitionmap support.
12049
12050 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12051
12052 This implements an Emacs-like menu entry editor.
12053
12054 * normal/menu_entry.c: New file.
12055
12056 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12057 characters to ASCII.
12058 (saved_char): New variable.
12059 (grub_ncurses_checkkey): Rewritten completely.
12060 (grub_ncurses_getkey): Likewise.
12061 (grub_ncurses_init): Call raw instead of cbreak.
12062
12063 * normal/menu.c (print_entry): Do not put a space.
12064 (init_page): Renamed to ...
12065 (grub_menu_init_page): ... this. All callers changed.
12066 (edit_menu_entry): Removed.
12067 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12068
12069 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12070
12071 * kern/misc.c (grub_vprintf): Call grub_refresh.
12072
12073 * normal/menu.c (DISP_LEFT): Renamed to ...
12074 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12075 * normal/menu.c (DISP_UP): Renamed to ...
12076 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12077 * normal/menu.c (DISP_RIGHT): Renamed to ...
12078 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12079 * normal/menu.c (DISP_DOWN): Renamed to ...
12080 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12081 * normal/menu.c (DISP_HLINE): Renamed to ...
12082 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12083 * normal/menu.c (DISP_VLINE): Renamed to ...
12084 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12085 * normal/menu.c (DISP_UL): Renamed to ...
12086 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12087 * normal/menu.c (DISP_UR): Renamed to ...
12088 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12089 * normal/menu.c (DISP_LL): Renamed to ...
12090 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12091 * normal/menu.c (DISP_LR): Renamed to ...
12092 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12093 * normal/menu.c (TERM_WIDTH): Renamed to ...
12094 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12095 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12096 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12097 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12098 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12099 * normal/menu.c (TERM_MARGIN): Renamed to ...
12100 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12101 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12102 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12103 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12104 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12105 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12106 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12107 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12108 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12109 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12110 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12111 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12112 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12113 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12114 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12115 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12116 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12117 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12118 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12119 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12120 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12121 All callers changed.
12122
12123 * include/grub/normal.h: New prototype.
12124
12125 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12126 normal/menu_entry.c.
12127 (normal_mod_SOURCES): Likewise.
12128 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12129 (normal_mod_SOURCES): Likewise.
12130
12131 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12132
12133 * include/grub/normal.h (grub_halt_init): New prototype.
12134 (grub_halt_fini): Likewise.
12135 (grub_reboot_init): Likewise.
12136 (grub_reboot_fini): Likewise.
12137
12138 * util/grub-emu.c: Include signal.h.
12139 (main_env): New global variable.
12140 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12141 catch C-c.
12142 (grub_machine_fini): New function.
12143 (main): Call grub_halt_init and grub_reboot_init before
12144 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12145 Call setjmp with MAIN_ENV to go back afterwards.
12146 Call grub_machine_fini right before return.
12147
12148 * include/grub/util/misc.h: Include setjmp.h.
12149 (main_env): New prototype.
12150
12151 * include/grub/kernel.h (grub_machine_fini): New prototype.
12152 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12153 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12154
12155 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12156 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12157 * term/i386/pc/console.c (grub_console_fini): Likewise.
12158
12159 * util/i386/pc/misc.c: New file.
12160
12161 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12162 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12163 commands/i386/pc/reboot.c.
12164
12165 2005-02-14 Guillem Jover <guillem@hadrons.org>
12166
12167 * include/grub/dl.h (grub_dl_check_header): New prototype.
12168 (grub_arch_dl_check_header): Change return type to grub_err_t,
12169 remove size parameter and export function. Update all callers.
12170 * kern/dl.c (grub_dl_check_header): New function.
12171 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12172 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12173 are inside the core.
12174 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12175 independent ELF header checks.
12176 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12177 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12178 `grub_dl_check_header' instead of explicit checks. Check for the
12179 ELF type.
12180 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12181 `grub_dl_check_header' instead of explicit checks. Remove arch
12182 specific ELF header checks.
12183
12184 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12185 argument SIZE.
12186
12187 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12188
12189 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12190 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12191
12192 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12193
12194 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12195 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12196 (part_map_iterate): Clear `grub_errno' and return 0 if
12197 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12198 * partmap/amiga.c (amiga_partition_map_iterate): Return
12199 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12200 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12201
12202 2005-02-01 Guillem Jover <guillem@hadrons.org>
12203
12204 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12205 help info.
12206
12207 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12208
12209 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12210 Removed prototype.
12211 (grub_rescue_cmd_linux): New prototype.
12212 (grub_rescue_cmd_initrd): Likewise.
12213 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12214 `bi_rec'.
12215 (grub_linux_release_mem): Release the memory for the initrd.
12216 (grub_load_linux): Renamed from this...
12217 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12218 Changed `entry' not to be static. Loop over memory regions to
12219 find another one when the default fails.
12220 (grub_rescue_cmd_initrd): New function.
12221 (grub_linux_init): Remove function.
12222 (grub_linux_fini): Likewise.
12223 (GRUB_MOD_INIT): Register `initrd'.
12224 (GRUB_MOD_FINI): Unregister `initrd'.
12225 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12226 Function removed.
12227 (grub_linux_normal_fini): Likewise.
12228 (GRUB_MOD_INIT): Register `initrd'.
12229 (GRUB_MOD_FINI): Unregister `initrd'.
12230
12231 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12232
12233 * commands/help.c: New file.
12234 * normal/arg.c (show_help): Renamed to...
12235 (grub_arg_show_help): ... this.
12236 * commands/i386/pc/halt.c: New file.
12237 * commands/i386/pc/reboot.c: Likewise.
12238 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12239 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12240 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12241 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12242 variables.
12243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12244 `commands/help.c'.
12245 (pkgdata_MODULES): Add `help.mod'.
12246 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12247 * grub/i386/pc/init.h (grub_reboot): New prototype.
12248 (grub_halt): Likewise.
12249 * include/grub/normal.h (grub_arg_show_help): New prototype.
12250 (grub_help_init): Likewise.
12251 (grub_help_fini): Likewise.
12252 * util/grub-emu.c (main): Initialize and deinitialize the help
12253 command.
12254
12255 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12256
12257 * normal/command.c (grub_command_init): Fixed the description of
12258 the `set' and `unset' commands.
12259
12260 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12261
12262 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12263 function.
12264 * commands/ieee1275/halt.c: New file.
12265 * commands/ieee1275/reboot.c: Likewise.
12266 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12267 `__attribute__ ((unused))'. Some GCS related fixed.
12268 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12269 (grub_suspend_fini): Likewise.
12270 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12271 and `halt.mod'.
12272 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12273 (halt_mod_CFLAGS): New variables.
12274 * include/grub/powerpc/ieee1275/ieee1275.h
12275 (grub_ieee1275_interpret): New prototype.
12276
12277 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12278
12279 * include/grub/misc.h (memmove): New prototype.
12280 (memcpy): Likewise.
12281
12282 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12283
12284 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12285 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12286
12287 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12288
12289 * kern/misc.c (grub_strndup): Function rewritten.
12290
12291 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12292
12293 * normal/menu.c (TERM_WIDTH): Macro redefined.
12294 (TERM_TOP_BORDER_Y): Likewise.
12295 (draw_border): Replaced while-loop by a for-loop. Make the number
12296 of lines consistent with the number of lines displayed in
12297 print_entries. Added a margin below the rectangle.
12298 (print_entry): Make the entry fit in the rectangle.
12299 (print_entries): Display the scroll arrows next to the right
12300 border.
12301
12302 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12303
12304 * fs/minix.c (grub_minix_find_file): Reserve more space for
12305 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12306 `grub_strncpy' to copy `path' into it.
12307
12308 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12309
12310 Add the loopback device, a device via which files can be accessed
12311 as devices.
12312
12313 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12314 (pkgdata_MODULES): Add loopback.mod.
12315 (loopback_mod_SOURCES): New variable.
12316 (loopback_mod_CFLAGS): Likewise.
12317 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12318 `disk/loopback.c'.
12319 (pkgdata_MODULES): Add loopback.mod.
12320 (loopback_mod_SOURCES): New variable.
12321 (loopback_mod_CFLAGS): Likewise.
12322 * disk/loopback.c: new file.
12323 * include/grub/normal.h (grub_loop_init): New prototype.
12324 (grub_loop_fini): New prototype.
12325 * util/grub-emu.c (main): Initialize and de-initialize loopback
12326 support.
12327 * include/grub/disk.h (grub_disk_dev_id): Add
12328 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12329
12330 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12331
12332 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12333 function.
12334 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12335 (suspend_mod_SOURCES): New variable.
12336 (suspend_mod_CFLAGS): Likewise.
12337 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12338 New prototype.
12339 * commands/ieee1275/suspend.c: New file.
12340
12341 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12342
12343 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12344 ((unused))' to `__attribute__ ((used))'.
12345 (GRUB_MOD_FINI): Likewise.
12346 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12347 * genmk.rb (PModule): Assign space to common symbols when linking
12348 modules.
12349
12350 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12351
12352 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12353 `unsigned' arguments to `grub_size_t'.
12354 (grub_malloc): Likewise.
12355 (grub_realloc): Likewise.
12356 (grub_memalign): Likewise.
12357 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12358 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12359 * util/misc.c (grub_malloc): Likewise.
12360 (grub_realloc): Likewise.
12361 * kern/mm.c (get_header_from_pointer): Change the casts to
12362 `unsigned' into a cast to `grub_size_t'.
12363
12364 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12365 point to `currnode' when `currnode' is changed.
12366
12367 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12368 Schottelius <nico-linux@schottelius.org>.
12369
12370 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12371
12372 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12373 (note_path): Remove variable.
12374 (GRUB_IEEE1275_NOTE_NAME): New macro.
12375 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12376 (grub_ieee1275_note_hdr): New structure.
12377 (grub_ieee1275_note_desc): Likewise.
12378 (grub_ieee1275_note): Likewise.
12379 (load_note): Remove `dir' argument. All callers updated. Remove
12380 `note_img' and `path'. Do not load a file from `note_path'.
12381 Initialize a struct grub_ieee1275_note and write that to `out'.
12382 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12383
12384 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12385
12386 * util/misc.c (grub_util_read_image): Revert last change. It
12387 called `grub_util_read_at', which seeks from the beginning of the
12388 file.
12389
12390 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12391
12392 * TODO: Add note about endianness in grub-mkimage.
12393 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12394 section.
12395 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12396 (grub_mkimage_SOURCES): New target.
12397 * include/grub/kernel.h (grub_start_addr): Remove variable.
12398 (grub_end_addr): Likewise.
12399 (grub_total_module_size): Likewise.
12400 (grub_kernel_image_size): Likewise.
12401 (GRUB_MODULE_MAGIC): New constant.
12402 (grub_module_info): New structure.
12403 (grub_arch_modules_addr): New prototype.
12404 (grub_get_end_addr): Remove prototype.
12405 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12406 * include/grub/powerpc/ieee1275/kernel.h: New file.
12407 * include/grub/util/misc.h (grub_util_get_fp_size): New
12408 prototype.
12409 (grub_util_read_at): Likewise.
12410 (grub_util_write_image_at): Likewise.
12411 * kern/main.c (grub_get_end_addr): Remove function.
12412 (grub_load_modules): Call grub_arch_modules_addr instead of using
12413 grub_end_addr. Look for a grub_module_info struct in memory. Use
12414 the grub_module_info fields instead of calling grub_get_end_addr
12415 as loop conditions. Move grub_add_unused_region code here.
12416 (grub_add_unused_region): Remove function.
12417 * kern/i386/pc/init.c: Include grub/cache.h.
12418 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12419 one call to add_mem_region.
12420 (grub_arch_modules_addr): New function.
12421 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12422 (grub_total_module_size): Likewise.
12423 Include grub/machine/kernel.h.
12424 (grub_arch_modules_addr): New function.
12425 * util/grub-emu.c (grub_end_addr): Remove variable.
12426 (grub_total_module_size): Likewise.
12427 (grub_arch_modules_addr): New function.
12428 * util/misc.c: Include unistd.h.
12429 (grub_util_get_fp_size): New function.
12430 (grub_util_read_at): Likewise.
12431 (grub_util_write_image_at): Likewise.
12432 (grub_util_read_image): Call grub_util_read_at.
12433 (grub_util_write_image): Call grub_util_write_image_at.
12434 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12435 additional memory in kernel_img for a struct grub_module_info.
12436 Fill in that grub_module_info.
12437 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12438
12439 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12440
12441 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12442 New function.
12443 * include/grub/powerpc/ieee1275/ieee1275.h
12444 (grub_ieee1275_milliseconds): New prototype.
12445 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12446 Change to 1000.
12447 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12448 grub_ieee1275_milliseconds.
12449
12450 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12451
12452 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12453 variable.
12454 (find_options): New function.
12455 (cmain): Call find_options.
12456 * include/grub/powerpc/ieee1275/ieee1275.h
12457 (grub_ieee1275_realmode): New extern variable.
12458 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12459 grub_map if grub_ieee1275_realmode is false.
12460
12461 2004-12-29 Marco Gerards <metgerards@student.han.nl>
12462
12463 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12464 lines are inserted and make it work like readline. Reported by
12465 Vincent Pelletier <subdino2004@yahoo.fr>.
12466
12467 2004-12-28 Marco Gerards <metgerards@student.han.nl>
12468
12469 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12470
12471 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12472 `kern/powerpc/cache.S'.
12473
12474 2004-12-27 Marco Gerards <metgerards@student.han.nl>
12475
12476 * genmk.rb: Handle the `Program' class in the main loop. Written
12477 by Johan Rydberg <jrydberg@gnu.org>.
12478 (Program): New class.
12479 (programs): New variable.
12480 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12481 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12482 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12483 (help_arch): Function removed.
12484 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12485 `powerpc/libgcc.h' and `loader.h'.
12486 (pkgdata_PROGRAMS): New variable.
12487 (sbin_UTILITIES): Variable removed.
12488 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12489 (grubof_SOURCES): Variable re-defined so it only includes the
12490 core functionality.
12491 (grubof_CFLAGS): Remove `-DGRUBOF'.
12492 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12493 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12494 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12495 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12496 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12497 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12498 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12499 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12500 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12501 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12502 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12503 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12504 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12505 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12506 (pc_mod_CFLAGS): New variables.
12507 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12508 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12509 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12510 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12511 Moved from here...
12512 * include/grub/i386/pc/init.h (grub_os_area_addr)
12513 (rub_os_area_size): ... to here.
12514 * include/grub/powerpc/ieee1275/ieee1275.h
12515 (grub_ieee1275_entry_fn): Export symbol.
12516 * include/grub/powerpc/ieee1275/init.h: New file.
12517 * include/grub/powerpc/libgcc.h: Likewise.
12518 * include/grub/cache.h: Likewise.
12519 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12520 <hollis@penguinppc.org>.
12521 * kern/dl.c: Include <grub/cache.h>.
12522 (grub_dl_flush_cache): New function.
12523 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12524 for this module.
12525 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12526 (grub_console_init): Removed prototypes.
12527 (grub_machine_init): Don't initialize the modules anymore.
12528 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12529 static.
12530 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12531 Macro undef removed.
12532 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12533 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12534 relocation `R_PPC_REL32'. Return an error when the relocation is
12535 unknown.
12536 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12537 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12538 * util/misc.c (grub_arch_sync_caches): Likewise.
12539
12540 2004-12-19 Marco Gerards <metgerards@student.han.nl>
12541
12542 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12543 `symlist.c', add `grubof_symlist.c'.
12544 (symlist.c): Variable removed.
12545 (grubof_HEADERS): Variable added.
12546 (grubof_symlist.c): New target.
12547 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12548 `kernel_img_HEADERS'.
12549 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12550 * kern/powerpc/dl.c: New file.
12551 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12552 Function removed.
12553 (grub_arch_dl_relocate_symbols): Likewise.
12554 (grub_register_exported_symbols): Likewise.
12555
12556 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12557
12558 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12559 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12560 to fail instead. Reported by Vincent Pelletier
12561 <subdino2004@yahoo.fr>.
12562
12563 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12564 it is not allocated. Reported by Vincent Pelletier
12565 <subdino2004@yahoo.fr>.
12566
12567 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12568 output so the output looks better.
12569
12570 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12571
12572 Modulize the partition map support and add support for the amiga
12573 partition map.
12574
12575 * commands/ls.c: Include <grub/partition.h> instead of
12576 <grub/machine/partition.h>.
12577 * kern/disk.c: Likewise.
12578 * kern/rescue.c: Likewise.
12579 * loader/i386/pc/chainloader.c: Likewise.
12580 * normal/cmdline.c: Likewise.
12581 * kern/powerpc/ieee1275/init.c: Likewise.
12582 (grub_machine_init): Call `grub_pc_partition_map_init',
12583 `grub_amiga_partition_map_init' and
12584 `grub_apple_partition_map_init'.
12585 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12586 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12587 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12588 `partition.h' and `pc_partition.h'.
12589 (grub_setup_SOURCES): Remove
12590 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12591 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12592 (grub_emu_SOURCES): Likewise.
12593 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12594 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12595 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12596 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12597 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12598 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12599 (grubof_SOURCES): Likewise.
12600 * disk/i386/pc/partition.c: File removed.
12601 * disk/powerpc/ieee1275/partition.c: Likewise.
12602 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12603 * include/grub/i386/pc/partition.h: Likewise.
12604 * kern/partition.c: New file.
12605 * partmap/amiga.c: Likewise.
12606 * partmap/apple.c: Likewise.
12607 * partmap/pc.c: Likewise.
12608 * include/grub/partition.h: Likewise..
12609 * include/grub/pc_partition.h: Likewise.
12610 * util/grub-emu.c: Include <grub/partition.h> instead of
12611 <grub/machine/partition.h>.
12612 (main): Call `grub_pc_partition_map_init',
12613 `grub_amiga_partition_map_init' and
12614 `grub_apple_partition_map_init' and deinitialize afterwards.
12615 * util/i386/pc/biosdisk.c: Include `#include
12616 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12617 `<grub/machine/partition.h>'.
12618 * util/i386/pc/grub-setup.c: Likewise.
12619 * util/i386/pc/biosdisk.c: Likewise.
12620 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12621 partition information in case of a PC partition.
12622 * util/i386/pc/grub-setup.c: Include `#include
12623 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12624 `<grub/machine/partition.h>'.
12625 (setup): Only access the PC specific partition information in case
12626 of a PC partition.
12627
12628 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12629
12630 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12631 (grub_longjmp): Likewise.
12632 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12633 20.
12634 * normal/powerpc/setjmp.S: New file.
12635 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12636 `normal/powerpc/setjmp.S'.
12637 (grubof_CFLAGS): Add `-DGRUBOF'.
12638 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12639 [GRUB_UTIL && !GRUBOF].
12640
12641 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12642
12643 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12644 property named `name'. Correctly handle the error returned by
12645 `grub_ieee1275_finddevice' if a device can not be opened.
12646
12647 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12648
12649 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12650 `actual' for negativity.
12651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12652 kern/fshelp.c.
12653
12654 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12655
12656 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12657 (PAGE_OFFSET): New macro.
12658 (CRTC_ADDR_PORT): Likewise.
12659 (CRTC_DATA_PORT): Likewise.
12660 (START_ADDR_HIGH_REGISTER): Likewise.
12661 (START_ADDR_LOW_REGISTER): Likewise.
12662 (GRAPHICS_ADDR_PORT): Likewise.
12663 (GRAPHICS_DATA_PORT): Likewise.
12664 (READ_MAP_REGISTER): Likewise.
12665 (INPUT_STATUS1_REGISTER): Likewise.
12666 (INPUT_STATUS1_VERTR_BIT): Likewise.
12667 (page): New variable.
12668 (wait_vretrace): New function.
12669 (set_read_map): Likewise.
12670 (set_start_address): Likewise.
12671 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12672 the right page.
12673 (check_vga_mem): Take the page into account.
12674 (write_char): Likewise.
12675 (write_cursor): Likewise.
12676 (scroll_up): Likewise. Copy the page to the page that is not
12677 shown and switch between both pages.
12678 (grub_vga_putchar): Fix off by one error.
12679 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12680 account.
12681
12682 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12683
12684 Add support for iso9660 (including rockridge).
12685
12686 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12687 (iso9660_mod_SOURCES): New variable.
12688 (iso9660_mod_CFLAGS): Likewise.
12689 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12690 * include/grub/fs.h (grub_iso9660_init): New prototype.
12691 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12692 * fs/iso9660.c: New file.
12693
12694 * include/grub/misc.h (grub_strncat): New prototype.
12695 * kern/misc.c (grub_strncat): New function.
12696
12697 * fs/hfs.c (grub_hfs_mount): Translate the error
12698 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12699 * fs/jfs.c (grub_jfs_mount): Likewise.
12700 * fs/ufs.c (grub_ufs_mount): Likewise.
12701
12702 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12703
12704 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12705 which initialized BAT registers.
12706 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12707 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12708 Move from here...
12709 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12710 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12711 ... to here.
12712 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12713 (grub_mapclaim): Likewise.
12714 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12715 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12716 hand.
12717
12718 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12719
12720 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12721 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12722 -ffreestanding and -msoft-float.
12723
12724 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12725
12726 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12727 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12728 set in grub_ieee1275_flags.
12729
12730 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12731
12732 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12733 prototype.
12734 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12735 grub_console_init first.
12736 Change the memory range used for grub_ieee1275_claim and
12737 grub_mm_init_region.
12738 Print an error message if the claim fails.
12739 Include <grub/misc.h>.
12740
12741 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12742
12743 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12744 Call grub_children_iterate for device nodes of type `scsi',
12745 `ide', or `ata'.
12746 (grub_ofdisk_open): Remove manual device alias resolution.
12747 Fix memory leak when device cannot be opened.
12748 * include/grub/powerpc/ieee1275/ieee1275.h
12749 (grub_children_iterate): New prototype.
12750 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12751 New function.
12752 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12753 Return -1 if args.size was -1.
12754
12755 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12756
12757 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12758 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12759 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12760 Open Firmware's memory for it; claim memory from _start to _end.
12761 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12762 (_end): New extern.
12763 (_start): Zero BSS from __bss_start to _end.
12764 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12765 New extern.
12766 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12767
12768 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12769
12770 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12771 -1 if args.base was -1.
12772
12773 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12774
12775 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12776 escape sequence instead of a literal ^L. Also call
12777 grub_ofconsole_gotoxy.
12778
12779 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12780
12781 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12782 void * arguments to grub_addr_t. All callers updated. Also make
12783 the `result' argument optional.
12784 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12785 All callers updated.
12786
12787 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12788
12789 * commands/ls.c (grub_ls_list_files): Use the string following the
12790 initial ')', if present, as the filesystem path.
12791 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12792
12793 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12794
12795 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12796
12797 Make the source code of the menu interface more readable.
12798
12799 * normal/menu.c: Include grub/mm.h.
12800 (TERM_WIDTH): New macro.
12801 (TERM_HEIGHT): Likewise.
12802 (TERM_INFO_HEIGHT): Likewise.
12803 (TERM_MARGIN): Likewise.
12804 (TERM_SCROLL_WIDTH): Likewise.
12805 (TERM_TOP_BORDER_Y): Likewise.
12806 (TERM_LEFT_BORDER_X): Likewise.
12807 (TERM_BORDER_WIDTH): Likewise.
12808 (TERM_MESSAGE_HEIGHT): Likewise.
12809 (TERM_BORDER_HEIGHT): Likewise.
12810 (TERM_NUM_ENTRIES): Likewise.
12811 (TERM_FIRST_ENTRY_Y): Likewise.
12812 (TERM_ENTRY_WIDTH): Likewise.
12813 (TERM_CURSOR_X): Likewise.
12814 (draw_border): Use macros instead of magic numbers.
12815 (print_entry): Likewise.
12816 (print_entries): Likewise.
12817 (run_menu): Likewise. Also, handle the key 'e'.
12818 (run_menu_entry): Ignore empty command lines.
12819 (print_message): Added a new argument EDIT. If EDIT is true,
12820 print a different message.
12821 (init_page): Likewise.
12822 (edit_menu_entry): New function. Not implemented yet.
12823
12824 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12825
12826 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12827 can be loaded from normal mode.
12828
12829 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12830 `multiboot.mod'.
12831 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12832 (multiboot_mod_CFLAGS): New variables.
12833 * loader/i386/pc/linux_normal.c: New file.
12834 * loader/i386/pc/multiboot_normal.c: Likewise.
12835
12836 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12837 attribute `unused'.
12838
12839 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12840 `fdiro' to read the mode information from instead of `diro'.
12841
12842 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12843 looking up a symlink.
12844
12845 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12846 macro.
12847 * normal/command.c (grub_command_execute): Don't parse the
12848 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12849 flags of the command.
12850
12851 * normal/menu.c (grub_menu_run): Fix typo.
12852
12853 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12854
12855 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12856
12857 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12858 `y + 1' instead of `y - 1'.
12859
12860 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12861
12862 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12863
12864 From Hollis Blanchard <hollis@penguinppc.org>:
12865 * kern/misc.c (memmove): New alias for grub_memmove.
12866 (memcmp): New alias for grub_memcmp.
12867 (memset): New alias for grub_memset.
12868 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12869 Change "int handle" to "grub_ieee1275_phandle_t handle".
12870 * include/grub/powerpc/ieee1275/ieee1275.h
12871 (grub_ieee1275_get_property): Likewise.
12872
12873 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12874
12875 Added normal mode command `chainloader' as module chain.mod, which
12876 depends on normal.mod and _chain.mod.
12877
12878 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12879 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12880 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12881 Deleted prototype.
12882 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12883 but arguments parsing moved to ...
12884 (grub_chainloader_cmd): ... here. New function.
12885 * include/grub/i386/pc/chainloader.h: New file.
12886 * loader/i386/pc/chainloader_normal.c: Likewise.
12887
12888 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12889
12890 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12891 (grub_mkimage_LDFLAGS): Likewise.
12892 (grub_emu_SOURCES): Likewise.
12893 (kernel_img_HEADERS): Added fshelp.h.
12894 * fs/ext2.c: Include <grub/fshelp.h>.
12895 (FILETYPE_REG): New macro.
12896 (FILETYPE_INO_REG): Likewise.
12897 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12898 Changed all users.
12899 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12900 all users.
12901 (grub_fshelp_node): New struct.
12902 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12903 to a pointer.
12904 (grub_ext2_get_file_block): Removed function.
12905 (grub_ext2_read_block): New function.
12906 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12907 This function was written.
12908 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12909 (grub_ext2_find_file): Removed function.
12910 (grub_ext2_read_symlink): New function.
12911 (grub_ext2_iterate_dir): Likewise.
12912 (grub_ext2_open): Rewritten.
12913 (grub_ext2_dir): Rewritten.
12914 * include/grub/fshelp.h: New file.
12915 * fs/fshelp.c: Likewise.
12916
12917 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12918
12919 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12920 (print_message): Add a missing newline.
12921 (run_menu): Added timeout support.
12922 (run_menu_entry): New local function.
12923 (grub_menu_run): Added support for booting.
12924
12925 * kern/loader.c (grub_loader_is_loaded): New function.
12926
12927 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12928 (grub_get_rtc): Exported.
12929
12930 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12931 (grub_get_rtc): Exported.
12932
12933 * include/grub/normal.h (struct grub_command_list): Remove
12934 constant from the member `command'.
12935
12936 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12937
12938 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12939
12940 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12941
12942 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12943
12944 Add support for the JFS filesystem.
12945
12946 * fs/jfs.c: New file.
12947 * include/grub/fs.h (grub_jfs_init): New prototype.
12948 (grub_jfs_fini): New prototype.
12949 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12950 (grub_emu_SOURCES): Likewise.
12951 (pkgdata_MODULES): Add jfs.mod.
12952 (jfs_mod_SOURCES): New variable.
12953 (jfs_mod_CFLAGS): Likewise.
12954 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12955 (grubof_SOURCES): Likewise.
12956 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12957
12958 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12959 endian to the host endian.
12960 (grub_fat_utf16_to_utf8): Move function from there...
12961 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12962 the endianness of the source string anymore.
12963 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12964
12965 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12966
12967 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12968 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12969 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12970 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12971
12972 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12973 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12974 for `node_found' and `it_dir'.
12975 (grub_hfs_dir): Add prototype for `dir_hook'.
12976
12977 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12978 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12979 and `indir32' to silence a gcc warning.
12980
12981 * include/grub/fs.h (grub_hfs_init): New prototype.
12982 (grub_hfs_fini): Likewise.
12983
12984
12985 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12986
12987 Each disk device has its own id now. This is useful to make use
12988 of multiple disk devices.
12989
12990 * include/grub/disk.h (grub_disk_dev_id): New enum.
12991 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12992 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12993
12994 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12995 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12996
12997 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12998 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12999
13000 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13001 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13002
13003 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13004 "id" which is used by the cache manager.
13005
13006 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13007 of just "GRUB".
13008
13009 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13010
13011 * fs/hfs.c: New file.
13012 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13013 (grub_emu_SOURCES): Likewise.
13014 (pkgdata_MODULES): Add hfs.mod.
13015 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13016 (grubof_SOURCES): Likewise.
13017 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13018
13019 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13020 * kern/misc.c (grub_strncasecmp): Add function.
13021
13022 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13023
13024 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13025 with parentheses.
13026
13027 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13028 (grub_ext2_dir): In case the directory entry type is unknown, read
13029 it from the inode.
13030
13031 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13032
13033 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13034 grub_load_linux instead of grub_rescue_cmd_linux as second
13035 argument of grub_rescue_register_command.
13036
13037 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13038
13039 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13040
13041 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13042 function.
13043 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13044 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13045 `loader/powerpc/ieee1275/linux.c',
13046 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13047 * include/grub/powerpc/ieee1275/ieee1275.h
13048 (grub_ieee1275_release): New prototype.
13049 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13050 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13051 normal, boot, linux and linux_normal.
13052 * loader/powerpc/ieee1275/linux.c: New file.
13053 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13054
13055 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13056
13057 * normal/arg.c (grub_arg_parse): Correct error handling after
13058 reallocating the argumentlist (check if `argl' is not null instead
13059 of checking if `args' is not null).
13060 * kern/mm.c (grub_realloc): Return the same pointer when using the
13061 same region, instead of returning the header address.
13062
13063 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13064
13065 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13066 one block instead of two when looking for the initial partition.
13067 (grub_partition_probe): Initialize the local variable `p' with 0.
13068 Use base 10 for the grub_strtoul call.
13069 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13070 need for one local variable.
13071 (grub_strtoul): Don't add the new value to `num', instead of that
13072 just assign it.
13073
13074 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13075
13076 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13077 (pxeboot_img_SOURCES): New variable.
13078 (pxeboot_img_ASFLAGS): Likewise.
13079 (pxeboot_img_LDFLAGS): Likewise.
13080 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13081 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13082 <lode_leroy@hotmail.com>.
13083
13084 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13085
13086 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13087 there was no input.
13088
13089 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13090
13091 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13092 the history buffer logic.
13093
13094 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13095
13096 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13097 (FILETYPE_INO_SYMLINK): New macros.
13098 (grub_ext2_find_file): Check if the node is a directory using the
13099 inode stat information instead of using the filetype in the
13100 dirent. Exclude the first character of an absolute symlink.
13101 (grub_ext2_dir): Mask out the filetype part of the mode member of
13102 the inode.
13103
13104 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13105
13106 Add support for UFS version 1 and 2. Add support for the minix
13107 filesystem version 1 and 2, both the variants with 14 and 30 long
13108 filenames.
13109
13110 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13111 fs/minix.c.
13112 (grub_emu_SOURCES): Likewise.
13113 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13114 (ufs_mod_SOURCES): New variable.
13115 (ufs_mod_CFLAGS): Likewise.
13116 (minix_mod_SOURCES): Likewise.
13117 (minix_mod_CFLAGS): Likewise.
13118 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13119 fs/minix.c.
13120 (grubof_SOURCES): Likewise.
13121 * fs/ufs.c: New file.
13122 * fs/minix.c: New file.
13123 * include/grub/fs.h (grub_ufs_init): New prototype.
13124 (grub_ufs_fini): Likewise.
13125 (grub_minix_init): Likewise.
13126 (grub_minix_fini): Likewise.
13127 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13128 minix fs.
13129
13130 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13131
13132 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13133 commands/ls.c, commands/terminal.c, commands/boot.c,
13134 commands/cmp.c and commands/cat.c.
13135 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13136
13137 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13138 "env.h"
13139
13140 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13141
13142 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13143 and grub_, respectively. Because the conversion is trivial and
13144 mechanical, I omit the details here. Please refer to the CVS
13145 if you need more information.
13146
13147 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13148
13149 * include/pupa: Renamed to ...
13150 * include/grub: ... this.
13151 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13152 * util/i386/pc/grub-mkimage.c: ... this.
13153 * util/i386/pc/pupa-setup.c: Renamed to ...
13154 * util/i386/pc/grub-setup.c: ... this.
13155 * util/pupa-emu.c: Renamed to ...
13156 * util/grub-emu.c: ... this.
13157
13158 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13159
13160 Add support for the newworld apple macintosh (PPC). This has been
13161 tested on the powerbook 2000 only. It only adds support for
13162 generic ieee1275 functions, console and disk support. This should
13163 be easy to port to other architectures with support for Open
13164 Firmware.
13165
13166 * configure.ac: Accept the powerpc as host_cpu. In the case of
13167 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13168 specific tests are only executed while building for the i386.
13169 Inverse test for crosscompile.
13170 * genmk.rb (Utility): Allow assembler files.
13171 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13172 * conf/powerpc-ieee1275.rmk: New file.
13173 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13174 * disk/powerpc/ieee1275/partition.c: Likewise.
13175 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13176 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13177 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13178 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13179 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13180 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13181 * include/pupa/powerpc/ieee1275/loader.h
13182 * include/pupa/powerpc/setjmp.h: Likewise.
13183 * include/pupa/powerpc/types.h: Likewise.
13184 * kern/powerpc/ieee1275/init.c: Likewise.
13185 * kern/powerpc/ieee1275/openfw.c: Likewise.
13186 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13187
13188 These files were written by Johan Rydberg
13189 (jrydberg@night.trouble.net) and I only modified them slightly.
13190
13191 * boot/powerpc/ieee1275/cmain.c: New file.
13192 * boot/powerpc/ieee1275/crt0.S: Likewise.
13193 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13194 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13195
13196 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13197
13198 * Makefile.in: Update copyright.
13199 * genmodsrc.sh: Likewise.
13200 * gensymlist.sh: Likewise.
13201 * term/i386/pc/vga.c: Indent correctly.
13202
13203 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13204 bugreporting address.
13205 * util/i386/pc/pupa-setup.c (usage): Likewise,
13206 (main): Call pupa_ext2_init and pupa_ext2_fini.
13207
13208 * fs/fat.c (log2): Renamed to ...
13209 (fat_log2): ... this.
13210 All callers changed.
13211 * kern/misc.c (memcpy): Alias to pupa_memmove.
13212 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13213 lvalue cast.
13214 * util/console.c (pupa_ncurses_fini): Return 0.
13215
13216 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13217 Move fail label here.
13218 [__GNU__]: Don't warn when using stat.
13219 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13220 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13221 long int. Use strtol instead of strtoul.
13222
13223 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13224
13225 * commands/boot.c: New file.
13226 * commands/cat.c: Likewise.
13227 * commands/cmp.c: Likewise.
13228 * commands/ls.c: Likewise.
13229 * commands/terminal.c: Likewise.
13230 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13231 (pupa_register_command): Changed interface to match the new
13232 argument parser.
13233 (pupa_command_execute): Changed (almost rewritten) so it uses
13234 pupa_split_command. Added support for setting variables using the
13235 syntax `foo=bar'.
13236 (rescue_command): Changed to work with the new argument parser.
13237 (terminal_command): Moved from here to commands/terminal.c.
13238 (set_command): New function.
13239 (unset_command): New function.
13240 (insmod_command): New function.
13241 (rmmod_command): New function.
13242 (lsmod_command): New function.
13243 (pupa_command_init): Don't initialize the command terminal
13244 anymore. Initialize the commands set, unset, insmod, rmmod and
13245 lsmod.
13246 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13247 (kernel_img_HEADERS): Add arg.h and env.h.
13248 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13249 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13250 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13251 normal/arg.c.
13252 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13253 terminal.mod.
13254 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13255 (boot_mod_SOURCES): New variable.
13256 (terminal_mod_SOURCES): Likewise.
13257 (ls_mod_SOURCES): Likewise.
13258 (cmp_mod_SOURCES): Likewise.
13259 (cat_mod_SOURCES): Likewise.
13260
13261 * normal/arg.c: New file.
13262 * kern/env.c: Likewise.
13263 * include/pupa/arg.h: Likewise.
13264 * include/pupa/env.h: Likewise.
13265 * font/manager.c (font_command): Changed to match argument parsing
13266 interface changes.
13267 (PUPA_MOD_INIT): Likewise.
13268 * hello/hello.c (pupa_cmd_hello): Likewise.
13269 (PUPA_MOD_INIT): Likewise.
13270 * include/pupa/disk.h: Include <pupa/device.h>.
13271 (pupa_print_partinfo): New prototype.
13272 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13273 (pupa_dl_get_prefix): Likewise.
13274 * include/pupa/misc.h: Include <pupa/err.h>.
13275 (pupa_isgraph): New prototype.
13276 (pupa_isdigit): Likewise.
13277 (pupa_split_cmdline): Likewise.
13278 * include/pupa/normal.h: Include <pupa/arg.h>.
13279 (pupa_command): Changed the prototype of the member `func' to
13280 match the argument parsing interface. Added member `options'.
13281 (pupa_register_command): Updated to match function.
13282 (pupa_arg_parse): New prototype.
13283 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13284 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13285 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13286 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13287 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13288 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13289 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13290 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13291 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13292 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13293 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13294 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13295 * kern/disk.c: Include <pupa/file.h>.
13296 (pupa_print_partinfo): New function.
13297 * kern/dl.c: Include <pupa/env.h>.
13298 (pupa_dl_dir): Variable removed.
13299 (pupa_dl_load): Use the environment variable `prefix' instead of
13300 the variable pupa_dl_dir.
13301 (pupa_dl_set_prefix): Function removed.
13302 (pupa_dl_get_prefix): Likewise.
13303 * kern/i386/pc/init.c: Include <pupa/env.h>.
13304 (pupa_machine_init): Use the environment variable `prefix' instead of
13305 using pupa_dl_set_prefix to set the prefix.
13306 * kern/main.c: Include <pupa/env.h>.
13307 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13308 using pupa_dl_get_prefix to get the prefix.
13309 * kern/misc.c: Include <pupa/env.h>.
13310 (pupa_isdigit): New function.
13311 (pupa_isgraph): Likewise.
13312 (pupa_ftoa): Likewise.
13313 (pupa_vsprintf): Added support for printing values of the type
13314 `double'. Make it possible to format variable output when using
13315 formatting like `%1.2%f'.
13316 (pupa_split_cmdline): New function.
13317 * kern/rescue.c: Include <pupa/env.h>.
13318 (next_word): Removed function.
13319 (pupa_rescue_cmd_prefix): Likewise.
13320 (pupa_rescue_cmd_set): New function.
13321 (pupa_rescue_cmd_unset): New function.
13322 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13323 split the command line instead of splitting it here. Added
13324 support for setting variables using the syntax `foo=bar'. Don't
13325 initialize the prefix command anymore. Initialized the set and
13326 unset commands.
13327 * normal/cmdline.c: Include <pupa/env.h>.
13328 (pupa_tab_complete): Added prototypes for print_simple_completion,
13329 print_partition_completion, add_completion, iterate_commands,
13330 iterate_dev, iterate_part and iterate_dir. Moved code to print
13331 partition information from here to kern/disk.c.
13332 (pupa_cmdline_run): Don't check if the function exists anymore.
13333 * normal/main.c: Include <pupa/env.h>.
13334 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13335 instead of using pupa_dl_get_prefix to get the prefix.
13336 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13337 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13338 warning.
13339 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13340 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13341 ((unused))' to silence a gcc warning.
13342 (pupa_vga_setcolor): Likewise.
13343 (debug_command): Changed to match argument parsing
13344 interface changes.
13345 * util/pupa-emu.c: Include <pupa/env.h>.
13346 (options): Added 0's for unused fields to silence a gcc warning.
13347 (argp): Likewise.
13348 (main): Use the environment variable `prefix' instead of using
13349 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13350 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13351 and terminal.
13352
13353 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13354 * util/misc.c: Include <malloc.h>.
13355 (pupa_malloc): Rewritten so errors are correctly reported.
13356 (pupa_realloc): Likewise.
13357 (pupa_memalign): Likewise.
13358 (pupa_mm_init_region): Declare unused variables with
13359 `__attribute__ ((unused))' to silence a gcc warning.
13360 * normal/i386/setjmp.S: Remove tab at the end of the file to
13361 silence a gcc warning.
13362 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13363 variables with `__attribute__ ((unused))' to silence a gcc
13364 warning.
13365 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13366 local variable i unsigned to silence a gcc warning.
13367
13368 * kern/term.c: Include <pupa/misc.h>.
13369 (pupa_more_lines): New variable.
13370 (pupa_more): Likewise.
13371 (pupa_putcode): When the pager is active pause at the end of every
13372 screen.
13373 (pupa_set_more): New function.
13374 * include/pupa/term.h (pupa_set_more): New prototype.
13375
13376
13377 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13378
13379 Now this project is GRUB 2 rather than PUPA. The location of
13380 the CVS repository was moved to GRUB's.
13381
13382 * configure.ac: Use bug-grub as the reporting address.
13383 Use GRUB instead of PUPA.
13384 Change the version number to 1.90.
13385
13386 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13387
13388 * genkernsyms.sh: Updated copyright information.
13389 * genmk.rb: Likewise.
13390 * genmodsrc.sh: Likewise.
13391 * gensymlist.sh: Likewise.
13392 * boot/i386/pc/boot.S: Likewise.
13393 * boot/i386/pc/diskboot.S: Likewise.
13394 * disk/i386/pc/biosdisk.c: Likewise.
13395 * disk/i386/pc/partition.c: Likewise.
13396 * font/manager.c: Likewise.
13397 * fs/ext2.c: Likewise.
13398 * fs/fat.c: Likewise.
13399 * include/pupa/boot.h: Likewise.
13400 * include/pupa/device.h: Likewise.
13401 * include/pupa/disk.h: Likewise.
13402 * include/pupa/dl.h: Likewise.
13403 * include/pupa/elf.h: Likewise.
13404 * include/pupa/err.h: Likewise.
13405 * include/pupa/file.h: Likewise.
13406 * include/pupa/font.h: Likewise.
13407 * include/pupa/fs.h: Likewise.
13408 * include/pupa/kernel.h: Likewise.
13409 * include/pupa/loader.h: Likewise.
13410 * include/pupa/misc.h: Likewise.
13411 * include/pupa/mm.h: Likewise.
13412 * include/pupa/net.h: Likewise.
13413 * include/pupa/normal.h: Likewise.
13414 * include/pupa/rescue.h: Likewise.
13415 * include/pupa/setjmp.h: Likewise.
13416 * include/pupa/symbol.h: Likewise.
13417 * include/pupa/term.h: Likewise.
13418 * include/pupa/types.h: Likewise.
13419 * include/pupa/i386/setjmp.h: Likewise.
13420 * include/pupa/i386/types.h: Likewise.
13421 * include/pupa/i386/pc/biosdisk.h: Likewise.
13422 * include/pupa/i386/pc/boot.h: Likewise.
13423 * include/pupa/i386/pc/console.h: Likewise.
13424 * include/pupa/i386/pc/init.h: Likewise.
13425 * include/pupa/i386/pc/kernel.h: Likewise.
13426 * include/pupa/i386/pc/linux.h: Likewise.
13427 * include/pupa/i386/pc/loader.h: Likewise.
13428 * include/pupa/i386/pc/memory.h: Likewise.
13429 * include/pupa/i386/pc/multiboot.h: Likewise.
13430 * include/pupa/i386/pc/partition.h: Likewise.
13431 * include/pupa/i386/pc/time.h: Likewise.
13432 * include/pupa/i386/pc/vga.h: Likewise.
13433 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13434 * include/pupa/util/getroot.h: Likewise.
13435 * include/pupa/util/misc.h: Likewise.
13436 * include/pupa/util/resolve.h: Likewise.
13437 * kern/device.c: Likewise.
13438 * kern/disk.c: Likewise.
13439 * kern/dl.c: Likewise.
13440 * kern/err.c: Likewise.
13441 * kern/file.c: Likewise.
13442 * kern/fs.c: Likewise.
13443 * kern/loader.c: Likewise.
13444 * kern/main.c: Likewise.
13445 * kern/misc.c: Likewise.
13446 * kern/mm.c: Likewise.
13447 * kern/rescue.c: Likewise.
13448 * kern/term.c: Likewise.
13449 * kern/i386/dl.c: Likewise.
13450 * kern/i386/pc/init.c: Likewise.
13451 * kern/i386/pc/lzo1x.S: Likewise.
13452 * kern/i386/pc/startup.S: Likewise.
13453 * loader/i386/pc/chainloader.c: Likewise.
13454 * loader/i386/pc/linux.c: Likewise.
13455 * loader/i386/pc/multiboot.c: Likewise.
13456 * normal/cmdline.c: Likewise.
13457 * normal/command.c: Likewise.
13458 * normal/main.c: Likewise.
13459 * normal/menu.c: Likewise.
13460 * normal/i386/setjmp.S: Likewise.
13461 * term/i386/pc/console.c: Likewise.
13462 * term/i386/pc/vga.c: Likewise.
13463 * util/console.c: Likewise.
13464 * util/genmoddep.c: Likewise.
13465 * util/misc.c: Likewise.
13466 * util/pupa-emu.c: Likewise.
13467 * util/resolve.c: Likewise.
13468 * util/unifont2pff.rb: Likewise.
13469 * util/i386/pc/biosdisk.c: Likewise.
13470 * util/i386/pc/getroot.c: Likewise.
13471 * util/i386/pc/pupa-mkimage.c: Likewise.
13472 * util/i386/pc/pupa-setup.c: Likewise.
13473
13474 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13475
13476 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13477 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13478 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13479 reading and reset it after reading.
13480 (pupa_ext2_close): Return PUPA_ERR_NONE.
13481
13482 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13483 Correct value.
13484 (struct linux_kernel_header): Add kernel_version and
13485 initrd_addr_max.
13486 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13487 pupa_file_read succeeds.
13488 (pupa_rescue_cmd_initrd): Implement.
13489
13490 2003-12-03 Marco Gerards <metgerards@student.han.nl>
13491
13492 * fs/ext2.c (pupa_ext2_label): New function.
13493 (pupa_ext2_fs): Added label.
13494 * fs/fat.c (pupa_fat_label): New function.
13495 (pupa_fat_fs): Added label.
13496 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13497
13498 * kern/misc.c (pupa_strndup): New function.
13499 * include/pupa/misc.h (pupa_strndup): New prototype.
13500
13501 * include/pupa/normal.h: Include <pupa/err.h>.
13502 (pupa_set_history): New prototype.
13503 (pupa_iterate_commands): New prototype.
13504 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13505 <pupa/disk.h>, <pupa/file.h>.
13506 (hist_size): New variable.
13507 (hist_lines): Likewise.
13508 (hist_end): Likewise.
13509 (hist_used): Likewise.
13510 (pupa_set_history): New function.
13511 (pupa_history_get): Likewise.
13512 (pupa_history_add): Likewise.
13513 (pupa_history_replace): Likewise.
13514 (pupa_tab_complete): Likewise.
13515 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13516 completion shows partitionnames while completing partitions, this
13517 feature was suggested by Jeff Bailey.
13518 * normal/command.c (pupa_iterate_commands): New function.
13519 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13520 (pupa_normal_init): Initialize history buffer.
13521 (PUPA_MOD_INIT): Likewise.
13522 (pupa_normal_fini): Free the history buffer.
13523 (PUPA_MOD_FINI): Likewise.
13524
13525 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13526 key.
13527
13528 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13529 * configure.ac [i386]: Check for regparam bug.
13530 (NESTED_FUNC_ATTR) [! i386]: Defined.
13531
13532 2003-11-17 Marco Gerards <metgerards@student.han.nl>
13533
13534 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13535 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13536 (pupa_emu_SOURCES): New variable.
13537 (pupa_emu_LDFLAGS): Likewise.
13538 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13539 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13540 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13541 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13542 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13543 (pupa_jmp_buf): New typedef.
13544 (pupa_setjmp) [PUPA_UTIL]: New macro.
13545 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13546 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13547 (pupa_refresh): New prototype.
13548 * include/pupa/util/getroot.h: New file.
13549 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13550 it.
13551 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13552 (pupa_rescue_cmd_cat): Likewise.
13553 (pupa_rescue_cmd_ls): Likewise.
13554 (pupa_rescue_cmd_testload): Likewise.
13555 (pupa_rescue_cmd_lsmod): Likewise.
13556 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13557 * normal/menu.c (run_menu): Likewise.
13558 * kern/term.c (pupa_cls): Likewise.
13559 (pupa_refresh): New function.
13560 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13561 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13562 * util/console.c: New file.
13563
13564 * util/i386/pc/getroot.c: New file.
13565 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13566 (pupa_putchar): New function.
13567 (pupa_refresh): Likewise.
13568 (xgetcwd): Function moved to ...
13569 (strip_extra_slashes): Likewise.
13570 (get_prefix): Likewise.
13571 * util/i386/pc/getroot.c: ... here.
13572 (find_root_device): Function moved and renamed to...
13573 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13574 Changed all callers.
13575 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13576 and renamed to...
13577 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13578 Changed all callers.
13579 * util/misc.c (pupa_memalign): New function.
13580 (pupa_mm_init_region): Likewise.
13581 (pupa_register_exported_symbols): Likewise.
13582 (pupa_putchar): Function removed.
13583 * util/pupa-emu.c: New file.
13584
13585 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13586
13587 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13588 (_multiboot_mod_SOURCES): New variable.
13589 (_multiboot_mod_CFLAGS): Likewise.
13590 * loader/i386/pc/multiboot.c: New file.
13591 * include/pupa/i386/pc/multiboot.h: Likewise.
13592 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13593 (pupa_multiboot_real_boot): New function.
13594 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13595 (pupa_multiboot_real_boot): New prototype.
13596 (pupa_rescue_cmd_multiboot): Likewise
13597 (pupa_rescue_cmd_module): Likewise.
13598
13599 * kern/loader.c (pupa_loader_set): Continue when
13600 pupa_loader_unload_func() fails.
13601 (pupa_loader_unset): New function.
13602 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13603
13604 * kern/misc.c (pupa_stpcpy): New function.
13605 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13606
13607 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13608
13609 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13610 for available extensions.
13611
13612 * include/pupa/i386/pc/time.h: New file.
13613 * kern/disk.c: Include <pupa/machine/time.h>.
13614 (PUPA_CACHE_TIMEOUT): New macro.
13615 (pupa_last_time): New variable.
13616 (pupa_disk_open): Flush the cache when there was a timeout.
13617 (pupa_disk_close): Reset the timer.
13618 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13619 pupa_currticks.
13620 * util/misc.c: Include <sys/times.h>
13621 (pupa_get_rtc): New function.
13622
13623 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13624
13625 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13626 as blocks.
13627 (pupa_ext2_get_file_block): Use blocks member.
13628
13629 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13630 first block. Return -1 instead of pupa_errno on error.
13631
13632 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13633
13634 * README: In the pupa-mkimage example use _chain instead of chain
13635 and ext2 instead of fat.
13636 * TODO: Replace ext2fs with jfs as an example. Add an item for
13637 adding journal playback for ext2fs.
13638 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13639 (pkgdata_MODULES): Added ext2.mod.
13640 (ext2_mod_SOURCES): New variable.
13641 (ext2_mod_CFLAGS): Likewise.
13642 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13643 * include/pupa/misc.h (pupa_strncpy): New prototype.
13644 (pupa_strcat): Likewise.
13645 (pupa_strncmp): Likewise.
13646 * kern/misc.c (pupa_strcat): Enable function.
13647 (pupa_strncpy): New function.
13648 (pupa_strncmp): Likewise.
13649 * fs/ext2.c: New file.
13650
13651 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13652 when the read failed before retrying.
13653 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13654 (_FILE_OFFSET_BITS): Likewise.
13655 * configure.ac: Added AC_SYS_LARGEFILE.
13656
13657 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13658
13659 * genmk.rb (PModule#rule): Make sure to get only symbol names
13660 from the output of nm.
13661 Reported by Robert Millan <zeratul2@wanadoo.es>.
13662
13663 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13664
13665 I forgot to check in these changes for a long time. This adds
13666 incomplete support for VGA console, and this is still very
13667 buggy. Also, a lot of consideration is required for I18N,
13668 UNICODE, and VGA font issues. Therefore, assume that this is
13669 such that "better than nothing".
13670
13671 * font/manager.c: New file.
13672 * include/pupa/font.h: Likewise.
13673 * include/pupa/i386/pc/vga.h: Likewise.
13674 * term/i386/pc/vga.c: Likewise.
13675 * util/unifont2pff.rb: Likewise.
13676
13677 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13678 (pkgdata_MODULES): Added vga.mod and font.mod.
13679 (vga_mod_SOURCES): New variables.
13680 (vga_mod_CFLAGS): Likewise.
13681 (font_mod_SOURCES): Likewise.
13682 (font_mod_CFLAGS): Likewise.
13683
13684 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13685
13686 * include/pupa/term.h: Include pupa/err.h.
13687 (struct pupa_term): Added init and fini.
13688 Changed the argument of putchar to pupa_uint32_t.
13689
13690 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13691 (pupa_console_real_putchar): New prototype.
13692 (pupa_console_putchar): Removed.
13693 (pupa_console_checkkey): Exported.
13694 (pupa_console_getkey): Likewise.
13695
13696 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13697 characters.
13698
13699 * kern/term.c (pupa_term_set_current): Rewritten.
13700 (pupa_putchar): Likewise.
13701 (pupa_putcode): New function.
13702
13703 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13704 (pupa_console_real_putchar): ... this.
13705 (pupa_vga_set_mode): New function.
13706 (pupa_vga_get_font): Likewise.
13707
13708 * normal/command.c: Include pupa/term.h.
13709 (terminal_command): New function.
13710 (pupa_command_init): Register the command "terminal".
13711
13712 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13713 (DISP_UP): Likewise.
13714 (DISP_RIGHT): Likewise.
13715 (DISP_DOWN): Likewise.
13716 (DISP_HLINE): Likewise.
13717 (DISP_VLINE): Likewise.
13718 (DISP_UL): Likewise.
13719 (DISP_UR): Likewise.
13720 (DISP_LL): Likewise.
13721 (DISP_LR): Likewise.
13722
13723 * term/i386/pc/console.c (pupa_console_putchar): New function.
13724
13725 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13726
13727 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13728 FIX. Reverse the path_list.
13729
13730 * include/pupa/normal.h: Export pupa_register_command and
13731 pupa_unregister_command.
13732
13733 * hello/hello.c (pupa_cmd_hello): New module.
13734 * conf/i386-pc.rmk: Added hello.mod.
13735
13736 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13737
13738 * kern/i386/pc/lzo1x.S: New file.
13739
13740 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13741 (compress_kernel): New variable.
13742 (generate_image): Heavily modified to support compressing a
13743 large part of the core image.
13744
13745 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13746 leak.
13747 (pupa_util_load_image): New function.
13748
13749 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13750 (pupa_compressed_size): New variable.
13751 (codestart): Enable Gate A20 here.
13752 Decompress the compressed part of the core image.
13753 Rearrange the code to put functions and variables which are
13754 required for initialization in the non-compressed part.
13755 Include lzo1x.S.
13756
13757 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13758 here.
13759
13760 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13761
13762 * include/pupa/i386/pc/kernel.h
13763 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13764 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13765 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13766 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13767 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13768
13769 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13770
13771 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13772 (Utility#rule): Likewise.
13773
13774 * configure.ac: Check if LZO is available.
13775
13776 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13777
13778 * include/pupa/normal.h: New file.
13779 * include/pupa/setjmp.h: Likewise.
13780 * include/pupa/i386/setjmp.h: Likewise.
13781 * normal/cmdline.c: Likewise.
13782 * normal/command.c: Likewise.
13783 * normal/main.c: Likewise.
13784 * normal/menu.c: Likewise.
13785 * normal/i386/setjmp.S: Likewise.
13786
13787 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13788 (pupa_rescue_cmd_initrd): Likewise.
13789
13790 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13791 Likewise.
13792
13793 * kern/i386/pc/startup.S (translation_table): New variable.
13794 (translate_keycode): New function.
13795 (pupa_console_getkey): Call translate_keycode.
13796
13797 * kern/rescue.c (attempt_normal_mode): New function.
13798 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13799 it failed, print a message.
13800
13801 * kern/mm.c (pupa_real_malloc): Print more information when a
13802 free magic is broken.
13803 (pupa_free): If the first free header is not free actually, set
13804 it to P.
13805
13806 * kern/main.c (pupa_load_normal_mode): Just load the module
13807 "normal".
13808 (pupa_main): Don't print the message
13809 "Entering into rescue mode..." here.
13810
13811 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13812 Declared.
13813 (pupa_rescue_cmd_initrd): Likewise.
13814 (pupa_rescue_cmd_initrd): Likewise.
13815
13816 * include/pupa/symbol.h (FUNCTION): Specify the type.
13817 (VARIABLE): Likewise.
13818
13819 * include/pupa/err.h (pupa_err_t): Added
13820 PUPA_ERR_UNKNOWN_COMMAND.
13821
13822 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13823 (pupa_dl_get_prefix): Likewise.
13824
13825 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13826 Added _chain.mod and _linux.mod instead of chain.mod and
13827 linux.mod.
13828 (chain_mod_SOURCES): Renamed to ...
13829 (_chain_mod_SOURCES): ... this.
13830 (chain_mod_CFLAGS): Renamed to ...
13831 (_chain_mod_CFLAGS): ... this.
13832 (linux_mod_SOURCES): Renamed to ...
13833 (_linux_mod_SOURCES): ... this.
13834 (linux_mod_CFLAGS): Renamed to ...
13835 (_linux_mod_CFLAGS): ... this.
13836 (normal_mod_SOURCES): New variable.
13837 (normal_mod_CFLAGS): Likewise.
13838 (normal_mod_ASFLAGS): Likewise.
13839
13840 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13841
13842 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13843 possible.
13844
13845 * kern/dl.c (pupa_dl_ref): Refer depending modules
13846 recursively.
13847 (pupa_dl_unref): Unrefer depending modules recursively.
13848 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13849 a module is unloaded before one depending on that module is
13850 unloaded.
13851 (pupa_dl_unload): Unload depending modules explicitly,
13852 if possible.
13853
13854 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13855
13856 * include/pupa/i386/pc/linux.h: New file.
13857 * loader/i386/pc/linux.c: Likewise.
13858
13859 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13860 Removed.
13861 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13862 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13863 of PUPA_CHAINLOADER_BOOT_SECTOR.
13864
13865 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13866 (pupa_linux_prot_size): New variable.
13867 (pupa_linux_tmp_addr): Likewise.
13868 (pupa_linux_real_addr): Likewise.
13869 (pupa_linux_boot_zimage): New function.
13870 (pupa_linux_boot_bzimage): Likewise.
13871
13872 * kern/i386/pc/init.c (struct mem_region): New structure.
13873 (MAX_REGIONS): New macro.
13874 (mem_regions): New variable.
13875 (num_regions): Likewise.
13876 (pupa_os_area_addr): Likewise.
13877 (pupa_os_area_size): Likewise.
13878 (pupa_lower_mem): Likewise.
13879 (pupa_upper_mem): Likewise.
13880 (add_mem_region): New function.
13881 (compact_mem_regions): Likewise.
13882 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13883 the size of the conventional memory and that of so-called upper
13884 memory (before the first memory hole).
13885 Instead of adding each found region to free memory, use
13886 add_mem_region and add them after removing overlaps.
13887 Also, add only 1/4 of the upper memory to free memory. The rest
13888 is used for loading OS images. Maybe this is ad hoc, but this
13889 makes it much easier to relocate OS images when booting.
13890
13891 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13892 (pupa_enter_rescue_mode): Don't register initrd and module.
13893
13894 * kern/mm.c: Include pupa/dl.h.
13895
13896 * kern/main.c: Include pupa/file.h and pupa/device.h.
13897
13898 * kern/loader.c (pupa_loader_load_module_func): Removed.
13899 (pupa_loader_load_module): Likewise.
13900
13901 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13902 ``.o''.
13903
13904 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13905 (pupa_linux_tmp_addr): Likewise.
13906 (pupa_linux_real_addr): Likewise.
13907 (pupa_linux_boot_zimage): Likewise.
13908 (pupa_linux_boot_bzimage): Likewise.
13909
13910 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13911 (pupa_upper_mem): Likewise.
13912 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13913 module is too dangerous.
13914
13915 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13916 (pupa_os_area_size): Likewise.
13917 (pupa_loader_set): Remove the first argument. Loader doesn't
13918 manage modules or initrd any longer.
13919 (pupa_loader_load_module): Removed.
13920
13921 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13922 (linux_mod_SOURCES): New variable.
13923 (linux_mod_CFLAGS): Likewise.
13924
13925 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13926
13927 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13928 the length of a blocklist correctly.
13929
13930 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13931 Use ioctl only if the OS file is a block device.
13932 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13933 not very useful for normal files.
13934
13935 * kern/main.c (pupa_set_root_dev): New function.
13936 (pupa_load_normal_mode): Likewise.
13937 (pupa_main): Call those above.
13938
13939 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13940 pupa_uint16_t.
13941
13942 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13943
13944 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13945
13946 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13947 (setup): Configure the installed partition information and the
13948 dl prefix.
13949
13950 * loader/i386/pc/chainloader.c (my_mod): New variable.
13951 (pupa_chainloader_unload): New function.
13952 (pupa_rescue_cmd_chainloader): Refer itself.
13953 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13954
13955 * kern/i386/pc/startup.S (install_partition): Removed.
13956 (version_string): Likewise.
13957 (config_file): Likewise.
13958 (pupa_install_dos_part): New variable.
13959 (pupa_install_bsd_part): Likewise.
13960 (pupa_prefix): Likewise.
13961 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13962
13963 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13964 and pupa/misc.h.
13965 (make_install_device): New function.
13966 (pupa_machine_init): Set the dl prefix.
13967
13968 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13969 (buf): Renamed to ...
13970 (linebuf): ... this.
13971 (pupa_rescue_cmd_prefix): New function.
13972 (pupa_rescue_cmd_insmod): Likewise.
13973 (pupa_rescue_cmd_rmmod): Likewise.
13974 (pupa_rescue_cmd_lsmod): Likewise.
13975 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13976 rmmod and lsmod.
13977
13978 * kern/mm.c (pupa_memalign): If failed even after invalidating
13979 disk caches, unload unneeded modules and retry.
13980
13981 * kern/misc.c (pupa_memmove): New function.
13982 (pupa_memcpy): Removed.
13983 (pupa_strcpy): New function.
13984 (pupa_itoa): Made static.
13985
13986 * kern/dl.c (pupa_dl_iterate): New function.
13987 (pupa_dl_ref): Likewise.
13988 (pupa_dl_unref): Likewise.
13989 (pupa_dl_unload): Return if succeeded or not.
13990 (pupa_dl_unload_unneeded): New function.
13991 (pupa_dl_unload_all): Likewise.
13992 (pupa_dl_init): Renamed to ...
13993 (pupa_dl_set_prefix): ... this.
13994 (pupa_dl_get_prefix): New function.
13995
13996 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13997 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13998 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13999 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14000 (pupa_install_dos_part): Declared.
14001 (pupa_install_bsd_part): Likewise.
14002 (pupa_prefix): Likewise.
14003 (pupa_boot_drive): Likewise.
14004
14005 * include/pupa/types.h: Fix a typo.
14006
14007 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14008 pupa_memmove.
14009 (pupa_memmove): Declared.
14010 (pupa_strcpy): Likewise.
14011
14012 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14013 pupa_mod_init takes one argument, its own module.
14014 (pupa_dl_unload_unneeded): Declared.
14015 (pupa_dl_unload_all): Likewise.
14016 (pupa_dl_ref): Likewise.
14017 (pupa_dl_unref): Likewise.
14018 (pupa_dl_iterate): Likewise.
14019 (pupa_dl_init): Renamed to ...
14020 (pupa_dl_set_prefix): ... this.
14021 (pupa_dl_get_prefix): Declared.
14022
14023 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14024 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14025 unloaded.
14026 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14027 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14028
14029 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14030 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14031
14032 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14033
14034 * util/i386/pc/pupa-setup.c (setup): Define the internal
14035 function find_first_partition_start at the top level, because GCC
14036 3.0.x cannot compile internal functions in deeper scopes
14037 correctly.
14038 (find_root_device): Use lstat instead of stat.
14039 Don't follow symbolic links.
14040 Fix the path-constructing code.
14041
14042 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14043 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14044 by a BLKGETSIZE ioctl first, because block devices don't fill
14045 the member st_mode of the structure stat on Linux.
14046 [__linux__] (linux_find_partition): Use a temporary buffer
14047 REAL_DEV for the working space. Copy it to DEV before returning.
14048 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14049 buffer cache consistent.
14050 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14051 strncmp. The previous value was merely wrong.
14052 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14053
14054 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14055 FAT size is 12. The previous value was merely wrong.
14056
14057 * kern/main.c (pupa_main): Don't split the starting message from
14058 newlines.
14059
14060 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14061 LF, because BIOS goes crazy about character attributes in this
14062 case.
14063
14064 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14065
14066 * include/i386/pc/util/biosdisk.h: New file.
14067 * util/i386/pc/biosdisk.c: Likewise.
14068 * util/i386/pc/pupa-setup.c: Likewise.
14069
14070 * Makefile.in (INCLUDE_DISTFILES): Added
14071 include/pupa/i386/pc/util/biosdisk.h.
14072 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14073 directory util/i386/pc.
14074 (install-local): Added a rule for sbin_UTILITIES.
14075 (uninstall): Likewise.
14076
14077 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14078
14079 * util/misc.c (xrealloc): New function.
14080 (pupa_malloc): Likewise.
14081 (pupa_free): Likewise.
14082 (pupa_realloc): Likewise.
14083 (pupa_stop): Likewise.
14084 (pupa_putchar): Likewise.
14085
14086 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14087
14088 * include/pupa/util/misc.h (xrealloc): Declared.
14089
14090 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14091 macro.
14092 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14093 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14094
14095 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14096 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14097
14098 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14099 way should be implemented.
14100 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14101
14102 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14103 the size of NAME for safety.
14104 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14105 0x88.
14106
14107 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14108 (pupa_setup_SOURCES): Likewise.
14109
14110 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14111
14112 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14113
14114 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14115 bunch of pushl's from pusha, because this destroys the return
14116 value.
14117
14118 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14119
14120 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14121 This means that any missing prototypes could be fatal. Also, you
14122 must take care when writing assembly code. See the comments at
14123 the beginning of startup.S, for more details.
14124
14125 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14126 compilation mechanism.
14127 (pupa_chainloader_real_boot): Likewise.
14128 (pupa_biosdisk_rw_int13_extensions): Likewise.
14129 (pupa_biosdisk_rw_standard): Likewise.
14130 (pupa_biosdisk_check_int13_extensions): Likewise.
14131 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14132 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14133 (pupa_get_memsize): Likewise.
14134 (pupa_get_mmap_entry): Likewise.
14135 (pupa_console_putchar): Likewise.
14136 (pupa_console_setcursor): Likewise.
14137 (pupa_getrtsecs): Use pushl instead of push.
14138
14139 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14140 memory instead of the stack for a mmap entry, because some
14141 BIOSes may ignore the maximum size and overflow.
14142
14143 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14144
14145 * genmk.rb (PModule#rule): Compile automatically generated
14146 sources with module-specific CFLAGS as well as other sources.
14147
14148 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14149
14150 * configure.ac: Check ld.
14151 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14152 respectively, before checking endianness and sizes.
14153
14154 * Makefile.in (LD): New variable.
14155
14156 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14157
14158 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14159
14160 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14161
14162 * Changelog: New file.
14163