]> git.proxmox.com Git - grub2.git/blob - ChangeLog
2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
[grub2.git] / ChangeLog
1 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2
3 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4 volume name mapping to support bigger than 9 character names properly.
5
6 2008-04-13 Robert Millan <rmh@aybabtu.com>
7
8 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10
11 2008-04-13 Christian Franke <franke@computer.org>
12
13 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
14 to create a floppy emulation boot CD when non emulation mode
15 does not work.
16 Enable Joliet CD filesystem extension.
17
18 2008-04-13 Robert Millan <rmh@aybabtu.com>
19
20 * kern/misc.c (grub_strncat): Fix off-by-one error.
21 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
22
23 * kern/env.c (grub_env_context_close): Clear current context, not
24 previous one.
25 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
26
27 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
28
29 2008-04-13 Robert Millan <rmh@aybabtu.com>
30
31 Improve robustness when handling LVM.
32
33 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
34 (and leave `*p' unmodified).
35 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
36 through it.
37 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
38 iterating through it.
39 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
40 through it.
41 (grub_lvm_scan_device): Check the return value (and fail gracefuly
42 when due) on each grub_lvm_getvalue() or grub_strstr() call.
43 Don't assume `vg->pvs != NULL' when iterating through it.
44
45 2008-04-13 Robert Millan <rmh@aybabtu.com>
46
47 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
48 * genmk.rb (partmap): New variable.
49 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
50 (#{partmap}): New target rule.
51 * genpartmaplist.sh: New file.
52 * Makefile.in (pkglib_DATA): Add partmap.lst.
53 (partmap.lst): New target rule.
54 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
55 modules (including all partition maps), instead of preloading them.
56
57 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
58
59 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
60 `linux-boot-prober' (if installed) to detect other operating
61 systems which are installed on the computer and add them to
62 the boot menu.
63 * conf/common.rmk: Build and install 30_os-prober.
64
65 2008-04-12 Robert Millan <rmh@aybabtu.com>
66
67 * kern/powerpc/ieee1275/init.c: Move from here ...
68 * kern/ieee1275/init.c: ... to here. Update all users.
69
70 * kern/powerpc/ieee1275/cmain.c: Move from here ...
71 * kern/ieee1275/cmain.c: ... to here. Update all users.
72
73 * kern/powerpc/ieee1275/openfw.c: Move from here ...
74 * kern/ieee1275/openfw.c: ... to here. Update all users.
75
76 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
77 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
78
79 2008-04-10 Pavel Roskin <proski@gnu.org>
80
81 * configure.ac: Always use "_cv_" in cache variables for
82 compatibility with Autoconf 2.62.
83
84 2008-04-07 Robert Millan <rmh@aybabtu.com>
85
86 Revert grub/machine/init.h addition by Pavel (since it breaks on
87 i386-ieee1275 and others):
88 * util/i386/pc/misc.c: Remove grub/machine/init.h.
89 * util/powerpc/ieee1275/misc.c: Likewise.
90
91 2008-04-07 Robert Millan <rmh@aybabtu.com>
92
93 * util/grub-probe.c (probe): Improve error message.
94
95 2008-04-07 Robert Millan <rmh@aybabtu.com>
96
97 * util/biosdisk.c (read_device_map): Skip devices that don't exist
98 (this prevents the presence of a bogus entry from ruining the whole
99 thing).
100
101 2008-04-06 Pavel Roskin <proski@gnu.org>
102
103 * util/biosdisk.c: Include grub/util/biosdisk.h.
104 * util/grub-fstest.c (execute_command): Make static.
105 * util/grub-mkdevicemap.c (check_device): Likewise.
106 * util/i386/pc/misc.c: Include grub/machine/init.h.
107 * util/powerpc/ieee1275/misc.c: Likewise.
108 * util/lvm.c: Include grub/util/lvm.h.
109 * util/misc.c: Include grub/kernel.h, grub/misc.h and
110 grub/cache.h.
111 * util/raid.c: Include grub/util/raid.h.
112 (grub_util_getdiskname): Make static.
113
114 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
115 grub_hostfs_fini(), as they are called from grub_init_all() and
116 grub_fini_all() respectively. This fixes an infinite loop in
117 grub-fstest due to double registration of hostfs.
118 Reported by Christian Franke <Christian.Franke@t-online.de>
119
120 2008-04-05 Pavel Roskin <proski@gnu.org>
121
122 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
123 all 8 functions. Otherwise, probe function 0 only.
124
125 2008-04-04 Pavel Roskin <proski@gnu.org>
126
127 * commands/lspci.c (grub_lspci_iter): Print the bus number
128 correctly.
129
130 * commands/lspci.c (grub_pci_classes): Fix typos.
131 (grub_lspci_iter): Don't print func twice. Print vendor ID
132 before device ID, as it's normally done.
133
134 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
135 Fix signedness warnings.
136 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
137 Likewise.
138 * util/ieee1275/get_disk_name.c: Include config.h so that
139 _GNU_SOURCE is defined and getline() is declared. Mark an
140 unused argument as such. Fix a signedness warning.
141
142 2008-04-02 Pavel Roskin <proski@gnu.org>
143
144 * genkernsyms.sh.in: Use more robust assignments for CC and
145 srcdir. Quote srcdir.
146 * gensymlist.sh.in: Likewise. Assert at the compile time that
147 the symbol table is not empty.
148
149 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
150 * fs/cpio.c (grub_cpio_read): Likewise.
151
152 2008-04-01 Pavel Roskin <proski@gnu.org>
153
154 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
155 * disk/host.c (grub_host_open): Likewise.
156 * disk/loopback.c (grub_loopback_open): Likewise.
157 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
158 disk->id as in disk/host.c, not a multi-character constant.
159
160 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
161 later is obsolete, potentially dangerous and sets a bad example.
162 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
163 * util/misc.c (grub_util_get_image_size): Likewise.
164
165 * disk/loopback.c (options): Improve help for "--partitions".
166
167 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
168 options to align them with the short options, e.g. "echo -e".
169
170 2008-03-31 Bean <bean123ch@gmail.com>
171
172 * video/reader/png.c (grub_png_data): New member is_16bit and
173 image_data.
174 (grub_png_decode_image_header): Detect 16 bit png image.
175 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
176 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
177 (grub_video_reader_png): Release memory occupied by image_data.
178
179 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
180 4096 bytes.
181 (grub_nfs_mount): Skip the test for sector per cluster.
182
183 * include/grub/ntfs.h (MAX_SPC): Removed.
184
185 2008-03-31 Bean <bean123ch@gmail.com>
186
187 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
188 (grub_probe_SOURCES): Add fs/afs.c.
189 (grub_fstest_SOURCES): Likewise.
190 (afs_mod_SOURCES): New variable.
191 (afs_mod_CFLAGS): Likewise.
192 (afs_mod_LDFLAGS): Likewise.
193
194 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
195 (grub_emu_SOURCES): Likewise.
196
197 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
198
199 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
200
201 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
202
203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
204
205 * fs/afs.c: New file.
206
207 2008-03-30 Pavel Roskin <proski@gnu.org>
208
209 * disk/host.c: Include grub/misc.h to fix a warning.
210 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
211 warnings about implicit declarations.
212
213 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
214 variable.
215 * include/grub/i386/loader.h: Change declaration of
216 grub_linux_boot() to match what grub_loader_set() expects.
217 * util/getroot.c (grub_guess_root_device): Return const char* to
218 fix a warning.
219 * util/grub-probe.c (probe): Fix a warning about uninitialized
220 abstraction_name variable.
221 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
222 second argument as unused to fix a warning.
223
224 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
225 missing grub_error() call.
226
227 * util/update-grub_lib.in: Define datarootdir, since Autoconf
228 2.60 and newer uses it to define datadir.
229
230 * commands/sleep.c: Fix warning about implicit declaration.
231 * disk/memdisk.c: Likewise.
232 * loader/aout.c: Likewise.
233 * loader/i386/bsd_normal.c: Likewise.
234 * util/grub-probe.c: Likewise.
235
236 * commands/i386/cpuid.c (has_longmode): Make static.
237 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
238 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
239
240 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
241 GDT. This is more robust, as %ds can change.
242 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
243 calling real_to_prot().
244 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
245
246 2008-03-28 Pavel Roskin <proski@gnu.org>
247
248 * kern/i386/pc/startup.S: Assert that uncompressed functions
249 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
250 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
251 code, as they push parts of the code (error handlers) beyond
252 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
253 code as correctness and size.
254
255 2008-03-28 Pavel Roskin <proski@gnu.org>
256
257 * kern/i386/pc/startup.S
258 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
259 data block address to the real mode, keep offset minimal. This
260 works around a bug in AWARD BIOS on old Athlon systems, which
261 makes CD detection hang.
262
263 2008-03-26 Pavel Roskin <proski@gnu.org>
264
265 * normal/color.c (grub_parse_color_name_pair): Make `name' a
266 const.
267 * include/grub/normal.h: Add grub_parse_color_name_pair()
268 declaration.
269
270 2008-03-24 Bean <bean123ch@gmail.com>
271
272 * disk/i386/pc/biosdisk.c (cd_start): Removed.
273 (cd_count): Removed.
274 (cd_drive): New variable.
275 (grub_biosdisk_get_drive): Don't check for (cdN) device.
276 (grub_biosdisk_call_hook): Likewise.
277 (grub_biosdisk_iterate): Change cdrom detection method.
278 (grub_biosdisk_open): Replace cd_start with cd_drive.
279 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
280 detect cdrom device.
281
282 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
283 Removed.
284 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
285 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
286 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
287 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
288 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
289 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
290 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
291 (grub_biosdisk_cdrp): New structure.
292 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
293
294 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
295
296 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
297 device.
298
299 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
300 New function.
301
302 2008-03-20 Robert Millan <rmh@aybabtu.com>
303
304 Remove 2 TiB limit in ata.mod.
305 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
306 (grub_ata_dumpinfo): Print sector count with 0x%llx.
307 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
308 grub_uint64_t instead of grub_uint32_t.
309
310 2008-03-05 Bean <bean123ch@gmail.com>
311
312 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
313 (grub_multiboot): Set boot device.
314
315 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
316
317 2008-03-02 Bean <bean123ch@gmail.com>
318
319 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
320 symlink_buffer.
321
322 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
323
324 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
325 texinfo.tex.
326
327 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
328 modified.
329
330 * docs/fdl.texi: New file.
331
332 * docs/mdate-sh: New file. Copied from gnulib.
333 * docs/texinfo.tex: Likewise.
334
335 * config.guess: Updated from gnulib.
336 * install-sh: Likewise.
337
338 2008-02-28 Robert Millan <rmh@aybabtu.com>
339
340 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
341 (aout_mod_SOURCES): New variable.
342 (aout_mod_CFLAGS): Likewise.
343 (aout_mod_LDFLAGS): Likewise.
344
345 * conf/i386-ieee1275.rmk: Likewise.
346
347 2008-02-28 Robert Millan <rmh@aybabtu.com>
348
349 * util/update-grub.in: Reorganise terminal validity check. Accept
350 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
351 Based on suggestion by Franklin PIAT.
352
353 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
354
355 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
356 function.
357 * util/getroot.c (grub_util_check_block_device): New function that
358 returns the given argument if it is a block device and returns NULL else.
359 * util/grub-probe.c (argument_is_device): New variable.
360 (probe): Promote device_name from a variable to an argument. Receive
361 device_name from grub_util_check_block_device() if path is NULL and from
362 grub_guess_root_device() else. Do not free() device_name anymore.
363 (options): Introduce new parameter '-d, --device'.
364 (main): Add description of the new parameter to the help screen.
365 Rename path variable to argument. Set argument_is_device if the '-d'
366 option is given. Pass argument to probe() depending on
367 argument_is_device.
368
369 2008-02-24 Bean <bean123ch@gmail.com>
370
371 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
372 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
373 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
374 (GRUB_ISO9660_VOLDESC_PART): Likewise.
375 (GRUB_ISO9660_VOLDESC_END): Likewise.
376 (grub_iso9660_primary_voldesc): New member escape.
377 (grub_iso9660_data): New member joliet.
378 (grub_iso9660_convert_string): New function.
379 (grub_iso9660_mount): Detect joliet extension.
380 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
381 (grub_iso9660_iso9660_label): Likewise.
382
383 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
384 (grub_setup_SOURCES): Add fs/udf.c.
385 (grub_fstest_SOURCES): Likewise.
386 (udf_mod_SOURCES): New variable.
387 (udf_mod_CFLAGS): Likewise.
388 (udf_mod_LDFLAGS): Likewise.
389
390 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
391 (grub_emu_SOURCES): Likewise.
392
393 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
394
395 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
396
397 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
398
399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
400
401 * fs/udf.c: New file.
402
403 2008-02-24 Robert Millan <rmh@aybabtu.com>
404
405 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
406 (normal/lexer.c_DEPENDENCIES): New variables.
407 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
408 (normal/lexer.c_DEPENDENCIES): Likewise.
409 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
410 (normal/lexer.c_DEPENDENCIES): Likewise.
411 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
412 (normal/lexer.c_DEPENDENCIES): Likewise.
413 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
414 (normal/lexer.c_DEPENDENCIES): Likewise.
415 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
416 (normal/lexer.c_DEPENDENCIES): Likewise.
417
418 2008-02-23 Robert Millan <rmh@aybabtu.com>
419
420 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
421 since they were intended to be in hex. This didn't break previously
422 because of a bug in gpt_partition_map_iterate() (see below).
423
424 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
425 when checking the validity of GPT header.
426 Remove `partno', since it always provides the same information as `i'.
427
428 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
429
430 * include/grub/efi/time.h: Fix a wrong comment.
431
432 2008-02-19 Pavel Roskin <proski@gnu.org>
433
434 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
435 message.
436
437 2008-02-19 Bean <bean123ch@gmail.com>
438
439 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
440 (aout_mod_SOURCES): New variable.
441 (aout_mod_CFLAGS): Likewise.
442 (aout_mod_LDFLAGS): Likewise.
443 (_bsd_mod_SOURCES): New variable.
444 (_bsd_mod_CFLAGS): Likewise.
445 (_bsd_mod_LDFLAGS): Likewise.
446 (bsd_mod_SOURCES): New variable.
447 (bsd_mod_CFLAGS): Likewise.
448 (bsd_mod_LDFLAGS): Likewise.
449
450 * include/grub/aout.h: New file.
451
452 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
453
454 * include/grub/i386/bsd.h: New file.
455
456 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
457 to make it public.
458
459 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
460 function is called, so that it's possible to change it inside the hook.
461 (grub_elf64_load): Likewise.
462 (grub_elf_file): Don't close the file if elf header is not found.
463 (grub_elf_close): Close the file if grub_elf_file fails (The new
464 grub_elf_file won't close it).
465 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
466 (grub_elf64_size): Likewise.
467
468 * kern/i386/loader.S (grub_unix_real_boot): New function.
469
470 * loader/aout.c: New file.
471
472 * loader/i386/bsd.c: New file.
473
474 * loader/i386/bsd_normal.c: New file.
475
476 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
477
478 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
479 can test othe formats.
480
481 2008-02-19 Robert Millan <rmh@aybabtu.com>
482
483 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
484 (grub_gpt_partition_type_empty): Redefine with macro from
485 `<grub/gpt_partition.h>'.
486 (gpt_partition_map_iterate): Adjust partition type comparison.
487
488 Export `entry' as partmap-specific `part.data' struct.
489 (grub_gpt_header, grub_gpt_partentry): Move from here ...
490
491 * include/grub/gpt_partition.h (grub_gpt_header)
492 (grub_gpt_partentry): ... to here (new file).
493
494 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
495
496 (grub_gpt_partition_type_bios_boot): New const variable, defined
497 with macro from `<grub/gpt_partition.h>'.
498
499 (setup): Replace `first_start' with `embed_region', which keeps
500 track of the embed region (and is partmap-agnostic).
501
502 Replace find_first_partition_start() with find_usable_region(),
503 which finds a usable region for embedding using partmap-specific
504 knowledge (supports PC/MSDOS and GPT).
505
506 Fix all assumptions that the embed region start at sector 1, using
507 `embed_region.start' from now on. Similarly, use `embed_region.end'
508 rather than `first_start' to calculate available size.
509
510 In grub_util_info() message, replace "into after the MBR" with an
511 indication of the specific sector our embed region starts at.
512
513 2008-02-19 Robert Millan <rmh@aybabtu.com>
514
515 * DISTLIST: Replace `commands/ieee1275/halt.c' and
516 `commands/ieee1275/reboot.c' with `commands/halt.c' and
517 `commands/reboot.c'.
518 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
519 (halt_mod_SOURCES): Likewise.
520 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
521 (halt_mod_SOURCES): Likewise.
522
523 2008-02-17 Christian Franke <franke@computer.org>
524
525 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
526
527 2008-02-17 Robert Millan <rmh@aybabtu.com>
528
529 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
530 set `first_start' to 0 for non-PC/MSDOS partition maps.
531
532 2008-02-16 Robert Millan <rmh@aybabtu.com>
533
534 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
535 do not assume partition map is PC/MSDOS before performing checks that
536 are specific to that layout.
537
538 2008-02-13 Robert Millan <rmh@aybabtu.com>
539
540 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
541 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
542 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
543
544 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
545
546 * configure.ac: Only a cosmetic change on the handling of
547 -fno-stack-protector.
548
549 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
550
551 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
552 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
553 reboot.c.
554 (grub_install_SOURCES): Add halt.mod and reboot.mod.
555 (halt_mod_SOURCES): New variable.
556 (halt_mod_CFLAGS): Likewise.
557 (halt_mod_LDFLAGS): Likewise.
558 (reboot_mod_SOURCES): Likewise.
559 (reboot_mod_CFLAGS): Likewise.
560 (reboot_mod_LDFLAGS): Likewise.
561
562 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
563 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
564 reboot.c.
565 (halt_mod_SOURCES): Likewise.
566 (reboot_mod_SOURCES): Likewise.
567
568 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
569 commands/i386/pc/reboot.c by commands/reboot.c.
570 (reboot_mod_SOURCES): Likewise.
571
572 * commands/i386/pc/reboot.c: merge this file ...
573
574 * commands/ieee1275/reboot.c: ... and this file ...
575
576 * commands/reboot.c: ... to this file.
577 Add some precompiler directive to include the correct header for
578 each machine.
579
580 * commands/ieee1275/halt.c: move this file ...
581
582 * commands/halt.c: ... to here.
583 Add some precompiler directive to include the correct header for
584 each machine.
585
586 * include/grub/efi/efi.h (grub_reboot): New function declaration.
587 (grub_halt): Likewise.
588
589 * kern/efi/efi.c (grub_reboot): New function.
590 (grub_halt): Likewise.
591
592 2008-02-12 Robert Millan <rmh@aybabtu.com>
593
594 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
595 /dev (like it is done for /dev/mapper). This doesn't provide support
596 for EVMS, but at least it is now easy to identify the problem when it
597 arises.
598
599 2008-02-11 Robert Millan <rmh@aybabtu.com>
600
601 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
602 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
603 comparing it with -1, not 0.
604
605 2008-02-10 Robert Millan <rmh@aybabtu.com>
606
607 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
608 `disk/lvm.c'.
609 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
610 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
611
612 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
613 `disk/lvm.c' to the end of the list.
614 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
615 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
616
617 2008-02-10 Robert Millan <rmh@aybabtu.com>
618
619 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
620 grub_print_error() instead. This will let user know why we're entering
621 rescue mode.
622 Based on suggestions from Sam Morris.
623
624 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
625
626 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
627 on remaining N args, instead of "--" arg N times.
628
629 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
630
631 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
632 (fill_with_default_glyph): Changed to use unknown_glyph for fill
633 pattern for unknown glyphs.
634
635 2008-02-09 Robert Millan <rmh@aybabtu.com>
636
637 * configure.ac: Probe for `help2man'.
638 * Makefile.in (builddir): New variable.
639 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
640 or otherwise add a few flags/options to it.
641 (install-local): For every executable utility or script that is
642 installed, invoke $(HELP2MAN) to install a manpage based on --help
643 output.
644
645 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
646 that it doesn't prevent --help from working in build tree.
647
648 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
649 with `bug-grub@gnu.org'.
650 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
651 * util/update-grub.in (usage): New function.
652 Implement proper argument check, with support for --help and --version
653 (as well as existing -y).
654
655 2008-02-09 Christian Franke <franke@computer.org>
656
657 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
658 avoid overwriting previous output.
659 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
660
661 2008-02-09 Robert Millan <rmh@aybabtu.com>
662
663 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
664 drawing the menu.
665
666 2008-02-09 Robert Millan <rmh@aybabtu.com>
667
668 * commands/sleep.c: New file.
669 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
670 (sleep_mod_SOURCES): New variable.
671 (sleep_mod_CFLAGS): Likewise.
672 (sleep_mod_LDFLAGS): Likewise.
673
674 2008-02-09 Robert Millan <rmh@aybabtu.com>
675
676 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
677 situations in which we can deduce the RAID size and the superblock
678 doesn't match it.
679
680 2008-02-09 Robert Millan <rmh@aybabtu.com>
681
682 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
683 and return a grub_diskmemberlist_t composed of LVM physical volumes.
684 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
685
686 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
687 and return a grub_diskmemberlist_t composed of physical array members.
688 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
689
690 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
691 prototype.
692 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
693 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
694 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
695
696 * util/grub-probe.c (probe): Move partmap probing code from here ...
697 (probe_partmap): ... to here.
698 (probe): Use probe_partmap() once for the disk we're probing, and
699 additionally, when such disk contains a memberlist() struct member,
700 once for each disk that is contained in the structure returned by
701 memberlist().
702
703 2008-02-09 Robert Millan <rmh@aybabtu.com>
704
705 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
706 environment variable to 'all' in order to obtain debug output from
707 non-util/ code.
708 * util/i386/pc/grub-setup.c (main): Likewise.
709
710 2008-02-08 Robert Millan <rmh@aybabtu.com>
711
712 * disk/raid.c (grub_raid_scan_device): Check for
713 `array->device[sb.this_disk.number]' rather than for
714 `array->device[sb.this_disk.number]->name', since the latter is not
715 garanteed to be accessible.
716
717 2008-02-08 Robert Millan <rmh@aybabtu.com>
718
719 * disk/raid.c: Update copyright.
720 * fs/cpio.c: Likewise.
721 * include/grub/raid.h: Likewise.
722 * loader/i386/pc/multiboot.c: Likewise.
723 * util/hostfs.c: Likewise.
724
725 2008-02-08 Robert Millan <rmh@aybabtu.com>
726
727 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
728 to a grub_disk_t array.
729 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
730 `device[x]'.
731 (grub_raid_scan_device): Replace `device[x].name' accesses with
732 `device[x]->name'. Simplify initialization of `array->device[x]'.
733
734 2008-02-08 Robert Millan <rmh@aybabtu.com>
735
736 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
737 grub_dprintf() calls.
738 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
739 error message.
740
741 2008-02-07 Christian Franke <franke@computer.org>
742
743 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
744 instead of fseek and ftell to support large files.
745 (grub_hostfs_read): Likewise.
746
747 2008-02-07 Robert Millan <rmh@aybabtu.com>
748
749 Patch from Jeroen Dekkers.
750 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
751 failure, since succesfuly reading all array members might not be
752 required.
753
754 2008-02-06 Robert Millan <rmh@aybabtu.com>
755
756 * util/grub-probe.c (probe): Simplify partmap probing (with the
757 assumption that the first word up to the underscore equals to
758 the module name).
759
760 2008-02-06 Christian Franke <franke@computer.org>
761
762 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
763 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
764 last block of a cpio or tar stream.
765 Check for "TRAILER!!!" instead of any empty data
766 block to detect last block of a cpio stream.
767 (grub_cpio_dir): Fix constness of variable np.
768 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
769 cpio or tar trailer is detected. This fixes a crash
770 on open of a non existing file.
771
772 2008-02-05 Bean <bean123ch@gmail.com>
773
774 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
775 address of entry.
776 (grub_multiboot_load_elf64): Likewise.
777 (grub_multiboot): Initialize mbi structure.
778
779 * util/grub-fstest.c: Don't include unused header file script.h.
780
781 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
782 of file.
783 (grub_fstest_SOURCES): Likewise.
784
785 2008-02-05 Robert Millan <rmh@aybabtu.com>
786
787 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
788 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
789 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
790 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
791
792 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
793 (translation_table): Replace hardcoded values with macros
794 provided by `<grub/term.h>'.
795
796 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
797 (keyboard_map): Correct/add a few values, with macros provided
798 by `<grub/term.h>'.
799 (keyboard_map_shift): Zero values that don't differ from their
800 `keyboard_map' equivalents.
801 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
802 Discard the second scan code that is always sent by Caps lock.
803 Only use `keyboard_map_shift' when it provides a non-zero value,
804 otherwise fallback to `keyboard_map'.
805
806 2008-02-04 Bean <bean123ch@gmail.com>
807
808 * Makefile.in (enable_grub_fstest): New variable.
809
810 * conf/common.rmk (grub_fstest_init.lst): New rule.
811 (grub_fstest_init.h): Likewise.
812 (grub_fstest_init.c): Likewise.
813 (util/grub-fstest.c_DEPENDENCIES): New variable.
814 (grub_fstest_SOURCES): Likewise.
815
816 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
817
818 * util/grub-fstest.c: New file.
819
820 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
821
822 Make grub-setup handle a separate root device.
823
824 * util/i386/pc/grub-setup.c (setup): Always open the root device,
825 so that the root device can be compared with the destination
826 device.
827 When embedding the core image, if the root and destination devices
828 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
829 0xFF.
830 When not embedding, set ROOT_DRIVE to 0xFF.
831
832 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
833
834 Add support for having a grub directory in a different drive. This
835 is still only the data handling part.
836
837 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
838 (codestart): Save %dh in GRUB_ROOT_DRIVE.
839 (grub_root_drive): New variable.
840
841 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
842 instead of GRUB_BOOT_DRIVE to construct a device name. Set
843 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
844 as it was.
845
846 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
847
848 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
849 macro.
850 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
851
852 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
853 is bogus, because PXE booting does not specify any drive
854 correctly.
855
856 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
857 am not sure if this is really correct.
858
859 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
860 is always identical to the boot drive when booting from a CD.
861
862 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
863 longer.
864 (root_drive): New variable.
865 (real_start): Unconditionally set %dh to ROOT_DRIVE.
866 (setup_sectors): Push %dx right after popping it, because %dh will
867 be modified later.
868 (copy_buffer): Restore %dx.
869
870 2008-02-03 Robert Millan <rmh@aybabtu.com>
871
872 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
873 use `cdboot.img' for cdrom images.
874
875 2008-02-03 Robert Millan <rmh@aybabtu.com>
876
877 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
878 only setup gfxterm when `font' command has succeeded.
879
880 2008-02-03 Robert Millan <rmh@aybabtu.com>
881
882 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
883 (grub_rescue_cmd_multiboot_loader)
884 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
885
886 2008-02-03 Pavel Roskin <proski@gnu.org>
887
888 * a/kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
889 %edx and %esi from stack only after grub_gate_a20() is called.
890 grub_gate_a20() clobbers %edx.
891
892 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
893
894 * configure.ac (AC_INIT): Bumped to 1.96.
895
896 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
897 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
898 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
899 video/readers/png.c.
900
901 2008-02-03 Bean <bean123ch@gmail.com>
902
903 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
904 (cdboot_img_SOURCES): New variable.
905 (cdboot_img_ASFLAGS): New variable.
906 (cdboot_img_LDFLAGS): New variable.
907
908 * boot/i386/pc/cdboot.S: New file.
909
910 * disk/i386/pc/biosdisk.c (cd_start): New variable.
911 (cd_count): Likewise.
912 (grub_biosdisk_get_drive): Add support for cd device.
913 (grub_biosdisk_call_hook): Likewise.
914 (grub_biosdisk_iterate): Likewise.
915 (grub_biosdisk_open): Likewise.
916 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
917 (grub_biosdisk_rw): Support reading from cd device.
918 (GRUB_MOD_INIT): Iterate cd devices.
919
920 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
921 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
922 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
923
924 * kern/i386/pc/init.c (make_install_device): Check for cd device.
925
926 2008-02-02 Robert Millan <rmh@aybabtu.com>
927
928 * commands/read.c: New file.
929 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
930 (read_mod_SOURCES): New variable.
931 (read_mod_CFLAGS): Likewise.
932 (read_mod_LDFLAGS): Likewise.
933
934 2008-02-02 Robert Millan <rmh@aybabtu.com>
935
936 * normal/main.c (grub_normal_execute): Check for `menu->size' when
937 determining whether menu has to be displayed.
938
939 2008-02-02 Marco Gerards <marco@gnu.org>
940
941 * bus/pci.c: New file.
942
943 * include/grub/pci.h: Likewise.
944
945 * include/grub/i386/pc/pci.h: Likewise.
946
947 * commands/lspci.c: Likewise.
948
949 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
950 `lspci.mod'.
951 (pci_mod_SOURCES): New variable.
952 (pci_mod_CFLAGS): Likewise.
953 (pci_mod_LDFLAGS): Likewise.
954 (lspci_mod_SOURCES): Likewise.
955 (lspci_mod_CFLAGS): Likewise.
956 (lspci_mod_LDFLAGS): Likewise.
957
958 2008-02-02 Bean <bean123ch@gmail.com>
959
960 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
961 (grub_ufs_get_file_block): Fix indirect block calculation problem.
962
963 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
964 (grub_xfs_btree_node): New structure.
965 (grub_xfs_btree_root): New structure.
966 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
967 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
968 (GRUB_XFS_EXTENT_BLOCK): Likewise.
969 (GRUB_XFS_EXTENT_SIZE): Likewise.
970 (grub_xfs_read_block): Support btree format type.
971 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
972 Use directory block as basic unit.
973
974 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
975
976 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
977 __attribute__ ((__regparm__ (1))).
978
979 2008-02-01 Robert Millan <rmh@aybabtu.com>
980
981 Correct a mistake in previous commit.
982
983 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
984 top.
985 (normal/command.c_DEPENDENCIES): New variable.
986
987 2008-02-01 Robert Millan <rmh@aybabtu.com>
988
989 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
990 top.
991 (normal/command.c_DEPENDENCIES): New variable.
992 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
993 * conf/i386-ieee1275.rmk: Likewise.
994 * conf/i386-linuxbios.rmk: Likewise.
995 * conf/i386-pc.rmk: Likewise.
996 * conf/sparc64-ieee1275.rmk: Likewise.
997 * conf/powerpc-ieee1275.rmk: Likewise.
998 (grub_emu_SOURCES): Add `fs/fshelp.c'.
999
1000 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
1001
1002 2008-02-01 Robert Millan <rmh@aybabtu.com>
1003
1004 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
1005 call at beginning of function.
1006
1007 2008-01-31 Pavel Roskin <proski@gnu.org>
1008
1009 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
1010 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
1011 (grub_mkrescue_SOURCES): Likewise.
1012 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
1013
1014 2008-01-30 Robert Millan <rmh@aybabtu.com>
1015
1016 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
1017 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
1018 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
1019 (grub_probe_SOURCES): ... to here.
1020
1021 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
1022 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
1023 * conf/i386-ieee1275.rmk: Likewise.
1024 * conf/i386-linuxbios.rmk: Likewise.
1025 * conf/powerpc-ieee1275.rmk: Likewise.
1026
1027 2008-01-30 Tristan Gingold <gingold@free.fr>
1028
1029 * kern/rescue.c: Silently accept empty lines.
1030
1031 2008-01-29 Bean <bean123ch@gmail.com>
1032
1033 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
1034 (real_code_2): Code cleanup and change comment style.
1035 (move_memory): Avoid using 32-bit address mode.
1036
1037 2008-01-29 Bean <bean123ch@gmail.com>
1038
1039 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
1040 (png_mod_SOURCES): New variable.
1041 (png_mod_CFLAGS): Likewise.
1042 (png_mod_LDFLAGS): Likewise.
1043
1044 * video/readers/png.c: New file.
1045
1046 2008-01-28 Robert Millan <rmh@aybabtu.com>
1047
1048 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
1049 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
1050 `ifndef GRUB_MOD_GAP' hack.
1051 * util/elf/grub-mkimage.c (add_segments): Likewise.
1052
1053 2008-01-27 Robert Millan <rmh@aybabtu.com>
1054
1055 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
1056 `GRUB_MOD_GAP' for platforms in which it's not defined.
1057 * util/elf/grub-mkimage.c (add_segments): Likewise.
1058
1059 2008-01-27 Robert Millan <rmh@aybabtu.com>
1060
1061 Get grub-emu to build again (including parallel builds).
1062
1063 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
1064 Split into ...
1065 (util/grub-emu.c_DEPENDENCIES): ... this, ...
1066 (normal/execute.c_DEPENDENCIES): ... this, ...
1067 (grub-emu_DEPENDENCIES): ... and this.
1068
1069 * conf/i386-efi.rmk: Likewise.
1070 * conf/i386-linuxbios.rmk: Likewise.
1071 * conf/i386-ieee1275.rmk: Likewise.
1072 * conf/powerpc-ieee1275.rmk: Likewise.
1073 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
1074
1075 2008-01-27 Robert Millan <rmh@aybabtu.com>
1076
1077 * NEWS: Add a few items.
1078
1079 2008-01-27 Robert Millan <rmh@aybabtu.com>
1080
1081 Fix parallel builds with grub-emu. Based on earlier commit for
1082 grub-probe and grub-setup.
1083
1084 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1085 (util/grub-emu.c_DEPENDENCIES): ... this.
1086 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1087 (util/grub-emu.c_DEPENDENCIES): ... this.
1088 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1089 (util/grub-emu.c_DEPENDENCIES): ... this.
1090 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1091 (util/grub-emu.c_DEPENDENCIES): ... this.
1092 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1093 (util/grub-emu.c_DEPENDENCIES): ... this.
1094
1095 2008-01-27 Pavel Roskin <proski@gnu.org>
1096
1097 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
1098 to create a gap between _end and the modules added to the image
1099 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
1100 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
1101 * util/elf/grub-mkimage.c (add_segments): Likewise.
1102
1103 2008-01-26 Pavel Roskin <proski@gnu.org>
1104
1105 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
1106 just return an error.
1107
1108 2008-01-26 Bean <bean123ch@gmail.com>
1109
1110 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
1111 (grub_reiserfs_get_item): Save offset of the next item.
1112 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
1113
1114 2008-01-25 Robert Millan <rmh@aybabtu.com>
1115
1116 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
1117 make all filesystem sources appear together (possibly fixing omissions
1118 while at it).
1119 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1120 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1121 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1122 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1123
1124 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
1125 add `kern/file.c'.
1126 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
1127 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1128 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
1129 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1130
1131 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
1132 (probe): Add a sanity check to make sure of our ability to read
1133 requested files when probing for filesystem type.
1134
1135 * genmk.rb: Update copyright year (2007).
1136
1137 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
1138 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
1139 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
1140 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
1141 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
1142 : Remove function prototypes.
1143
1144 2008-01-25 Robert Millan <rmh@aybabtu.com>
1145
1146 Revert my previous commits (based on wrong assumption of how grub_errno
1147 works).
1148
1149 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
1150 * kern/file.c (grub_file_open): Likewise.
1151
1152 2008-01-24 Pavel Roskin <proski@gnu.org>
1153
1154 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
1155 that hang if GRUB tries to setup colors.
1156 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
1157 colors for firmwares that don't support it.
1158 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
1159 Recognize Open Hack'Ware, set flags to work around its
1160 limitations.
1161
1162 2008-01-24 Robert Millan <rmh@aybabtu.com>
1163
1164 * kern/file.c (grub_file_open): Do not account previous failures of
1165 unrelated functions when grub_errno is checked for.
1166 Reported by Oleg Strikov.
1167
1168 2008-01-24 Bean <bean123ch@gmail.com>
1169
1170 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
1171 (grub_ufs_sblock): New member volume name.
1172 (grub_ufs_find_file): Fix string copy bug.
1173 (grub_ufs_label): Implement this function properly.
1174
1175 * fs/hfs.c (grub_hfs_cnid_type): New enum.
1176 (grub_hfs_iterate_records): Use the correct file number for extents
1177 and catalog file. Fix problem in next index calculation.
1178 (grub_hfs_find_node): Replace recursive function call with loop.
1179 (grub_hfs_iterate_dir): Replace recursive function call with loop.
1180
1181 2008-01-23 Robert Millan <rmh@aybabtu.com>
1182
1183 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1184 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1185 (grub_multiboot2_real_boot): New function prototype.
1186
1187 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1188 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1189
1190 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1191 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1192
1193 2008-01-23 Robert Millan <rmh@aybabtu.com>
1194
1195 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1196 #ifdef'ed out grub_printf().
1197
1198 2008-01-23 Robert Millan <rmh@aybabtu.com>
1199
1200 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1201 grub_dprintf calls, since they make "debug=all" mode unusable.
1202 (grub_console_checkkey): Likewise.
1203
1204 2008-01-23 Robert Millan <rmh@aybabtu.com>
1205
1206 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1207 `term/i386/pc/at_keyboard.c'.
1208 (pkglib_MODULES): Add `serial.mod'.
1209 (serial_mod_SOURCES): New variable.
1210 (serial_mod_CFLAGS): Likewise.
1211 (serial_mod_LDFLAGS): Likewise.
1212
1213 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1214 `<grub/powerpc/ieee1275/console.h>'.
1215 (grub_keyboard_controller_init): New function prototype.
1216 (grub_console_checkkey): Likewise.
1217 (grub_console_getkey): Likewise.
1218
1219 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1220 keyboard on i386.
1221
1222 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1223 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1224
1225 2008-01-23 Robert Millan <rmh@aybabtu.com>
1226
1227 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1228 present, "(memdisk)/boot/grub" becomes the default prefix.
1229
1230 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1231 a memdisk tarball with all the modules. Add --overlay=DIR option that
1232 allows users to overlay additional files into the image.
1233
1234 2008-01-23 Robert Millan <rmh@aybabtu.com>
1235
1236 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1237 and `machine/memory.h'.
1238 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1239 (_multiboot_mod_SOURCES): New variable.
1240 (_multiboot_mod_CFLAGS): Likewise.
1241 (_multiboot_mod_LDFLAGS): Likewise.
1242 (multiboot_mod_SOURCES): Likewise.
1243 (multiboot_mod_CFLAGS): Likewise.
1244 (multiboot_mod_LDFLAGS): Likewise.
1245
1246 * include/grub/i386/ieee1275/loader.h: New file.
1247
1248 * include/grub/i386/ieee1275/machine.h: Likewise.
1249
1250 * include/grub/i386/ieee1275/memory.h: Likewise.
1251
1252 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1253 variable declaration.
1254 (grub_os_area_size): Likewise.
1255
1256 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1257 (grub_lower_mem, grub_upper_mem): New variables.
1258 (grub_stop_floppy): New function (just to make
1259 grub_multiboot2_real_boot() happy).
1260
1261 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1262 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1263 (grub_stop): New function.
1264 Include `"../realmode.S"' and `"../loader.S"'.
1265
1266 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1267 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1268
1269 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1270 rely on grub_multiboot2_real_boot() for final boot.
1271
1272 2008-01-22 Robert Millan <rmh@aybabtu.com>
1273
1274 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1275 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1276 device that doesn't look like an SD card.
1277 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1278 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1279 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1280 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1281 found.
1282
1283 2008-01-22 Robert Millan <rmh@aybabtu.com>
1284
1285 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1286 avoid claiming over our own code.
1287
1288 2008-01-22 Bean <bean123ch@gmail.com>
1289
1290 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1291 (jpeg_mod_SOURCES): New variable.
1292 (jpeg_mod_CFLAGS): Likewise.
1293 (jpeg_mod_LDFLAGS): Likewise.
1294
1295 * video/readers/jpeg.c : New file.
1296
1297 2008-01-22 Bean <bean123ch@gmail.com>
1298
1299 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1300 there are no more items.
1301
1302 2008-01-21 Robert Millan <rmh@aybabtu.com>
1303
1304 * kern/mm.c (grub_mm_init_region): Improve debug message.
1305
1306 2008-01-21 Robert Millan <rmh@aybabtu.com>
1307
1308 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1309 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1310 address.
1311 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1312 a C macro.
1313 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1314 Indicates start of upper memory.
1315 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1316 (generate_image): Abort when image size is big enough to corrupt
1317 upper memory.
1318
1319 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1320 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1321 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1322 instead of hardcoding 0xA0000.
1323 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1324 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1325 instead of hardcoding 0xA0000.
1326
1327 2008-01-21 Robert Millan <rmh@aybabtu.com>
1328
1329 * disk/memdisk.c (memdisk_size): New variable.
1330 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1331 `memdisk_size'.
1332 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1333 image to dynamic memory.
1334 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1335 `memdisk_size'. Free memdisk block.
1336
1337 2008-01-21 Robert Millan <rmh@aybabtu.com>
1338
1339 Fix detection of very small filesystems (like tar).
1340
1341 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1342 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1343 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1344 a problem with this disk).
1345
1346 2008-01-21 Robert Millan <rmh@aybabtu.com>
1347
1348 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1349 on grub_biosdisk_rw_standard() error.
1350
1351 2008-01-21 Robert Millan <rmh@aybabtu.com>
1352
1353 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1354 recent changes.
1355 * kern/elf.c: Likewise.
1356 * kern/ieee1275/ieee1275.c: Likewise.
1357 * kern/powerpc/ieee1275/openfw.c: Likewise.
1358 * term/ieee1275/ofconsole.c: Likewise.
1359
1360 2008-01-21 Robert Millan <rmh@aybabtu.com>
1361
1362 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1363
1364 * include/grub/kernel.h (grub_arch_memdisk_addr)
1365 (grub_arch_memdisk_size): Moved from here ...
1366
1367 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1368 (grub_arch_memdisk_size): ... to here.
1369
1370 2008-01-21 Robert Millan <rmh@aybabtu.com>
1371
1372 Mostly based on bugfix from Bean.
1373
1374 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1375 attribute with hook() parameter.
1376 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1377 declaration.
1378 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1379 attribute with hook() parameter.
1380 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1381 declaration.
1382
1383 2008-01-21 Robert Millan <rmh@aybabtu.com>
1384
1385 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1386 (pkglib_MODULES): Add `memdisk.mod'.
1387 (memdisk_mod_SOURCES): New variable.
1388 (memdisk_mod_CFLAGS): Likewise.
1389 (memdisk_mod_LDFLAGS): Likewise.
1390
1391 * disk/memdisk.c: New file.
1392
1393 * include/grub/disk.h (grub_disk_dev_id): Add
1394 `GRUB_DISK_DEVICE_MEMDISK_ID'.
1395
1396 * include/grub/i386/pc/kernel.h
1397 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1398 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1399 (grub_kernel_image_size): New variable declaration.
1400 (grub_total_module_size): Likewise.
1401 (grub_memdisk_image_size): Likewise.
1402
1403 * include/grub/i386/pc/memory.h
1404 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1405
1406 * include/grub/kernel.h: Include `<grub/symbol.h>'.
1407 (grub_arch_memdisk_addr): New variable declaration.
1408 (grub_arch_memdisk_size): Likewise.
1409
1410 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1411 (grub_arch_memdisk_size): Likewise.
1412
1413 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1414 (codestart): Replace hardcoded `0x100000' with
1415 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1416
1417 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1418 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
1419 not NULL, append the contents of the file it refers to, at the end of
1420 the compressed kernel image. Initialize `grub_memdisk_image_size'
1421 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1422 (options): Add "memdisk"|'m' option.
1423 (main): Parse --memdisk|-m option, and pass user-provided path as
1424 parameter to generate_image().
1425
1426 2008-01-20 Robert Millan <rmh@aybabtu.com>
1427
1428 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
1429 grub_dprintf() calls from here ...
1430 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
1431
1432 2008-01-20 Robert Millan <rmh@aybabtu.com>
1433
1434 Fix detection of "real mode" when /options/real-mode? doesn't exist.
1435
1436 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
1437 declaration.
1438 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
1439 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
1440 `GRUB_IEEE1275_FLAG_REAL_MODE'.
1441 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
1442 property).
1443 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
1444 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
1445
1446 2008-01-19 Robert Millan <rmh@aybabtu.com>
1447
1448 Get rid of confusing function (superceeded by
1449 `grub_ieee1275_get_integer_property')
1450 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
1451 prototype.
1452 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
1453 function.
1454 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
1455 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
1456 in native endianess from grub_ieee1275_get_integer_property().
1457
1458 2008-01-19 Robert Millan <rmh@aybabtu.com>
1459
1460 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
1461 command after "shut-down", since implementations differ on which
1462 the command for halt is.
1463
1464 2008-01-19 Robert Millan <rmh@aybabtu.com>
1465
1466 * include/grub/i386/linuxbios/console.h: Add header protection.
1467 (grub_keyboard_controller_init): New function prototype.
1468 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
1469 (KEYBOARD_COMMAND_READ): Likewise.
1470 (KEYBOARD_COMMAND_WRITE): Likewise.
1471 (KEYBOARD_SCANCODE_SET1): Likewise.
1472 (grub_keyboard_controller_write): New function.
1473 (grub_keyboard_controller_read): Likewise.
1474 (grub_keyboard_controller_init): Likewise.
1475
1476 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
1477 (grub_console_init): On coreboot/LinuxBIOS, call
1478 grub_keyboard_controller_init().
1479
1480 2008-01-19 Robert Millan <rmh@aybabtu.com>
1481
1482 PowerPC changes provided by Pavel Roskin.
1483
1484 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
1485 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
1486 don't rely on cmain() doing it.
1487 * kern/i386/ieee1275/startup.S (_start): Store %eax in
1488 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
1489
1490 2008-01-16 Robert Millan <rmh@aybabtu.com>
1491
1492 * include/grub/i386/linuxbios/memory.h
1493 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
1494 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
1495 receive `table_header' as argument. Instead, probe for it in the
1496 known memory ranges where it can be present.
1497 (grub_available_iterate): Do not pass a fixed `table_header' address
1498 to grub_linuxbios_table_iterate().
1499
1500 2008-01-15 Robert Millan <rmh@aybabtu.com>
1501
1502 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
1503 * conf/i386-ieee1275.rmk: New file.
1504 * include/grub/i386/ieee1275/console.h: Likewise.
1505 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
1506 * include/grub/i386/ieee1275/kernel.h: Likewise.
1507 * include/grub/i386/ieee1275/time.h: Likewise.
1508 * kern/i386/ieee1275/init.c: Likewise.
1509 * kern/i386/ieee1275/startup.S: Likewise.
1510
1511 2008-01-15 Robert Millan <rmh@aybabtu.com>
1512
1513 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
1514 when pointers are 32-bit (but still do set it to one when they are
1515 64-bit).
1516
1517 2008-01-15 Robert Millan <rmh@aybabtu.com>
1518
1519 * include/grub/ieee1275/ieee1275.h
1520 (grub_ieee1275_get_integer_property): New function prototype.
1521
1522 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
1523 (grub_ieee1275_get_integer_property): New function. Wraps around
1524 grub_ieee1275_get_property() to handle endianess.
1525
1526 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
1527 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
1528 where appropiate.
1529 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
1530 (grub_map): Likewise.
1531 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
1532
1533 2008-01-15 Bean <bean123ch@gmail.com>
1534
1535 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
1536 (grub_script_execute_cmdline): Reset grub_errno.
1537
1538 * normal/main.c (read_config_file): Reset grub_errno.
1539
1540 * normal/parse.y (script_init): New.
1541 (script): Move function and menuentry here.
1542 (delimiter): New.
1543 (command): Add delimiter at the end of command.
1544 (commands): Adjust to match the new command.
1545 (commandblock): Remove grub_script_lexer_record_start.
1546 (menuentry): Add grub_script_lexer_record_start, use the new commands.
1547 (if): Use the new commands.
1548
1549 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
1550
1551 2008-01-15 Robert Millan <rmh@aybabtu.com>
1552
1553 * normal/menu.c (run_menu): Move timeout message from here ...
1554 (print_timeout): ... to here.
1555 (run_menu): Use print_timeout() once during initial draw to print
1556 the whole message, and again in every clock tick to update only
1557 the number of seconds.
1558
1559 2008-01-15 Robert Millan <rmh@aybabtu.com>
1560
1561 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
1562 actual size of `available' from grub_ieee1275_get_property(), and
1563 restrict parsing to that bound.
1564
1565 2008-01-15 Christian Franke <franke@computer.org>
1566
1567 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
1568 (argp_program_version): Remove variable.
1569 (argp_program_bug_address): Likewise.
1570 (options): Convert from struct argp_option to struct option.
1571 (struct arguments): Remove.
1572 (parse_opt): Remove.
1573 (usage): New function.
1574 (main): Replace struct args members by simple variables.
1575 Replace argp_parse() by getopt_long().
1576 Add switch to evaluate options.
1577 Add missing "(...)" around root_dev in prefix string.
1578
1579 2008-01-14 Robert Millan <rmh@aybabtu.com>
1580
1581 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
1582 for grub_ieee1275_exit(), in order to improve portability.
1583
1584 2008-01-14 Robert Millan <rmh@aybabtu.com>
1585
1586 * util/grub.d/10_linux.in (prefix): Define.
1587 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
1588
1589 2008-01-13 Pavel Roskin <proski@gnu.org>
1590
1591 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
1592 grub_errno if no errors have been detected.
1593
1594 2008-01-12 Robert Millan <rmh@aybabtu.com>
1595
1596 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
1597 (grub_util_get_dev_abstraction): New function prototype.
1598
1599 * util/getroot.c: Include `<grub/util/getroot.h>'
1600 (grub_util_get_grub_dev): Move detection of abstraction type to ...
1601 (grub_util_get_dev_abstraction): ... here (new function).
1602
1603 * util/grub-probe.c: Convert PRINT_* to an enum. Add
1604 `PRINT_ABSTRACTION'.
1605 (probe): Probe for abstraction type when requested.
1606 (main): Understand `--target=abstraction'.
1607
1608 * util/i386/efi/grub-install.in: Add abstraction module to core
1609 image when it is found to be necessary.
1610 * util/i386/pc/grub-install.in: Likewise.
1611 * util/powerpc/ieee1275/grub-install.in: Likewise.
1612
1613 * util/update-grub_lib.in (font_path): Return system path without
1614 converting to GRUB path.
1615 * util/update-grub.in: Convert system path returned by font_path()
1616 to a GRUB path. Use `grub-probe -t abstraction' to determine what
1617 abstraction module is needed for loading fonts (if any). Export
1618 that as `GRUB_PRELOAD_MODULES'.
1619 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
1620 insmod commands).
1621
1622 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
1623
1624 Remove some unused code from reiserfs.
1625
1626 * fs/reiserfs.c (struct grub_reiserfs_key)
1627 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
1628 (struct grub_reiserfs_node_body): Removed.
1629 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1630 Likewise.
1631 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1632 Likewise.
1633 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1634 Likewise.
1635 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1636 Likewise.
1637 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1638 Likewise.
1639 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
1640 Likewise.
1641 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1642 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1643 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1644
1645 2008-01-10 Robert Millan <rmh@aybabtu.com>
1646
1647 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
1648 Determines if a file is garbage left by packaging systems, etc.
1649 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
1650 for processing /etc/grub.d scripts.
1651 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
1652 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
1653 as a condition for processing Linux images.
1654
1655 2008-01-10 Pavel Roskin <proski@gnu.org>
1656
1657 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
1658 to compile reiserfs.c on PowerPC.
1659
1660 2008-01-10 Robert Millan <rmh@aybabtu.com>
1661
1662 * kern/device.c (grub_device_iterate): Do not abort device iteration
1663 when one of the devices cannot be opened.
1664 * kern/disk.c (grub_disk_open): Do not account previous failures of
1665 unrelated functions when grub_errno is checked for.
1666
1667 2008-01-08 Robert Millan <rmh@aybabtu.com>
1668
1669 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
1670 `! grub_linux_is_bzimage', change order of address comparison to make
1671 it more intuitive, and improve "too big zImage" error message.
1672
1673 2008-01-08 Robert Millan <rmh@aybabtu.com>
1674
1675 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
1676 `$(update-grub_DATA)'.
1677 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
1678 targets.
1679
1680 2008-01-07 Robert Millan <rmh@aybabtu.com>
1681
1682 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
1683 which instruction is modified by grub-setup during installation
1684 (since it wasn't obvious by only looking at this file).
1685
1686 2008-01-07 Robert Millan <rmh@aybabtu.com>
1687
1688 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
1689 listing actual TODO items.
1690
1691 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1692
1693 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
1694 correctly.
1695 (grub_reiserfs_get_key_offset): Likewise.
1696 (grub_reiserfs_set_key_offset): Likewise.
1697 (grub_reiserfs_set_key_type): Likewise.
1698 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
1699
1700 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
1701 better to remove the bitfield version completely.
1702
1703 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1704
1705 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
1706 allocated from the heap, due to the fshelp implementation.
1707 (grub_reiserfs_dir): Free NODE, due to the same reason.
1708
1709 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1710
1711 Mostly from Vincent Pelletier:
1712
1713 * fs/reiserfs.c: New file.
1714
1715 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
1716 (reiserfs_mod_SOURCES): New variable.
1717 (reiserfs_mod_CFLAGS): Likewise.
1718 (reiserfs_mod_LDFLAGS): Likewise.
1719
1720 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
1721 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
1722 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
1723 normal/color.c.
1724
1725 2008-01-06 Robert Millan <rmh@aybabtu.com>
1726
1727 * normal/color.c: Remove `<grub/env.h>'.
1728
1729 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
1730
1731 * include/grub/normal.h: Include <grub/env.h>.
1732
1733 2008-01-05 Robert Millan <rmh@aybabtu.com>
1734
1735 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
1736 usage example with `(hd0,1)'.
1737 Reported by Samuel Thibault.
1738
1739 2008-01-05 Robert Millan <rmh@aybabtu.com>
1740
1741 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
1742 (grub_linux_boot_zimage): Rename to ...
1743 (grub_linux_boot): ... this.
1744 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
1745 (grub_linux_boot_zimage): Conditionalize zImage copy.
1746
1747 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
1748 (grub_linux_boot_bzimage): Remove prototype.
1749 (grub_linux_boot_zimage): Rename to ...
1750 (grub_linux_boot): ... this.
1751
1752 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
1753 (grub_linux_boot): Remove function.
1754
1755 2008-01-05 Robert Millan <rmh@aybabtu.com>
1756
1757 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
1758 (grub_env_write_color_highlight): Likewise.
1759 (grub_wait_after_message): Likewise.
1760
1761 * normal/color.c: New file.
1762
1763 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1764 (normal_mod_DEPENDENCIES): Likewise.
1765
1766 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1767 (normal_mod_DEPENDENCIES): Likewise.
1768
1769 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1770 (normal_mod_DEPENDENCIES): Likewise.
1771
1772 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1773 (normal_mod_DEPENDENCIES): Likewise.
1774
1775 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
1776 for waiting after a message is printed.
1777 * normal/main.c (read_config_file): Likewise.
1778 (grub_normal_init): Register grub_env_write_color_normal() and
1779 grub_env_write_color_highlight() hooks. Mark `color_normal' and
1780 `color_highlight' variables as global.
1781
1782 * normal/menu.c (grub_wait_after_message): New function.
1783 (grub_color_menu_normal): New variable. Replaces ...
1784 (GRUB_COLOR_MENU_NORMAL): ... this macro.
1785 (grub_color_menu_highlight): New variable. Replaces ...
1786 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
1787 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
1788 `GRUB_TERM_COLOR_STANDARD'.
1789 (print_message): Use `grub_setcolorstate' to reload colors. Rename
1790 `normal_code' and `highlight_code' to `old_color_normal' and
1791 `old_color_highlight', respectively.
1792 (grub_menu_init_page): Update colors when drawing the menu, based on
1793 `menu_color_normal' and `menu_color_highlight' variables.
1794 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
1795 a message is printed.
1796
1797 2008-01-05 Robert Millan <rmh@aybabtu.com>
1798
1799 * kern/env.c (grub_env_context_open): Propagate hooks for global
1800 variables to new context.
1801
1802 * kern/main.c (grub_set_root_dev): Export `root' variable.
1803
1804 2008-01-05 Robert Millan <rmh@aybabtu.com>
1805
1806 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
1807 discs unconditionaly, since udev and others have options to provide
1808 them.
1809
1810 2008-01-05 Robert Millan <rmh@aybabtu.com>
1811
1812 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
1813
1814 2008-01-04 Christian Franke <franke@computer.org>
1815
1816 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
1817 of eisa_mmap.
1818
1819 2008-01-03 Pavel Roskin <proski@gnu.org>
1820
1821 * kern/i386/linuxbios/init.c: Put "void" to all function
1822 declarations with no arguments.
1823 * kern/powerpc/ieee1275/init.c: Likewise.
1824 * term/i386/pc/at_keyboard.c: Likewise.
1825 * term/i386/pc/vga_text.c: Likewise.
1826 * util/grub-mkdevicemap.c: Likewise.
1827
1828 2008-01-02 Robert Millan <rmh@aybabtu.com>
1829
1830 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
1831 message when loaded image is out of bounds.
1832 (grub_multiboot_load_elf64): Likewise.
1833
1834 2008-01-02 Pavel Roskin <proski@gnu.org>
1835
1836 * util/grub.d/10_linux.in: Try version without ".old" when
1837 looking for initrd. It's better to use initrd from the newer
1838 kernel of the same version than no initrd at all.
1839
1840 2008-01-01 Robert Millan <rmh@aybabtu.com>
1841
1842 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
1843
1844 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
1845
1846 * include/grub/video.h: Added grub_video_unmap_color and
1847 grub_video_get_active_render_target.
1848 (grub_video_adapter): Added unmap_color and get_active_render_target.
1849
1850 * video/video.c: Added grub_video_unmap_color and
1851 grub_video_get_active_render_target.
1852 (grub_video_get_info): Changed method to accept NULL pointer as an
1853 argument to allow detection of active video adapter.
1854
1855 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
1856 grub_video_vbe_unmap_color_int.
1857 Added grub_video_vbe_unmap_color and
1858 grub_video_vbe_get_active_render_target.
1859 (grub_video_vbe_adapter): Added unmap_color and
1860 get_active_render_target.
1861
1862 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
1863 with grub_video_vbe_unmap_color_int.
1864
1865 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
1866 (DEFAULT_NORMAL_COLOR): Likewise.
1867 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
1868 (DEFAULT_FG_COLOR): Removed.
1869 (DEFAULT_BG_COLOR): Likewise.
1870 (DEFAULT_CURSOR_COLOR): Changed value.
1871 (grub_virtual_screen): Added standard_color_setting,
1872 normal_color_setting, highlight_color_setting and term_color.
1873 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
1874 (bitmap_width): Added.
1875 (bitmap_height): Likewise.
1876 (bitmap): Likewise.
1877 (set_term_color): Likewise.
1878 (grub_virtual_screen_setup): Changed to use new terminal coloring
1879 settings.
1880 (grub_gfxterm_init): Added init for bitmap.
1881 (grub_gfxterm_fini): Added destroy for bitmap.
1882 (redraw_screen_rect): Updated to use background bitmap and new
1883 terminal coloring.
1884 (scroll_up): Added optimization for case when there is no bitmap.
1885 (grub_gfxterm_cls): Fixed to use correct background color.
1886 (grub_virtual_screen_setcolorstate): Changed to use new terminal
1887 coloring.
1888 (grub_virtual_screen_setcolor): Likewise.
1889 (grub_virtual_screen_getcolor): Added.
1890 (grub_gfxterm_background_image_cmd): Likewise.
1891 (grub_video_term): Added setcolor and getcolor.
1892 (MOD_INIT): Added registration of background_image command.
1893 (MOD_TERM): Added unregistration for background_image command.
1894
1895 2007-12-30 Pavel Roskin <proski@gnu.org>
1896
1897 * loader/multiboot_loader.c: Fix multiboot command
1898 unregistration. Fix all typos in the word "multiboot".
1899
1900 2007-12-29 Pavel Roskin <proski@gnu.org>
1901
1902 * util/grub.d/10_linux.in: Refactor search for initrd. Add
1903 support for initrd names used in Fedora.
1904
1905 2007-12-26 Bean <bean123ch@gmail.com>
1906
1907 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
1908 (cpio_mod_SOURCES): New variable.
1909 (cpio_mod_CFLAGS): Likewise.
1910 (cpio_mod_LDFLAGS): Likewise.
1911
1912 * fs/cpio.c: New file.
1913
1914 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
1915
1916 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1917
1918 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1919
1920 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1921
1922 2007-12-25 Robert Millan <rmh@aybabtu.com>
1923
1924 * include/grub/term.h (struct grub_term): Add `getcolor' function.
1925 (grub_getcolor): New function.
1926
1927 * kern/term.c (grub_getcolor): New function.
1928 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
1929 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
1930 (print_entry): Set normal and highlight colors to
1931 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
1932 respectively, before printing and restore them to old
1933 values afterwards.
1934 (grub_menu_init_page): Likewise. Fill an additional colored space
1935 that would otherwise be left blank.
1936
1937 * term/efi/console.c (grub_console_getcolor): New function.
1938 (struct grub_console_term.getcolor): New variable.
1939 * term/i386/pc/console.c (grub_console_getcolor): New function.
1940 (struct grub_console_term.getcolor): New variable.
1941 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
1942 (struct grub_console_term.getcolor): New variable.
1943
1944 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
1945 (struct grub_console_term.setcolor): Remove variable.
1946 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
1947 (struct grub_console_term.setcolor): Remove variable.
1948 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
1949 (struct grub_console_term.setcolor): Remove variable.
1950 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
1951 (struct grub_console_term.setcolor): Remove variable.
1952
1953 2007-12-25 Robert Millan <rmh@aybabtu.com>
1954
1955 * configure.ac: Search for possible unifont.hex locations, and
1956 define UNIFONT_HEX if found.
1957
1958 * Makefile.in (UNIFONT_HEX): Define variable.
1959 (DATA): Rename to ...
1960 (PKGLIB): ... this. Update all users.
1961 (PKGDATA): New variable.
1962 (pkgdata_IMAGES): Rename to ...
1963 (pkglib_IMAGES): ... this. Update all users.
1964 (pkgdata_MODULES): Rename to ...
1965 (pkglib_MODULES): ... this. Update all users.
1966 (pkgdata_PROGRAMS): Rename to ...
1967 (pkglib_PROGRAMS): ... this. Update all users.
1968 (pkgdata_DATA): Rename to ...
1969 (pkglib_DATA): ... this. Update all users.
1970 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
1971 (unicode.pff, ascii.pff): New rules.
1972 (all-local): Add `$(PKGDATA)' dependency.
1973 (install-local): Process `$(PKGDATA)'.
1974
1975 * util/update-grub_lib.in (font_path): Search for *.pff files in
1976 a few more locations, including `${pkgdata}'.
1977
1978 2007-12-23 Robert Millan <rmh@aybabtu.com>
1979
1980 Patch from Bean <bean123ch@gmail.com>:
1981 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
1982 `size'.
1983
1984 2007-12-21 Bean <bean123ch@gmail.com>
1985
1986 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
1987 (ntfscomp_mod_SOURCES): New variable.
1988 (ntfscomp_mod_CFLAGS): Likewise.
1989 (ntfscomp_mod_LDFLAGS): Likewise.
1990
1991 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
1992 (grub_probe_SOURCES): Likewise.
1993 (grub_emu_SOURCES): Likewise.
1994
1995 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1996 (grub_emu_SOURCES): Likewise.
1997
1998 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1999 (grub_emu_SOURCES): Likewise.
2000
2001 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2002 (grub_emu_SOURCES): Likewise.
2003
2004 * fs/ntfs.c (grub_ntfscomp_func): New variable.
2005 (read_run_list): Renamed to grub_ntfs_read_run_list.
2006 (decomp_nextvcn): Moved to ntfscomp.c.
2007 (decomp_getch): Likewise.
2008 (decomp_get16): Likewise.
2009 (decomp_block): Likewise.
2010 (read_block): Likewise.
2011 (read_data): Partially moved to ntfscomp.c.
2012 (fixup): Change unsigned to grub_uint16_t.
2013 (read_mft): Change unsigned long to grub_uint32_t.
2014 (read_attr): Likewise.
2015 (read_data): Likewise.
2016 (read_run_data): Likewise.
2017 (read_run_list): Likewise.
2018 (read_mft): Likewise.
2019
2020 * fs/ntfscomp.c: New file.
2021
2022 * include/grub/ntfs.h: New file.
2023
2024 2007-12-16 Robert Millan <rmh@aybabtu.com>
2025
2026 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
2027 IDE disk check, since Linux is known to support 20 IDE disks.
2028 Reported by Colin Watson.
2029
2030 2007-12-15 Bean <bean123ch@gmail.com>
2031
2032 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
2033 (lnxboot_img_SOURCES): New variable.
2034 (lnxboot_img_ASFLAGS): Likewise.
2035 (lnxboot_img_LDFLAGS): Likewise.
2036
2037 * boot/i386/pc/lnxboot.S: New file.
2038
2039 2007-11-24 Pavel Roskin <proski@gnu.org>
2040
2041 * configure.ac: Test if '--build-id=none' is supported by the
2042 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
2043 objcopy to generate incorrect binary files (binutils
2044 2.17.50.0.18-1 as shipped by Fedora 8).
2045 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
2046 linking, so that build ID doesn't break the test.
2047
2048 2007-11-24 Pavel Roskin <proski@gnu.org>
2049
2050 * include/grub/i386/time.h: use "void" in the argument list
2051 of grub_cpu_idle().
2052 * include/grub/powerpc/time.h: Likewise.
2053 * include/grub/sparc64/time.h: Likewise.
2054
2055 2007-11-18 Christian Franke <franke@computer.org>
2056
2057 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
2058 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
2059 This fixes the problem that function keys did not work in grub-emu.
2060
2061 2007-11-18 Christian Franke <franke@computer.org>
2062
2063 * disk/host.c (grub_host_open): Remove attribute unused from
2064 name parameter. Add check for "host". This fixes the problem
2065 that grub-emu does not find partitions.
2066
2067 2007-11-18 Christian Franke <franke@computer.org>
2068
2069 * util/hostfs.c (is_dir): New function.
2070 (grub_hostfs_dir): Handle missing dirent.d_type case.
2071 (grub_hostfs_read): Add missing fseek().
2072 (grub_hostfs_label): Clear label pointer. This fixes a crash
2073 of grub-emu on "ls (host)".
2074
2075 2007-11-18 Christian Franke <franke@computer.org>
2076
2077 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
2078 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
2079 to 64 bit boundary by default.
2080
2081 2007-11-18 Bean <bean123ch@gmail.com>
2082
2083 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
2084 (hexdump_mod_SOURCES): New variable.
2085 (hexdump_mod_CFLAGS): Likewise.
2086 (hexdump_mod_LDFLAGS): Likewise.
2087
2088 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2089
2090 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2091
2092 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2093
2094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2095
2096 * include/grub/hexdump.h: New file.
2097
2098 * commands/hexdump.c: New file.
2099
2100 2007-11-10 Robert Millan <rmh@aybabtu.com>
2101
2102 * commands/i386/pc/play.c (beep_off): Switch order of arguments
2103 in grub_outb() calls.
2104 (beep_on): Likewise.
2105
2106 2007-11-10 Christian Franke <franke@computer.org>
2107
2108 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
2109 (grub_menu_run): Likewise.
2110
2111 2007-11-10 Robert Millan <rmh@aybabtu.com>
2112
2113 * include/grub/i386/efi/machine.h: New file.
2114 * include/grub/i386/linuxbios/machine.h: Likewise.
2115 * include/grub/i386/pc/machine.h: Likewise.
2116 * include/grub/powerpc/ieee1275/machine.h: Likewise.
2117 * include/grub/sparc64/ieee1275/machine.h: Likewise.
2118
2119 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
2120 (serial_hw_io_addr): New variable.
2121 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
2122 instead of `(unsigned short *) 0x400'.
2123
2124 2007-11-10 Bean <bean123ch@gmail.com>
2125
2126 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2127
2128 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2129
2130 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
2131 (vga_mod_SOURCES): Added.
2132 (vga_mod_CFLAGS): Likewise.
2133 (vga_mod_LDFLAGS): Likewise.
2134
2135 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
2136 grub_outb() calls.
2137 (set_map_mask): Likewise.
2138 (set_read_map): Likewise.
2139 (set_read_address): Likewise.
2140 (vga_font): Removed variable.
2141 (get_vga_glyph): Removed function.
2142 (invalidate_char): Likewise.
2143 (write_char): Changed to use grub_font_get_glyph() for font
2144 information.
2145 (grub_vga_putchar): Likewise.
2146 (grub_vga_getcharwidth): Likewise.
2147
2148 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2149
2150 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
2151 flags.
2152 (pxeboot_img_LDFLAGS): Likewise.
2153 (diskboot_img_LDFLAGS): Likewise.
2154 (kernel_img_LDFLAGS): Likewise.
2155
2156 2007-11-06 Robert Millan <rmh@aybabtu.com>
2157
2158 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
2159 in grub_outb() calls.
2160 (serial_hw_init): Likewise.
2161
2162 2007-11-05 Robert Millan <rmh@aybabtu.com>
2163
2164 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
2165 spaces. Skip non-regular files.
2166
2167 2007-11-05 Robert Millan <rmh@aybabtu.com>
2168
2169 * kern/disk.c (grub_disk_firmware_fini)
2170 (grub_disk_firmware_is_tainted): New variables.
2171
2172 * include/grub/disk.h (grub_disk_firmware_fini)
2173 (grub_disk_firmware_is_tainted): Likewise.
2174
2175 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
2176 (grub_disk_biosdisk_fini): ... to here.
2177 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
2178 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
2179 is set. Register grub_disk_biosdisk_fini() in
2180 `grub_disk_firmware_fini'.
2181
2182 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
2183 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2184 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2185 to finish existing firmware disk interface.
2186
2187 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2188 (ata_mod_SOURCES): New variable.
2189 (ata_mod_CFLAGS): Likewise.
2190 (ata_mod_LDFLAGS): Likewise.
2191
2192 2007-11-05 Robert Millan <rmh@aybabtu.com>
2193
2194 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2195 (grub_ata_wait): Reimplement using grub_millisleep().
2196
2197 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2198 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2199
2200 2007-11-03 Marco Gerards <marco@gnu.org>
2201
2202 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2203 (CRTC_ADDR_PORT): New macro.
2204 (CRTC_DATA_PORT): Likewise.
2205 (CRTC_CURSOR): Likewise.
2206 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2207 (CRTC_CURSOR_ADDR_LOW): Likewise.
2208 (update_cursor): New function.
2209 (grub_console_real_putchar): Call `update_cursor'.
2210 (grub_console_gotoxy): Likewise.
2211 (grub_console_cls): Set the default color when clearing the
2212 screen.
2213 (grub_console_setcursor): Implemented.
2214
2215 2007-11-03 Marco Gerards <marco@gnu.org>
2216
2217 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2218 become activate.
2219 (grub_ata_pio_write): Likewise.
2220
2221 (grub_atapi_identify): Wait after issuing an ATA command.
2222 (grub_atapi_packet): Likewise.
2223 (grub_ata_identify): Likewise.
2224 (grub_ata_readwrite): Likewise.
2225
2226 2007-11-03 Marco Gerards <marco@gnu.org>
2227
2228 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2229 (grub_ata_pio_write): Likewise.
2230 (grub_ata_readwrite): Use `grub_error', instead of
2231 returning `grub_errno'.
2232
2233 2007-11-03 Marco Gerards <marco@gnu.org>
2234
2235 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2236 grub_ata_pio_write once for every single sector, instead of for
2237 multiple sectors.
2238
2239 2007-10-31 Robert Millan <rmh@aybabtu.com>
2240
2241 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2242
2243 * conf/i386-linuxbios.rmk: New file.
2244
2245 * kern/i386/pc/hardware.c: Likewise.
2246 * term/i386/pc/at_keyboard.c: Likewise.
2247 * term/i386/pc/vga_text.c: Likewise.
2248
2249 * include/grub/i386/linuxbios/boot.h: Likewise.
2250 * include/grub/i386/linuxbios/console.h: Likewise.
2251 * include/grub/i386/linuxbios/init.h: Likewise.
2252 * include/grub/i386/linuxbios/kernel.h: Likewise.
2253 * include/grub/i386/linuxbios/loader.h: Likewise.
2254 * include/grub/i386/linuxbios/memory.h: Likewise.
2255 * include/grub/i386/linuxbios/serial.h: Likewise.
2256 * include/grub/i386/linuxbios/time.h: Likewise.
2257
2258 * kern/i386/linuxbios/init.c: Likewise.
2259 * kern/i386/linuxbios/startup.S: Likewise.
2260 * kern/i386/linuxbios/table.c: Likewise.
2261
2262 2007-10-31 Marco Gerards <marco@gnu.org>
2263
2264 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2265 (ata_mod_SOURCES): New variable.
2266 (ata_mod_CFLAGS): Likewise.
2267 (ata_mod_LDFLAGS): Likewise.
2268
2269 * disk/ata.c: New file.
2270
2271 * include/grub/disk.h (grub_disk_dev_id): Add
2272 `GRUB_DISK_DEV_ATA_ID'.
2273
2274 2007-10-31 Robert Millan <rmh@aybabtu.com>
2275
2276 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2277 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2278
2279 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2280 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2281
2282 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2283 `<grub/types.h>'.
2284
2285 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2286
2287 2007-10-27 Robert Millan <rmh@aybabtu.com>
2288
2289 * include/grub/types.h (ULONG_MAX): Define macro.
2290
2291 2007-10-22 Robert Millan <rmh@aybabtu.com>
2292
2293 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2294 `"../realmode.S"'.
2295 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2296
2297 2007-10-22 Robert Millan <rmh@aybabtu.com>
2298
2299 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2300 (pkgdata_MODULES): Add `biosdisk.mod'.
2301 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2302 variables.
2303
2304 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2305 (grub_biosdisk_init): Replace with ...
2306 (GRUB_MOD_INIT(biosdisk)): ... this.
2307 (grub_biosdisk_fini): Replace with ...
2308 (GRUB_MOD_FINI(biosdisk)): ... this.
2309
2310 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2311 (grub_machine_init): Remove call to grub_biosdisk_init().
2312 (grub_machine_fini): Remove call to grub_machine_fini().
2313
2314 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2315
2316 2007-10-22 Robert Millan <rmh@aybabtu.com>
2317
2318 * include/grub/time.h: New file.
2319 * include/grub/i386/time.h: Likewise.
2320 * include/grub/powerpc/time.h: Likewise.
2321 * include/grub/sparc64/time.h: Likewise.
2322
2323 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2324 instances to ...
2325 (KERNEL_MACHINE_TIME_HEADER): ... this.
2326 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2327 instances to ...
2328 (KERNEL_MACHINE_TIME_HEADER): ... this.
2329 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2330 instances to ...
2331 (KERNEL_MACHINE_TIME_HEADER): ... this.
2332
2333 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2334 (grub_millisleep): New function.
2335 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2336 (grub_millisleep): New function.
2337 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2338 Remove `grub/machine/time.h' include.
2339 (grub_millisleep): New function.
2340 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2341 Remove `grub/machine/time.h' include.
2342 (grub_millisleep): New function.
2343
2344 * include/grub/misc.h (grub_div_roundup): New function.
2345
2346 * kern/misc.c: Include `<grub/time.h>'.
2347 (grub_millisleep_generic): New function.
2348
2349 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2350 Add `time.h'.
2351 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2352 Add `time.h'.
2353 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2354 `machine/time.h'. Add `time.h'.
2355 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2356
2357 2007-10-21 Robert Millan <rmh@aybabtu.com>
2358
2359 * include/grub/misc.h (grub_max): New function.
2360
2361 2007-10-21 Robert Millan <rmh@aybabtu.com>
2362
2363 * util/misc.c (grub_util_info): Call fflush() before returning.
2364
2365 2007-10-20 Robert Millan <rmh@aybabtu.com>
2366
2367 * genmk.rb (Image): Copy `extra_flags' from here ...
2368 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
2369
2370 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2371 to `argc' and `args' arguments.
2372
2373 2007-10-17 Robert Millan <rmh@aybabtu.com>
2374
2375 * kern/i386/loader.S: New file.
2376
2377 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2378 * kern/i386/loader.S (grub_linux_prot_size)... to here.
2379 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2380 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2381 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2382 * kern/i386/loader.S (grub_linux_real_addr)... to here.
2383 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2384 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2385 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2386 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2387 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2388 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2389 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2390 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2391
2392 * kern/i386/realmode.S: New file.
2393
2394 * kern/i386/pc/startup.S (protstack): Moved from here ...
2395 * kern/i386/realmode.S (protstack)... to here.
2396 * kern/i386/pc/startup.S (gdt): Moved from here ...
2397 * kern/i386/realmode.S (gdt)... to here.
2398 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2399 * kern/i386/realmode.S (prot_to_real)... to here.
2400
2401 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2402 `kern/i386/realmode.S'.
2403
2404 2007-10-17 Robert Millan <rmh@aybabtu.com>
2405
2406 * include/grub/i386/loader.h: New file.
2407
2408 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2409 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2410 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2411 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2412 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2413 * include/grub/i386/loader.h (grub_linux_prot_size)
2414 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2415 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2416 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2417 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2418
2419 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2420
2421 2007-10-15 Robert Millan <rmh@aybabtu.com>
2422
2423 * normal/misc.c (grub_normal_print_device_info): Do not probe for
2424 filesystem when dev->disk is unset.
2425 Do probe for filesystem even when dev->disk->has_partitions is set.
2426 In case a filesystem is found, always report it.
2427 In case it isn't, if dev->disk->has_partitions is set, report that
2428 a partition table was found instead of reporting that no filesystem
2429 could be identified.
2430
2431 2007-10-12 Robert Millan <rmh@aybabtu.com>
2432
2433 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
2434 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
2435
2436 * include/grub/types.h (grub_host_to_target16): New macro.
2437 (grub_host_to_target32): Likewise.
2438 (grub_host_to_target64): Likewise.
2439 (grub_target_to_host16): Likewise.
2440 (grub_target_to_host32): Likewise.
2441 (grub_target_to_host64): Likewise.
2442
2443 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2444 Renamed from to ...
2445 (GRUB_MOD_ALIGN): ...this. Update all users.
2446
2447 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
2448 grub_host_to_target32.
2449 Replace grub_be_to_cpu32 with grub_target_to_host32.
2450 (load_modules): Likewise.
2451 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
2452 Replace grub_be_to_cpu32 with grub_target_to_host32.
2453 Replace grub_cpu_to_be16 with grub_host_to_target16.
2454 Replace grub_cpu_to_be32 grub_host_to_target32.
2455
2456 2007-10-12 Robert Millan <rmh@aybabtu.com>
2457
2458 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
2459 * util/elf/grub-mkimage.c: ... here.
2460
2461 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
2462 `util/powerpc/ieee1275/grub-mkimage.c'.
2463
2464 2007-10-07 Robert Millan <rmh@aybabtu.com>
2465
2466 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
2467 and make it easier to figure out.
2468 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
2469 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
2470 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
2471 leave us with less than HEAP_MIN_SIZE total heap.
2472 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
2473
2474 2007-10-03 Robert Millan <rmh@aybabtu.com>
2475
2476 * include/grub/i386/io.h: New file.
2477 * commands/i386/pc/play.c (inb): Removed.
2478 (outb): Removed.
2479 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2480 with grub_outb().
2481 * term/i386/pc/serial.c (inb): Removed.
2482 (outb): Removed.
2483 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2484 with grub_outb().
2485 * term/i386/pc/vga.c (inb): Removed.
2486 (outb): Removed.
2487 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2488 with grub_outb().
2489
2490 2007-10-02 Robert Millan <rmh@aybabtu.com>
2491
2492 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
2493 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2494 Reported by Marcin Kurek.
2495
2496 2007-09-07 Robert Millan <rmh@aybabtu.com>
2497
2498 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
2499 SmartFirmware version updates (as released by Sven Luther), and avoid
2500 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
2501 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
2502 known broken.
2503
2504 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2505
2506 From Hitoshi Ozeki:
2507 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
2508 when merging two regions.
2509
2510 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2511
2512 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
2513 * normal/completion.c (grub_normal_do_completion): Likewise.
2514 Reported by Hitoshi Ozeki.
2515
2516 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2517
2518 Do not use devices at boot in chainloading.
2519
2520 * loader/i386/pc/chainloader.c (boot_drive): New variable.
2521 (boot_part_addr): Likewise.
2522 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
2523 with BOOT_DRIVE and BOOT_PART_ADDR.
2524 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
2525 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
2526
2527 2007-08-29 Robert Millan <rmh@aybabtu.com>
2528
2529 Patch from Simon Peter <dn.tlp@gmx.net>:
2530 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
2531 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
2532 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
2533 util/i386/pc/grub-setup.c_DEPENDENCIES.
2534 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
2535 util/grub-probe.c_DEPENDENCIES.
2536 * conf/powerpc-ieee1275.rmk: Likewise.
2537
2538 2007-08-28 Robert Millan <rmh@aybabtu.com>
2539
2540 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
2541 to tell grub-mkdevicemap how to name devices.
2542 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
2543 feature).
2544
2545 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
2546 util/i386/get_disk_name.c.
2547 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
2548 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
2549 util/ieee1275/get_disk_name.c.
2550
2551 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
2552
2553 * DISTLIST: Add util/i386/get_disk_name.c and
2554 util/ieee1275/get_disk_name.c.
2555
2556 * util/grub-mkdevicemap.c: Replace device naming logic with
2557 grub_util_get_disk_name() calls.
2558
2559 2007-08-20 Robert Millan <rmh@aybabtu.com>
2560
2561 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
2562 (so that it works for both plural and singular quantities).
2563
2564 2007-08-05 Robert Millan <rmh@aybabtu.com>
2565
2566 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
2567 so that [xz] isn't taken into account when determining order.
2568
2569 2007-08-02 Marco Gerards <marco@gnu.org>
2570
2571 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
2572 `include/multiboot2.h', `include/grub/elfload.h',
2573 `include/multiboot.h', `include/grub/multiboot.h',
2574 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
2575 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
2576 `kern/elf.c', `loader/multiboot_loader.c',
2577 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
2578 `loader/i386/pc/multiboot2.c',
2579 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
2580 `util/i386/pc/grub-mkrescue.in'. Remove
2581 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
2582 `include/grub/i386/pc/util/biosdisk.h' and
2583 `include/grub/powerpc/ieee1275/multiboot.h'.
2584
2585 2007-08-02 Bean <bean123ch@gmail.com>
2586
2587 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
2588 (ntfs_mod_SOURCES): New variable.
2589 (ntfs_mod_CFLAGS): Likewise.
2590 (ntfs_mod_LDFLAGS): Likewise.
2591
2592 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
2593 (grub_probe_SOURCES): Likewise.
2594 (grub_emu_SOURCES): Likewise.
2595
2596 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2597 (grub_emu_SOURCES): Likewise.
2598
2599 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2600 (grub_emu_SOURCES): Likewise.
2601
2602 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
2603
2604 * fs/ntfs.c: New file.
2605
2606 2007-08-02 Bean <bean123ch@gmail.com>
2607
2608 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
2609
2610 * file.h (grub_file): Likewise.
2611
2612 * fshelp.h (grub_fshelp_read_file): Likewise.
2613
2614 * util/i386/pc/grub-setup.c (setup): Likewise.
2615 (save_first_sector): Likewise.
2616 (save_blocklists): Likewise.
2617
2618 * fs/affs.c (grub_affs_read_file): Likewise.
2619
2620 * fs/ext2.c (grub_ext2_read_file): Likewise.
2621
2622 * fs/fat.c (grub_fat_read_data): Likewise.
2623
2624 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
2625
2626 * fs/hfs.c (grub_hfs_read_file): Likewise.
2627
2628 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2629
2630 * fs/jfs.c (grub_jfs_read_file): Likewise.
2631
2632 * fs/minix.c (grub_minix_read_file): Likewise.
2633
2634 * fs/sfs.c (grub_sfs_read_file): Likewise.
2635
2636 * fs/ufs.c (grub_ufs_read_file): Likewise.
2637
2638 * fs/xfs.c (grub_xfs_read_file): Likewise.
2639
2640 * command/blocklist.c (read_blocklist): Likewise.
2641 (print_blocklist): Likewise.
2642
2643 2007-08-02 Marco Gerards <marco@gnu.org>
2644
2645 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
2646 `util/hostfs.c'.
2647
2648 * disk/host.c: New file.
2649
2650 * util/hostfs.c: Likewise.
2651
2652 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
2653 return `GRUB_ERR_BAD_FS'.
2654 * fs/sfs.c (grub_sfs_mount): Likewise.
2655 * fs/xfs.c (grub_xfs_mount): Likewise.
2656
2657 * include/grub/disk.h (enum grub_disk_dev_id): Add
2658 `GRUB_DISK_DEVICE_HOST_ID'.
2659
2660 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
2661
2662 2007-07-24 Jerone Young <jerone@gmail.com>
2663
2664 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
2665 modules for compilation.
2666 * conf/powerpc-ieee1275.rmk: Likewise.
2667
2668 * include/multiboot.h: Move multiboot definitions to one file. Rename
2669 many definitions to not get grub specific.
2670 * include/multiboot2.h: Create header with multiboot 2 definitions.
2671 * include/grub/multiboot.h: Header for grub specific function
2672 prototypes and definitions.
2673 * include/grub/multiboot2.h: Likewise.
2674 * include/grub/multiboot_loader.h: Likewise.
2675 * include/grub/i386/pc/multiboot.h: Removed.
2676 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
2677
2678 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
2679 and 2 to allow for one multiboot and module commands.
2680 * loader/multiboot2.c: Add multiboot2 functionality.
2681 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
2682 and definition names.
2683 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
2684 2 functions.
2685 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
2686 ieee1275 specific multiboot2 code.
2687
2688 * kern/i386/pc/startup.S: Change headers and definition names for
2689 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
2690
2691 2007-07-22 Robert Millan <rmh@aybabtu.com>
2692
2693 * geninitheader.sh: Process file specified in first parameter rather
2694 than hardcoding grub_modules_init.lst.
2695 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
2696 than hardcoding grub_modules_init.h.
2697
2698 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
2699 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
2700 grub_probe_init.[ch] and grub_setup_init.[ch].
2701
2702 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
2703 grub_modules_init.h with grub_emu_init.h.
2704 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
2705 grub_probe_init.[ch] files.
2706 * conf/i386-efi.rmk: Likewise.
2707 * conf/i386-pc.rmk: Likewise.
2708 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
2709 grub_setup_init.[ch] files.
2710
2711 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
2712 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
2713 to initialize modules rather than a list of hardcoded functions.
2714 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
2715 grub_init_all() to initialize modules rather than a list of hardcoded
2716 functions.
2717
2718 2007-07-22 Robert Millan <rmh@aybabtu.com>
2719
2720 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
2721 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
2722
2723 2007-07-22 Robert Millan <rmh@aybabtu.com>
2724
2725 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2726 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
2727 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
2728 flag when running on SmartFirmware.
2729 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
2730 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
2731 was set.
2732
2733 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2734 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
2735 rather than decreasing it.
2736
2737 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
2738 there's not enough space to do it, fail in the same way as when it
2739 can't be done because there are no partitions.
2740
2741 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
2742 when nvsetenv failed.
2743
2744 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2745
2746 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
2747 because this rule is automatically generated.
2748 (grub-mkrescue): Removed for the same reason as above.
2749
2750 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2751
2752 Migrate to GNU General Public License Version 3.
2753
2754 * COPYING: Replaced with the plain text version of GPLv3.
2755
2756 * config.guess: Updated from gnulib.
2757 * config.sub: Likewise.
2758
2759 * geninit.sh: Output a GPLv3 copyright notice.
2760 * geninitheader.sh: Likewise.
2761 * genmodsrc.sh: Likewise.
2762 * gensymlist.sh.in: Likewise.
2763
2764 * boot/i386/pc/boot.S: Upgraded to GPLv3.
2765 * boot/i386/pc/diskboot.S: Likewise.
2766 * boot/i386/pc/pxeboot.S: Likewise.
2767 * commands/blocklist.c: Likewise.
2768 * commands/boot.c: Likewise.
2769 * commands/cat.c: Likewise.
2770 * commands/cmp.c: Likewise.
2771 * commands/configfile.c: Likewise.
2772 * commands/echo.c: Likewise.
2773 * commands/help.c: Likewise.
2774 * commands/ls.c: Likewise.
2775 * commands/search.c: Likewise.
2776 * commands/terminal.c: Likewise.
2777 * commands/test.c: Likewise.
2778 * commands/videotest.c: Likewise.
2779 * commands/i386/cpuid.c: Likewise.
2780 * commands/i386/pc/halt.c: Likewise.
2781 * commands/i386/pc/play.c: Likewise.
2782 * commands/i386/pc/reboot.c: Likewise.
2783 * commands/i386/pc/vbeinfo.c: Likewise.
2784 * commands/i386/pc/vbetest.c: Likewise.
2785 * commands/ieee1275/halt.c: Likewise.
2786 * commands/ieee1275/reboot.c: Likewise.
2787 * commands/ieee1275/suspend.c: Likewise.
2788 * disk/loopback.c: Likewise.
2789 * disk/lvm.c: Likewise.
2790 * disk/raid.c: Likewise.
2791 * disk/efi/efidisk.c: Likewise.
2792 * disk/i386/pc/biosdisk.c: Likewise.
2793 * disk/ieee1275/ofdisk.c: Likewise.
2794 * font/manager.c: Likewise.
2795 * fs/affs.c: Likewise.
2796 * fs/ext2.c: Likewise.
2797 * fs/fat.c: Likewise.
2798 * fs/fshelp.c: Likewise.
2799 * fs/hfs.c: Likewise.
2800 * fs/hfsplus.c: Likewise.
2801 * fs/iso9660.c: Likewise.
2802 * fs/jfs.c: Likewise.
2803 * fs/minix.c: Likewise.
2804 * fs/sfs.c: Likewise.
2805 * fs/ufs.c: Likewise.
2806 * fs/xfs.c: Likewise.
2807 * hello/hello.c: Likewise.
2808 * include/grub/acorn_filecore.h: Likewise.
2809 * include/grub/arg.h: Likewise.
2810 * include/grub/bitmap.h: Likewise.
2811 * include/grub/boot.h: Likewise.
2812 * include/grub/cache.h: Likewise.
2813 * include/grub/device.h: Likewise.
2814 * include/grub/disk.h: Likewise.
2815 * include/grub/dl.h: Likewise.
2816 * include/grub/elfload.h: Likewise.
2817 * include/grub/env.h: Likewise.
2818 * include/grub/err.h: Likewise.
2819 * include/grub/file.h: Likewise.
2820 * include/grub/font.h: Likewise.
2821 * include/grub/fs.h: Likewise.
2822 * include/grub/fshelp.h: Likewise.
2823 * include/grub/gzio.h: Likewise.
2824 * include/grub/hfs.h: Likewise.
2825 * include/grub/kernel.h: Likewise.
2826 * include/grub/loader.h: Likewise.
2827 * include/grub/lvm.h: Likewise.
2828 * include/grub/misc.h: Likewise.
2829 * include/grub/mm.h: Likewise.
2830 * include/grub/net.h: Likewise.
2831 * include/grub/normal.h: Likewise.
2832 * include/grub/parser.h: Likewise.
2833 * include/grub/partition.h: Likewise.
2834 * include/grub/pc_partition.h: Likewise.
2835 * include/grub/raid.h: Likewise.
2836 * include/grub/rescue.h: Likewise.
2837 * include/grub/script.h: Likewise.
2838 * include/grub/setjmp.h: Likewise.
2839 * include/grub/symbol.h: Likewise.
2840 * include/grub/term.h: Likewise.
2841 * include/grub/terminfo.h: Likewise.
2842 * include/grub/tparm.h: Likewise.
2843 * include/grub/types.h: Likewise.
2844 * include/grub/video.h: Likewise.
2845 * include/grub/efi/api.h: Likewise.
2846 * include/grub/efi/chainloader.h: Likewise.
2847 * include/grub/efi/console.h: Likewise.
2848 * include/grub/efi/console_control.h: Likewise.
2849 * include/grub/efi/disk.h: Likewise.
2850 * include/grub/efi/efi.h: Likewise.
2851 * include/grub/efi/pe32.h: Likewise.
2852 * include/grub/efi/time.h: Likewise.
2853 * include/grub/i386/linux.h: Likewise.
2854 * include/grub/i386/setjmp.h: Likewise.
2855 * include/grub/i386/types.h: Likewise.
2856 * include/grub/i386/efi/kernel.h: Likewise.
2857 * include/grub/i386/efi/loader.h: Likewise.
2858 * include/grub/i386/efi/time.h: Likewise.
2859 * include/grub/i386/pc/biosdisk.h: Likewise.
2860 * include/grub/i386/pc/boot.h: Likewise.
2861 * include/grub/i386/pc/chainloader.h: Likewise.
2862 * include/grub/i386/pc/console.h: Likewise.
2863 * include/grub/i386/pc/init.h: Likewise.
2864 * include/grub/i386/pc/kernel.h: Likewise.
2865 * include/grub/i386/pc/loader.h: Likewise.
2866 * include/grub/i386/pc/memory.h: Likewise.
2867 * include/grub/i386/pc/multiboot.h: Likewise.
2868 * include/grub/i386/pc/serial.h: Likewise.
2869 * include/grub/i386/pc/time.h: Likewise.
2870 * include/grub/i386/pc/vbe.h: Likewise.
2871 * include/grub/i386/pc/vbeblit.h: Likewise.
2872 * include/grub/i386/pc/vbefill.h: Likewise.
2873 * include/grub/i386/pc/vbeutil.h: Likewise.
2874 * include/grub/i386/pc/vga.h: Likewise.
2875 * include/grub/ieee1275/ieee1275.h: Likewise.
2876 * include/grub/ieee1275/ofdisk.h: Likewise.
2877 * include/grub/powerpc/libgcc.h: Likewise.
2878 * include/grub/powerpc/setjmp.h: Likewise.
2879 * include/grub/powerpc/types.h: Likewise.
2880 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2881 * include/grub/powerpc/ieee1275/console.h: Likewise.
2882 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
2883 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
2884 * include/grub/powerpc/ieee1275/loader.h: Likewise.
2885 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
2886 * include/grub/powerpc/ieee1275/time.h: Likewise.
2887 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
2888 * include/grub/sparc64/libgcc.h: Likewise.
2889 * include/grub/sparc64/setjmp.h: Likewise.
2890 * include/grub/sparc64/types.h: Likewise.
2891 * include/grub/sparc64/ieee1275/console.h: Likewise.
2892 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2893 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2894 * include/grub/sparc64/ieee1275/time.h: Likewise.
2895 * include/grub/util/biosdisk.h: Likewise.
2896 * include/grub/util/getroot.h: Likewise.
2897 * include/grub/util/lvm.h: Likewise.
2898 * include/grub/util/misc.h: Likewise.
2899 * include/grub/util/raid.h: Likewise.
2900 * include/grub/util/resolve.h: Likewise.
2901 * io/gzio.c: Likewise.
2902 * kern/device.c: Likewise.
2903 * kern/disk.c: Likewise.
2904 * kern/dl.c: Likewise.
2905 * kern/elf.c: Likewise.
2906 * kern/env.c: Likewise.
2907 * kern/err.c: Likewise.
2908 * kern/file.c: Likewise.
2909 * kern/fs.c: Likewise.
2910 * kern/loader.c: Likewise.
2911 * kern/main.c: Likewise.
2912 * kern/misc.c: Likewise.
2913 * kern/mm.c: Likewise.
2914 * kern/parser.c: Likewise.
2915 * kern/partition.c: Likewise.
2916 * kern/rescue.c: Likewise.
2917 * kern/term.c: Likewise.
2918 * kern/efi/efi.c: Likewise.
2919 * kern/efi/init.c: Likewise.
2920 * kern/efi/mm.c: Likewise.
2921 * kern/i386/dl.c: Likewise.
2922 * kern/i386/efi/init.c: Likewise.
2923 * kern/i386/efi/startup.S: Likewise.
2924 * kern/i386/pc/init.c: Likewise.
2925 * kern/i386/pc/lzo1x.S: Likewise.
2926 * kern/i386/pc/startup.S: Likewise.
2927 * kern/ieee1275/ieee1275.c: Likewise.
2928 * kern/powerpc/cache.S: Likewise.
2929 * kern/powerpc/dl.c: Likewise.
2930 * kern/powerpc/ieee1275/cmain.c: Likewise.
2931 * kern/powerpc/ieee1275/crt0.S: Likewise.
2932 * kern/powerpc/ieee1275/init.c: Likewise.
2933 * kern/powerpc/ieee1275/openfw.c: Likewise.
2934 * kern/sparc64/cache.S: Likewise.
2935 * kern/sparc64/dl.c: Likewise.
2936 * kern/sparc64/ieee1275/init.c: Likewise.
2937 * kern/sparc64/ieee1275/openfw.c: Likewise.
2938 * loader/efi/chainloader.c: Likewise.
2939 * loader/efi/chainloader_normal.c: Likewise.
2940 * loader/i386/efi/linux.c: Likewise.
2941 * loader/i386/efi/linux_normal.c: Likewise.
2942 * loader/i386/pc/chainloader.c: Likewise.
2943 * loader/i386/pc/chainloader_normal.c: Likewise.
2944 * loader/i386/pc/linux.c: Likewise.
2945 * loader/i386/pc/linux_normal.c: Likewise.
2946 * loader/i386/pc/multiboot.c: Likewise.
2947 * loader/i386/pc/multiboot_normal.c: Likewise.
2948 * loader/powerpc/ieee1275/linux.c: Likewise.
2949 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2950 * normal/arg.c: Likewise.
2951 * normal/cmdline.c: Likewise.
2952 * normal/command.c: Likewise.
2953 * normal/completion.c: Likewise.
2954 * normal/execute.c: Likewise.
2955 * normal/function.c: Likewise.
2956 * normal/lexer.c: Likewise.
2957 * normal/main.c: Likewise.
2958 * normal/menu.c: Likewise.
2959 * normal/menu_entry.c: Likewise.
2960 * normal/misc.c: Likewise.
2961 * normal/parser.y: Likewise.
2962 * normal/script.c: Likewise.
2963 * normal/i386/setjmp.S: Likewise.
2964 * normal/powerpc/setjmp.S: Likewise.
2965 * normal/sparc64/setjmp.S: Likewise.
2966 * partmap/acorn.c: Likewise.
2967 * partmap/amiga.c: Likewise.
2968 * partmap/apple.c: Likewise.
2969 * partmap/gpt.c: Likewise.
2970 * partmap/pc.c: Likewise.
2971 * partmap/sun.c: Likewise.
2972 * term/gfxterm.c: Likewise.
2973 * term/terminfo.c: Likewise.
2974 * term/efi/console.c: Likewise.
2975 * term/i386/pc/console.c: Likewise.
2976 * term/i386/pc/serial.c: Likewise.
2977 * term/i386/pc/vesafb.c: Likewise.
2978 * term/i386/pc/vga.c: Likewise.
2979 * term/ieee1275/ofconsole.c: Likewise.
2980 * util/biosdisk.c: Likewise.
2981 * util/console.c: Likewise.
2982 * util/genmoddep.c: Likewise.
2983 * util/getroot.c: Likewise.
2984 * util/grub-emu.c: Likewise.
2985 * util/grub-mkdevicemap.c: Likewise.
2986 * util/grub-probe.c: Likewise.
2987 * util/lvm.c: Likewise.
2988 * util/misc.c: Likewise.
2989 * util/raid.c: Likewise.
2990 * util/resolve.c: Likewise.
2991 * util/update-grub.in: Likewise.
2992 * util/update-grub_lib.in: Likewise.
2993 * util/grub.d/00_header.in: Likewise.
2994 * util/grub.d/10_hurd.in: Likewise.
2995 * util/grub.d/10_linux.in: Likewise.
2996 * util/i386/efi/grub-install.in: Likewise.
2997 * util/i386/efi/grub-mkimage.c: Likewise.
2998 * util/i386/pc/grub-install.in: Likewise.
2999 * util/i386/pc/grub-mkimage.c: Likewise.
3000 * util/i386/pc/grub-mkrescue.in: Likewise.
3001 * util/i386/pc/grub-setup.c: Likewise.
3002 * util/i386/pc/misc.c: Likewise.
3003 * util/powerpc/ieee1275/grub-install.in: Likewise.
3004 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
3005 * util/powerpc/ieee1275/misc.c: Likewise.
3006 * video/bitmap.c: Likewise.
3007 * video/video.c: Likewise.
3008 * video/i386/pc/vbe.c: Likewise.
3009 * video/i386/pc/vbeblit.c: Likewise.
3010 * video/i386/pc/vbefill.c: Likewise.
3011 * video/i386/pc/vbeutil.c: Likewise.
3012 * video/readers/tga.c: Likewise.
3013
3014 2007-07-02 Robert Millan <rmh@aybabtu.com>
3015
3016 * conf/i386-efi.rmk: Replace obsolete reference to
3017 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
3018 with util/getroot.c.
3019 * conf/powerpc-ieee1275.rmk: Likewise.
3020 * conf/sparc64-ieee1275.rmk: Likewise.
3021
3022 * util/grub-emu.c (main): Fix unchecked pointer handling.
3023
3024 2007-07-02 Robert Millan <rmh@aybabtu.com>
3025
3026 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
3027 invocation to fail, in order to support partition-less media.
3028
3029 * util/i386/pc/grub-install.in: Likewise.
3030
3031 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
3032 which fs or partmap modules are needed (akin to its sister scripts).
3033
3034 Also use grub-probe to get rid of unportable /proc/mounts check.
3035
3036 Print the same informational message that the other scripts do, before
3037 exitting.
3038
3039 2007-06-23 Robert Millan <rmh@aybabtu.com>
3040
3041 * util/update-grub_lib.in (font_path): New function. Determine wether
3042 a font file can be found and, if so, echo the GRUB path to it.
3043
3044 * util/update-grub.in: Handle multiple terminals depending on user
3045 input, platform availability and font file presence. Propagate
3046 variables of our findings to /etc/grub.d/ children.
3047
3048 * util/grub.d/00_header.in: Handle multiple terminals, based on
3049 environment setup by update-grub.
3050
3051 2007-06-23 Robert Millan <rmh@aybabtu.com>
3052
3053 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
3054
3055 2007-06-21 Robert Millan <rmh@aybabtu.com>
3056
3057 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
3058 indicate end of data section in kernel image.
3059 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
3060 GRUB_KERNEL_MACHINE_DATA_END.
3061
3062 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
3063 space for it.
3064 * kern/i386/efi/startup.S: Likewise.
3065
3066 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
3067 during image generation. Implement --prefix option to override this
3068 patch.
3069 * util/i386/efi/grub-mkimage.c: Likewise.
3070
3071 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
3072 code to make path relative to its root into a separate function.
3073
3074 * util/i386/pc/grub-install.in: Use newly provided
3075 make_system_path_relative_to_its_root() to convert ${grubdir}, then
3076 pass the result to grub-install --prefix.
3077
3078 2007-06-13 Robert Millan <rmh@aybabtu.com>
3079
3080 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
3081 DEFAULT_DEVICE_MAP.
3082 * util/grub-emu.c: Use above definitions from misc.h instead of
3083 defining them.
3084 * util/grub-mkdevicemap.c: Likewise.
3085 * util/i386/pc/grub-setup.c: Likewise.
3086 * util/grub-probe.c: Likewise.
3087 (probe): Abort with grub_util_error() when either
3088 grub_guess_root_device or grub_util_get_grub_dev fails.
3089
3090 2007-06-12 Robert Millan <rmh@aybabtu.com>
3091
3092 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
3093 "pager" assignment.
3094 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
3095 "pcdata".
3096 * util/grub-probe.c (probe): Likewise for "drive_name".
3097
3098 2007-06-11 Robert Millan <rmh@aybabtu.com>
3099
3100 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
3101 not just the cdrom one.
3102
3103 2007-06-11 Robert Millan <rmh@aybabtu.com>
3104
3105 * util/i386/pc/grub-mkrescue.in: Add "set -e".
3106 Add --pkglibdir=DIR option to override pkglibdir.
3107 Mention --image-type=TYPE in help output.
3108 Fix --grub-mkimage (it was a no-op).
3109 Abort gracefuly when no parameter is given.
3110
3111 2007-06-11 Robert Millan <rmh@aybabtu.com>
3112
3113 * util/i386/pc/grub-mkrescue.in: New file.
3114 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
3115 * Makefile.in: Handle bin_SCRIPTS.
3116
3117 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
3118
3119 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
3120 list of video modes.
3121
3122 2007-06-06 Robert Millan <rmh@aybabtu.com>
3123
3124 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
3125 file doesn't exist, or if it is in a filesystem grub can't read.
3126
3127 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
3128 not abort if GRUB_DRIVE could not be defined. Rearrange generated
3129 header comment to fit in 80 columns when the variables are resolved.
3130
3131 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
3132 could be identified by update-grub. Remove redundant check for
3133 unifont.pff existance (since convert_system_path_to_grub_path now
3134 handles that).
3135
3136 2007-06-04 Robert Millan <rmh@aybabtu.com>
3137
3138 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
3139
3140 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
3141
3142 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
3143
3144 2007-06-04 Robert Millan <rmh@aybabtu.com>
3145
3146 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
3147
3148 * include/grub/partition.h: Declare grub_apple_partition_map_init and
3149 grub_apple_partition_map_fini.
3150
3151 * util/biosdisk.c
3152 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
3153 to access >2 TiB disks).
3154
3155 Print disk->total_sectors with %llu instead of %lu, since this
3156 variable is always 64-bit (prevents wrong disk size from being displayed
3157 on either >2 TiB disk or big-endian CPU).
3158
3159 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
3160 into a generic case that supports all (sane) partition maps.
3161
3162 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
3163 breaks big-endian.
3164
3165 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
3166 and grub_apple_partition_map_fini() after that.
3167
3168 2007-06-01 Robert Millan <rmh@aybabtu.com>
3169
3170 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
3171
3172 * util/grub.d/00_header.in: Only enable gfxterm when
3173 convert_system_path_to_grub_path() succeeds.
3174
3175 2007-05-20 Robert Millan <rmh@aybabtu.com>
3176
3177 * util/update-grub_lib.in: New file.
3178 * DISTLIST: Add update-grub_lib.in.
3179 * conf/common.rmk: Generate update-grub_lib and install it in
3180 $(lib_DATA).
3181 * Makefile.in: Add install routine for $(lib_DATA).
3182
3183 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3184 function provided by update-grub_lib to support arbitrary paths of
3185 unifont.pff.
3186 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3187 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3188
3189 2007-05-19 Robert Millan <rmh@aybabtu.com>
3190
3191 * commands/i386/cpuid.c: New module.
3192 * DISTLIST: Add it.
3193 * conf/i386-efi.rmk: Enable cpuid.mod.
3194 * conf/i386-pc.rmk: Likewise.
3195
3196 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3197
3198 * kern/disk.c (grub_disk_read): Check return value of
3199 grub_realloc().
3200
3201 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3202
3203 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3204 arrays.
3205 * disk/raid.c (grub_raid_open): Likewise.
3206
3207 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3208
3209 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3210 stack instead of on the heap.
3211
3212 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3213 before doing a read on it.
3214
3215 * configure.ac: Only use -fno-stack-protector for the target
3216 environment.
3217
3218 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3219
3220 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3221 __attribute_ ((unused)) to mode_type argument.
3222
3223 * util/getroot.c (grub_guess_root_device): Fix #endif.
3224
3225 * kern/misc.c (memcmp): Fix prototype.
3226
3227 * include/grub/partition.h [GRUB_UTIL]
3228 (grub_gpt_partition_map_init): Add prototype.
3229 (grub_gpt_partition_map_fini): Likewise.
3230
3231 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3232 at the right place.
3233
3234 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3235 (grub_fat_read_data): Likewise.
3236 (grub_fat_find_dir): Likewise.
3237
3238 * font/manager.c (find_glyph): Make table a const.
3239 (grub_font_get_glyph): Remove bitmap from if statement.
3240
3241 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3242
3243 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3244 code, first search for device in /dev/mapper, then in /dev.
3245 (grub_util_get_grub_dev): New function.
3246 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3247 prototype.
3248 * util/grub-probe.c (probe): Remove check for RAID, call
3249 grub_util_get_grub_dev() instead of
3250 grub_util_biosdisk_get_grub_dev().
3251 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3252 grub_util_biosdisk_get_grub_dev().
3253 * util/i386/pc/grub-setup.c (main): Likewise.
3254
3255 2007-05-16 Robert Millan <rmh@aybabtu.com>
3256
3257 * DISTLIST: Update for the latest changes.
3258 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3259 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3260 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3261 grub/util/biosdisk.h.
3262 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3263 grub/util/biosdisk.h.
3264
3265 2007-05-16 Robert Millan <rmh@aybabtu.com>
3266
3267 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3268
3269 2007-05-16 Robert Millan <rmh@aybabtu.com>
3270
3271 * util/i386/efi/grub-install.in: New.
3272 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3273 newly added grub-install.
3274 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3275 include.
3276 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3277 grub/util/biosdisk.h.
3278 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3279 grub/util/biosdisk.h.
3280
3281 2007-05-16 Robert Millan <rmh@aybabtu.com>
3282
3283 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3284 * include/grub/util/biosdisk.h: ... here.
3285 * util/i386/pc/biosdisk.c: Moved to ...
3286 * util/biosdisk.c: ... here.
3287 * util/i386/pc/getroot.c: Moved to ...
3288 * util/getroot.c: ... here.
3289 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3290 * util/grub-mkdevicemap.c: ... here.
3291 * util/i386/pc/grub-probe.c: Moved to ...
3292 * util/grub-probe.c: ... here.
3293
3294 2007-05-15 Robert Millan <rmh@aybabtu.com>
3295
3296 * util/update-grub.in: Remove duplicated line in grub.cfg header
3297 message.
3298
3299 2007-05-13 Robert Millan <rmh@aybabtu.com>
3300
3301 * util/update-grub.in: Fix a few assumptions about the devices holding
3302 /, /boot and /boot/grub being the same.
3303 * util/grub.d/00_header.in: Likewise.
3304 * util/grub.d/10_hurd.in: Likewise.
3305 * util/grub.d/10_linux.in: Likewise.
3306
3307 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3308 patterns. Use that to define the `.old' suffix as older than `'.
3309
3310 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3311
3312 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3313 the grub.cfg header message.
3314
3315 2007-05-11 Robert Millan <rmh@aybabtu.com>
3316
3317 * util/update-grub.in: Create device.map if it doesn't already exist,
3318 before attempting to run grub-probe.
3319 Check for grub-probe and grub-mkdevicemap with the same code
3320 grub-install is using.
3321 Remove test mode.
3322
3323 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3324
3325 * Makefile.in: Add the datarootdir autoconf variable.
3326
3327 2007-05-09 Robert Millan <rmh@aybabtu.com>
3328
3329 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3330 fail gracefuly if dev->disk->partition == NULL.
3331
3332 2007-05-07 Robert Millan <rmh@aybabtu.com>
3333
3334 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3335 determine partition map module.
3336 * util/i386/pc/grub-install.in: Use this feature to decide which
3337 partition module to load, instead of hardcoding pc and gpt.
3338
3339 2007-05-07 Robert Millan <rmh@aybabtu.com>
3340
3341 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3342 source directory differs from build directory.
3343
3344 2007-05-05 Robert Millan <rmh@aybabtu.com>
3345
3346 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3347 initialisation.
3348
3349 2007-05-05 Robert Millan <rmh@aybabtu.com>
3350
3351 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3352
3353 2007-05-05 Robert Millan <rmh@aybabtu.com>
3354
3355 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3356 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3357
3358 2007-05-05 Robert Millan <rmh@aybabtu.com>
3359
3360 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3361 (grub_probe_SOURCES): Likewise.
3362 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3363 GPT and initialize dos_part and bsd_part accordingly.
3364 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3365 install_bsd_part.
3366 (main): Activate gpt module for use during partition identification,
3367 and deactivate it afterwards.
3368 * util/i386/pc/grub-install.in: Add gpt module to core.img.
3369 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3370 partition identification, and deactivate it afterwards.
3371
3372 2007-05-05 Robert Millan <rmh@aybabtu.com>
3373
3374 * term/i386/pc/console.c (grub_console_fini): Call
3375 grub_term_set_current() before grub_term_unregister().
3376
3377 2007-05-04 Robert Millan <rmh@aybabtu.com>
3378
3379 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3380 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3381 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
3382 and update-grub_DATA.
3383 * conf/common.rmk: Build and install update-grub components.
3384 * conf/common.mk: Regenerate.
3385 * util/update-grub.in: New. Core of update-grub.
3386 * util/grub.d/00_header.in: New. Generates grub.cfg header.
3387 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
3388 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
3389 * util/grub.d/README: New. Document grub.d directory layout.
3390
3391 2007-05-01 Robert Millan <rmh@aybabtu.com>
3392
3393 * util/grub-emu.c: Move initialization functions
3394 grub_util_biosdisk_init() and grub_init_all() before
3395 grub_util_biosdisk_get_grub_dev(), which relies on them.
3396
3397 2007-04-19 Robert Millan <rmh@aybabtu.com>
3398
3399 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3400 it is used later.
3401
3402 2007-04-18 Jerone Young <jerone@gmail.com>
3403
3404 * kernel/elf.c: Add missing parenthesis for conditional statement
3405 stanza.
3406
3407 2007-04-10 Jerone Young <jerone@gmail.com>
3408
3409 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3410 continue on and look for device node with real device name.
3411
3412 2007-04-10 Jerone Young <jerone@gmail.com>
3413
3414 * configure.ac: Add argument for autoconf to use tranformation
3415 ability.
3416 * Makefile.in: Add autoconf package transformation code.
3417 * util/i386/pc/grub-install.in: Likewise.
3418 * util/powerpc/ieee1275/grub-install.in: Likewise.
3419
3420 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3421
3422 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
3423 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
3424 (EXT2_REVISION): Likewise.
3425 (EXT2_INODE_SIZE): Likewise.
3426 (struct grub_ext2_block_group): Added a missing member
3427 "used_dirs".
3428 (grub_ext2_read_inode): Divide by the inode size in a superblock
3429 instead of 128 to obtain INODES_PER_BLOCK.
3430 Use the macro EXT2_INODE_SIZE instead of directly using
3431 SBLOCK->INODE_SIZE.
3432
3433 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3434
3435 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
3436 superblock instead of the structure size to compute an
3437 offset. This fixes the problem that GRUB could not read a
3438 filesystem when inode size is different from 128-byte.
3439
3440 2007-03-05 Marco Gerards <marco@gnu.org>
3441
3442 * normal/main.c (read_config_file): When "menu" is not set, create
3443 an initial context.
3444
3445 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3446
3447 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
3448 (HEAP_LIMIT): New macro.
3449 (grub_claim_heap): Claim memory up to `heaplimit'.
3450
3451 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3452
3453 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
3454 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
3455 (_start): Likewise.
3456 (grub_arch_modules_addr): Return address after `_end'.
3457 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
3458 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
3459 (add_segments): Calculate `_end' from phdr size and location.
3460 (ALIGN_UP): Moved to ...
3461 * include/grub/misc.h: here.
3462 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3463 New macro.
3464 (GRUB_IEEE1275_MODULE_BASE): Removed.
3465
3466 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3467
3468 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
3469 loop boundary.
3470
3471 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3472
3473 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
3474 All users updated.
3475 (grub_elf64_load_hook_t): Likewise.
3476 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
3477 debug output.
3478
3479 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3480
3481 * kern/mm.c: Update copyright.
3482 (grub_mm_debug): Correct syntax error.
3483 (grub_mm_dump_free): New function.
3484 (grub_debug_free): Call `grub_free'.
3485 * include/grub/mm.h: Update copyright.
3486 (grub_mm_dump_free): Add declaration.
3487
3488 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3489
3490 * include/grub/ieee1275/ieee1275.h: Update copyright.
3491 * kern/powerpc/ieee1275/init.c: Likewise.
3492 * kern/powerpc/ieee1275/openfw.c: Likewise.
3493
3494 * loader/powerpc/ieee1275/linux.c: Likewise.
3495 * include/grub/elfload.h: Likewise.
3496 * kern/elf.c: Likewise.
3497 (grub_elf32_load): Pass `base' and `size' parameters. Update all
3498 callers.
3499 (grub_elf64_load): Likewise.
3500 (grub_elf32_load_segment): Move to a nested function.
3501 (grub_elf64_load_segment): Likewise.
3502
3503 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3504
3505 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
3506 prototype.
3507 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
3508 (grub_heap_len): Likewise.
3509 (HEAP_SIZE): New macro.
3510 (grub_claim_heap): New function.
3511 (grub_machine_init): Don't claim heap directly. Call
3512 `grub_claim_heap'.
3513 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
3514 (grub_available_iterate): New function.
3515
3516 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
3517
3518 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
3519 * configure.ac: Use it for testing the HOST and TARGET compilers.
3520
3521 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
3522
3523 * Makefile.in (enable_grub_emu): New variable.
3524 * configure.ac (--enable-grub-emu): New option.
3525 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
3526 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
3527 * conf/i386-pc.rmk: Likewise.
3528 * conf/powerpc-ieee1275.rmk: Likewise.
3529 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
3530
3531 2006-12-12 Marco Gerards <marco@gnu.org>
3532
3533 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
3534
3535 * kern/env.c (grub_env_unset): Don't free the member `value' when
3536 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
3537 pointer.
3538
3539 * normal/main.c (current_menu): Removed.
3540 (free_menu): Unset the `menu' environment variable.
3541 (grub_normal_menu_addentry): Make use of the environment variable
3542 `menu', instead of using the global `current_menu'. Allocate
3543 memory for the sourcecode of this entry.
3544 (read_config_file): New argument `nested', changed all callers.
3545 Only in the case of a new context, initialize a new menu. Set the
3546 `menu' environment variable.
3547 (grub_normal_execute): Don't set and unset the environment
3548 variable `menu' here anymore. Only free the menu when leaving the
3549 context.
3550
3551 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
3552 leak.
3553
3554 2006-12-11 Marco Gerards <marco@gnu.org>
3555
3556 * normal/menu_entry.c (run): Fix off by one bug so the last line
3557 is executed. Move the loader check to outside the loop.
3558
3559 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
3560
3561 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
3562
3563 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
3564
3565 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
3566 the number of sectors. Reported by Andrey Shuvikov
3567 <mr_hyro@yahoo.com>.
3568
3569 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
3570
3571 * kern/disk.c (grub_disk_read): When there is a read error, always
3572 try to read only the necessary data.
3573
3574 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
3575 disk/raid.c.
3576 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
3577 prototype.
3578 [GRUB_UTIL] (grub_raid_fini): Likewise.
3579 [GRUB_UTIL] (grub_lvm_init): Likewise.
3580 [GRUB_UTIL] (grub_lvm_fini): Likewise.
3581 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
3582 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
3583 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
3584 and grub_raid_fini().
3585
3586 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3587
3588 * include/grub/types.h (__unused): Rename to UNUSED.
3589 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
3590 (grub_elf64_size): Likewise.
3591
3592 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3593
3594 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
3595 grub_error_push and grub_error_pop in the error-handling path.
3596 (grub_elf32_load_segment): Only call grub_file_read with non-zero
3597 length.
3598
3599 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3600
3601 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
3602 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3603 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3604 (kernel_elf_SOURCES): Likewise.
3605 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
3606 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
3607 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3608 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3609 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
3610 (elf_mod_SOURCES): New variable.
3611 (elf_mod_CFLAGS): Likewise.
3612 (elf_mod_LDFLAGS): Likewise.
3613 * include/grub/types.h (__unused): New macro.
3614 * include/grub/elfload.h: New file.
3615 * kern/elf.c: Likewise.
3616 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
3617 (ELF32_LOADMASK): New macro.
3618 (ELF64_LOADMASK): Likewise.
3619 (vmlinux): Removed.
3620 (grub_linux_load32): New function.
3621 (grub_linux_load64): Likewise.
3622 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
3623 Use grub_elf_t instead of grub_file_t.
3624
3625 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
3626
3627 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
3628 `catch_result' to struct set_color_args.
3629
3630 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
3631
3632 * normal/menu.c: Include grub/script.h.
3633 * normal/menu_entry.c: Likewise.
3634 * include/grub/normal.h: Do not include grub/script.h.
3635
3636 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3637
3638 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
3639
3640 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3641
3642 * kern/disk.c (grub_disk_open): Print debug messages when opening a
3643 disk.
3644 (grub_disk_close): Print debug messages when closing a disk.
3645 (grub_disk_read): Print debug messages when disk read fails.
3646 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
3647 filesystem type.
3648 * kern/partition.c: Include misc.h.
3649 (grub_partition_iterate): Print debug messages when detecting
3650 partition type.
3651
3652 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3653
3654 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
3655 is negative.
3656 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
3657
3658 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
3659
3660 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3661 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
3662
3663 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
3664
3665 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
3666 instead of sizeof(lv). Patch by Michael Guntsche.
3667
3668 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
3669
3670 * disk/lvm.c: Rename VGS to VG_LIST.
3671 (grub_lvm_iterate): Change VGS->LV to VG-LV.
3672 (grub_lvm_open): Likewise.
3673 Thanks to Michael Guntsche for finding this bug.
3674
3675 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3676
3677 * configure.ac (AC_INIT): Bumped to 1.95.
3678
3679 2006-10-14 Robert Millan <rmh@aybabtu.com>
3680
3681 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
3682 with "/dev/.static/dev/md".
3683
3684 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3685
3686 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
3687 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
3688 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
3689 DRIVE_NAME are always freed.
3690
3691 * util/i386/pc/biosdisk.c (make_device_name): Add one into
3692 DOS_PART, as a DOS partition is counted from one instead of zero
3693 now. Reported by Robert Millan.
3694
3695 2006-10-14 Robert Millan <rmh@aybabtu.com>
3696
3697 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
3698 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
3699 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
3700 string returned by grub_guess_root_device.
3701 * util/i386/pc/grub-setup.c: Likewise.
3702 * util/i386/pc/grub-probefs.c: Likewise.
3703
3704 * util/i386/pc/grub-probefs.c: Rename to ...
3705 * util/i386/pc/grub-probe.c: ... this.
3706 * DISTLIST: Remove grub-probefs, add grub-probe.
3707 * conf/i386-efi.rmk: Likewise.
3708 * conf/i386-pc.rmk: Likewise.
3709 * util/i386/pc/grub-install.in: Likewise.
3710
3711 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
3712 choose which information we want to print.
3713
3714 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3715
3716 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
3717 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
3718 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
3719 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
3720 video/readers/tga.c and video/i386/pc/vbeutil.c.
3721
3722 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
3723
3724 Added support for RAID and LVM.
3725
3726 * disk/lvm.c: New file.
3727 * disk/raid.c: Likewise.
3728 * include/grub/lvm.h: Likewise.
3729 * include/grub/raid.h: Likewise.
3730 * include/grub/util/lvm.h: Likewise.
3731 * include/grub/util/raid.h: Likewise.
3732 * util/lvm.c: Likewise.
3733 * util/raid.c: Likewise.
3734
3735 * include/grub/disk.h (grub_disk_dev_id): Add
3736 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
3737 (grub_disk_get_size): New prototype.
3738 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
3739 returns a partition.
3740 (grub_disk_get_size): New function.
3741
3742 * kern/i386/pc/init.c (make_install_device): Copy the prefix
3743 verbatim if grub_install_dos_part is -2.
3744
3745 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
3746 and LVM devices.
3747
3748 * util/i386/pc/grub-setup.c (setup): New argument
3749 MUST_EMBED. Force embedding of GRUB when the argument is
3750 true. Close FILE before returning.
3751 (main): Add support for RAID and LVM.
3752
3753 * conf/common.rmk: Add RAID and LVM modules.
3754 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
3755 util/lvm.c.
3756 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
3757
3758 * kern/misc.c (grub_strstr): New function.
3759 * include/grub/misc.h (grub_strstr): New prototype.
3760
3761 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
3762
3763 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
3764
3765 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
3766
3767 * kern/misc.c (grub_strtoull): Guess the base only if not
3768 specified.
3769
3770 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3771
3772 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
3773 PowerMac support.
3774
3775 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3776
3777 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
3778
3779 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
3780 Remove `flags' argument. All callers changed.
3781 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
3782 (IEEE1275_IHANDLE_INVALID): New variable.
3783 (IEEE1275_CELL_INVALID): New variable.
3784 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3785 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
3786 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
3787 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
3788 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
3789 codes from Open Firmware. All callers updated.
3790 (grub_ieee1275_next_property): Directly return Open Firmware return
3791 code.
3792 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3793 Standardize error checking from `grub_ieee1275_get_property'.
3794 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
3795 `devalias' to `aliases'. Correct comments. Consolidate error paths.
3796
3797 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3798
3799 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
3800 `instance_to_package_args' to `instance_to_path_args'.
3801
3802 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
3803 `grub_ieee1275_chosen'.
3804
3805 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
3806 `grub_ieee1275_interpret'.
3807
3808 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
3809
3810 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
3811
3812 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
3813
3814 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
3815 (__cmpdi): Likewise.
3816
3817 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
3818 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
3819 `grub_ssize_t'.
3820
3821 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
3822
3823 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
3824 to type `grub_ssize_t'.
3825 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
3826
3827 2006-09-22 Marco Gerards <marco@gnu.org>
3828
3829 * normal/script.c (grub_script_create_cmdmenu): Skip leading
3830 newlines.
3831
3832 2006-09-22 Marco Gerards <marco@gnu.org>
3833
3834 * commands/echo.c: New file.
3835
3836 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
3837
3838 * conf/common.rmk (echo_mod_SOURCES): New variable.
3839 (echo_mod_CFLAGS): Likewise.
3840 (echo_mod_LDFLAGS): Likewise.
3841
3842 2006-09-22 Marco Gerards <marco@gnu.org>
3843
3844 * normal/main.c (get_line): Malloc memory instead of using
3845 preallocated memory. Removed the arguments `cmdline' and
3846 `max_len'. Updated all callers.
3847
3848 2006-09-22 Marco Gerards <marco@gnu.org>
3849
3850 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
3851 (normal_mod_DEPENDENCIES): Likewise.
3852
3853 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
3854 (normal_mod_DEPENDENCIES): Likewise.
3855
3856 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
3857
3858 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
3859
3860 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
3861 programs.
3862 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
3863 (normal_mod_DEPENDENCIES): Likewise.
3864 * conf/i386-pc.mk: Regenerate.
3865 * conf/i386-efi.mk: Likewise
3866 * conf/common.mk: Likewise.
3867 * conf/powerpc-ieee1275.mk: Likewise.
3868 * conf/sparc64-ieee1275.mk: Likewise.
3869
3870 2006-09-22 Robert Millan <rmh@aybabtu.com>
3871
3872 Sync with i386 version.
3873 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
3874 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
3875
3876 2006-09-21 Robert Millan <rmh@aybabtu.com>
3877
3878 Import from GRUB Legacy (lib/device.c):
3879 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
3880 (init_device_map) [__linux__]: Add support for I2O devices.
3881
3882 2006-09-14 Marco Gerards <marco@gnu.org>
3883
3884 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
3885 `-melf_i386'.
3886
3887 2006-09-14 Robert Millan <rmh@aybabtu.com>
3888
3889 * util/i386/pc/grub-install.in: Skip menu.lst when removing
3890 /boot/grub/*.lst.
3891
3892 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
3893
3894 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
3895 before adding it to device.map.
3896
3897 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
3898
3899 * genmk.rb: Let GCC generate dependenceies the first time it
3900 compiles a file; using the -MD option.
3901 * conf/common.mk: Regenerate.
3902 * conf/i386-pc.mk: Likewise.
3903 * conf/i386-efi.mk: Likewise.
3904 * conf/powerpc-ieee1275.mk: Likewise.
3905 * conf/sparc64-ieee1275.mk: Likewise.
3906
3907 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
3908
3909 Move the prototypes of grub_setjmp and grub_longjmp to
3910 cpu/setjmp.h, so that each architecture may specify different
3911 attributes.
3912
3913 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
3914 (grub_longjmp): Likewise.
3915 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
3916 (grub_longjmp): Likewise.
3917 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
3918 (grub_longjmp): Likewise.
3919
3920 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
3921 [!GRUB_UTIL] (grub_longjmp): Removed.
3922
3923 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
3924
3925 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
3926 "color!" method does not return any value.
3927
3928 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3929
3930 * include/grub/bitmap.h: New file.
3931
3932 * include/grub/i386/pc/vbeutil.h: Likewise.
3933
3934 * video/bitmap.c: Likewise.
3935
3936 * video/readers/tga.c: Likewise.
3937
3938 * video/i386/pc/vbeutil.c: Likewise.
3939
3940 * commands/videotest.c: Code cleanup and updated to reflect to new
3941 video API.
3942
3943 * term/gfxterm.c: Likewise.
3944
3945 * video/video.c: Likewise.
3946
3947 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
3948 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
3949 (bitmap_mod_SOURCES): New entry.
3950 (bitmap_mod_CFLAGS): Likewise.
3951 (bitmap_mod_LDFLAGS): Likewise.
3952 (tga_mod_SOURCES): Likewise.
3953 (tga_mod_CFLAGS): Likewise.
3954 (tga_mod_LDFLAGS): Likewise.
3955
3956 * include/grub/video.h (grub_video_blit_operators): New enum type.
3957 (grub_video_render_target): Changed as forward declaration and moved
3958 actual definition to be video driver specific.
3959 (grub_video_adapter.blit_bitmap): Added blitting operator.
3960 (grub_video_adapter.blit_render_target): Likewise.
3961 (grub_video_blit_bitmap): Likewise.
3962 (grub_video_blit_render_target): Likewise.
3963
3964 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
3965 driver specific render target definition.
3966 (grub_video_vbe_map_rgba): Added driver internal helper.
3967 (grub_video_vbe_unmap_color): Updated to use
3968 grub_video_i386_vbeblit_info.
3969 (grub_video_vbe_get_video_ptr): Likewise.
3970
3971 * include/grub/i386/pc/vbeblit.h
3972 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
3973 grub_video_i386_vbeblit_info.
3974 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3975 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3976 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3977 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3978 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3979 (grub_video_i386_vbeblit_index_index): Likewise.
3980 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
3981 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3982 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3983 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
3984 operator.
3985 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
3986 operator.
3987
3988 * video/i386/pc/vbeblit.c: Updated to reflect changes on
3989 include/grub/i386/pc/vbeblit.h.
3990
3991 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
3992 Updated to use grub_video_i386_vbeblit_info.
3993 (grub_video_i386_vbefill_R8G8B8): Likewise.
3994 (grub_video_i386_vbefill_index): Likewise.
3995 (grub_video_i386_vbefill): Added generic filler.
3996
3997 * video/i386/pc/vbefill.c: Updated to reflect changes on
3998 include/grub/i386/pc/vbefill.h.
3999
4000 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
4001 grub_video_i386_vbeblit_info.
4002 (grub_video_vbe_unmap_color): Likewise.
4003 (grub_video_vbe_blit_glyph): Likewise.
4004 (grub_video_vbe_scroll): Likewise.
4005 (grub_video_vbe_draw_pixel): Removed function.
4006 (grub_video_vbe_get_pixel): Likewise.
4007 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
4008 updated code to use it.
4009 (common_blitter): Added common blitter for render target and bitmap.
4010 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
4011 (grub_video_vbe_blit_render_target): Likewise.
4012
4013 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
4014
4015 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
4016 is in text mode if there is no console control protocol instance
4017 available.
4018
4019 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4020
4021 * include/grub/video.h: Code cleanup.
4022
4023 * include/grub/i386/pc/vbe.h: Likewise.
4024
4025 * video/i386/pc/vbe.c: Likewise.
4026
4027 * video/i386/pc/vbeblit.c: Likewise.
4028
4029 * video/i386/pc/vbefill.c: Likewise.
4030
4031 * video/video.c: Likewise. Also added more comments.
4032
4033 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4034
4035 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
4036 (struct grub_biosdisk_dap): Likewise.
4037
4038 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
4039 linkage settings for all functions.
4040
4041 2006-07-12 Marco Gerards <marco@gnu.org>
4042
4043 * configure.ac (--enable-mm-debug): Fix typo.
4044
4045 * genkernsyms.sh.in: Use proper quoting for `CC'.
4046
4047 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
4048
4049 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
4050 (normal_mod_ASFLAGS): Remove "-m32".
4051
4052 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
4053
4054 * util/misc.c: Include config.h.
4055 [!HAVE_MEMALIGN]: Do not include malloc.h.
4056 (grub_memalign): Use posix_memalign, if present. Then, use
4057 memalign, if present. Otherwise, emit an error.
4058
4059 * util/grub-emu.c: Do not include malloc.h.
4060
4061 * include/grub/util/misc.h: Include unistd.h. This is required for
4062 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
4063 D. Eades III <hde@foobar-qux.org>.
4064
4065 * configure.ac (AC_GNU_SOURCE): Added.
4066 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
4067 type.
4068
4069 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
4070
4071 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
4072 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
4073
4074 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
4075
4076 * include/grub/types.h (grub_host_addr_t): Rename to
4077 grub_target_addr_t.
4078 (grub_host_off_t): Rename to grub_target_off_t.
4079 (grub_host_size_t): Rename to grub_target_size_t.
4080 (grub_host_ssize_t): Rename to grub_target_ssize_t.
4081 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
4082
4083 * include/grub/kernel.h (struct grub_module_header): Change type
4084 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
4085 (grub_module_info): Likewise.
4086
4087 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4088
4089 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
4090 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
4091 Velazquez <jesus.velazquez@gmail.com>.
4092
4093 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4094
4095 Count partitions from 1 instead of 0 in the string representation
4096 of partitions. Still use 0-based internally.
4097
4098 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
4099 (sun_partition_map_iterate): Use grub_partition_t instead of
4100 struct grub_partition *. Cast DESC->START_CYLINDER to
4101 grub_uint64_t after converting the endian.
4102 (sun_partition_map_probe): Subtract 1 for PARTNUM.
4103 (sun_partition_map_get_name): Add 1 to P->INDEX.
4104
4105 * partmap/pc.c (grub_partition_parse): Subtract 1 for
4106 PCDATA->DOS_PART.
4107 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
4108
4109 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
4110 zero instead of one.
4111 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
4112 (gpt_partition_map_get_name): Add 1 into P->INDEX.
4113
4114 * partmap/apple.c (apple_partition_map_iterate): Change the type
4115 of POS to unsigned.
4116 (apple_partition_map_probe): Subtract 1 for PARTNUM.
4117 (apple_partition_map_get_name): Add 1 into P->INDEX.
4118
4119 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
4120 of POS to unsigned.
4121 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
4122 calculate the offset of a partition.
4123 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
4124 (amiga_partition_map_get_name): Add 1 into P->INDEX.
4125
4126 * partmap/acorn.c (acorn_partition_map_find): Change the type of
4127 SECTOR to grub_disk_addr_t.
4128 (acorn_partition_map_iterate): Likewise.
4129 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
4130 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
4131 top.
4132 (acorn_partition_map_get_name): Add 1 into P->INDEX.
4133
4134 * kern/i386/pc/init.c (make_install_device): Add 1 into
4135 GRUB_INSTALL_DOS_PART.
4136
4137 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
4138 conditional.
4139
4140 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4141
4142 Clean up the code to support 64-bit addressing in disks and
4143 files. This change is not enough for filesystems yet.
4144
4145 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
4146 type of "start" to grub_uint64_t.
4147 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
4148 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
4149 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
4150 convert addresses.
4151
4152 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
4153 to grub_disk_addr_t.
4154
4155 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
4156 string.
4157
4158 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4159
4160 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
4161 to char *.
4162
4163 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
4164
4165 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
4166
4167 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
4168
4169 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
4170 to grub_off_t, to detect an error from grub_file_seek.
4171 (grub_multiboot_load_elf32): Likewise.
4172
4173 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
4174 maximum unsigned long value when an overflow is detected.
4175 (grub_strtoull): New function.
4176 (grub_divmod64): Likewise.
4177 (grub_lltoa): use grub_divmod64.
4178
4179 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
4180 grub_disk_addr_t.
4181 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
4182 the pointer to next character. Use grub_strtoull instead of
4183 grub_strtoul.
4184 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4185 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4186 respectively.
4187
4188 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
4189 return value is signed.
4190 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4191 test if OFFSET is less than zero, as OFFSET is unsigned now.
4192
4193 * kern/disk.c (struct grub_disk_cache): Change the type of
4194 "sector" to grub_disk_addr_t.
4195 (grub_disk_cache_get_index): Change the type of SECTOR to
4196 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4197 unsigned after shifting.
4198 (grub_disk_cache_invalidate): Change the type of SECTOR to
4199 grub_disk_addr_t.
4200 (grub_disk_cache_unlock): Likewise.
4201 (grub_disk_cache_store): Likewise.
4202 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4203 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4204 grub_disk_addr_t and grub_uint64_t, respectively.
4205 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4206 body, as the value of OFFSET is tweaked by
4207 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4208 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4209 respectively.
4210 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4211 body, as the value of OFFSET is tweaked by
4212 grub_disk_check_range. Change the types of LEN and N to
4213 grub_size_t.
4214
4215 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4216 and "saved_offset" to grub_off_t.
4217 (test_header): Cast BUF to char *.
4218 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4219 to char *.
4220 (grub_gzio_read): Change the types of OFFSET and SIZE to
4221 grub_off_t and grub_size_t, respectively.
4222
4223 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4224 Removed.
4225 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4226 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4227 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4228 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4229 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4230
4231 * include/grub/types.h (grub_off_t): Unconditionally set to
4232 grub_uint64_t.
4233 (grub_disk_addr_t): Changed to grub_uint64_t.
4234
4235 * include/grub/partition.h (struct grub_partition): Change the
4236 types of "start", "len" and "offset" to grub_disk_addr_t,
4237 grub_uint64_t and grub_disk_addr_t, respectively.
4238 (grub_partition_get_start): Return grub_disk_addr_t.
4239 (grub_partition_get_len): Return grub_uint64_t.
4240
4241 * include/grub/misc.h (grub_strtoull): New prototype.
4242 (grub_divmod64): Likewise.
4243
4244 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4245 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4246 grub_off_t, respectively.
4247 All callers and references changed.
4248
4249 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4250 grub_size_t in "read".
4251 All callers and references changed.
4252
4253 * include/grub/file.h (struct grub_file): Change the types of
4254 "offset" and "size" to grub_off_t and grub_off_t,
4255 respectively. Change the type of SECTOR to grub_disk_addr_t in
4256 "read_hook".
4257 (grub_file_read): Change the type of LEN to grub_size_t.
4258 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4259 grub_off_t.
4260 (grub_file_size): Return grub_off_t.
4261 (grub_file_tell): Likewise.
4262 All callers and references changed.
4263
4264 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4265 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4266 "write".
4267 (struct grub_disk): Change the type of "total_sectors" to
4268 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4269 "read_hook".
4270 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4271 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4272 (grub_disk_write): Likewise.
4273 All callers and references changed.
4274
4275 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4276 char * for grub_strncmp to silence gcc.
4277 (grub_iso9660_mount): Likewise.
4278 (grub_iso9660_mount): Likewise.
4279 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4280 return statement.
4281 (grub_iso9660_iterate_dir): Likewise.
4282 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4283
4284 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4285 LEN to grub_disk_addr_t and grub_size_t, respectively.
4286
4287 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4288
4289 * fs/jfs.c (grub_jfs_read_file): Likewise.
4290
4291 * fs/minix.c (grub_jfs_read_file): Likewise.
4292
4293 * fs/sfs.c (grub_jfs_read_file): Likewise.
4294
4295 * fs/ufs.c (grub_jfs_read_file): Likewise.
4296
4297 * fs/xfs.c (grub_jfs_read_file): Likewise.
4298
4299 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4300 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4301 respectively.
4302
4303 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4304 BLKNR to -1 instead of returning GRUB_ERRNO.
4305 (grub_ext2_read_file): Change the types of SECTOR and
4306 LEN to grub_disk_addr_t and grub_size_t, respectively.
4307
4308 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4309 LEN to grub_disk_addr_t and grub_size_t, respectively.
4310
4311 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4312 grub_file_read.
4313
4314 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4315 string. Do not cast SECTOR explicitly.
4316
4317 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4318 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4319 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4320 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4321 over 2TB and LBA mode is not supported, raise an error.
4322 (get_safe_sectors): New function.
4323 (grub_biosdisk_read): Use get_safe_sectors.
4324 (grub_biosdisk_write): Likewise.
4325
4326 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4327 (grub_efidisk_write): Likewise.
4328
4329 * disk/loopback.c (delete_loopback): Cosmetic changes.
4330 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4331 correctly.
4332 (grub_loopback_open): Likewise.
4333 (grub_loopback_read): Likewise. Also, change the type of POS to
4334 grub_off_t, and fix the usage of grub_memset.
4335
4336 * commands/i386/pc/play.c: Include grub/machine/time.h.
4337
4338 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4339 print FILE->SIZE.
4340
4341 * commands/configfile.c: Include grub/env.h.
4342
4343 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4344 GRUB_ERRNO directly instead. Change the type of POS to
4345 grub_off_t. Follow the coding standard.
4346
4347 * commands/blocklist.c: Include grub/partition.h.
4348 (grub_cmd_blocklist): Return an error if the underlying device is
4349 not a disk. Take the starting sector of a partition into account,
4350 if a partition is used.
4351
4352 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4353 a length field.
4354 (lba_mode): Support 64-bit addresses.
4355 (chs_mode): Likewise.
4356 (copy_buffer): Adapted to the new offsets of a length field and a
4357 segment field.
4358 (blocklist_default_start): Allocate 64-bit space.
4359
4360 * boot/i386/pc/boot.S (force_lba): Removed.
4361 (boot_drive): Moved to under KERNEL_SECTOR.
4362 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4363 space.
4364 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4365 is useless.
4366 (lba_mode): Refactored to support a 64-bit address. More size
4367 optimization.
4368 (setup_sectors): Likewise.
4369
4370 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4371
4372 * DISTLIST: Added include/grub/i386/linux.h. Removed
4373 include/grub/i386/pc/linux.h
4374
4375 * configure.ac (AC_INIT): Bumped to 1.94.
4376
4377 * config.guess: Updated from gnulib.
4378 * config.sub: Likewise.
4379 * install-sh: Likewise.
4380 * mkinstalldirs: Likewise.
4381
4382 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4383
4384 * conf/common.rmk (grub_modules_init.lst): Depended on
4385 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4386 MODSRCFILES.
4387
4388 * genmk.rb (PModule::rule): Reverted the previous change.
4389
4390 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4391
4392 * conf/common.rmk (grub_modules_init.lst): Depends on
4393 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4394 that the target does not exist before producing.
4395 (grub_modules_init.h): Remove the target before generating.
4396 (grub_emu_init.c): Likewise.
4397
4398 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4399
4400 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
4401
4402 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4403 for the target-specific tests. Make sure that we also have the
4404 up-to-date target variables for those tests.
4405
4406 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4407
4408 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4409 (PModule::rule): Likewise.
4410
4411 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4412
4413 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4414 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4415 target-specific flags should be prefixed.
4416 (PModule::rule): Likewise.
4417
4418 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
4419
4420 * configure.ac (CMP): Check if cmp is available explicitly.
4421
4422 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
4423
4424 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
4425 (target_cpu): New variable.
4426 (pkglibdir): Use target_cpu instead of host_cpu.
4427
4428 * util/i386/pc/grub-install.in (host_cpu): Removed.
4429 (target_cpu): New variable.
4430 (pkglibdir): Use target_cpu instead of host_cpu.
4431
4432 * util/genmoddep.c: Removed.
4433
4434 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
4435 instead of GRUB_HOST_SIZEOF_VOID_P.
4436 * kern/dl.c: Likewise.
4437
4438 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
4439 ...
4440 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4441 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4442 (GRUB_TARGET_SIZEOF_LONG): ... this.
4443 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4444 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4445 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4446 to ...
4447 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4448 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4449 (GRUB_TARGET_SIZEOF_LONG): ... this.
4450 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4451 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4452 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4453 to ...
4454 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4455 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4456 (GRUB_TARGET_SIZEOF_LONG): ... this.
4457 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4458 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4459
4460 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
4461 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
4462 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
4463 instead of GRUB_HOST_SIZEOF_LONG.
4464 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
4465 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
4466 GRUB_CPU_WORDS_BIGENDIAN.
4467 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
4468 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
4469 grub_host_ssize_t.
4470
4471 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
4472 (genmoddep_SOURCES): Likewise.
4473 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
4474 (genmoddep_SOURCES): Likewise.
4475 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
4476 (genmoddep_SOURCES): Likewise.
4477 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
4478 Likewise.
4479 (genmoddep_SOURCES): Likewise.
4480
4481 * genmoddep.awk: New file.
4482
4483 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
4484 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
4485 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
4486 (PModule::rule): Likewise.
4487 (Program::rule): Likewise.
4488 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
4489 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
4490 respectively.
4491
4492 * configure.ac: Rewritten intensively to use host and target
4493 instead of build and host, respectively.
4494
4495 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
4496 (host_cpu): Removed.
4497 (target_cpu): New variable.
4498 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
4499 (BUILD_CC): Removed.
4500 (BUILD_CFLAGS): Likewise.
4501 (BUILD_CPPFLAGS): Likewise.
4502 (TARGET_CC): New variable.
4503 (TARGET_CFLAGS): Likewise.
4504 (TARGET_CPPFLAGS): Likewise.
4505 (TARGET_LDFLAGS): Likewise.
4506 (AWK): Likewise.
4507 (include): Use target_cpu instead of host_cpu.
4508 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
4509
4510 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
4511
4512 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
4513
4514 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
4515 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
4516 field 'false' to 'exec_on_false'.
4517 (grub_script_create_cmdif): Renamed argument names to reflect above
4518 changes.
4519
4520 * normal/execute.c (grub_script_execute_cmdif): Likewise.
4521
4522 * normal/script.c (grub_script_create_cmdif): Likewise.
4523
4524 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
4525
4526 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
4527 top.
4528 (grub_hfsplus_btree_recptr): Likewise.
4529 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
4530 FILEBLOCK both to pass a block number and store next block
4531 number.
4532 (grub_hfsplus_read_block): Rewritten heavily to support an extent
4533 overflow file correctly. Specify errors appropriately, because
4534 fshelp expects that GRUB_ERRNO is set when fails. Reuse
4535 grub_hfsplus_btree_recptr to get the pointer to a found key.
4536 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
4537 is found.
4538
4539 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
4540 linux.mod.
4541 (_linux_mod_SOURCES): New variable.
4542 (_linux_mod_CFLAGS): Likewise.
4543 (_linux_mod_LDFLAGS): Likewise.
4544 (linux_mod_SOURCES): Likewise.
4545 (linux_mod_CFLAGS): Likewise.
4546 (linux_mod_LDFLAGS): Likewise.
4547
4548 * DISTLIST: Added loader/i386/efi/linux.c,
4549 loader/i386/efi/linux_normal.c and
4550 include/grub/i386/efi/loader.h.
4551
4552 * loader/i386/efi/linux.c: New file.
4553 * loader/i386/efi/linux_normal.c: Likewise.
4554 * include/grub/i386/efi/loader.h: Likewise.
4555
4556 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
4557
4558 * commands/blocklist.c: New file.
4559
4560 * DISTLIST: Added commands/blocklist.c.
4561
4562 * term/efi/console.c (grub_console_highlight_color): Use a lighter
4563 color for the background, and a darker color for the foreground.
4564 (grub_console_checkkey): Return READ_KEY.
4565 (grub_console_cls): Set the background to
4566 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
4567
4568 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
4569
4570 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
4571 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
4572
4573 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
4574 prototype.
4575
4576 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
4577 BG. The spec is wrong again.
4578
4579 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
4580 prototype.
4581 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
4582
4583 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4584 commands/blocklist.c.
4585 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4586
4587 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
4588 (blocklist_mod_SOURCES): New variable.
4589 (blocklist_mod_CFLAGS): Likewise.
4590 (blocklist_mod_LDFLAGS): Likewise.
4591
4592 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
4593
4594 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
4595 duplication.
4596 (lba_mode): Use %eax more intensively to reduce the code size.
4597
4598 2006-05-20 Marco Gerards <marco@gnu.org>
4599
4600 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
4601
4602 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
4603 for `menuentry'.
4604 (script): Accept leading newlines.
4605 (newlines): New rule to describe 0 or more newlines.
4606 (commands): Accept `command' with trailing newline. Fixed the
4607 order in which arguments were passed to `grub_script_add_cmd'.
4608 Accept commands separated by newlines.
4609 (function): Changed to accept newlines.
4610 (menuentry) Rewritten.
4611
4612 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
4613 front of the list, instead of to the end.
4614
4615 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
4616
4617 * util/i386/pc/grub-install.in (bindir): New variable.
4618 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
4619 Shaver <lbgwjl@gmail.com>.
4620
4621 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
4622
4623 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4624 grub/machine/linux.h
4625 * loader/i386/pc/linux.c: Likewise.
4626
4627 * include/grub/i386/pc/linux.h: Moved to ...
4628 * include/grub/i386/linux.h: ... here.
4629
4630 * include/grub/i386/linux.h (struct linux_kernel_params): New
4631 struct.
4632
4633 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
4634
4635 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
4636 checking.
4637 (grub_video_vbe_blit_glyph): Likewise.
4638 (grub_video_vbe_blit_bitmap): Likewise.
4639 (grub_video_vbe_blit_render_target): Likewise.
4640
4641 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
4642
4643 * configure.ac (--with-platform): Properly quote the square
4644 brackets.
4645
4646 2006-05-08 Marco Gerards <marco@gnu.org>
4647
4648 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
4649 this...
4650 (kernel_elf_HEADERS): ...to this. Updated all users.
4651 (grubof_symlist.c): Renamed from this...
4652 (kernel_elf_symlist.c): ...to this. Updated all users.
4653 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4654 (grubof_SOURCES): Renamed from this...
4655 (kernel_elf_SOURCES): ...to this.
4656 (grubof_HEADERS): Renamed from this...
4657 (kernel_elf_HEADERS): ...to this.
4658 (grubof_CFLAGS): Renamed from this...
4659 (kernel_elf_CFLAGS): ...to this.
4660 (grubof_ASFLAGS): Renamed from this...
4661 (kernel_elf_ASFLAGS): ...to this.
4662 (grubof_LDFLAGS): Renamed from this...
4663 (kernel_elf_LDFLAGS): ...to this.
4664
4665 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
4666 this...
4667 (kernel_elf_HEADERS): ...to this. Updated all users.
4668 (grubof_symlist.c): Renamed from this...
4669 (kernel_elf_symlist.c): ...to this. Updated all users.
4670 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4671 (grubof_SOURCES): Renamed from this...
4672 (kernel_elf_SOURCES): ...to this.
4673 (grubof_HEADERS): Renamed from this...
4674 (kernel_elf_HEADERS): ...to this.
4675 (grubof_CFLAGS): Renamed from this...
4676 (kernel_elf_CFLAGS): ...to this.
4677 (grubof_ASFLAGS): Renamed from this...
4678 (kernel_elf_ASFLAGS): ...to this.
4679 (grubof_LDFLAGS): Renamed from this...
4680 (kernel_elf_LDFLAGS): ...to this.
4681
4682 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
4683 `kernel.elf' instead of `grubof'.
4684
4685 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
4686
4687 Add --with-platform to configure. Use pkglibdir instead of
4688 pkgdatadir. This is reported by Roger Leigh.
4689
4690 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
4691 (host_vendor): Likewise.
4692 (host_os): Likewise.
4693 (pkgdatadir): Likewise.
4694 (platform): New variable.
4695 (pkglibdir): Likewise.
4696 Use PKGLIBDIR instead of PKGDATADIR.
4697
4698 * util/i386/pc/grub-install.in (datadir): Removed.
4699 (host_vendor): Likewise.
4700 (host_os): Likewise.
4701 (pkgdatadir): Likewise.
4702 (platform): New variable.
4703 (pkglibdir): Likewise.
4704 Use PKGLIBDIR instead of PKGDATADIR.
4705
4706 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
4707 instead of GRUB_DATADIR.
4708 (main): Likewise.
4709 * util/i386/pc/grub-mkimage.c (usage): Likewise.
4710 (main): Likewise.
4711 * util/i386/efi/grub-mkimage.c (usage): Likewise.
4712 (main): Likewise.
4713
4714 * configure.ac (--with-platform): New option.
4715 Use PLATFORM instead of HOST_VENDOR to specify a platform.
4716
4717 * Makefile.in: Include a makefile based on PLATFORM instead of
4718 HOST_VENDOR.
4719 (pkgdatadir): Not appended by the machine type.
4720 (pkglibdir): Appended by the machine type.
4721 (host_vendor): Removed.
4722 (platform): New variable.
4723 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
4724 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
4725 (uninstall): Likewise.
4726
4727 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
4728
4729 Use the environment context in the menu. Remove the commands
4730 "default" and "timeout", and use variables instead.
4731
4732 * normal/menu.c: Include grub/env.h.
4733 (print_entry): Cast TITLE to silence gcc.
4734 (get_timeout): New function.
4735 (set_timeout): Likewise.
4736 (get_entry_number): Likewise.
4737 (run_menu): Use a default entry, a fallback entry and a timeout
4738 in the environment variables "default", "fallback" and
4739 "timeout". Also, tweak the default entry if it is not within the
4740 current menu entries.
4741 (grub_menu_run): Use a fallback entry in the environment variable
4742 "fallback".
4743
4744 * normal/main.c (read_config_file): Do not initialize
4745 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
4746 NEWMENU->TIMEOUT.
4747 (grub_normal_execute): Use a data slot to store the menu.
4748
4749 * include/grub/normal.h (struct grub_menu): Removed default_entry,
4750 fallback_entry and timeout.
4751 (struct grub_menu_list): Removed.
4752 (grub_menu_list_t): Likewise.
4753 (struct grub_context): Likewise.
4754 (grub_context_t): Likewise.
4755 (grub_context_get): Likewise.
4756 (grub_context_get_current_menu): Likewise.
4757 (grub_context_push_menu): Likewise.
4758 (grub_context_pop_menu): Likewise.
4759 (grub_default_init): Likewise.
4760 (grub_default_fini): Likewise.
4761 (grub_timeout_init): Likewise.
4762 (grub_timeout_fini): Likewise.
4763
4764 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
4765 and timeout.mod.
4766 (normal_mod_SOURCES): Removed normal/context.c.
4767
4768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
4769 commands/default.c, commands/timeout.c and normal/context.c.
4770 (normal_mod_SOURCES): Removed normal/context.c.
4771
4772 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
4773 commands/timeout.c and normal/context.c.
4774 (normal_mod_SOURCES): Removed normal/context.c.
4775
4776 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
4777 commands/default.c, commands/timeout.c and normal/context.c.
4778 (normal_mod_SOURCES): Removed normal/context.c.
4779
4780 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
4781 timeout.mod.
4782 (default_mod_SOURCES): Removed.
4783 (default_mod_CFLAGS): Likewise.
4784 (default_mod_LDFLAGS): Likewise.
4785 (timeout_mod_SOURCES): Removed.
4786 (timeout_mod_CFLAGS): Likewise.
4787 (timeout_mod_LDFLAGS): Likewise.
4788
4789 * DISTLIST: Removed commands/default.c, commands/timeout.c and
4790 normal/context.c.
4791
4792 * commands/default.c: Removed.
4793 * commands/timeout.c: Likewise.
4794 * normal/context.c: Likewise.
4795
4796 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
4797
4798 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
4799
4800 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
4801
4802 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
4803 "next" to "prev" for readability.
4804 (struct grub_env_sorted_var): New struct.
4805 (grub_env_context): Renamed to ...
4806 (initial_context): ... this.
4807 (grub_env_var_context): Renamed to ...
4808 (current_context): ... this.
4809 (grub_env_find): Look only at CURRENT_CONTEXT.
4810 (grub_env_context_open): Rewritten to copy exported variables from
4811 previous context.
4812 (grub_env_context_close): Rewritten according to the new
4813 scheme. Also, add an assertion to prevent the initial context from
4814 removed.
4815 (grub_env_insert): Removed the code for the sorted list.
4816 (grub_env_remove): Likewise.
4817 (grub_env_export): Simply mark the variable with
4818 GRUB_ENV_VAR_GLOBAL.
4819 (grub_env_set): A cosmetic change for naming consistency.
4820 (grub_env_get): Likewise.
4821 (grub_env_unset): Likewise.
4822 (grub_env_iterate): Rewritten to sort variables within this
4823 function.
4824 (grub_register_variable_hook): Fixed for naming consistency. Call
4825 grub_env_find again, only if NAME is not found at the first time.
4826 (mangle_data_slot_name): New function.
4827 (grub_env_set_data_slot): Likewise.
4828 (grub_env_get_data_slot): Likewise.
4829 (grub_env_unset_data_slot): Likewise.
4830
4831 * include/grub/env.h (grub_env_var_type): New enum.
4832 (GRUB_ENV_VAR_LOCAL): New constant.
4833 (GRUB_ENV_VAR_GLOBAL): Likewise.
4834 (GRUB_ENV_VAR_DATA): Likewise.
4835 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
4836 "type".
4837 (grub_env_set): Replace VAR with NAME for consistency.
4838 (grub_register_variable_hook): Likewise.
4839 (grub_env_export): Specify the name of the argument.
4840 (grub_env_set_data_slot): New prototype.
4841 (grub_env_get_data_slot): Likewise.
4842 (grub_env_unset_data_slot): Likewise.
4843
4844 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4845
4846 Extend the loader so that GRUB can accept a loader which comes
4847 back to GRUB when a loaded image exits. Also, this change adds
4848 support for a chainloader on EFI.
4849
4850 * term/efi/console.c: Include grub/misc.h.
4851 (grub_console_checkkey): Display a scan code on the top for
4852 debugging. This will be removed once the EFI port gets stable.
4853 Correct the scan code mapping.
4854
4855 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
4856 allocate memory from larger regions, in order to reduce the number
4857 of allocated regions. Otherwise, the MacOSX loader panics.
4858 (filter_memory_map): Avoid less than 1MB for compatibility with
4859 other loaders.
4860 (add_memory_regions): Allocate from the tail of a region, if
4861 possible, to avoid allocating a region near to 1MB, for the MacOSX
4862 loader.
4863
4864 * kern/efi/init.c (grub_efi_set_prefix): Specify
4865 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
4866
4867 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
4868 argument IMAGE_HANDLE and specify it to get a loaded image.
4869 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
4870 grub_efi_get_loaded_image.
4871 (grub_efi_get_filename): Divide the legnth by the size of
4872 grub_efi_char16_t.
4873 (grub_efi_get_device_path): New function.
4874 (grub_efi_print_device_path): Print End Device Path nodes. Divide
4875 the length by the size of grub_efi_char16_t for a file path device
4876 path node.
4877
4878 * kern/loader.c (grub_loader_noreturn): New variable.
4879 (grub_loader_set): Accept a new argument NORETURN. Set
4880 GRUB_LOADER_NORETURN to NORETURN.
4881 All callers changed.
4882 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
4883 grub_machine_fini.
4884
4885 * include/grub/efi/efi.h (grub_efi_get_device_path): New
4886 prototype.
4887 (grub_efi_get_loaded_image): Take an argument to specify an image
4888 handle.
4889
4890 * include/grub/loader.h (grub_loader_set): Added one more argument
4891 NORETURN.
4892
4893 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
4894 instead of grub_efi_open_protocol.
4895 (grub_efidisk_get_device_name): Likewise.
4896 (grub_efidisk_close): Print a newline.
4897 (grub_efidisk_get_device_handle): Fixed to use
4898 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
4899 GRUB_EFI_DEVICE_PATH_TYPE.
4900
4901 * disk/efi/efidisk.c (device_path_guid): Moved to ...
4902 * kern/efi/efi.c (device_path_guid): ... here.
4903
4904 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
4905 chain.mod.
4906 (kernel_mod_HEADERS): Added efi/disk.h.
4907 (_chain_mod_SOURCES): New variable.
4908 (_chain_mod_CFLAGS): Likewise.
4909 (_chain_mod_LDFLAGS): Likewise.
4910 (chain_mod_SOURCES): Likewise.
4911 (chain_mod_CFLAGS): Likewise.
4912 (chain_mod_LDFLAGS): Likewise.
4913
4914 * DISTLIST: Added include/grub/efi/chainloader.h,
4915 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
4916
4917 * include/grub/efi/chainloader.h: New file.
4918 * loader/efi/chainloader.c: Likewise.
4919 * loader/efi/chainloader_normal.c: Likewise.
4920
4921 2006-04-30 Marco Gerards <marco@gnu.org>
4922
4923 * commands/configfile.c (grub_cmd_source): New function.
4924 (GRUB_MOD_INIT): Register the commands `source' and `.'.
4925 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
4926
4927 2006-04-30 Marco Gerards <marco@gnu.org>
4928
4929 * normal/execute.c (grub_script_execute_cmd): Change the return
4930 type to `grub_err_t'. Correctly return the error.
4931 (grub_script_execute_cmdline): In case a command line is not a
4932 command or a function, try to interpret it as an assignment.
4933
4934 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4935
4936 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
4937 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
4938 skip a node whose name is obviously invalid as UTF-16,
4939 i.e. contains a NUL character. Stop the iteration when the last
4940 directory entry is found. Instead of using the return value of
4941 grub_hfsplus_btree_iterate_node, store the value in RET and use
4942 it, because the iterator can be stopped by the last directory
4943 entry.
4944
4945 2006-04-30 Marco Gerards <marco@gnu.org>
4946
4947 * include/grub/env.h (grub_env_export): New prototype. Reported
4948 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
4949
4950 2006-04-30 Marco Gerards <marco@gnu.org>
4951
4952 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
4953 size of the extents in a catalog file record.
4954
4955 2006-04-29 Marco Gerards <marco@gnu.org>
4956
4957 * commands/configfile.c (grub_cmd_configfile): Execute the
4958 configfile within its own context.
4959
4960 * include/grub/env.h (grub_env_context_open): New prototype.
4961 (grub_env_context_close): Likewise.
4962
4963 * kern/env.c (grub_env): Removed.
4964 (grub_env_sorted): Likewise.
4965 (grub_env_context): New variable.
4966 (grub_env_var_context): Likewise.
4967 (grub_env_find): Search both the active context and the global
4968 context.
4969 (grub_env_context_open): New function.
4970 (grub_env_context_close): Likewise.
4971 (grub_env_insert): Likewise.
4972 (grub_env_remove): Likewise.
4973 (grub_env_export): Likewise.
4974 (grub_env_set): Changed to use helper functions to avoid code
4975 duplication.
4976 (grub_env_iterate): Rewritten so both the current context and the
4977 global context are being used.
4978
4979 * normal/command.c (export_command): New function.
4980 (grub_command_init): Register the `export' function.
4981
4982 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
4983
4984 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
4985 explicitly to suppress gcc's warnings.
4986 * fs/fat.c (grub_fat_find_dir): Likewise.
4987 (grub_fat_label): Likewise.
4988 * fs/xfs.c (grub_xfs_read_inode): Likewise.
4989 (grub_xfs_mount): Likewise.
4990 (grub_xfs_label): Likewise.
4991 * fs/affs.c (grub_affs_mount): Likewise.
4992 (grub_affs_label): Likewise.
4993 (grub_affs_iterate_dir): Likewise.
4994 * fs/sfs.c (grub_sfs_mount): Likewise.
4995 (grub_sfs_iterate_dir): Likewise.
4996 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
4997 * fs/hfs.c (grub_hfs_mount): Likewise.
4998 (grub_hfs_cmp_catkeys): Likewise.
4999 (grub_hfs_find_dir): Likewise.
5000 (grub_hfs_dir): Likewise.
5001 (grub_hfs_label): Likewise.
5002 * fs/jfs.c (grub_jfs_mount): Likewise.
5003 (grub_jfs_opendir): Likewise.
5004 (grub_jfs_getent): Likewise.
5005 (grub_jfs_lookup_symlink): Likewise.
5006 (grub_jfs_label): Likewise.
5007 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
5008 (grub_hfsplus_iterate_dir): Likewise.
5009 (grub_hfsplus_btree_iterate_node): Made static.
5010
5011 * util/grub-emu.c (prefix): New variable.
5012 (grub_machine_set_prefix): New function.
5013 (main): Do not set the environment variable "prefix" here. Only
5014 set PREFIX, which is used later by grub_machine_set_prefix.
5015
5016 * include/grub/video.h: Do not include grub/symbol.h.
5017 (grub_video_register): Not exported. This symbol is not defined in
5018 the kernel.
5019 (grub_video_unregister): Likewise.
5020 (grub_video_iterate): Likewise.
5021 (grub_video_setup): Likewise.
5022 (grub_video_restore): Likewise.
5023 (grub_video_get_info): Likewise.
5024 (grub_video_get_blit_format): Likewise.
5025 (grub_video_set_palette): Likewise.
5026 (grub_video_get_palette): Likewise.
5027 (grub_video_set_viewport): Likewise.
5028 (grub_video_get_viewport): Likewise.
5029 (grub_video_map_color): Likewise.
5030 (grub_video_map_rgb): Likewise.
5031 (grub_video_map_rgba): Likewise.
5032 (grub_video_fill_rect): Likewise.
5033 (grub_video_blit_glyph): Likewise.
5034 (grub_video_blit_bitmap): Likewise.
5035 (grub_video_blit_render_target): Likewise.
5036 (grub_video_scroll): Likewise.
5037 (grub_video_swap_buffers): Likewise.
5038 (grub_video_create_render_target): Likewise.
5039 (grub_video_delete_render_target): Likewise.
5040 (grub_video_set_active_render_target): Likewise.
5041
5042 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
5043 Undefined.
5044 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
5045
5046 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
5047 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5048 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5049 instead of $(srcdir)/genkernsyms.sh.
5050
5051 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
5052 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5053 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5054 instead of $(srcdir)/genkernsyms.sh.
5055
5056 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
5057 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5058 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5059 instead of $(srcdir)/genkernsyms.sh.
5060
5061 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
5062 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5063 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5064 instead of $(srcdir)/genkernsyms.sh.
5065
5066 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
5067 genkernsyms.sh.
5068
5069 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
5070 genkernsyms.sh.
5071 (gensymlist.sh): New target.
5072 (genkernsyms.sh): Likewise.
5073
5074 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
5075 genkernsyms.sh.in and gensymlist.sh.in.
5076
5077 * genkernsyms.sh: Removed.
5078 * gensymlist.sh: Likewise.
5079
5080 * genkernsyms.sh.in: New file.
5081 * gensymlist.sh.in: Likewise.
5082
5083 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5084
5085 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
5086 clobber "prefix", since we may have already set it manually.
5087
5088 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5089
5090 * kern/misc.c (abort): New alias for grub_abort.
5091
5092 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
5093
5094 A new machine-specific function "grub_machine_set_prefix" is
5095 defined. This is called after loading modules, so that a prefix
5096 initialization can use modules. Also, this change adds an
5097 intensive debugging feature for the memory manager via the
5098 configure option "--enable-mm-debug".
5099
5100 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
5101 PART.LEN.
5102
5103 * kern/sparc64/ieee1275/init.c (abort): Removed.
5104 (grub_stop): Likewise.
5105 (grub_exit): New function.
5106 (grub_set_prefix): Renamed to ...
5107 (grub_machine_set_prefix): ... this.
5108 (grub_machine_init): Do not call grub_set_prefix.
5109
5110 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
5111 (grub_machine_set_prefix): ... this.
5112 (grub_machine_init): Do not call grub_set_prefix.
5113
5114 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
5115 (grub_machine_init): Do not set the prefix here.
5116
5117 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
5118
5119 * kern/efi/init.c: Include grub/mm.h.
5120 (grub_efi_set_prefix): New function.
5121
5122 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
5123 (grub_efi_get_filename): New function.
5124 (grub_print_device_path): Renamed to ...
5125 (grub_efi_print_device_path): ... this.
5126
5127 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
5128 [MM_DEBUG] (grub_realloc): Likewise.
5129 [MM_DEBUG] (grub_free): Likewise.
5130 [MM_DEBUG] (grub_memalign): Likewise.
5131 [MM_DEBUG] (grub_mm_debug): New variable.
5132 [MM_DEBUG] (grub_debug_malloc): New function.
5133 [MM_DEBUG] (grub_debug_free): New function.
5134 [MM_DEBUG] (grub_debug_realloc): New function.
5135 [MM_DEBUG] (grub_debug_memalign): New function.
5136
5137 * kern/misc.c (grub_abort): Print a newline to distinguish
5138 the message.
5139
5140 * kern/main.c (grub_main): Call grub_machine_set_prefix and
5141 grub_set_root_dev after loading modules. This is necessary when
5142 setting a prefix depends on modules.
5143
5144 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
5145 (grub_efi_print_device_path): ... this.
5146 (grub_efi_get_filename): New prototype.
5147 (grub_efi_set_prefix): Likewise.
5148
5149 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
5150 and grub/disk.h.
5151 (grub_efidisk_get_device_handle): New prototype.
5152 (grub_efidisk_get_device_name): Likewise.
5153
5154 * include/grub/mm.h: Include config.h.
5155 (MM_DEBUG): Removed.
5156 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
5157 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
5158 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
5159 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
5160 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
5161 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
5162 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
5163 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
5164 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
5165
5166 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
5167
5168 * disk/efi/efidisk.c: Include grub/partition.h.
5169 (iterate_child_devices): New function.
5170 (add_device): First, compare only last device path nodes, so that
5171 devices are sorted by the types.
5172 (grub_efidisk_get_device_handle): New function.
5173 (grub_efidisk_get_device_name): Likewise.
5174
5175 * configure.ac (--enable-mm-debug): New option to enable the
5176 memory manager debugging feature. This makes the binary much
5177 bigger, so is disabled by default.
5178
5179 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
5180
5181 Use grub_abort instead of grub_stop, and grub_exit must be
5182 define in each architecture now. Also, this change adds support
5183 for EFI disks.
5184
5185 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5186 (grub_getkey): New function.
5187 (grub_term_get_current): Likewise.
5188
5189 * util/i386/pc/grub-setup.c: Include grub/term.h.
5190 (grub_getkey): New function.
5191 (grub_term_get_current): Likewise.
5192
5193 * util/misc.c (grub_stop): Renamed to ...
5194 (grub_exit): ... this.
5195
5196 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5197 (grub_exit): ... this.
5198 (grub_machine_init): Use grub_abort instead of abort.
5199 (grub_stop): Removed.
5200
5201 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5202 abort.
5203
5204 * kern/i386/pc/startup.S (grub_exit): New function.
5205 (cold_reboot): New label.
5206
5207 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5208 (grub_efi_init): Call grub_efidisk_init.
5209 (grub_efi_fini): Call grub_efidisk_fini.
5210
5211 * kern/efi/efi.c: Include grub/mm.h.
5212 (grub_efi_console_control_guid): Renamed to ...
5213 (console_control_guid): ... this.
5214 (grub_efi_loaded_image_guid): Renamed to ...
5215 (loaded_image_guid): ... this.
5216 (grub_efi_locate_handle): New function.
5217 (grub_efi_open_protocol): Likewise.
5218 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5219 GRUB_EFI_CONSOLE_CONTROL_GUID.
5220 (grub_efi_exit): Removed.
5221 (grub_stop): Likewise.
5222 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5223 (grub_exit): New function.
5224 (grub_print_device_path): Likewise.
5225
5226 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5227 (grub_enter_rescue_mode): Register "exit".
5228
5229 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5230 (grub_abort): New function.
5231
5232 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5233
5234 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5235
5236 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5237
5238 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5239 (grub_print_device_path): New prototype.
5240 (grub_efi_locate_handle): Likewise.
5241 (grub_efi_open_protocol): Likewise.
5242
5243 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5244 * disk/efi/efidisk.c: Likewise.
5245
5246 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5247
5248 * include/grub/efi/console_control.h
5249 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5250
5251 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5252 last 8 bytes as an array.
5253 (GRUB_EFI_DISK_IO_GUID): New macro.
5254 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5255 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5256 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5257 grub_uint8_t.
5258 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5259 (struct grub_efi_device_path): Rename the member "sub_type" to
5260 "subtype".
5261 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5262 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5263 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5264 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5265 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5266 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5267 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5268 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5269 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5270 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5271 (struct grub_efi_pci_device_path): New structure.
5272 (grub_efi_pci_device_path_t): New type.
5273 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5274 (struct grub_efi_pccard_device_path): New structure.
5275 (grub_efi_pccard_device_path_t): New type.
5276 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5277 (struct grub_efi_memory_mapped_device_path): New structure.
5278 (grub_efi_memory_mapped_device_path_t): New type.
5279 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5280 (struct grub_efi_vendor_device_path): New structure.
5281 (grub_efi_vendor_device_path_t): New type.
5282 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5283 (struct grub_efi_controller_device_path): New structure.
5284 (grub_efi_controller_device_path_t): New type.
5285 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5286 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5287 (struct grub_efi_acpi_device_path): New structure.
5288 (grub_efi_acpi_device_path_t): New type.
5289 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5290 (struct grub_efi_expanded_acpi_device_path): New structure.
5291 (grub_efi_expanded_acpi_device_path_t): New type.
5292 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5293 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5294 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5295 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5296 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5297 (struct grub_efi_atapi_device_path): New structure.
5298 (grub_efi_atapi_device_path_t): New type.
5299 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5300 (struct grub_efi_fibre_channel_device_path): New structure.
5301 (grub_efi_fibre_channel_device_path_t): New type.
5302 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5303 (struct grub_efi_1394_device_path): New structure.
5304 (grub_efi_1394_device_path_t): New type.
5305 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5306 (struct grub_efi_usb_device_path): New structure.
5307 (grub_efi_usb_device_path_t): New type.
5308 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5309 (struct grub_efi_usb_class_device_path): New structure.
5310 (grub_efi_usb_class_device_path_t): New type.
5311 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5312 (struct grub_efi_i2o_device_path): New structure.
5313 (grub_efi_i2o_device_path_t): New type.
5314 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5315 (struct grub_efi_mac_address_device_path): New structure.
5316 (grub_efi_mac_address_device_path_t): New type.
5317 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5318 (struct grub_efi_ipv4_device_path): New structure.
5319 (grub_efi_ipv4_device_path_t): New type.
5320 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5321 (struct grub_efi_ipv6_device_path): New structure.
5322 (grub_efi_ipv6_device_path_t): New type.
5323 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5324 (struct grub_efi_infiniband_device_path): New structure.
5325 (grub_efi_infiniband_device_path_t): New type.
5326 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5327 (struct grub_efi_uart_device_path): New structure.
5328 (grub_efi_uart_device_path_t): New type.
5329 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5330 (struct grub_efi_vendor_messaging_device_path): New structure.
5331 (grub_efi_vendor_messaging_device_path_t): New type.
5332 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5333 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5334 (struct grub_efi_hard_drive_device_path): New structure.
5335 (grub_efi_hard_drive_device_path_t): New type.
5336 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5337 (struct grub_efi_cdrom_device_path): New structure.
5338 (grub_efi_cdrom_device_path_t): New type.
5339 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5340 (struct grub_efi_vendor_media_device_path): New structure.
5341 (grub_efi_vendor_media_device_path_t): New type.
5342 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5343 (struct grub_efi_file_path_device_path): New structure.
5344 (grub_efi_file_path_device_path_t): New type.
5345 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5346 (struct grub_efi_protocol_device_path): New structure.
5347 (grub_efi_protocol_device_path_t): New type.
5348 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5349 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5350 (struct grub_efi_bios_device_path): New structure.
5351 (grub_efi_bios_device_path_t): New type.
5352 (struct grub_efi_disk_io): New structure.
5353 (grub_efi_disk_io_t): New type.
5354 (struct grub_efi_block_io_media): New structure.
5355 (grub_efi_block_io_media_t): New type.
5356 (struct grub_efi_block_io): New structure.
5357 (grub_efi_block_io_t): New type.
5358
5359 * include/grub/misc.h (grub_stop): Removed.
5360 (grub_exit): New prototype.
5361 (grub_abort): Likewise.
5362
5363 * include/grub/disk.h (enum grub_disk_dev_id): Added
5364 GRUB_DISK_DEVICE_EFIDISK_ID.
5365
5366 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5367 disk/efi/efidisk.c.
5368 (kernel_syms.lst): Remove the target if an error occurs.
5369
5370 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
5371
5372 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5373 as it was simply too buggy.
5374
5375 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
5376
5377 * kern/misc.c (grub_lltoa): New function.
5378 (grub_vsprintf): Added support for the long long suffix,
5379 i.e. "ll".
5380
5381 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
5382
5383 * Makefile.in (LDFLAGS): Add variable.
5384 (LD): Remove variable.
5385 * configure.ac: Add -m32 to LDFLAGS.
5386 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5387 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5388 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5389 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5390 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5391 variables.
5392 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5393 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5394 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5395
5396 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
5397
5398 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5399 length for unknown glyph.
5400
5401 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5402
5403 Add support for pre-loaded modules into the EFI port.
5404
5405 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5406 completely. Accept one more argument DIR. The caller has changed.
5407
5408 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5409
5410 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5411 (grub_efi_loaded_image_guid): New variable.
5412 (grub_efi_get_loaded_image): New function.
5413 (grub_arch_modules_addr): Likewise.
5414
5415 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5416 prototype.
5417
5418 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5419 (struct grub_efi_loaded_image): New structure.
5420 (grub_efi_loaded_image_t): New type.
5421
5422 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5423
5424 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
5425 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
5426 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
5427
5428 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
5429
5430 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
5431
5432 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
5433
5434 * DISTLIST: Added include/grub/efi/console.h,
5435 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
5436 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5437
5438 * include/grub/efi/console.h: New file.
5439 * include/grub/efi/time.h: Likewise.
5440 * include/grub/i386/efi/kernel.h: Likewise.
5441 * kern/efi/init.c: Likewise.
5442 * kern/efi/mm.c: Likewise.
5443 * term/efi/console.c: Likewise.
5444
5445 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
5446 (grub_stop): Removed.
5447 (grub_get_rtc): Likewise.
5448 (grub_machine_init): Simply call grub_efi_init.
5449 (grub_machine_fini): Call grub_efi_fini.
5450
5451 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
5452 (grub_efi_output_string): Removed.
5453 (grub_efi_stall): New function.
5454 (grub_stop): Likewise.
5455 (grub_get_rtc): Likewise.
5456
5457 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
5458 (grub_efi_stall): New prototype.
5459 (grub_efi_allocate_pages): Likewise.
5460 (grub_efi_free_pages): Likewise.
5461 (grub_efi_get_memory_map): Likewise.
5462 (grub_efi_mm_init): Likewise.
5463 (grub_efi_mm_fini): Likewise.
5464 (grub_efi_init): Likewise.
5465 (grub_efi_fini): Likewise.
5466
5467 * include/grub/i386/efi/time.h: Do not include
5468 grub/symbol.h. Include grub/efi/time.h.
5469 (GRUB_TICKS_PER_SECOND): Removed.
5470 (grub_get_rtc): Likewise.
5471
5472 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
5473 Added padding. The EFI spec is buggy.
5474 (GRUB_EFI_BLACK): New macro.
5475 (GRUB_EFI_BLUE): Likewise.
5476 (GRUB_EFI_GREEN): Likewise.
5477 (GRUB_EFI_CYAN): Likewise.
5478 (GRUB_EFI_RED): Likewise.
5479 (GRUB_EFI_MAGENTA): Likewise.
5480 (GRUB_EFI_BROWN): Likewise.
5481 (GRUB_EFI_LIGHTGRAY): Likewise.
5482 (GRUB_EFI_BRIGHT): Likewise.
5483 (GRUB_EFI_DARKGRAY): Likewise.
5484 (GRUB_EFI_LIGHTBLUE): Likewise.
5485 (GRUB_EFI_LIGHTGREEN): Likewise.
5486 (GRUB_EFI_LIGHTCYAN): Likewise.
5487 (GRUB_EFI_LIGHTRED): Likewise.
5488 (GRUB_EFI_LIGHTMAGENTA): Likewise.
5489 (GRUB_EFI_YELLOW): Likewise.
5490 (GRUB_EFI_WHITE): Likewise.
5491 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
5492 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
5493 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
5494 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
5495 (GRUB_EFI_BACKGROUND_RED): Likewise.
5496 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
5497 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
5498 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
5499 (GRUB_EFI_TEXT_ATTR): Likewise.
5500
5501 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
5502 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5503 (kernel_mod_HEADERS): Added efi/time.h.
5504
5505 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
5506
5507 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
5508 include/grub/efi/api.h, include/grub/efi/console_control.h,
5509 include/grub/efi/efi.h, include/grub/efi/pe32.h,
5510 include/grub/i386/efi/time.h, kern/efi/efi.c,
5511 kern/i386/efi/init.c, kern/i386/efi/startup.S,
5512 and util/i386/efi/grub-mkimage.c.
5513
5514 * Makefile.in (RMKFILES): Added i386-efi.rmk.
5515
5516 * genmk.rb (PModule#rule): Do not export symbols if
5517 #{prefix}_EXPORTS is set to "no".
5518
5519 * conf/i386-efi.mk: New file.
5520 * conf/i386-efi.rmk: Likewise.
5521 * include/grub/efi/api.h: Likewise.
5522 * include/grub/efi/console_control.h: Likewise.
5523 * include/grub/efi/efi.h: Likewise.
5524 * include/grub/efi/pe32.h: Likewise.
5525 * include/grub/i386/efi/time.h: Likewise.
5526 * kern/efi/efi.c: Likewise.
5527 * kern/i386/efi/init.c: Likewise.
5528 * kern/i386/efi/startup.S: Likewise.
5529 * util/i386/efi/grub-mkimage.c: Likewise.
5530
5531 2006-04-17 Marco Gerards <marco@gnu.org>
5532
5533 * include/grub/script.h: Include <grub/parser.h> and
5534 "grub_script.tab.h".
5535 (struct grub_lexer_param): New struct.
5536 (struct grub_parser_param): Likewise.
5537 (grub_script_create_arglist): Pass the state in an argument.
5538 (grub_script_add_arglist): Likewise.
5539 (grub_script_create_cmdline): Likewise.
5540 (grub_script_create_cmdblock): Likewise.
5541 (grub_script_create_cmdif): Likewise.
5542 (grub_script_create_cmdmenu): Likewise.
5543 (grub_script_add_cmd): Likewise.
5544 (grub_script_arg_add): Likewise.
5545 (grub_script_lexer_ref): Likewise.
5546 (grub_script_lexer_deref): Likewise.
5547 (grub_script_lexer_record_start): Likewise.
5548 (grub_script_lexer_record_stop): Likewise.
5549 (grub_script_mem_record): Likewise.
5550 (grub_script_mem_record_stop): Likewise.
5551 (grub_script_malloc): Likewise.
5552 (grub_script_yylex): Likewise.
5553 (grub_script_yyparse): Likewise.
5554 (grub_script_yyerror): Likewise.
5555 (grub_script_yylex): Likewise.
5556 (grub_script_lexer_init): Return the state.
5557
5558 * normal/lexer.c (grub_script_lexer_state): Removed variable.
5559 (grub_script_lexer_done): Likewise.
5560 (grub_script_lexer_getline): Likewise.
5561 (grub_script_lexer_refs): Likewise.
5562 (script): Likewise.
5563 (newscript): Likewise.
5564 (record): Likewise.
5565 (recording): Likewise.
5566 (recordpos): Likewise.
5567 (recordlen): Likewise.
5568 (grub_script_lexer_init): Return the state instead of setting
5569 global variables.
5570 (grub_script_lexer_ref): Use the newly added argument for state
5571 instead of globals.
5572 (grub_script_lexer_deref): Likewise.
5573 (grub_script_lexer_record_start): Likewise.
5574 (grub_script_lexer_record_stop): Likewise.
5575 (recordchar): Likewise.
5576 (nextchar): Likewise.
5577 (grub_script_yylex2): Likewise.
5578 (grub_script_yylex): Likewise.
5579 (grub_script_yyerror): Likewise.
5580
5581 * normal/parser.y (func_mem): Removed variable.
5582 (menu_entry): Likewise.
5583 (err): Likewise.
5584 (%lex-param): New parser option.
5585 (%parse-param): Likewise.
5586 (script): Always return the AST.
5587 (argument): Pass the state around.
5588 (arguments): Likewise.
5589 (grubcmd): Likewise.
5590 (commands): Likewise.
5591 (function): Likewise.
5592 (menuentry): Likewise.
5593 (if_statement): Likewise.
5594 (if): Likewise.
5595
5596 * normal/script.c (grub_script_memused): Removed variable.
5597 (grub_script_parsed): Likewise.
5598 (grub_script_malloc): Added a state argument. Use that instead of
5599 global variables.
5600 (grub_script_mem_record): Likewise.
5601 (grub_script_mem_record_stop): Likewise.
5602 (grub_script_arg_add): Likewise.
5603 (grub_script_add_arglist): Likewise.
5604 (grub_script_create_cmdline): Likewise.
5605 (grub_script_create_cmdif): Likewise.
5606 (grub_script_create_cmdmenu): Likewise.
5607 (grub_script_add_cmd): Likewise.
5608 (grub_script_parse): Setup the state before calling the parser.
5609
5610 2006-04-16 Marco Gerards <marco@gnu.org>
5611
5612 * normal/command.c (grub_command_init): Remove the title command.
5613
5614 * normal/lexer.c (grub_script_yylex): Renamed from this...
5615 (grub_script_yylex2): ... to this.
5616 (grub_script_yylex): New function. Temporary
5617 introduced to filter some tokens.
5618 (grub_script_yyerror): Print a newline.
5619
5620 * normal/main.c (read_config_file): Output information about the
5621 lines that contain errors. Wait for a key after all lines have
5622 been processed. Don't return an empty menu.
5623
5624 * normal/parser.y (func_mem): Don't initialize.
5625 (menu_entry): Likewise.
5626 (err): New variable.
5627 (script): Don't return anything when an error was encountered.
5628 (ws, returns): Removed rules.
5629 (argument): Disabled concatenated variable support.
5630 (arguments): Remove explicit separators.
5631 (grubcmd): Likewise.
5632 (function): Likewise.
5633 (menuentry): Likewise.
5634 (if): Likewise.
5635 (commands): Likewise. Add error handling.
5636
5637 * normal/script.c (grub_script_create_cmdline): If
5638 `grub_script_parsed' is 0, assume the parser encountered an error.
5639
5640 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
5641
5642 * configure.ac: Add support for EFI. Fix the typo
5643 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
5644
5645 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5646
5647 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
5648 foreign multibyte characters should be shown correctly.
5649
5650 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5651
5652 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
5653 calculation.
5654 (read_config_file): Made it to close file before returning.
5655
5656 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
5657
5658 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
5659 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
5660 video/i386/pc/vbefill.c.
5661
5662 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
5663 video/i386/pc/vbefill.c.
5664
5665 * include/grub/video.h (grub_video_blit_format): New enum.
5666 (grub_video_mode_info): Added new member blit_format.
5667 (grub_video_get_blit_format): New function prototype.
5668
5669 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
5670 function prototype.
5671 (grub_video_vbe_map_rgb): Likewise.
5672 (grub_video_vbe_unmap_color): Likewise.
5673
5674 * include/grub/i386/pc/vbeblit.h: New file.
5675
5676 * include/grub/i386/pc/vbefill.h: New file.
5677
5678 * video/video.c (grub_video_get_blit_format): New function.
5679 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
5680 (grub_video_vbe_map_rgb): Likewise.
5681 (grub_video_vbe_unmap_color): Likewise.
5682
5683 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
5684 optimized fills.
5685 (grub_video_vbe_blit_render_target): Changed to use more optimized
5686 blits.
5687 (grub_video_vbe_setup): Added detection for optimized settings.
5688 (grub_video_vbe_create_render_target): Likewise.
5689
5690 * video/i386/pc/vbeblit.c: New file.
5691
5692 * video/i386/pc/vbefill.c: New file.
5693
5694 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
5695
5696 * font/manager.c (grub_font_get_glyph): Removed font fixup from
5697 here...
5698
5699 * util/unifont2pff.rb: ... and moved it to here. Improved argument
5700 parsing to support both hex and dec ranges. If filename was missing
5701 show usage information.
5702
5703 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
5704
5705 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
5706 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
5707
5708 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
5709 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
5710 (video_mod_SOURCES): Added.
5711 (video_mod_CFLAGS): Likewise.
5712 (video_mod_LDFLAGS): Likewise.
5713 (gfxterm_mod_SOURCES): Likewise.
5714 (gfxterm_mod_CFLAGS): Likewise.
5715 (gfxterm_mod_LDFLAGS): Likewise.
5716 (videotest_mod_SOURCES): Likewise.
5717 (videotest_mod_CFLAGS): Likewise.
5718 (videotest_mod_LDFLAGS): Likewise.
5719 (vesafb_mod_SOURCES): Removed.
5720 (vesafb_mod_CFLAGS): Likewise.
5721 (vesafb_mod_LDFLAGS): Likewise.
5722 (vga_mod_SOURCES): Likewise.
5723 (vga_mod_CFLAGS): Likewise.
5724 (vga_mod_LDFLAGS): Likewise.
5725
5726 * commands/videotest.c: New file.
5727
5728 * font/manager.c (fill_with_default_glyph): Modified to use
5729 grub_font_glyph.
5730 (grub_font_get_glyph): Likewise.
5731 (fontmanager): Renamed from this...
5732 (font_manager): ... to this.
5733
5734 * include/grub/font.h (grub_font_glyph): Added new structure.
5735 (grub_font_get_glyph): Modified to use grub_font_glyph.
5736
5737 * include/grub/misc.h (grub_abs): Added as inline function.
5738
5739 * include/grub/video.h: New file.
5740
5741 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
5742 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
5743 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
5744 (grub_vbe_get_controller_info): Renamed from this...
5745 (grub_vbe_bios_get_controller_info): ... to this.
5746 (grub_vbe_get_mode_info): Renamed from this...
5747 (grub_vbe_bios_get_mode_info): ... to this.
5748 (grub_vbe_set_mode): Renamed from this...
5749 (grub_vbe_bios_set_mode): ... to this.
5750 (grub_vbe_get_mode): Renamed from this...
5751 (grub_vbe_bios_get_mode): ... to this.
5752 (grub_vbe_set_memory_window): Renamed from this...
5753 (grub_vbe_bios_set_memory_window): ... to this.
5754 (grub_vbe_get_memory_window): Renamed from this...
5755 (grub_vbe_bios_get_memory_window): ... to this.
5756 (grub_vbe_set_scanline_length): Renamed from this...
5757 (grub_vbe_set_scanline_length): ... to this.
5758 (grub_vbe_get_scanline_length): Renamed from this...
5759 (grub_vbe_bios_get_scanline_length): ... to this.
5760 (grub_vbe_set_display_start): Renamed from this...
5761 (grub_vbe_bios_set_display_start): ... to this.
5762 (grub_vbe_get_display_start): Renamed from this...
5763 (grub_vbe_bios_get_display_start): ... to this.
5764 (grub_vbe_set_palette_data): Renamed from this...
5765 (grub_vbe_bios_set_palette_data): ... to this.
5766 (grub_vbe_set_pixel_rgb): Removed.
5767 (grub_vbe_set_pixel_index): Likewise.
5768
5769 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
5770 from this...
5771 (grub_vbe_bios_get_controller_info): ... to this.
5772 (grub_vbe_get_mode_info): Renamed from this...
5773 (grub_vbe_bios_get_mode_info): ... to this.
5774 (grub_vbe_set_mode): Renamed from this...
5775 (grub_vbe_bios_set_mode): ... to this.
5776 (grub_vbe_get_mode): Renamed from this...
5777 (grub_vbe_bios_get_mode): ... to this.
5778 (grub_vbe_set_memory_window): Renamed from this...
5779 (grub_vbe_bios_set_memory_window): ... to this.
5780 (grub_vbe_get_memory_window): Renamed from this...
5781 (grub_vbe_bios_get_memory_window): ... to this.
5782 (grub_vbe_set_scanline_length): Renamed from this...
5783 (grub_vbe_set_scanline_length): ... to this.
5784 (grub_vbe_get_scanline_length): Renamed from this...
5785 (grub_vbe_bios_get_scanline_length): ... to this.
5786 (grub_vbe_set_display_start): Renamed from this...
5787 (grub_vbe_bios_set_display_start): ... to this.
5788 (grub_vbe_get_display_start): Renamed from this...
5789 (grub_vbe_bios_get_display_start): ... to this.
5790 (grub_vbe_set_palette_data): Renamed from this...
5791 (grub_vbe_bios_set_palette_data): ... to this.
5792 (grub_vbe_bios_get_controller_info): Fixed problem with registers
5793 getting corrupted after calling it. Added more pushes and pops.
5794 (grub_vbe_bios_set_mode): Likewise.
5795 (grub_vbe_bios_get_mode): Likewise.
5796 (grub_vbe_bios_get_memory_window): Likewise.
5797 (grub_vbe_bios_set_scanline_length): Likewise.
5798 (grub_vbe_bios_get_scanline_length): Likewise.
5799 (grub_vbe_bios_get_display_start): Likewise.
5800 (grub_vbe_bios_set_palette_data): Likewise.
5801
5802 * normal/cmdline.c (cl_set_pos): Refresh the screen.
5803 (cl_insert): Likewise.
5804 (cl_delete): Likewise.
5805
5806 * term/gfxterm.c: New file.
5807
5808 * term/i386/pc/vesafb.c: Removed file.
5809
5810 * video/video.c: New file.
5811
5812 * video/i386/pc/vbe.c (real2pm): Added new function.
5813 (grub_video_vbe_draw_pixel): Likewise.
5814 (grub_video_vbe_get_video_ptr): Likewise.
5815 (grub_video_vbe_get_pixel): Likewise
5816 (grub_video_vbe_init): Likewise.
5817 (grub_video_vbe_fini): Likewise.
5818 (grub_video_vbe_setup): Likewise.
5819 (grub_video_vbe_get_info): Likewise.
5820 (grub_video_vbe_set_palette): Likewise.
5821 (grub_video_vbe_get_palette): Likewise.
5822 (grub_video_vbe_set_viewport): Likewise.
5823 (grub_video_vbe_get_viewport): Likewise.
5824 (grub_video_vbe_map_color): Likewise.
5825 (grub_video_vbe_map_rgb): Likewise.
5826 (grub_video_vbe_map_rgba): Likewise.
5827 (grub_video_vbe_unmap_color): Likewise.
5828 (grub_video_vbe_fill_rect): Likewise.
5829 (grub_video_vbe_blit_glyph): Likewise.
5830 (grub_video_vbe_blit_bitmap): Likewise.
5831 (grub_video_vbe_blit_render_target): Likewise.
5832 (grub_video_vbe_scroll): Likewise.
5833 (grub_video_vbe_swap_buffers): Likewise.
5834 (grub_video_vbe_create_render_target): Likewise.
5835 (grub_video_vbe_delete_render_target): Likewise.
5836 (grub_video_vbe_set_active_render_target): Likewise.
5837 (grub_vbe_set_pixel_rgb): Remove function.
5838 (grub_vbe_set_pixel_index): Likewise.
5839 (index_color_mode): Remove static variable.
5840 (active_mode): Likewise.
5841 (framebuffer): Likewise.
5842 (bytes_per_scan_line): Likewise.
5843 (grub_video_vbe_adapter): Added new static variable.
5844 (framebuffer): Likewise.
5845 (render_target): Likewise.
5846 (initial_mode): Likewise.
5847 (mode_in_use): Likewise.
5848 (mode_list): Likewise.
5849
5850 2006-03-10 Marco Gerards <marco@gnu.org>
5851
5852 * configure.ac (AC_INIT): Bumped to 1.93.
5853
5854 * DISTLIST: Added `include/grub/hfs.h'.
5855
5856 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
5857
5858 * boot/i386/pc/boot.S (general_error): Before looping, try INT
5859 18H, which might help the BIOS falling back to next boot media.
5860
5861 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
5862
5863 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
5864 Poe Chen <poe.poechen@gmail.com>.
5865
5866 2006-01-17 Marco Gerards <marco@gnu.org>
5867
5868 * include/grub/normal.h: Include <grub/script.h>.
5869 (grub_command_list): Removed struct.
5870 (grub_command_list_t): Removed type.
5871 (grub_menu_entry): Remove members `num' and `command_list'. Add
5872 members `commands' and `sourcecode'.
5873 * include/grub/script.h: Add inclusion guards.
5874 (grub_script_cmd_menuentry): New struct.
5875 (grub_script_execute_menuentry): New prototype.
5876 (grub_script_lexer_record_start): Likewise.
5877 (grub_script_lexer_record_stop): Likewise.
5878 * normal/execute.c (grub_script_execute_menuentry): New function.
5879 * normal/lexer.c (record, recording, recordpos, recordlen): New
5880 variables.
5881 (grub_script_lexer_record_start): New function.
5882 (grub_script_lexer_record_stop): Likewise.
5883 (recordchar): Likewise.
5884 (nextchar): Likewise.
5885 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
5886 2048 as the buffer size. Add the tokens `menuentry' and `@'.
5887 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
5888 (current_menu): New variable.
5889 (free_menu): Mainly rewritten.
5890 (grub_normal_menu_addentry): New function.
5891 (read_config_file): Rewritten.
5892 * normal/menu.c (run_menu_entry): Mainly rewritten.
5893 * normal/menu_entry.c (make_screen): Rewritten te code to insert
5894 the menu entry.
5895 (run): Mainly rewritten.
5896 * normal/parser.y (menu_entry): New variable.
5897 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
5898 (menuentry): New rule.
5899 (command): Add `menuentry'.
5900 (if_statement): Allow additional returns before `fi'.
5901 * normal/script.c (grub_script_create_cmdmenu): New function.
5902
5903 2006-01-03 Marco Gerards <marco@gnu.org>
5904
5905 * INSTALL: GNU Bison is required.
5906 * configure.ac: Rewritten the test to detect Bison.
5907 * Makefile.in (YACC): New variable. Reported by Xun Sun
5908 <xun.sun.cn@gmail.com>.
5909
5910 2006-01-03 Marco Gerards <marco@gnu.org>
5911
5912 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
5913 the HFS+ filesystem to filesystem blocks.
5914 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
5915 GCC warning is silenced.
5916
5917 2006-01-03 Marco Gerards <marco@gnu.org>
5918
5919 * partmap/apple.c (apple_partition_map_iterate): Convert the data
5920 read from disk from big endian to host byte order.
5921
5922 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
5923
5924 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
5925 documentation.
5926 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
5927 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
5928 embedded HFS+ filesystem.
5929 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
5930 (grub_hfs_sblock): Move from here...
5931 * include/grub/hfs.h: To here... New file.
5932 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
5933 documentation.
5934 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
5935 New macros.
5936 (grub_hfsplus_volheader): Change type of member `magic' to
5937 `grub_uint16_t'.
5938 (grub_hfsplus_data): Add new member `embedded_offset'.
5939 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
5940 returned block.
5941 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
5942 Calculate the offset.
5943
5944 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5945
5946 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
5947 Removed.
5948 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
5949
5950 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5951
5952 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
5953 ENV->NAME is NULL after allocating ENV->VALUE.
5954
5955 2005-12-25 Marco Gerards <marco@gnu.org>
5956
5957 * kern/env.c (grub_env_set): Rewritten the error handling code.
5958
5959 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5960
5961 * geninit.sh: Made more robust, and more portable.
5962
5963 2005-12-25 Marco Gerards <marco@gnu.org>
5964
5965 Add support for Apple HFS+ filesystems.
5966
5967 * fs/hfsplus.c: New file.
5968
5969 * DISTLIST: Added `fs/hfsplus.c'.
5970
5971 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
5972 (hfsplus_mod_SOURCES): New variable.
5973 (hfsplus_mod_CFLAGS): Likewise.
5974 (hfsplus_mod_LDFLAGS): Likewise.
5975 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
5976 (grub_setup_SOURCES): Likewise.
5977 (grub_mkdevicemap_SOURCES): Likewise.
5978 (grub_emu_SOURCES): Likewise.
5979 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5980
5981 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
5982
5983 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
5984
5985 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5986
5987 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
5988 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
5989 include/grub/parser.h, include/grub/script.h, kern/parser.c,
5990 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
5991 normal/lexer.c, normal/parser.y, normal/script.c, and
5992 partmap/gpt.c.
5993 Removed kern/sparc64/cache.c.
5994
5995 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
5996 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
5997 grub_emu_init.c.
5998
5999 * configure.ac (AC_INIT): Bumped to 1.92.
6000
6001 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
6002
6003 * kern/err.c (grub_error_push): Added new function to support error
6004 stacks.
6005 (grub_error_pop): Likewise.
6006 (grub_error_stack_items): New local variable to support error stacks.
6007 (grub_error_stack_pos): Likewise.
6008 (grub_error_stack_assert): Likewise.
6009 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
6010 stack depth.
6011 (grub_print_error): Added support to print errors from error stack.
6012
6013 * include/grub/err.h (grub_error_push): Added function prototype.
6014 (grub_error_pop): Likewise.
6015
6016 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
6017
6018 * configure.ac: Accept `powerpc64' as host_cpu.
6019 (amd64): Rename to `biarch32'.
6020
6021 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
6022 non-cacheline-aligned addresses.
6023
6024 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
6025 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
6026 if `size' is non-zero.
6027
6028 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
6029
6030 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
6031 and `cd' to make sure the filename is not prefixed with a
6032 directory name.
6033 (pkgdata_MODULES): Add `gpt.mod'.
6034 (gpt_mod_SOURCES): New variable.
6035 (gpt_mod_CFLAGS): Likewise.
6036 (gpt_mod_LDFLAGS): Likewise.
6037
6038 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
6039
6040 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
6041 New macro.
6042
6043 * partmap/gpt.c: New file.
6044
6045 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
6046 GPT partition map is detected.
6047
6048 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
6049
6050 * commands/i386/pc/play.c: New file.
6051 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
6052 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
6053 macros.
6054
6055 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
6056
6057 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
6058 ((unused))' to silence gcc warning.
6059
6060 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
6061
6062 * configure.ac: Correct `AC_PROG_YACC' test.
6063
6064 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6065
6066 * util/powerpc/ieee1275/grub-install.in: Run the mount point
6067 check before installing files.
6068
6069 2005-11-22 Mike Small <smallm@panix.com>
6070
6071 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
6072 number regex so multidigit numbers are recognized correctly.
6073
6074 2005-11-22 Mike Small <smallm@panix.com>
6075
6076 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
6077 debugging message before attempting to claim memory.
6078 (grub_rescue_cmd_initrd): Add a claim debugging message and try
6079 multiple addresses in case of failure.
6080
6081 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6082
6083 * term/tparm.c (get_space): Remove empty `if' statement.
6084
6085 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
6086
6087 * kern/parser.c (check_varstate): Rename `state' to 's'.
6088
6089 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6090
6091 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
6092 variable definitions to the beginning of each function. Sort stack
6093 variables by size.
6094 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
6095 `buf' argument to `char *'.
6096
6097 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6098
6099 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
6100 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6101 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6102 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6103 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6104 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6105 configfile.mod, search.mod, gzio.mod and test.mod.
6106 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6107 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6108 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6109 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6110 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6111 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6112 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6113 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6114 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6115 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6116 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6117 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6118 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6119 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6120 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6121 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6122 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6123 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6124 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6125 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6126 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6127 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6128 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
6129
6130 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
6131 `grep --include'.
6132 (pkgdata_MODULES): Add test.mod.
6133
6134 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6135
6136 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
6137 appending to variables with "+=".
6138 (PModule): Use full pathname to generate *.lst filenames.
6139
6140 * Makefile.in: Fixed list rules moved from genmk.rb.
6141 (.DELETE_ON_ERROR): New special target.
6142 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
6143
6144 * conf/i386-pc.rmk: Include conf/common.mk.
6145 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6146 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6147 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6148 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6149 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6150 configfile.mod, search.mod, gzio.mod and test.mod.
6151 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6152 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6153 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6154 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6155 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6156 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6157 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6158 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6159 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6160 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6161 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6162 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6163 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6164 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6165 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6166 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6167 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6168 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6169 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6170 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6171 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6172 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6173 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
6174 here...
6175 * conf/common.rmk: ... to here. New file.
6176
6177 * conf/common.mk: New file.
6178
6179 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
6180
6181 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
6182 (grub_script.tab.c): ... here.
6183
6184 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6185 (grub_script.tab.c): ... here.
6186
6187 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6188 (grub_script.tab.c): ... here.
6189
6190 * normal/command.c (grub_command_find): Fixed a memory leak of
6191 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6192
6193 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6194
6195 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6196 "@" which marks the start of a comment on ARM.
6197 (VARIABLE): Likewise.
6198
6199 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6200
6201 Add support for Linux/ADFS partition tables.
6202
6203 * partmap/acorn.c: New file.
6204
6205 * include/grub/acorn_filecore.h: Likewise.
6206
6207 * DISTLIST: Added `partmap/acorn.c' and
6208 `include/grub/acorn_filecore.h'.
6209
6210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6211 `partmap/acorn.c'.
6212 (pkgdata_MODULES): Add `acorn.mod'.
6213 (acorn_mod_SOURCES): New variable.
6214 (acorn_mod_CFLAGS): Likewise.
6215
6216 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6217 `partmap/acorn.c'.
6218 (pkgdata_MODULES): Add `acorn.mod'.
6219 (acorn_mod_SOURCES): New variable.
6220 (acorn_mod_CFLAGS): Likewise.
6221
6222 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6223 (pkgdata_MODULES): Add `acorn.mod'.
6224 (acorn_mod_SOURCES): New variable.
6225 (acorn_mod_CFLAGS): Likewise.
6226 (acorn_mod_LDFLAGS): Likewise.
6227
6228 * include/types.h (grub_disk_addr_t): New typedef.
6229
6230 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
6231
6232 * geninit.sh: New file.
6233
6234 * geninitheader.sh: Likewise.
6235
6236 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6237 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6238 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6239 * commands/configfile.c (grub_configfile_init)
6240 (grub_configfile_fini): Likewise.
6241 * commands/default.c (grub_default_init, grub_default_fini):
6242 Likewise.
6243 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6244 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6245 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6246 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6247 Likewise.
6248 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6249 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6250 Likewise.
6251 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6252 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6253 Likewise.
6254 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6255 Likewise.
6256 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6257 Likewise.
6258 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6259 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6260 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6261 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6262 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6263 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6264 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6265 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6266 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6267 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6268 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6269 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6270 * partmap/amiga.c (grub_amiga_partition_map_init)
6271 (grub_amiga_partition_map_fini): Likewise.
6272 * partmap/apple.c (grub_apple_partition_map_init)
6273 (grub_apple_partition_map_fini): Likewise.
6274 * partmap/pc.c (grub_pc_partition_map_init)
6275 (grub_pc_partition_map_fini): Likewise.
6276 * partmap/sun.c (grub_sun_partition_map_init,
6277 grub_sun_partition_map_fini): Likewise.
6278 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6279 Likewise.
6280
6281 * util/grub-emu.c: Include <grub_modules_init.h>.
6282 (main): Don't initialize and de-initialize any modules directly,
6283 use `grub_init_all' and `grub_fini_all' instead.
6284
6285 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6286 `grub_vesafb_mod_init'.
6287 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6288 all users.
6289 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6290 `grub_vga_mod_init'. Updated all users.
6291 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6292
6293 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6294 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6295 rules.
6296
6297 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6298 Generate a function to initialize the module in utilities.
6299 Updated all callers.
6300 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6301 initialize the module in utilities. Updated all callers.
6302
6303 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6304
6305 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6306 escape sequence and a literal ^L to clear the screen.
6307
6308 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6309 when returning from Open Firmware.
6310
6311 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6312
6313 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6314 (grub_ofconsole_height): Likewise.
6315 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6316 manually insert a '\n'.
6317 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6318 `grub_ofconsole_height'. Return early if these are already set.
6319
6320 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6321
6322 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6323 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6324 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6325 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6326 and `normal/script.c'.
6327 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6328 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6329 (test_mod_SOURCES): New variable.
6330 (test_mod_CFLAGS): Likewise.
6331 (test_mod_LDFLAGS): Likewise.
6332 (pkgdata_MODULES): Add `test.mod'.
6333 (grub_script.tab.c): New rule.
6334 (grub_script.tab.h): Likewise.
6335
6336 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
6337
6338 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6339 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6340 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6341 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6342 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6343 (test_mod_SOURCES): New variable.
6344 (test_mod_CFLAGS): Likewise.
6345 (pkgdata_MODULES): Add `test.mod'.
6346 (grub_script.tab.c): New rule.
6347 (grub_script.tab.h): Likewise.
6348
6349 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
6350
6351 Add initial scripting support.
6352
6353 * commands/test.c: New file.
6354 * include/grub/script.h: Likewise.
6355 * normal/execute.c: Likewise.
6356 * normal/function.c: Likewise.
6357 * normal/lexer.c: Likewise.
6358 * normal/parser.y: Likewise.
6359 * normal/script.c: Likewise.
6360
6361 * configure.ac: Add `AC_PROG_YACC' test.
6362
6363 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6364 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6365 `normal/function.c' and `normal/script.c'.
6366 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6367 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6368 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6369 variables.
6370 (pkgdata_MODULES): Add `test.mod'.
6371 (grub_script.tab.c): New rule.
6372 (grub_script.tab.h): Likewise.
6373
6374 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6375
6376 * include/grub/normal.h (grub_test_init): New prototype.
6377 (grub_test_fini): Likewise.
6378
6379 * normal/command.c: Include <grub/script.h>.
6380 (grub_command_execute): Rewritten.
6381
6382 * util/grub-emu.c (main): Call `grub_test_init' and
6383 `grub_test_fini'.
6384
6385 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6386
6387 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6388 to 0.
6389 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6390 there are no pending characters.
6391
6392 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6393
6394 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6395 `grub_strndup' to drop device arguments. Replace unnecessary
6396 `grub_strndup' with `grub_strdup'.
6397
6398 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6399
6400 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6401 `debug' environment variable has been set.
6402
6403 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
6404
6405 * Makefile.in (install-local): Use $(DATA).
6406 (uninstall): Likewise.
6407 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6408 (sbin_UTILITIES): ... to here.
6409 (sbin_SCRIPTS): New variable.
6410 (grub_install_SOURCES): New variable.
6411 * util/powerpc/ieee1275/grub-install.in: New file.
6412 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6413 variable.
6414 (add_segments): Call `grub_util_get_path'.
6415
6416 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6417
6418 From Timothy Baldwin:
6419 * commands/ls.c (grub_ls_list_files): Close FILE with
6420 grub_file_close.
6421 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6422
6423 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
6424
6425 * include/grub/parser.h: New file.
6426
6427 * kern/parser.c: Likewise.
6428
6429 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
6430 (grub_setup_SOURCES): Likewise.
6431 (grub_probefs_SOURCES): Likewise.
6432 (grub_emu_SOURCES): Likewise.
6433 (kernel_img_HEADERS): Add `parser.h'.
6434
6435 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6436 (grub_emu_SOURCES): Add `kern/parser.c'.
6437 (grubof_SOURCES): Likewise.
6438
6439 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6440 (grubof_SOURCES): Add `kern/parser.c'.
6441
6442 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
6443
6444 * kern/misc.c (grub_split_cmdline): Removed function.
6445
6446 * kern/rescue.c: Include <grub/parser.h>.
6447 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
6448 of `grub_split_cmdline'.
6449
6450 * normal/command.c: Include <grub/parser.h>.
6451 (grub_command_execute): Use `grub_parser_split_cmdline' instead
6452 of `grub_split_cmdline'.
6453
6454 * normal/completion.c: Include <grub/parser.h>.
6455 (cmdline_state): New variable.
6456 (iterate_dir): End the filename with a quote depending on the
6457 command line state.
6458 (get_state): new function.
6459 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
6460 split the arguments and determine the current argument. When the
6461 argument string is not quoted, escape all spaces.
6462
6463 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6464
6465 * normal/sparc64/setjmp.S: New file.
6466
6467 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6468
6469 * include/grub/sparc64/libgcc.h: New file.
6470 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
6471 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
6472 normal/sparc64/setjmp.c.
6473
6474 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6475
6476 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
6477 * kern/sparc64/cache.S: New file.
6478 * kern/sparc64/cache.c: Removed.
6479 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
6480 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
6481 -mtune=ultrasparc.
6482 (COMMON_LDFLAGS): Add -melf64_sparc.
6483 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
6484 (grubof_SOURCES): Use cache.S instead of cache.c.
6485 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
6486 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
6487 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
6488 commented though.
6489 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
6490 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
6491 (linux_mod_CFLAGS): Commented out.
6492 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
6493 out because module isn't built.
6494 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
6495 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
6496 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
6497 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
6498 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
6499 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6500 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6501 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
6502 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
6503 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
6504 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6505 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6506 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
6507 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
6508
6509 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
6510
6511 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
6512 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
6513 longer, because HFS should not be used on PC.
6514
6515 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6516
6517 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
6518 consistently within the loop.
6519
6520 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
6521
6522 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
6523 directory can not be read.
6524
6525 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6526
6527 * configure.ac (AC_INIT): Increase the version number to 1.91.
6528
6529 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
6530 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
6531 term/i386/pc/serial.c.
6532
6533 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6534
6535 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
6536 file size must be permitted.
6537
6538 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
6539 between %ah and %al.
6540
6541 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6542
6543 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
6544 grub_uint64_t.
6545 Call the hook with a NUL-terminated filename.
6546 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
6547 grub_cpu_to_be32.
6548
6549 * kern/term.c (cursor_state): New variable.
6550 (grub_term_set_current): Reset the cursor state on a new
6551 terminal.
6552 (grub_setcursor): Rewritten to use CURSOR_STATE.
6553 (grub_getcursor): New function.
6554
6555 * include/grub/term.h (grub_getcursor): New prototype.
6556
6557 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
6558 integers on ARM. Reported by Timothy Baldwin
6559 <T.E.Baldwin99@members.leeds.ac.uk>.
6560
6561 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
6562
6563 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
6564 allocated.
6565 (grub_sfs_dir): Likewise.
6566
6567 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
6568
6569 Add support for the SFS filesystem.
6570
6571 * fs/sfs.c: New file.
6572
6573 * DISTLIST: Added `fs/sfs.c'.
6574
6575 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
6576 (grub_probefs_SOURCES): Likewise.
6577 (grub_emu_SOURCES): Likewise.
6578 (pkgdata_MODULES): Add `sfs.mod'.
6579 (sfs_mod_SOURCES): New variable.
6580 (sfs_mod_CFLAGS): Likewise.
6581 (sfs_mod_LDFLAGS): Likewise.
6582
6583 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
6584 (pkgdata_MODULES): Add `sfs.mod'.
6585 (sfs_mod_SOURCES): New variable.
6586 (sfs_mod_CFLAGS): Likewise.
6587
6588 * util/grub-emu.c (main): Call `grub_sfs_init' and
6589 `grub_sfs_fini'.
6590
6591 * include/grub/fs.h (grub_sfs_init): New prototype.
6592 (grub_sfs_fini): Likewise.
6593
6594 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
6595
6596 Add support for the AFFS filesystem.
6597
6598 * fs/affs.c: New file.
6599
6600 * DISTLIST: Added `fs/affs.c'.
6601
6602 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
6603 (grub_probefs_SOURCES): Likewise.
6604 (grub_emu_SOURCES): Likewise.
6605 (pkgdata_MODULES): Add `affs.mod'.
6606 (affs_mod_SOURCES): New variable.
6607 (affs_mod_CFLAGS): Likewise.
6608 (affs_mod_LDFLAGS): Likewise.
6609
6610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
6611 (pkgdata_MODULES): Add `affs.mod'.
6612 (affs_mod_SOURCES): New variable.
6613 (affs_mod_CFLAGS): Likewise.
6614
6615 * util/grub-emu.c (main): Call `grub_affs_init' and
6616 `grub_affs_fini'.
6617
6618 * include/grub/fs.h (grub_affs_init): New prototype.
6619 (grub_affs_fini): Likewise.
6620
6621 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
6622
6623 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
6624
6625 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
6626
6627 * configure.ac: Accept `x86_64' as host_cpu. In that case add
6628 `-m32' to CFLAGS.
6629
6630 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
6631 linking.
6632
6633 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
6634 (COMMON_LDFLAGS): New variable.
6635 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
6636 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
6637 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
6638 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
6639 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
6640 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
6641 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
6642 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
6643 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
6644 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
6645 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6646 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6647 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
6648 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
6649 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
6650 variables.
6651 (normal_mod_ASFLAGS): Add `-m32'.
6652
6653 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
6654 (grub_host_size_t, grub_host_ssize_t): New types.
6655 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
6656 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
6657 `GRUB_HOST_SIZEOF_VOID_P'.
6658
6659 * include/grub/kernel.h (struct grub_module_header): Type of
6660 member offset changed to `grub_host_off_t'. Type of member size
6661 changed to `grub_host_size_t'.
6662 (struct grub_module_info): Type of member offset changed to
6663 `grub_host_off_t'. Type of member size changed to
6664 `grub_host_size_t'.
6665
6666 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
6667
6668 Make GRUB's kernel compliant to Multiboot Specification.
6669
6670 * kern/i386/pc/startup.S (multiboot_header): New label.
6671 (multiboot_entry): Likewise.
6672 (multiboot_trampoline): Likewise.
6673
6674 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6675 Increased to 0x4A0.
6676
6677 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
6678 put parentheses after a question mark.
6679 [!GRUB_UTIL] (my_mod): New variable.
6680
6681 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
6682
6683 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
6684
6685 Adds support for the XFS filesystem. Btrees are not supported
6686 yet.
6687
6688 * fs/xfs.c: New file.
6689
6690 * DISTLIST: Added `fs/xfs.c'.
6691
6692 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
6693 (grub_probefs_SOURCES): Likewise.
6694 (grub_emu_SOURCES): Likewise.
6695 (pkgdata_MODULES): Add `xfs.mod'.
6696 (xfs_mod_SOURCES): New variable.
6697 (xfs_mod_CFLAGS): Likewise.
6698
6699 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
6700 (pkgdata_MODULES): Add `xfs.mod'.
6701 (xfs_mod_SOURCES): New variable.
6702 (xfs_mod_CFLAGS): Likewise.
6703
6704 * util/grub-emu.c (main): Call `grub_xfs_init' and
6705 `grub_xfs_fini'.
6706
6707 * include/grub/fs.h (grub_xfs_init): New prototype.
6708 (grub_xfs_fini): Likewise.
6709
6710
6711 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
6712
6713 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
6714 color modes, allow greater than 16 colors to be configured as
6715 a default palette.
6716
6717 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6718
6719 * normal/completion.c (complete_arguments): Add the qualifier
6720 const into OPTIONS.
6721
6722 From Omniflux <omniflux+lists@omniflux.com>:
6723 * include/grub/terminfo.h: New file.
6724 * include/grub/tparm.h: Likewise.
6725 * include/grub/i386/pc/serial.h: Likewise.
6726 * term/terminfo.c: Likewise.
6727 * term/tparm.c: Likewise.
6728 * term/i386/pc/serial.c: Likewise.
6729 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
6730 serial.mod.
6731 (terminfo_mod_SOURCES): New variable.
6732 (terminfo_mod_CFLAGS): Likewise.
6733 (serial_mod_SOURCES): Likewise.
6734 (serial_mod_CFLAGS): Likewise.
6735
6736 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
6737
6738 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
6739 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
6740 and kern/powerpc/ieee1275/cmain.c, respectively.
6741
6742 * boot/powerpc/ieee1275/crt0.S: Moved to ...
6743 * kern/powerpc/ieee1275/crt0.S: ... here.
6744
6745 * boot/powerpc/ieee1275/cmain.c: Moved to ...
6746 * kern/powerpc/ieee1275/cmain.c: ... here.
6747
6748 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
6749 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
6750 instead of boot/powerpc/ieee1275/crt0.S and
6751 boot/powerpc/ieee1275/cmain.c, respectively.
6752
6753 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
6754 sectors. It was not used anyway.
6755
6756 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6757
6758 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
6759 `unused parameter' warning.
6760
6761 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6762
6763 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
6764 function.
6765 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
6766 getcharwidth.
6767
6768 2005-08-28 Marco Gerards <metgerards@student.han.nl>
6769
6770 * include/grub/normal.h (enum grub_completion_type): Added
6771 `GRUB_COMPLETION_TYPE_ARGUMENT'.
6772
6773 * normal/cmdline.c (print_completion): Handle
6774 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
6775 * normal/menu_entry.c (store_completion): Likewise.
6776
6777 * normal/completion.c (complete_arguments): New function.
6778 (grub_normal_do_completion): Call `complete_arguments' when the
6779 current words start with a dash.
6780
6781 2005-08-27 Marco Gerards <metgerards@student.han.nl>
6782
6783 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
6784 `gzio.mod' instead of `io.mod').
6785
6786 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
6787
6788 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
6789 (DISTDIRS): Added io and video.
6790 Rewrite the search routine to make an output consistently.
6791
6792 * DISTLIST: Added conf/sparc64-ieee1275.mk,
6793 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
6794 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
6795 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
6796 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
6797 util/powerpc/ieee1275/misc.c.
6798
6799 * include/grub/gzio.h: New file.
6800 * io/gzio.c: Likewise.
6801
6802 * kern/file.c (grub_file_close): Call grub_device_close only if
6803 FILE->DEVICE is not NULL.
6804
6805 * include/grub/mm.h [!NULL] (NULL): New macro.
6806
6807 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
6808
6809 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
6810 (pkgdata_MODULES): Added gzio.mod.
6811 (gzio_mod_SOURCES): New variable.
6812 (gzio_mod_CFLAGS): Likewise.
6813
6814 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
6815 (pkgdata_MODULES): Added gzio.mod.
6816 (gzio_mod_SOURCES): New variable.
6817 (gzio_mod_CFLAGS): Likewise.
6818
6819 * commands/cat.c: Include grub/gzio.h.
6820 (grub_cmd_cat): Use grub_gzfile_open instead of
6821 grub_file_open.
6822
6823 * commands/cmp.c: Include grub/gzio.h.
6824 (grub_cmd_cmp): Use grub_gzfile_open instead of
6825 grub_file_open.
6826
6827 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
6828 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
6829 grub_file_open.
6830 (grub_rescue_cmd_module): Likewise.
6831
6832 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6833
6834 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
6835 kern/sparc64/ieee1275/init.c because it contains _start.
6836 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
6837
6838 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6839
6840 * configure.ac: Add support for sparc64 host with ieee1275
6841 firmware.
6842 * configure: Generated from configure.ac.
6843 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
6844 instead of int.
6845 (grub_ofdisk_read): Likewise.
6846 (grub_ofdisk_open): Use %p to print pointer values, and cast the
6847 pointers as (void *) to remove a warning.
6848 (grub_ofdisk_close): Likewise.
6849 (grub_ofdisk_read): Likewise.
6850 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
6851 returns, so make it return void to remove a warning.
6852 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
6853 Corresponding prototype change.
6854 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
6855 values, and cast the pointers as (void *) to remove a warning.
6856 (grub_mm_dump): Likewise.
6857 * conf/sparc64-ieee1275.mk: New file.
6858 * conf/sparc64-ieee1275.rmk: Likewise.
6859 * include/grub/sparc64/setjmp.h: Likewise.
6860 * include/grub/sparc64/types.h: Likewise.
6861 * include/grub/sparc64/ieee1275/console.h: Likewise.
6862 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6863 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6864 * include/grub/sparc64/ieee1275/time.h: Likewise.
6865 * kern/sparc64/cache.c: Likewise.
6866 * kern/sparc64/dl.c: Likewise.
6867 * kern/sparc64/ieee1275/init.c: Likewise.
6868 * kern/sparc64/ieee1275/openfw.c: Likewise.
6869
6870 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
6871
6872 * util/console.c (grub_ncurses_putchar): If C is greater than
6873 0x7f, set C to a question mark.
6874 (grub_ncurses_getcharwidth): New function.
6875 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
6876 getcharwidth.
6877
6878 * normal/menu.c (print_entry): Made aware of Unicode. First,
6879 convert TITLE to UCS-4, and predict the cursor position by
6880 grub_getcharwidth.
6881
6882 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
6883 const to SRC.
6884 * kern/misc.c (grub_utf16_to_utf8): Likewise.
6885
6886 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6887
6888 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
6889 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6890 grub_strcat.
6891
6892 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
6893 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6894 grub_strcpy and grub_strlen. Take it into account that a space
6895 character is inserted as a delimiter.
6896
6897 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6898
6899 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
6900 invalid magic in thre error.
6901
6902 * commands/search.c: New file.
6903
6904 * util/grub-emu.c (main): Call grub_search_init and
6905 grub_search_fini.
6906
6907 * kern/rescue.c (grub_rescue_print_disks): Removed.
6908 (grub_rescue_print_devices): New function.
6909 (grub_rescue_cmd_ls): Use grub_device_iterate with
6910 grub_rescue_print_devices instead of grub_disk_dev_iterate with
6911 grub_rescue_print_disks.
6912
6913 * kern/partition.c (grub_partition_iterate): Return the result of
6914 PARTMAP->ITERATE instead of GRUB_ERRNO.
6915
6916 * kern/device.c: Include grub/partition.h.
6917 (grub_device_iterate): New function.
6918
6919 * include/grub/partition.h (grub_partition_iterate): Return int
6920 instead of grub_err_t.
6921
6922 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
6923 prototype.
6924 [GRUB_UTIL] (grub_search_fini): Likewise.
6925
6926 * include/grub/device.h (grub_device_iterate): New prototype.
6927
6928 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6929 commands/search.c.
6930 (pkgdata_MODULES): Added search.mod.
6931 (search_mod_SOURCES): New variable.
6932 (search_mod_CFLAGS): Likewise.
6933
6934 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
6935 (pkgdata_MODULES): Added search.mod.
6936 (search_mod_SOURCES): New variable.
6937 (search_mod_CFLAGS): Likewise.
6938
6939 * commands/ls.c (grub_ls_list_disks): Renamed to ...
6940 (grub_ls_list_devices): ... this, and use grub_device_iterate.
6941 All callers changed.
6942
6943 * DISTLIST: Added commands/search.c.
6944
6945 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6946
6947 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
6948 conversion.
6949 (grub_getcharwidth): New function.
6950
6951 * kern/misc.c (grub_utf8_to_ucs4): New function.
6952
6953 * include/grub/term.h (struct grub_term): Added a new member
6954 "getcharwidth".
6955 (grub_getcharwidth): New prototype.
6956
6957 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
6958
6959 * term/i386/pc/console.c (map_char): New function. Segregated from
6960 grub_console_putchar.
6961 (grub_console_putchar): Use map_char.
6962 (grub_console_getcharwidth): New function.
6963 (grub_console_term): Specified grub_console_getcharwidth as
6964 getcharwidth.
6965
6966 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
6967 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
6968
6969 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
6970 GRUB_ERRNO.
6971 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
6972 on grub_strtoul completely.
6973 (write_char): Declare local variables in the beginning of the
6974 function.
6975 (grub_vesafb_getcharwidth): New function.
6976 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
6977 getcharwidth.
6978
6979 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
6980
6981 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
6982 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
6983 commands/i386/pc/vbetest.c.
6984
6985 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
6986 call grub_vbe_get_controller_info again, because the returned
6987 information is volatile.
6988 (grub_vbe_set_video_mode): Mostly rewritten.
6989 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
6990 grub_vbe_status_t correctly.
6991 (grub_vbe_get_video_mode_info): Likewise.
6992 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
6993 several if statements.
6994
6995 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
6996 * commands/i386/pc/vbeinfo.c: ... this.
6997
6998 * commands/i386/pc/vbe_test.c: Renamed to ...
6999 * commands/i386/pc/vbetest.c: ... this.
7000
7001 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
7002 ...
7003 (grub_cmd_vbeinfo): ... this. Save video modes before
7004 iterating. Skip a video mode, if it is not available, not enough
7005 information is given or it is monochrome. Show the memory
7006 model. Leave the interpretation of MODEVAR to grub_strtoul
7007 completely.
7008 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
7009 (GRUB_MOD_FINI): Likewise.
7010
7011 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
7012 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
7013 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
7014 duplicated grub_env_get. Leave the interpretation of MODEVAR to
7015 grub_strtoul completely.
7016 (real2pm): Removed.
7017 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
7018 (GRUB_MOD_FINI): Likewise.
7019
7020 * normal/misc.c: Include grub/mm.h.
7021
7022 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
7023 vbe_list_modes with vbetest.mod and vbeinfo.mod.
7024 (vbe_list_modes_mod_SOURCES): Removed.
7025 (vbe_list_modes_mod_CFLAGS): Likewise.
7026 (vbe_test_mod_SOURCES): Likewise.
7027 (vbe_test_mod_CFLAGS): Likewise.
7028 (vbeinfo_mod_SOURCES): New variable.
7029 (vbeinfo_mod_CFLAGS): Likewise.
7030 (vbetest_mod_SOURCES): Likewise.
7031 (vbetest_mod_CFLAGS): Likewise.
7032
7033 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
7034
7035 * normal/misc.c: New file.
7036
7037 * DISTLIST: Added normal/misc.c.
7038
7039 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
7040 DISK to HOOK. Call HOOK with DISK.
7041 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7042 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7043 * partmap/sun.c (sun_partition_map_iterate): Likewise.
7044
7045 * normal/menu_entry.c (struct screen): Added a new member
7046 "completion_shown".
7047 (completion_buffer): New global variable.
7048 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
7049 (store_completion): New function.
7050 (complete): Likewise.
7051 (clear_completions): Likewise.
7052 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
7053 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
7054 a tab, call complete.
7055
7056 * normal/completion.c (disk_dev): Removed.
7057 (print_simple_completion): Likewise.
7058 (print_partition_completion): Likewise.
7059 (print_func): New global variable.
7060 (add_completion): Do not take the arguments WHAT or PRINT any
7061 longer. Added a new argument TYPE. Instead of printing directly,
7062 call PRINT_FUNC if not NULL.
7063 All callers changed.
7064 (complete_device): Use a local variable DEV instead of
7065 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
7066 (grub_normal_do_completion): Take a new argument HOOK. Do not
7067 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
7068 empty string, return NULL instead.
7069 All callers changed.
7070
7071 * normal/cmdline.c (print_completion): New function.
7072
7073 * kern/partition.c (grub_partition_iterate): Add an argument DISK
7074 to HOOK.
7075 All callers changed.
7076
7077 * kern/disk.c (grub_print_partinfo): Removed.
7078
7079 * include/grub/partition.h (struct grub_partition_map): Add a new
7080 argument DISK into HOOK of ITERATE.
7081 (grub_partition_iterate): Add a new argument DISK to HOOK.
7082
7083 * include/grub/normal.h (enum grub_completion_type): New enum.
7084 (grub_completion_type_t): New type.
7085 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
7086 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
7087 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
7088 (GRUB_COMPLETION_TYPE_FILE): Likewise.
7089 (grub_normal_do_completion): Added a new argument HOOK.
7090 (grub_normal_print_device_info): New prototype.
7091
7092 * include/grub/disk.h (grub_print_partinfo): Removed.
7093
7094 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
7095 (normal_mod_SOURCES): Likewise.
7096 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7097 (normal_mod_SOURCES): Likewise.
7098
7099 * commands/ls.c (grub_ls_list_disks): Use
7100 grub_normal_print_device_info instead of grub_print_partinfo. Free
7101 PNAME.
7102 (grub_ls_list_files): Use grub_normal_print_device_info instead of
7103 duplicating the code.
7104
7105 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7106
7107 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
7108 follow GCS more precisely.
7109 * commands/i386/pc/vbe_test.c: Likewise.
7110 * include/grub/i386/pc/vbe.h: Likewise.
7111 * term/i386/pc/vesafb.c: Likewise.
7112 * video/i386/pc/vbe.c: Likewise.
7113
7114 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7115
7116 * DISTLIST: Added term/i386/pc/vesafb.c
7117 DISTLIST: Added video/i386/pc/vbe.c
7118 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
7119 DISTLIST: Added commands/i386/pc/vbe_test.c.
7120 * commands/i386/pc/vbe_list_modes.c: New file.
7121 * commands/i386/pc/vbe_test.c: Likewise.
7122 * term/i386/pc/vesafb.c: Likewise.
7123 * video/i386/pc/vbe.c: Likewise.
7124 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
7125 (grub_vbe_probe) Added prototype.
7126 (grub_vbe_set_video_mode) Likewise.
7127 (grub_vbe_get_video_mode) Likewise.
7128 (grub_vbe_get_video_mode_info) Likewise.
7129 (grub_vbe_set_pixel_rgb) Likewise.
7130 (grub_vbe_set_pixel_index) Likewise.
7131 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
7132 (pkgdata_MODULES): Added vesafb.mod.
7133 (pkgdata_MODULES): Added vbe_list_modes.mod.
7134 (pkgdata_MODULES): Added vbe_test.mod.
7135 (vbe_mod_SOURCES): Added.
7136 (vbe_mod_CFLAGS): Likewise.
7137 (vesafb_mod_SOURCES): Likewise.
7138 (vesafb_mod_CFLAGS): Likewise.
7139 (vbe_list_modes_mod_SOURCES): Likewise.
7140 (vbe_list_modes_mod_CFLAGS): Likewise.
7141 (vbe_test_mod_SOURCES): Likewise.
7142 (vbe_test_mod_CFLAGS): Likewise.
7143
7144 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
7145
7146 * normal/command.c (grub_command_execute): If INTERACTIVE is
7147 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
7148 CMDLINE. Disable the pager if INTERACTIVE is true.
7149 All callers are changed.
7150
7151 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
7152 before reading a config file.
7153 * normal/main.c (read_config_file): Even if a command is not
7154 found, register it if it is within an entry.
7155
7156 * util/grub-emu.c: Include sys/types.h and unistd.h.
7157 (options): Added --hold.
7158 (struct arguments): Added a new member "hold".
7159 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
7160 missing.
7161 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
7162 cleared by a debugger, if it is not zero.
7163
7164 * include/grub/normal.h (grub_command_execute): Add an argument
7165 INTERACTIVE.
7166
7167 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
7168
7169 * DISTLIST: Added include/grub/i386/pc/vbe.h.
7170
7171 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
7172
7173 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
7174 program with another one, because the old one didn't detect a bug
7175 in gcc-3.4. Always use regparm 2, because the new test is still
7176 not enough for gcc-4.0. Someone must investigate a simple test
7177 case which detects a bug in gcc-4.0.
7178
7179 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
7180
7181 * DISTLIST: Added normal/completion.c.
7182
7183 * normal/completion.c: New file.
7184
7185 * term/i386/pc/console.c (grub_console_getwh): New function.
7186 (grub_console_term): Assign grub_console_getwh to getwh.
7187
7188 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7189 function is defined in normal/completion.c as
7190 grub_normal_do_completion.
7191 (grub_cmdline_get): Use grub_normal_do_completion instead of
7192 grub_tab_complete.
7193
7194 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7195 returns non-zero, otherwise return 0.
7196 (grub_partition_iterate): First, probe the partition map. Then,
7197 call ITERATE only for this partition map.
7198
7199 * kern/misc.c (grub_strncmp): Rewritten.
7200
7201 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7202 returns non-zero. Otherwise return 0.
7203
7204 * include/grub/partition.h (grub_partition_map_iterate): Return
7205 int instead of void.
7206
7207 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7208
7209 * include/grub/misc.h (grub_strncmp): Change the type of N to
7210 grub_size_t.
7211
7212 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7213 of void.
7214
7215 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
7216 unsigned explictly before comparing it with I.
7217
7218 * kern/main.c (grub_env_write_root): Add the attribute unused into
7219 VAR.
7220
7221 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7222 normal/completion.c.
7223 (normal_mod_SOURCES): Likewise.
7224 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7225 (normal_mod_SOURCES): Likewise.
7226
7227 * normal/command.c (grub_iterate_commands): If ITERATE returns
7228 non-zero, return one immediately.
7229
7230 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7231
7232 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7233 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7234 descriptions.
7235 (grub_vbe_get_controller_info): New function.
7236 (grub_vbe_get_mode_info): Likewise.
7237 (grub_vbe_set_mode): Likewise.
7238 (grub_vbe_get_mode): Likewise.
7239 (grub_vbe_set_memory_window): Likewise.
7240 (grub_vbe_get_memory_window): Likewise.
7241 (grub_vbe_set_scanline_length): Likewise.
7242 (grub_vbe_get_scanline_length): Likewise.
7243 (grub_vbe_set_display_start): Likewise.
7244 (grub_vbe_get_display_start): Likewise.
7245 (grub_vbe_set_palette_data): Likewise.
7246 * include/grub/i386/pc/vbe.h: New file.
7247
7248 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7249
7250 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7251 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7252 * DISTLIST: Likewise.
7253 * kern/ieee1275/of.c: Moved to ...
7254 * kern/ieee1275/ieee1275.c: ... here.
7255
7256 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7257
7258 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7259 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7260 Pass 0 as `end' parameter to grub_strtoul().
7261
7262 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7263
7264 * include/grub/powerpc/ieee1275/console.h: Do not include
7265 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7266 ifdef.
7267 (grub_console_cur_color): Remove i386-specific prototype.
7268 (grub_console_real_putchar): Likewise.
7269 (grub_console_checkkey): Likewise.
7270 (grub_console_getkey): Likewise.
7271 (grub_console_getxy): Likewise.
7272 (grub_console_gotoxy): Likewise.
7273 (grub_console_cls): Likewise.
7274 (grub_console_setcursor): Likewise.
7275 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7276 Include <grub/machine/console.h>.
7277 * term/ieee1275/ofconsole.c: Likewise.
7278
7279 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7280
7281 * Makefile.in (LIBLZO): New variable.
7282
7283 * configure.ac: Check for LZO version 2.
7284
7285 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7286 lzo/lzo1x.h instead of lzo1x.h.
7287
7288 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7289 of -llzo.
7290
7291 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7292 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7293
7294 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7295 copying the data from PARTITION to P.
7296
7297 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7298
7299 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7300 negative, unload the module.
7301
7302 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7303 map is "pc_partition_map" but not "pc".
7304 (usage): Fix the description. The options are --boot-image and
7305 --core-image but not --boot-file or --core-file.
7306 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7307 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7308 DEFAULT_DIRECTORY.
7309
7310 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7311 --core-file. Specify INSTALL_DEVICE as an argument.
7312
7313 * util/console.c: Include config.h.
7314 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7315 [HAVE_NCURSES_H]: Include ncurses.h.
7316 [HAVE_CURSES_H]: Include curses.h.
7317 [!A_NORMAL] (A_NORMAL): Defined as zero.
7318 [!A_STANDOUT] (A_STANDOUT): Likewise.
7319
7320 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7321 -lncurses.
7322 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7323
7324 * configure.ac: Check for curses libraries and headers.
7325
7326 * Makefile.in (LIBCURSES): New variable.
7327
7328 * genmk.rb (Script::rule): Set the executable bits.
7329
7330 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7331 name of the PC partition map is "pc_partition_map" but not "pc".
7332
7333 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7334
7335 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7336 (modules): Likewise.
7337 (usage): Added descriptions for --modules and --grub-probefs.
7338 Handle --modules and --grub-probefs. Save the arguments in MODULES
7339 and GRUB_PROBEFS, respectively.
7340 Auto-detect a filesystem module against GRUBDIR. If the result is
7341 empty and modules are not specified explicitly, abort the
7342 installation. Add the result to MODULES.
7343
7344 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7345 disk/powerpc/ieee1275/ofdisk.c,
7346 include/grub/powerpc/ieee1275/init.h and
7347 term/powerpc/ieee1275/ofconsole.c.
7348 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7349 term/ieee1275/ofconsole.c.
7350
7351 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7352
7353 * COPYING: Upgraded to the latest version. Only the address of the
7354 FSF office has changed.
7355
7356 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7357
7358 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7359 kern/ieee1275.c with kern/ieee1275/of.c.
7360
7361 * kern/ieee1275.c: Moved to ...
7362 * kern/ieee1275/of.c: ... here.
7363
7364 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
7365
7366 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7367 readablity.
7368
7369 * config.guess: Updated to the latest version from gnulib.
7370 * config.sub: Likewise.
7371 * install.sh: Likewise.
7372 * mkinstalldirs: Likewise.
7373
7374 * include/grub/console.h: Removed. This file is arch-specific. Do
7375 not put this in include/grub.
7376
7377 * include/grub/i386/pc/console.h: Resurrected.
7378
7379 * util/console.c: Include grub/machine/console.h instead of
7380 grub/console.h.
7381 * util/grub-emu.c: Likewise.
7382
7383 2005-08-04 Marco Gerards <metgerards@student.han.nl>
7384
7385 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7386 hardcoded value.
7387
7388 From Vincent Pelletier <subdino2004@yahoo.fr>
7389 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7390 Redefined to use grub_getwh.
7391 (grub_term): New member named getwh.
7392 (grub_getwh): New prototype.
7393 * kern/term.c (grub_getwh): New function.
7394 * term/i386/pc/console.c (grub_console_getwh): New function.
7395 (grub_console_term): New member `getwh'.
7396 * term/i386/pc/vga.c (grub_vga_getwh): New function.
7397 (grub_vga_term): New member `getwh'.
7398 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
7399 grub_ssize_t.
7400 (grub_ofconsole_getw): New function.
7401 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7402 (grub_ofconsole_term): New field named getwh and new initial
7403 value.
7404
7405 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
7406
7407 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7408 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
7409 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7410 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7411 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7412 of <grub/machine/ieee1275.h>.
7413 * commands/ieee1275/reboot.c: Likewise.
7414 * boot/powerpc/ieee1275/ieee1275.c: Move ...
7415 * kern/ieee1275.c: ... to here. All users updated. Change all
7416 parameter structs to use new type `grub_ieee1275_cell_t'.
7417 * term/powerpc/ieee1275/ofconsole.c: Move ...
7418 * term/ieee1275/ofconsole.c: ... to here. All users updated.
7419 * disk/powerpc/ieee1275/ofdisk.c: Move ...
7420 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
7421 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7422 to return int.
7423 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
7424 Remove unused prototypes. All users updated.
7425 * include/grub/powerpc/ieee1275/console.h: Removed.
7426 * include/grub/powerpc/ieee1275/ieee1275.h: Define
7427 `grub_ieee1275_cell_t'.
7428 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
7429 Cast comparisons with -1 to the correct type.
7430 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
7431 type to match `grub_ieee1275_entry_fn'.
7432
7433 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
7434
7435 * DISTLIST: Added util/i386/pc/grub-probefs.c.
7436
7437 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
7438 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
7439 partmap/sun.c.
7440 (grub_probefs_SOURCES): New variable.
7441
7442 * util/i386/pc/grub-probefs.c: New file.
7443
7444 * util/i386/pc/grub-setup.c (main): Call
7445 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
7446 grub_hfs_init and grub_jfs_init to initialize the system. Call
7447 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
7448 grub_pc_partition_map_fini to finish the system.
7449
7450 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
7451
7452 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
7453 function.
7454 (grub_multiboot_load_elf32): Likewise.
7455 (grub_multiboot_is_elf64): Likewise.
7456 (grub_multiboot_load_elf64): Likewise.
7457 (grub_multiboot_load_elf): Likewise.
7458 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
7459 an ELF32 or ELF64 file.
7460 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
7461
7462 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
7463 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
7464 NULL before calling FS->LABEL.
7465 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
7466 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
7467 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
7468 before calling FS->LABEL.
7469
7470 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
7471
7472 * util/i386/pc/grub-install.in (datadir): New variable.
7473 (libdir): Removed.
7474 (pkgdatadir): New variable.
7475 (pkglibdir): Removed.
7476
7477 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
7478
7479 * DISTLIST: Added util/i386/pc/grub-install.in.
7480
7481 * util/i386/pc/grub-install.in: New file.
7482
7483 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
7484 (grub_install_SOURCES): Likewise.
7485
7486 * genmk.rb: Added support for scripts.
7487 (Script): New class.
7488 (scripts): New variable.
7489
7490 * Makefile.in (install-local): Install sbin_SCRIPTS by
7491 INSTALL_SCRIPT.
7492 (uninstall): Remove sbin_SCRIPTS.
7493
7494 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
7495 device, try to get a GRUB device by
7496 grub_util_biosdisk_get_grub_dev.
7497 Free DEST_DEV.
7498
7499 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
7500 description for --device-map.
7501
7502 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7503
7504 Change the semantics of variable hooks. They now return strings
7505 instead of error values.
7506
7507 * util/i386/pc/grub-setup.c: Include grub/env.h.
7508 (setup): Use grub_device_set_root instead of grub_env_set.
7509
7510 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
7511 grub_env_get instead of grub_device_set_root and
7512 grub_device_get_root, respectively.
7513
7514 * kern/main.c (grub_env_write_root): New function.
7515 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
7516 grub_env_set instead of grub_device_set_root.
7517
7518 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
7519 many variables.
7520 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
7521 rather than calling ENV->WRITE_HOOK afterwards.
7522 (grub_env_get): Return the result of ENV->READ_HOOK rather than
7523 passing a pointer of a pointer.
7524 (grub_register_variable_hook): Change the types of "read_hook" and
7525 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
7526 respectively.
7527 Allocate the default empty string on the heap, because this string
7528 may be freed later.
7529
7530 * kern/device.c: Include grub/env.h.
7531 (grub_device_set_root): Removed.
7532 (grub_device_get_root): Likewise.
7533 (grub_device_open): Use grub_env_get instead of
7534 grub_device_get_root.
7535
7536 * include/grub/env.h (grub_env_read_hook_t): New type.
7537 (grub_env_write_hook_t): Likewise.
7538 (grub_env_var): Change the types of "read_hook" and "write_hook"
7539 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
7540 (grub_register_variable_hook): Likewise.
7541
7542 * include/grub/device.h (grub_device_set_root): Removed.
7543 (grub_device_set_root): Likewise.
7544
7545 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
7546 make sure that DIRNAME terminates with '/', so that
7547 grub_fat_find_dir will fail if PATH is not a directory.
7548
7549 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
7550 from DIRNAME.
7551 Use the qualifier auto for print_files and print_files_long.
7552 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
7553 as a regular file.
7554 Put a newline only if there is no error.
7555 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
7556 used.
7557
7558 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7559
7560 * kern/partition.c (grub_partition_probe): Initialize PART to
7561 NULL. Otherwise, when no partition map is registered, this returns
7562 a garbage.
7563
7564 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
7565
7566 * partmap/apple.c (apple_partition_map_iterate): Check if POS
7567 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
7568 valid.
7569
7570 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
7571
7572 * commands/ls.c (grub_ls_list_disks): Print the filesystem
7573 information on each device, if it does not have partitions. Print
7574 "Device" instead of "Disk", because this function is not specific
7575 to disk devices.
7576
7577 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
7578 static to ensure that it is put on the memory rather than a
7579 register.
7580
7581 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7582
7583 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
7584 (grub_cat_init): Likewise.
7585 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
7586 (options): Likewise.
7587 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
7588 (grub_configfile_init): Likewise.
7589 * font/manager.c (GRUB_MOD_INIT): Likewise.
7590 * commands/help.c (GRUB_MOD_INIT): Likewise.
7591 (grub_help_init): Likewise.
7592 * normal/command.c (grub_command_init): Likewise.
7593 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
7594 * disk/loopback.c (grub_loop_init): Likewise.
7595 (GRUB_MOD_INIT): Likewise.
7596 * commands/ls.c (grub_ls_init): Likewise.
7597 (GRUB_MOD_INIT): Likewise.
7598 (options): Likewise.
7599 * commands/boot.c (grub_boot_init): Likewise.
7600 (GRUB_MOD_INIT): Likewise.
7601 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
7602 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
7603 (GRUB_MOD_INIT): Likewise.
7604 * commands/cmp.c (grub_cmp_init): Likewise.
7605 (GRUB_MOD_INIT): Likewise.
7606
7607 * normal/arg.c: Use <> instead of "" to include header files.
7608 (SHORT_ARG_HELP): New macro.
7609 (SHORT_ARG_USAGE): Likewise.
7610 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
7611 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
7612 descriptions.
7613 (find_short): Check if C is 'h' or 'u' explicitly.
7614 (grub_arg_show_help): Use space characters instead of tabs. Treat
7615 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
7616 are shown with --help and --usage only if they are not used for
7617 the command itself.
7618 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
7619 'h' and 'u'.
7620
7621 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
7622 const into "longarg". Change the type of "shortarg" to int.
7623
7624 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7625
7626 * boot/i386/pc/boot.S (boot_drive_check): New label.
7627
7628 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
7629 macro.
7630
7631 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
7632 which do not pass a boot drive correctly. Copied from GRUB Legacy.
7633
7634 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7635
7636 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
7637 When turning off Gate A20, skip the check and return immediately,
7638 because this is not fatal usually.
7639
7640 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7641
7642 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
7643 be 0x7C00 instead of 0x8000.
7644
7645 * boot/i386/pc/pxeboot.S: Rewritten.
7646
7647 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
7648 EXT_C.
7649 (gate_a20_check_state): Read a byte from 0x108000. Invert the
7650 result.
7651
7652 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
7653
7654 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
7655 robustness. This routine now supports a BIOS call and System
7656 Control Port A to modify the gate A20.
7657
7658 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7659 Increased to 0x440.
7660
7661 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
7662
7663 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
7664 device path and resulting ihandle.
7665 (grub_ofdisk_close): dprintf the ihandle being closed.
7666 (grub_ofdisk_read): dprintf function parameters.
7667 * kern/mm.c (grub_mm_init_region): Likewise.
7668 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
7669 (grub_linux_boot): dprintf the Linux entry point, initrd address and
7670 size, and boot arguments.
7671 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
7672 before loading into memory.
7673 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
7674 before loading into memory.
7675
7676 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
7677
7678 * kern/mm.c: Added much documentation.
7679 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
7680 8, set to 5 instead of 8.
7681
7682 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
7683
7684 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
7685
7686 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
7687 (grub_mkdevicemap_SOURCES): New variable.
7688
7689 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
7690 lib/device.c of GRUB Legacy.
7691
7692 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
7693
7694 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
7695 instead of PATH is NULL.
7696
7697 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
7698
7699 * commands/cmp.c (BUFFER_SIZE): New macro.
7700 (grub_cmd_cmp): Close the right file at the right time. Compare
7701 only data just read. Don't report files of different size as
7702 identical. Dynamically allocate buffers. Move variable
7703 declarations at the beginning of function.
7704
7705 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
7706
7707 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
7708 reverse.
7709
7710 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
7711
7712 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
7713 when backspace is pressed at beginning of line.
7714
7715 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
7716
7717 * DISTLIST: Added genfslist.sh.
7718
7719 * normal/main.c (fs_module_list): New variable.
7720 (autoload_fs_module): New function.
7721 (read_fs_list): Likewise.
7722 (grub_normal_execute): Call read_fs_list.
7723
7724 * kern/fs.c (grub_fs_autoload_hook): New variable.
7725 (grub_fs_probe): Added support for auto-loading.
7726
7727 * include/grub/normal.h (struct grub_fs_module_list): New struct.
7728 (grub_fs_module_list_t): New type.
7729
7730 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
7731 (grub_fs_autoload_hook): New prototype.
7732
7733 * genfslist.sh: New file.
7734
7735 * genmk.rb: Added a rule to generate a filesystem list.
7736
7737 2005-06-30 Marco Gerards <metgerards@student.han.nl>
7738
7739 * configure.ac: Fix the test for cross-compiling.
7740
7741 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
7742 define GRUB_UTIL anymore.
7743
7744 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
7745 so this function works on other systems than just big endian.
7746 (load_modules): Likewise.
7747 (add_segments): Likewise.
7748
7749 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
7750
7751 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
7752 contains `l' modifier, get a long from va_arg().
7753
7754 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
7755
7756 * kern/mm.c (grub_free): If the next free block which is being
7757 merged is the first free block, set the first block to the block
7758 being freed.
7759 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
7760
7761 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7762
7763 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
7764 `grub_ieee1275_chosen'.
7765
7766 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7767
7768 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
7769 (grub_ieee1275_chosen): New variable.
7770 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
7771 `chosen'.
7772 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
7773 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7774 Rename first argument to `phandle' for consistency.
7775 (grub_ieee1275_get_property_length): Likewise.
7776 (grub_ieee1275_next_property): Likewise. Change type of first argument
7777 to grub_ieee1275_phandle_t.
7778 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
7779 Move export next to declaration.
7780 (grub_ieee1275_chosen): New variable.
7781 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
7782 Correct cosmetic typo.
7783 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
7784 `grub_ieee1275_chosen'.
7785 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
7786 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
7787 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
7788 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
7789 `grub_ieee1275_chosen'.
7790
7791 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
7792
7793 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
7794 /chosen/bootargs.
7795 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
7796 /chosen/bootargs as "variable=value" pairs.
7797
7798 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
7799
7800 * include/grub/misc.h (grub_dprintf): New macro.
7801 (grub_real_dprintf): New prototype.
7802 (grub_strword): Likewise.
7803 (grub_iswordseparator): Likewise.
7804 * kern/misc.c (grub_real_dprintf): New function.
7805 (grub_strword): Likewise.
7806 (grub_iswordseparator): Likewise.
7807
7808 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
7809
7810 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
7811 (roundup): Remove macro.
7812 (grub_ieee1275_flags): Make static.
7813 (grub_ieee1275_realmode): Remove.
7814 (grub_ieee1275_test_flag): New function.
7815 (grub_ieee1275_set_flag): Likewise.
7816 (find_options): Rename to `grub_ieee1275_find_options'; update
7817 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
7818 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
7819 (cmain): New prototype.
7820 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
7821 `grub_ieee1275_flags' directly.
7822 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
7823 machine/biosdisk.h.
7824 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
7825 Don't include grub/machine/init.h.
7826 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
7827 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7828 Remove prototype.
7829 (grub_ieee1275_realmode): Likewise.
7830 (grub_ieee1275_flag): New enum.
7831 (grub_ieee1275_test_flag): New prototype.
7832 (grub_ieee1275_set_flag): New prototype.
7833 * include/grub/powerpc/ieee1275/init.h: Remove file.
7834 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
7835 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
7836 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
7837 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
7838 comment.
7839 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
7840 `grub_ieee1275_test_flag'.
7841 (grub_ieee1275_encode_devname): Likewise.
7842
7843 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
7844
7845 * include/grub/powerpc/ieee1275/ieee1275.h
7846 (grub_ieee1275_encode_devname): New prototype.
7847 (grub_ieee1275_get_filename): Likewise.
7848 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
7849 function.
7850 (grub_set_prefix): Likewise.
7851 (grub_machine_init): Call grub_set_prefix.
7852 * kern/powerpc/ieee1275/openfw.c: Fix typos.
7853 (grub_parse_type): New enum.
7854 (grub_ieee1275_get_devargs): New function.
7855 (grub_ieee1275_get_devname): Likewise.
7856 (grub_ieee1275_parse_args): Likewise.
7857 (grub_ieee1275_get_filename): Likewise.
7858 (grub_ieee1275_encode_devname): Likewise.
7859
7860 2005-03-30 Marco Gerards <metgerards@student.han.nl>
7861
7862 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
7863 `grub_loader_unset'.
7864
7865 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
7866
7867 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
7868 instead of grub_ieee1275_interpret.
7869 (grub_halt_init): New function.
7870 (grub_halt_fini): Likewise.
7871 (GRUB_MOD_INIT): Correct message grammar.
7872 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
7873 instead of grub_ieee1275_interpret.
7874 (grub_reboot_init): New function.
7875 (grub_reboot_fini): Likewise.
7876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
7877 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
7878 util/i386/pc/misc.c with commands/ieee1275/halt.c,
7879 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
7880 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
7881 function.
7882 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
7883 Add prototype.
7884 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
7885 prototype.
7886 (grub_halt): Likewise.
7887 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
7888 (cmain): Remove __attribute__((unused)).
7889 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
7890 (grub_heap_len): Likewise.
7891 (grub_machine_fini): New function.
7892 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
7893 (grub_halt): Likewise.
7894 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
7895 function.
7896 * util/powerpc/ieee1275/misc.c: New file.
7897
7898 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7899
7900 * DISTLIST: New file.
7901 * gendistlist.sh: Likewise.
7902
7903 * Makefile.in (COMMON_DISTFILES): Removed.
7904 (BOOT_DISTFILES): Likewise.
7905 (CONF_DISTFILES): Likewise.
7906 (DISK_DISTFILES): Likewise.
7907 (FS_DISTFILES): Likewise.
7908 (INCLUDE_DISTFILES): Likewise.
7909 (KERN_DISTFILES): Likewise.
7910 (LOADER_DISTFILES): Likewise.
7911 (TERM_DISTFILES): Likewise.
7912 (UTIL_DISTFILES): Likewise.
7913 (DISTFILES): Likewise.
7914 (uninstall): Uninstall files in $(pkgdata_DATA).
7915 (DISTLIST): New target.
7916 (distdir): Use the contents of the file DISTLIST to get a list of
7917 distributed files.
7918
7919 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7920
7921 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
7922 descriptor. This is ported from GRUB Legacy.
7923
7924 * gencmdlist.sh: Added an extra semicolon to make it work with
7925 old sed versions. Reported by Robert Bihlmeyer
7926 <robbe@orcus.priv.at>.
7927
7928 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
7929
7930 Automatic loading of commands is supported.
7931
7932 * normal/main.c (read_command_list): New function.
7933 (grub_normal_execute): Call read_command_list.
7934
7935 * normal/command.c (grub_register_command): Return zero or CMD.
7936 Allocate CMD->NAME from the heap.
7937 Initialize CMD->MODULE_NAME to zero.
7938 Find the same name as well. If the same command is found and it is
7939 a dummy command, overwrite members. If it is not a dummy command,
7940 return zero.
7941 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
7942 (grub_command_find): If a dummy command is found, load a module
7943 and retry to find a command only once.
7944
7945 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
7946 make sure that each command is loaded.
7947
7948 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
7949 macro.
7950 (struct grub_command): Remove const from the member `name'.
7951 Add a new member `module_name'.
7952 (grub_register_command): Return grub_command_t.
7953
7954 * commands/help.c (grub_cmd_help): Call grub_command_find to make
7955 sure that each command is loaded.
7956
7957 * genmk.rb (PModule::rule): Specify a module name without the
7958 suffix ".mod" to gencmdlist.sh.
7959
7960 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7961
7962 * gencmdlist.sh: New file.
7963
7964 * genmk.rb (PModule::rule): Generate a rule for a command list.
7965 Clean command.lst.
7966 Generate command.lst from $(COMMANDFILES).
7967
7968 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
7969 (DATA): Added $(pkgdata_DATA).
7970 (install-local): Install files in $(pkgdata_DATA).
7971
7972 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7973
7974 * term/i386/pc/vga.c (debug_command): Removed.
7975 (GRUB_MOD_INIT): Do not register the command "debug".
7976
7977 From Hollis Blanchard:
7978 * commands/configfile.c: New file.
7979 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7980 commands/configfile.c.
7981 (pkgdata_MODULES): Added configfile.mod.
7982 (configfile_mod_SOURCES): New variable.
7983 (configfile_mod_CFLAGS): Likewise.
7984 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7985 commands/configfile.c.
7986 (pkgdata_MODULES): Added configfile.mod.
7987 (configfile_mod_SOURCES): New variable.
7988 (configfile_mod_CFLAGS): Likewise.
7989 * util/grub-emu.c (main): Call grub_configfile_init and
7990 grub_configfile_fini.
7991 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
7992 prototype.
7993 [GRUB_UTIL] (grub_configfile_fini): Likewise.
7994
7995 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
7996
7997 * normal/arg.c (grub_arg_show_help): Do not show the bug report
7998 address.
7999
8000 * commands/help.c (grub_cmd_help): Do not print newlines after
8001 the last command in print_command_help.
8002
8003 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8004
8005 * commands/default.h: New file.
8006 * commands/timeout.h: Likewise.
8007 * normal/context.c: Likewise.
8008
8009 * util/misc.c: Do not include sys/times.h.
8010 Include sys/time.h and grub/machine/time.h.
8011 (grub_get_rtc): Rewritten with gettimeofday.
8012
8013 * util/grub-emu.c (main): Call grub_default_init and
8014 grub_timeout_init before grub_normal_init, and call
8015 grub_timeout_fini and grub_default_fini after grub_main.
8016
8017 * util/console.c (grub_ncurses_checkkey): Return the read
8018 character or -1.
8019
8020 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
8021 timeouts.
8022
8023 * normal/main.c (read_config_file): Push MENU. If this fails,
8024 print an error and wait for a user input.
8025 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
8026 If a menu is empty or an error occurs, pop MENU.
8027 (grub_normal_execute): Pop and free MENU after grub_menu_run
8028 returns.
8029
8030 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
8031
8032 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
8033 include time.h.
8034 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8035 without GRUB_UTIL.
8036 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
8037 time.h.
8038 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8039 without GRUB_UTIL.
8040
8041 * include/grub/normal.h (struct grub_menu_list): New struct.
8042 (grub_menu_list_t): New type.
8043 (struct grub_context): New struct.
8044 (grub_context_t): New type.
8045 (grub_register_command): Got rid of EXPORT_FUNC.
8046 (grub_unregister_command): Likewise.
8047 (grub_context_get): New prototype.
8048 (grub_context_get_current_menu): Likewise.
8049 (grub_context_push_menu): Likewise.
8050 (grub_context_pop_menu): Likewise.
8051 [GRUB_UTIL] (grub_default_init): Likewise.
8052 [GRUB_UTIL] (grub_default_fini): Likewise.
8053 [GRUB_UTIL] (grub_timeout_init): Likewise.
8054 [GRUB_UTIL] (grub_timeout_fini): Likewise.
8055
8056 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
8057 commands/timeout.c and normal/context.c.
8058 (pkgdata_MODULES): Added default.mod and timeout.mod.
8059 (normal_mod_SOURCES): Added normal/context.c.
8060 (default_mod_SOURCES): New variable.
8061 (default_mod_CFLAGS): Likewise.
8062 (timeout_mod_SOURCES): Likewise.
8063 (timeout_mod_CFLAGS): Likewise.
8064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
8065 conf/i386-pc.rmk.
8066 (pkgdata_MODULES): Added default.mod and timeout.mod.
8067 (normal_mod_SOURCES): Added normal/context.c.
8068 (default_mod_SOURCES): New variable.
8069 (default_mod_CFLAGS): Likewise.
8070 (timeout_mod_SOURCES): Likewise.
8071 (timeout_mod_CFLAGS): Likewise.
8072
8073 * Makefile.in (all-local): Added $(MKFILES).
8074
8075 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
8076
8077 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
8078 (grub_emu_SOURCES): Likewise.
8079 (pkgdata_MODULES): Add `sun.mod'.
8080 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8082 `partmap/sun.c'.
8083 (pkgdata_MODULES): Add `sun.mod'.
8084 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8085 * include/grub/partition.h (grub_sun_partition_map_init): New
8086 prototype.
8087 (grub_sun_partition_map_fini): Likewise.
8088 * partmap/sun.c: New file.
8089 * util/grub-emu.c (main): Initialize and de-initialize the sun
8090 partitionmap support.
8091
8092 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
8093
8094 This implements an Emacs-like menu entry editor.
8095
8096 * normal/menu_entry.c: New file.
8097
8098 * util/console.c (grub_ncurses_putchar): Translate some Unicode
8099 characters to ASCII.
8100 (saved_char): New variable.
8101 (grub_ncurses_checkkey): Rewritten completely.
8102 (grub_ncurses_getkey): Likewise.
8103 (grub_ncurses_init): Call raw instead of cbreak.
8104
8105 * normal/menu.c (print_entry): Do not put a space.
8106 (init_page): Renamed to ...
8107 (grub_menu_init_page): ... this. All callers changed.
8108 (edit_menu_entry): Removed.
8109 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
8110
8111 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
8112
8113 * kern/misc.c (grub_vprintf): Call grub_refresh.
8114
8115 * normal/menu.c (DISP_LEFT): Renamed to ...
8116 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
8117 * normal/menu.c (DISP_UP): Renamed to ...
8118 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
8119 * normal/menu.c (DISP_RIGHT): Renamed to ...
8120 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
8121 * normal/menu.c (DISP_DOWN): Renamed to ...
8122 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
8123 * normal/menu.c (DISP_HLINE): Renamed to ...
8124 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
8125 * normal/menu.c (DISP_VLINE): Renamed to ...
8126 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
8127 * normal/menu.c (DISP_UL): Renamed to ...
8128 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
8129 * normal/menu.c (DISP_UR): Renamed to ...
8130 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
8131 * normal/menu.c (DISP_LL): Renamed to ...
8132 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
8133 * normal/menu.c (DISP_LR): Renamed to ...
8134 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
8135 * normal/menu.c (TERM_WIDTH): Renamed to ...
8136 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
8137 * normal/menu.c (TERM_HEIGHT): Renamed to ...
8138 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
8139 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
8140 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
8141 * normal/menu.c (TERM_MARGIN): Renamed to ...
8142 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
8143 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
8144 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
8145 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
8146 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
8147 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
8148 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
8149 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
8150 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
8151 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
8152 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
8153 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
8154 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
8155 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
8156 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
8157 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
8158 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
8159 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
8160 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
8161 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
8162 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
8163 All callers changed.
8164
8165 * include/grub/normal.h: New prototype.
8166
8167 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8168 normal/menu_entry.c.
8169 (normal_mod_SOURCES): Likewise.
8170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8171 (normal_mod_SOURCES): Likewise.
8172
8173 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
8174
8175 * include/grub/normal.h (grub_halt_init): New prototype.
8176 (grub_halt_fini): Likewise.
8177 (grub_reboot_init): Likewise.
8178 (grub_reboot_fini): Likewise.
8179
8180 * util/grub-emu.c: Include signal.h.
8181 (main_env): New global variable.
8182 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
8183 catch C-c.
8184 (grub_machine_fini): New function.
8185 (main): Call grub_halt_init and grub_reboot_init before
8186 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8187 Call setjmp with MAIN_ENV to go back afterwards.
8188 Call grub_machine_fini right before return.
8189
8190 * include/grub/util/misc.h: Include setjmp.h.
8191 (main_env): New prototype.
8192
8193 * include/grub/kernel.h (grub_machine_fini): New prototype.
8194 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8195 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8196
8197 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8198 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8199 * term/i386/pc/console.c (grub_console_fini): Likewise.
8200
8201 * util/i386/pc/misc.c: New file.
8202
8203 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8204 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8205 commands/i386/pc/reboot.c.
8206
8207 2005-02-14 Guillem Jover <guillem@hadrons.org>
8208
8209 * include/grub/dl.h (grub_dl_check_header): New prototype.
8210 (grub_arch_dl_check_header): Change return type to grub_err_t,
8211 remove size parameter and export function. Update all callers.
8212 * kern/dl.c (grub_dl_check_header): New function.
8213 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8214 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8215 are inside the core.
8216 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8217 independent ELF header checks.
8218 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8219 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8220 `grub_dl_check_header' instead of explicit checks. Check for the
8221 ELF type.
8222 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8223 `grub_dl_check_header' instead of explicit checks. Remove arch
8224 specific ELF header checks.
8225
8226 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8227 argument SIZE.
8228
8229 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8230
8231 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8232 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8233
8234 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8235
8236 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8237 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8238 (part_map_iterate): Clear `grub_errno' and return 0 if
8239 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8240 * partmap/amiga.c (amiga_partition_map_iterate): Return
8241 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8242 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8243
8244 2005-02-01 Guillem Jover <guillem@hadrons.org>
8245
8246 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8247 help info.
8248
8249 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8250
8251 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8252 Removed prototype.
8253 (grub_rescue_cmd_linux): New prototype.
8254 (grub_rescue_cmd_initrd): Likewise.
8255 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8256 `bi_rec'.
8257 (grub_linux_release_mem): Release the memory for the initrd.
8258 (grub_load_linux): Renamed from this...
8259 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8260 Changed `entry' not to be static. Loop over memory regions to
8261 find another one when the default fails.
8262 (grub_rescue_cmd_initrd): New function.
8263 (grub_linux_init): Remove function.
8264 (grub_linux_fini): Likewise.
8265 (GRUB_MOD_INIT): Register `initrd'.
8266 (GRUB_MOD_FINI): Unregister `initrd'.
8267 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8268 Function removed.
8269 (grub_linux_normal_fini): Likewise.
8270 (GRUB_MOD_INIT): Register `initrd'.
8271 (GRUB_MOD_FINI): Unregister `initrd'.
8272
8273 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8274
8275 * commands/help.c: New file.
8276 * normal/arg.c (show_help): Renamed to...
8277 (grub_arg_show_help): ... this.
8278 * commands/i386/pc/halt.c: New file.
8279 * commands/i386/pc/reboot.c: Likewise.
8280 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8281 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8282 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8283 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8284 variables.
8285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8286 `commands/help.c'.
8287 (pkgdata_MODULES): Add `help.mod'.
8288 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8289 * grub/i386/pc/init.h (grub_reboot): New prototype.
8290 (grub_halt): Likewise.
8291 * include/grub/normal.h (grub_arg_show_help): New prototype.
8292 (grub_help_init): Likewise.
8293 (grub_help_fini): Likewise.
8294 * util/grub-emu.c (main): Initialize and deinitialize the help
8295 command.
8296
8297 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8298
8299 * normal/command.c (grub_command_init): Fixed the description of
8300 the `set' and `unset' commands.
8301
8302 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8303
8304 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8305 function.
8306 * commands/ieee1275/halt.c: New file.
8307 * commands/ieee1275/reboot.c: Likewise.
8308 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8309 `__attribute__ ((unused))'. Some GCS related fixed.
8310 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8311 (grub_suspend_fini): Likewise.
8312 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8313 and `halt.mod'.
8314 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8315 (halt_mod_CFLAGS): New variables.
8316 * include/grub/powerpc/ieee1275/ieee1275.h
8317 (grub_ieee1275_interpret): New prototype.
8318
8319 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8320
8321 * include/grub/misc.h (memmove): New prototype.
8322 (memcpy): Likewise.
8323
8324 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8325
8326 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8327 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8328
8329 2005-01-22 Marco Gerards <metgerards@student.han.nl>
8330
8331 * kern/misc.c (grub_strndup): Function rewritten.
8332
8333 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8334
8335 * normal/menu.c (TERM_WIDTH): Macro redefined.
8336 (TERM_TOP_BORDER_Y): Likewise.
8337 (draw_border): Replaced while-loop by a for-loop. Make the number
8338 of lines consistent with the number of lines displayed in
8339 print_entries. Added a margin below the rectangle.
8340 (print_entry): Make the entry fit in the rectangle.
8341 (print_entries): Display the scroll arrows next to the right
8342 border.
8343
8344 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8345
8346 * fs/minix.c (grub_minix_find_file): Reserve more space for
8347 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8348 `grub_strncpy' to copy `path' into it.
8349
8350 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8351
8352 Add the loopback device, a device via which files can be accessed
8353 as devices.
8354
8355 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8356 (pkgdata_MODULES): Add loopback.mod.
8357 (loopback_mod_SOURCES): New variable.
8358 (loopback_mod_CFLAGS): Likewise.
8359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8360 `disk/loopback.c'.
8361 (pkgdata_MODULES): Add loopback.mod.
8362 (loopback_mod_SOURCES): New variable.
8363 (loopback_mod_CFLAGS): Likewise.
8364 * disk/loopback.c: new file.
8365 * include/grub/normal.h (grub_loop_init): New prototype.
8366 (grub_loop_fini): New prototype.
8367 * util/grub-emu.c (main): Initialize and de-initialize loopback
8368 support.
8369 * include/grub/disk.h (grub_disk_dev_id): Add
8370 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8371
8372 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
8373
8374 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8375 function.
8376 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8377 (suspend_mod_SOURCES): New variable.
8378 (suspend_mod_CFLAGS): Likewise.
8379 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8380 New prototype.
8381 * commands/ieee1275/suspend.c: New file.
8382
8383 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8384
8385 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8386 ((unused))' to `__attribute__ ((used))'.
8387 (GRUB_MOD_FINI): Likewise.
8388 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8389 * genmk.rb (PModule): Assign space to common symbols when linking
8390 modules.
8391
8392 2005-01-20 Marco Gerards <metgerards@student.han.nl>
8393
8394 * include/grub/mm.h (grub_mm_init_region): Change the type of the
8395 `unsigned' arguments to `grub_size_t'.
8396 (grub_malloc): Likewise.
8397 (grub_realloc): Likewise.
8398 (grub_memalign): Likewise.
8399 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8400 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8401 * util/misc.c (grub_malloc): Likewise.
8402 (grub_realloc): Likewise.
8403 * kern/mm.c (get_header_from_pointer): Change the casts to
8404 `unsigned' into a cast to `grub_size_t'.
8405
8406 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8407 point to `currnode' when `currnode' is changed.
8408
8409 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
8410 Schottelius <nico-linux@schottelius.org>.
8411
8412 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
8413
8414 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8415 (note_path): Remove variable.
8416 (GRUB_IEEE1275_NOTE_NAME): New macro.
8417 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8418 (grub_ieee1275_note_hdr): New structure.
8419 (grub_ieee1275_note_desc): Likewise.
8420 (grub_ieee1275_note): Likewise.
8421 (load_note): Remove `dir' argument. All callers updated. Remove
8422 `note_img' and `path'. Do not load a file from `note_path'.
8423 Initialize a struct grub_ieee1275_note and write that to `out'.
8424 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
8425
8426 2005-01-05 Marco Gerards <metgerards@student.han.nl>
8427
8428 * util/misc.c (grub_util_read_image): Revert last change. It
8429 called `grub_util_read_at', which seeks from the beginning of the
8430 file.
8431
8432 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
8433
8434 * TODO: Add note about endianness in grub-mkimage.
8435 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
8436 section.
8437 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
8438 (grub_mkimage_SOURCES): New target.
8439 * include/grub/kernel.h (grub_start_addr): Remove variable.
8440 (grub_end_addr): Likewise.
8441 (grub_total_module_size): Likewise.
8442 (grub_kernel_image_size): Likewise.
8443 (GRUB_MODULE_MAGIC): New constant.
8444 (grub_module_info): New structure.
8445 (grub_arch_modules_addr): New prototype.
8446 (grub_get_end_addr): Remove prototype.
8447 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
8448 * include/grub/powerpc/ieee1275/kernel.h: New file.
8449 * include/grub/util/misc.h (grub_util_get_fp_size): New
8450 prototype.
8451 (grub_util_read_at): Likewise.
8452 (grub_util_write_image_at): Likewise.
8453 * kern/main.c (grub_get_end_addr): Remove function.
8454 (grub_load_modules): Call grub_arch_modules_addr instead of using
8455 grub_end_addr. Look for a grub_module_info struct in memory. Use
8456 the grub_module_info fields instead of calling grub_get_end_addr
8457 as loop conditions. Move grub_add_unused_region code here.
8458 (grub_add_unused_region): Remove function.
8459 * kern/i386/pc/init.c: Include grub/cache.h.
8460 (grub_machine_init): Remove call to grub_get_end_addr. Remove
8461 one call to add_mem_region.
8462 (grub_arch_modules_addr): New function.
8463 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
8464 (grub_total_module_size): Likewise.
8465 Include grub/machine/kernel.h.
8466 (grub_arch_modules_addr): New function.
8467 * util/grub-emu.c (grub_end_addr): Remove variable.
8468 (grub_total_module_size): Likewise.
8469 (grub_arch_modules_addr): New function.
8470 * util/misc.c: Include unistd.h.
8471 (grub_util_get_fp_size): New function.
8472 (grub_util_read_at): Likewise.
8473 (grub_util_write_image_at): Likewise.
8474 (grub_util_read_image): Call grub_util_read_at.
8475 (grub_util_write_image): Call grub_util_write_image_at.
8476 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
8477 additional memory in kernel_img for a struct grub_module_info.
8478 Fill in that grub_module_info.
8479 * util/powerpc/ieee1275/grub-mkimage.c: New file.
8480
8481 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8482
8483 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
8484 New function.
8485 * include/grub/powerpc/ieee1275/ieee1275.h
8486 (grub_ieee1275_milliseconds): New prototype.
8487 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
8488 Change to 1000.
8489 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
8490 grub_ieee1275_milliseconds.
8491
8492 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8493
8494 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
8495 variable.
8496 (find_options): New function.
8497 (cmain): Call find_options.
8498 * include/grub/powerpc/ieee1275/ieee1275.h
8499 (grub_ieee1275_realmode): New extern variable.
8500 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
8501 grub_map if grub_ieee1275_realmode is false.
8502
8503 2004-12-29 Marco Gerards <metgerards@student.han.nl>
8504
8505 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
8506 lines are inserted and make it work like readline. Reported by
8507 Vincent Pelletier <subdino2004@yahoo.fr>.
8508
8509 2004-12-28 Marco Gerards <metgerards@student.han.nl>
8510
8511 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
8512
8513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
8514 `kern/powerpc/cache.S'.
8515
8516 2004-12-27 Marco Gerards <metgerards@student.han.nl>
8517
8518 * genmk.rb: Handle the `Program' class in the main loop. Written
8519 by Johan Rydberg <jrydberg@gnu.org>.
8520 (Program): New class.
8521 (programs): New variable.
8522 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
8523 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
8524 instead of "grub/kernel.h". Include <grub/machine/init.h>.
8525 (help_arch): Function removed.
8526 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
8527 `powerpc/libgcc.h' and `loader.h'.
8528 (pkgdata_PROGRAMS): New variable.
8529 (sbin_UTILITIES): Variable removed.
8530 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
8531 (grubof_SOURCES): Variable re-defined so it only includes the
8532 core functionality.
8533 (grubof_CFLAGS): Remove `-DGRUBOF'.
8534 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
8535 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
8536 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
8537 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
8538 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
8539 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
8540 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
8541 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
8542 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
8543 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
8544 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8545 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
8546 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
8547 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
8548 (pc_mod_CFLAGS): New variables.
8549 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
8550 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
8551 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
8552 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
8553 Moved from here...
8554 * include/grub/i386/pc/init.h (grub_os_area_addr)
8555 (rub_os_area_size): ... to here.
8556 * include/grub/powerpc/ieee1275/ieee1275.h
8557 (grub_ieee1275_entry_fn): Export symbol.
8558 * include/grub/powerpc/ieee1275/init.h: New file.
8559 * include/grub/powerpc/libgcc.h: Likewise.
8560 * include/grub/cache.h: Likewise.
8561 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
8562 <hollis@penguinppc.org>.
8563 * kern/dl.c: Include <grub/cache.h>.
8564 (grub_dl_flush_cache): New function.
8565 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
8566 for this module.
8567 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
8568 (grub_console_init): Removed prototypes.
8569 (grub_machine_init): Don't initialize the modules anymore.
8570 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
8571 static.
8572 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
8573 Macro undef removed.
8574 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
8575 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
8576 relocation `R_PPC_REL32'. Return an error when the relocation is
8577 unknown.
8578 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
8579 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
8580 * util/misc.c (grub_arch_sync_caches): Likewise.
8581
8582 2004-12-19 Marco Gerards <metgerards@student.han.nl>
8583
8584 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
8585 `symlist.c', add `grubof_symlist.c'.
8586 (symlist.c): Variable removed.
8587 (grubof_HEADERS): Variable added.
8588 (grubof_symlist.c): New target.
8589 (kernel_syms.lst): Use `grubof_HEADERS' instead of
8590 `kernel_img_HEADERS'.
8591 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
8592 * kern/powerpc/dl.c: New file.
8593 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
8594 Function removed.
8595 (grub_arch_dl_relocate_symbols): Likewise.
8596 (grub_register_exported_symbols): Likewise.
8597
8598 2004-12-13 Marco Gerards <metgerards@student.han.nl>
8599
8600 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
8601 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
8602 to fail instead. Reported by Vincent Pelletier
8603 <subdino2004@yahoo.fr>.
8604
8605 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
8606 it is not allocated. Reported by Vincent Pelletier
8607 <subdino2004@yahoo.fr>.
8608
8609 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
8610 output so the output looks better.
8611
8612 2004-12-04 Marco Gerards <metgerards@student.han.nl>
8613
8614 Modulize the partition map support and add support for the amiga
8615 partition map.
8616
8617 * commands/ls.c: Include <grub/partition.h> instead of
8618 <grub/machine/partition.h>.
8619 * kern/disk.c: Likewise.
8620 * kern/rescue.c: Likewise.
8621 * loader/i386/pc/chainloader.c: Likewise.
8622 * normal/cmdline.c: Likewise.
8623 * kern/powerpc/ieee1275/init.c: Likewise.
8624 (grub_machine_init): Call `grub_pc_partition_map_init',
8625 `grub_amiga_partition_map_init' and
8626 `grub_apple_partition_map_init'.
8627 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
8628 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
8629 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
8630 `partition.h' and `pc_partition.h'.
8631 (grub_setup_SOURCES): Remove
8632 `disk/i386/pc/partition.c'. Add `kern/partition.c',
8633 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8634 (grub_emu_SOURCES): Likewise.
8635 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
8636 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
8637 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
8638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8639 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
8640 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8641 (grubof_SOURCES): Likewise.
8642 * disk/i386/pc/partition.c: File removed.
8643 * disk/powerpc/ieee1275/partition.c: Likewise.
8644 * include/grub/powerpc/ieee1275/partition.h: Likewise.
8645 * include/grub/i386/pc/partition.h: Likewise.
8646 * kern/partition.c: New file.
8647 * partmap/amiga.c: Likewise.
8648 * partmap/apple.c: Likewise.
8649 * partmap/pc.c: Likewise.
8650 * include/grub/partition.h: Likewise..
8651 * include/grub/pc_partition.h: Likewise.
8652 * util/grub-emu.c: Include <grub/partition.h> instead of
8653 <grub/machine/partition.h>.
8654 (main): Call `grub_pc_partition_map_init',
8655 `grub_amiga_partition_map_init' and
8656 `grub_apple_partition_map_init' and deinitialize afterwards.
8657 * util/i386/pc/biosdisk.c: Include `#include
8658 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8659 `<grub/machine/partition.h>'.
8660 * util/i386/pc/grub-setup.c: Likewise.
8661 * util/i386/pc/biosdisk.c: Likewise.
8662 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
8663 partition information in case of a PC partition.
8664 * util/i386/pc/grub-setup.c: Include `#include
8665 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8666 `<grub/machine/partition.h>'.
8667 (setup): Only access the PC specific partition information in case
8668 of a PC partition.
8669
8670 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
8671
8672 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
8673 (grub_longjmp): Likewise.
8674 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
8675 20.
8676 * normal/powerpc/setjmp.S: New file.
8677 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8678 `normal/powerpc/setjmp.S'.
8679 (grubof_CFLAGS): Add `-DGRUBOF'.
8680 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
8681 [GRUB_UTIL && !GRUBOF].
8682
8683 2004-11-16 Marco Gerards <metgerards@student.han.nl>
8684
8685 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
8686 property named `name'. Correctly handle the error returned by
8687 `grub_ieee1275_finddevice' if a device can not be opened.
8688
8689 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
8690
8691 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
8692 `actual' for negativity.
8693 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8694 kern/fshelp.c.
8695
8696 2004-11-01 Marco Gerards <metgerards@student.han.nl>
8697
8698 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
8699 (PAGE_OFFSET): New macro.
8700 (CRTC_ADDR_PORT): Likewise.
8701 (CRTC_DATA_PORT): Likewise.
8702 (START_ADDR_HIGH_REGISTER): Likewise.
8703 (START_ADDR_LOW_REGISTER): Likewise.
8704 (GRAPHICS_ADDR_PORT): Likewise.
8705 (GRAPHICS_DATA_PORT): Likewise.
8706 (READ_MAP_REGISTER): Likewise.
8707 (INPUT_STATUS1_REGISTER): Likewise.
8708 (INPUT_STATUS1_VERTR_BIT): Likewise.
8709 (page): New variable.
8710 (wait_vretrace): New function.
8711 (set_read_map): Likewise.
8712 (set_start_address): Likewise.
8713 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
8714 the right page.
8715 (check_vga_mem): Take the page into account.
8716 (write_char): Likewise.
8717 (write_cursor): Likewise.
8718 (scroll_up): Likewise. Copy the page to the page that is not
8719 shown and switch between both pages.
8720 (grub_vga_putchar): Fix off by one error.
8721 (grub_vga_cls): Wait for the vertical retrace. Take the page into
8722 account.
8723
8724 2004-11-01 Marco Gerards <metgerards@student.han.nl>
8725
8726 Add support for iso9660 (including rockridge).
8727
8728 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8729 (iso9660_mod_SOURCES): New variable.
8730 (iso9660_mod_CFLAGS): Likewise.
8731 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8732 * include/grub/fs.h (grub_iso9660_init): New prototype.
8733 * util/grub-emu.c (main): Call `grub_iso9660_init'.
8734 * fs/iso9660.c: New file.
8735
8736 * include/grub/misc.h (grub_strncat): New prototype.
8737 * kern/misc.c (grub_strncat): New function.
8738
8739 * fs/hfs.c (grub_hfs_mount): Translate the error
8740 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
8741 * fs/jfs.c (grub_jfs_mount): Likewise.
8742 * fs/ufs.c (grub_ufs_mount): Likewise.
8743
8744 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
8745
8746 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
8747 which initialized BAT registers.
8748 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
8749 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8750 Move from here...
8751 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
8752 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8753 ... to here.
8754 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
8755 (grub_mapclaim): Likewise.
8756 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
8757 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
8758 hand.
8759
8760 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
8761
8762 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
8763 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
8764 -ffreestanding and -msoft-float.
8765
8766 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
8767
8768 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
8769 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
8770 set in grub_ieee1275_flags.
8771
8772 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
8773
8774 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
8775 prototype.
8776 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
8777 grub_console_init first.
8778 Change the memory range used for grub_ieee1275_claim and
8779 grub_mm_init_region.
8780 Print an error message if the claim fails.
8781 Include <grub/misc.h>.
8782
8783 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
8784
8785 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
8786 Call grub_children_iterate for device nodes of type `scsi',
8787 `ide', or `ata'.
8788 (grub_ofdisk_open): Remove manual device alias resolution.
8789 Fix memory leak when device cannot be opened.
8790 * include/grub/powerpc/ieee1275/ieee1275.h
8791 (grub_children_iterate): New prototype.
8792 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
8793 New function.
8794 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8795 Return -1 if args.size was -1.
8796
8797 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8798
8799 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
8800 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
8801 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
8802 Open Firmware's memory for it; claim memory from _start to _end.
8803 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
8804 (_end): New extern.
8805 (_start): Zero BSS from __bss_start to _end.
8806 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8807 New extern.
8808 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
8809
8810 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8811
8812 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
8813 -1 if args.base was -1.
8814
8815 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
8816
8817 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
8818 escape sequence instead of a literal ^L. Also call
8819 grub_ofconsole_gotoxy.
8820
8821 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
8822
8823 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
8824 void * arguments to grub_addr_t. All callers updated. Also make
8825 the `result' argument optional.
8826 (grub_ieee1275_release): change void * arguments to grub_addr_t.
8827 All callers updated.
8828
8829 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
8830
8831 * commands/ls.c (grub_ls_list_files): Use the string following the
8832 initial ')', if present, as the filesystem path.
8833 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
8834
8835 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
8836
8837 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
8838
8839 Make the source code of the menu interface more readable.
8840
8841 * normal/menu.c: Include grub/mm.h.
8842 (TERM_WIDTH): New macro.
8843 (TERM_HEIGHT): Likewise.
8844 (TERM_INFO_HEIGHT): Likewise.
8845 (TERM_MARGIN): Likewise.
8846 (TERM_SCROLL_WIDTH): Likewise.
8847 (TERM_TOP_BORDER_Y): Likewise.
8848 (TERM_LEFT_BORDER_X): Likewise.
8849 (TERM_BORDER_WIDTH): Likewise.
8850 (TERM_MESSAGE_HEIGHT): Likewise.
8851 (TERM_BORDER_HEIGHT): Likewise.
8852 (TERM_NUM_ENTRIES): Likewise.
8853 (TERM_FIRST_ENTRY_Y): Likewise.
8854 (TERM_ENTRY_WIDTH): Likewise.
8855 (TERM_CURSOR_X): Likewise.
8856 (draw_border): Use macros instead of magic numbers.
8857 (print_entry): Likewise.
8858 (print_entries): Likewise.
8859 (run_menu): Likewise. Also, handle the key 'e'.
8860 (run_menu_entry): Ignore empty command lines.
8861 (print_message): Added a new argument EDIT. If EDIT is true,
8862 print a different message.
8863 (init_page): Likewise.
8864 (edit_menu_entry): New function. Not implemented yet.
8865
8866 2004-09-17 Marco Gerards <metgerards@student.han.nl>
8867
8868 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
8869 can be loaded from normal mode.
8870
8871 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
8872 `multiboot.mod'.
8873 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
8874 (multiboot_mod_CFLAGS): New variables.
8875 * loader/i386/pc/linux_normal.c: New file.
8876 * loader/i386/pc/multiboot_normal.c: Likewise.
8877
8878 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
8879 attribute `unused'.
8880
8881 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
8882 `fdiro' to read the mode information from instead of `diro'.
8883
8884 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
8885 looking up a symlink.
8886
8887 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
8888 macro.
8889 * normal/command.c (grub_command_execute): Don't parse the
8890 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
8891 flags of the command.
8892
8893 * normal/menu.c (grub_menu_run): Fix typo.
8894
8895 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
8896
8897 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
8898
8899 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
8900 `y + 1' instead of `y - 1'.
8901
8902 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
8903
8904 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
8905
8906 From Hollis Blanchard <hollis@penguinppc.org>:
8907 * kern/misc.c (memmove): New alias for grub_memmove.
8908 (memcmp): New alias for grub_memcmp.
8909 (memset): New alias for grub_memset.
8910 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8911 Change "int handle" to "grub_ieee1275_phandle_t handle".
8912 * include/grub/powerpc/ieee1275/ieee1275.h
8913 (grub_ieee1275_get_property): Likewise.
8914
8915 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
8916
8917 Added normal mode command `chainloader' as module chain.mod, which
8918 depends on normal.mod and _chain.mod.
8919
8920 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
8921 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
8922 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
8923 Deleted prototype.
8924 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
8925 but arguments parsing moved to ...
8926 (grub_chainloader_cmd): ... here. New function.
8927 * include/grub/i386/pc/chainloader.h: New file.
8928 * loader/i386/pc/chainloader_normal.c: Likewise.
8929
8930 2004-09-11 Marco Gerards <metgerards@student.han.nl>
8931
8932 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
8933 (grub_mkimage_LDFLAGS): Likewise.
8934 (grub_emu_SOURCES): Likewise.
8935 (kernel_img_HEADERS): Added fshelp.h.
8936 * fs/ext2.c: Include <grub/fshelp.h>.
8937 (FILETYPE_REG): New macro.
8938 (FILETYPE_INO_REG): Likewise.
8939 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
8940 Changed all users.
8941 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
8942 all users.
8943 (grub_fshelp_node): New struct.
8944 (grub_ext2_data): Added member `diropen'. Changed member `inode'
8945 to a pointer.
8946 (grub_ext2_get_file_block): Removed function.
8947 (grub_ext2_read_block): New function.
8948 (grub_ext2_read_file): Replaced parameter `data' by `node'.
8949 This function was written.
8950 (grub_ext2_mount): Read the root inode. Create a diropen struct.
8951 (grub_ext2_find_file): Removed function.
8952 (grub_ext2_read_symlink): New function.
8953 (grub_ext2_iterate_dir): Likewise.
8954 (grub_ext2_open): Rewritten.
8955 (grub_ext2_dir): Rewritten.
8956 * include/grub/fshelp.h: New file.
8957 * fs/fshelp.c: Likewise.
8958
8959 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
8960
8961 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
8962 (print_message): Add a missing newline.
8963 (run_menu): Added timeout support.
8964 (run_menu_entry): New local function.
8965 (grub_menu_run): Added support for booting.
8966
8967 * kern/loader.c (grub_loader_is_loaded): New function.
8968
8969 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
8970 (grub_get_rtc): Exported.
8971
8972 * include/grub/i386/pc/time.h: Include grub/symbol.h.
8973 (grub_get_rtc): Exported.
8974
8975 * include/grub/normal.h (struct grub_command_list): Remove
8976 constant from the member `command'.
8977
8978 * include/grub/loader.h (grub_loader_is_loaded): Declared.
8979
8980 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
8981
8982 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
8983
8984 2004-08-28 Marco Gerards <metgerards@student.han.nl>
8985
8986 Add support for the JFS filesystem.
8987
8988 * fs/jfs.c: New file.
8989 * include/grub/fs.h (grub_jfs_init): New prototype.
8990 (grub_jfs_fini): New prototype.
8991 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
8992 (grub_emu_SOURCES): Likewise.
8993 (pkgdata_MODULES): Add jfs.mod.
8994 (jfs_mod_SOURCES): New variable.
8995 (jfs_mod_CFLAGS): Likewise.
8996 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
8997 (grubof_SOURCES): Likewise.
8998 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
8999
9000 * fs/fat.c (grub_fat_find_dir): Convert the filename little
9001 endian to the host endian.
9002 (grub_fat_utf16_to_utf8): Move function from there...
9003 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
9004 the endianess of the source string anymore.
9005 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
9006
9007 2004-08-24 Marco Gerards <metgerards@student.han.nl>
9008
9009 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
9010 (grub_boot_fini) [GRUB_UTIL]: Likewise.
9011 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
9012 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
9013
9014 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
9015 (grub_hfs_iterate_dir): Make the function static. Add prototypes
9016 for `node_found' and `it_dir'.
9017 (grub_hfs_dir): Add prototype for `dir_hook'.
9018
9019 * fs/minix.c (grub_minix_get_file_block): Add prototype for
9020 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
9021 and `indir32' to silence a gcc warning.
9022
9023 * include/grub/fs.h (grub_hfs_init): New prototype.
9024 (grub_hfs_fini): Likewise.
9025
9026
9027 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9028
9029 Each disk device has its own id now. This is useful to make use
9030 of multiple disk devices.
9031
9032 * include/grub/disk.h (grub_disk_dev_id): New enum.
9033 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
9034 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
9035
9036 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
9037 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9038
9039 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
9040 GRUB_DISK_DEVICE_OFDISK_ID as an id.
9041
9042 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
9043 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9044
9045 * include/grub/disk.h (struct grub_disk_dev): Added a new member
9046 "id" which is used by the cache manager.
9047
9048 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
9049 of just "GRUB".
9050
9051 2004-08-18 Marco Gerards <metgerards@student.han.nl>
9052
9053 * fs/hfs.c: New file.
9054 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
9055 (grub_emu_SOURCES): Likewise.
9056 (pkgdata_MODULES): Add hfs.mod.
9057 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
9058 (grubof_SOURCES): Likewise.
9059 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
9060
9061 * include/grub/misc.h (grub_strncasecmp): Add prototype.
9062 * kern/misc.c (grub_strncasecmp): Add function.
9063
9064 2004-08-14 Marco Gerards <metgerards@student.han.nl>
9065
9066 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
9067 with parentheses.
9068
9069 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
9070 (grub_ext2_dir): In case the directory entry type is unknown, read
9071 it from the inode.
9072
9073 2004-08-02 Peter Bruin <pjbruin@dds.nl>
9074
9075 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
9076 grub_load_linux instead of grub_rescue_cmd_linux as second
9077 argument of grub_rescue_register_command.
9078
9079 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
9080
9081 2004-07-27 Marco Gerards <metgerards@student.han.nl>
9082
9083 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
9084 function.
9085 * commands/boot.c: Remove the check for `GRUB_UTIL'.
9086 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9087 `loader/powerpc/ieee1275/linux.c',
9088 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
9089 * include/grub/powerpc/ieee1275/ieee1275.h
9090 (grub_ieee1275_release): New prototype.
9091 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
9092 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
9093 normal, boot, linux and linux_normal.
9094 * loader/powerpc/ieee1275/linux.c: New file.
9095 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9096
9097 2004-07-12 Marco Gerards <metgerards@student.han.nl>
9098
9099 * normal/arg.c (grub_arg_parse): Correct error handling after
9100 reallocating the argumentlist (check if `argl' is not null instead
9101 of checking if `args' is not null).
9102 * kern/mm.c (grub_realloc): Return the same pointer when using the
9103 same region, instead of returning the header address.
9104
9105 2004-07-11 Marco Gerards <metgerards@student.han.nl>
9106
9107 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
9108 one block instead of two when looking for the initial partition.
9109 (grub_partition_probe): Initialize the local variable `p' with 0.
9110 Use base 10 for the grub_strtoul call.
9111 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
9112 need for one local variable.
9113 (grub_strtoul): Don't add the new value to `num', instead of that
9114 just assign it.
9115
9116 2004-07-11 Marco Gerards <metgerards@student.han.nl>
9117
9118 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
9119 (pxeboot_img_SOURCES): New variable.
9120 (pxeboot_img_ASFLAGS): Likewise.
9121 (pxeboot_img_LDFLAGS): Likewise.
9122 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
9123 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
9124 <lode_leroy@hotmail.com>.
9125
9126 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9127
9128 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
9129 there was no input.
9130
9131 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9132
9133 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
9134 the history buffer logic.
9135
9136 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9137
9138 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
9139 (FILETYPE_INO_SYMLINK): New macros.
9140 (grub_ext2_find_file): Check if the node is a directory using the
9141 inode stat information instead of using the filetype in the
9142 dirent. Exclude the first character of an absolute symlink.
9143 (grub_ext2_dir): Mask out the filetype part of the mode member of
9144 the inode.
9145
9146 2004-05-24 Marco Gerards <metgerards@student.han.nl>
9147
9148 Add support for UFS version 1 and 2. Add support for the minix
9149 filesystem version 1 and 2, both the variants with 14 and 30 long
9150 filenames.
9151
9152 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
9153 fs/minix.c.
9154 (grub_emu_SOURCES): Likewise.
9155 (pkgdata_MODULES): Add ufs.mod and minix.mod.
9156 (ufs_mod_SOURCES): New variable.
9157 (ufs_mod_CFLAGS): Likewise.
9158 (minix_mod_SOURCES): Likewise.
9159 (minix_mod_CFLAGS): Likewise.
9160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
9161 fs/minix.c.
9162 (grubof_SOURCES): Likewise.
9163 * fs/ufs.c: New file.
9164 * fs/minix.c: New file.
9165 * include/grub/fs.h (grub_ufs_init): New prototype.
9166 (grub_ufs_fini): Likewise.
9167 (grub_minix_init): Likewise.
9168 (grub_minix_fini): Likewise.
9169 * util/grub-emu.c (main): Initialize and deinitialize UFS and
9170 minix fs.
9171
9172 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
9173
9174 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
9175 commands/ls.c, commands/terminal.c, commands/boot.c,
9176 commands/cmp.c and commands/cat.c.
9177 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
9178
9179 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
9180 "env.h"
9181
9182 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9183
9184 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9185 and grub_, respectively. Because the conversion is trivial and
9186 mechanical, I omit the details here. Please refer to the CVS
9187 if you need more information.
9188
9189 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9190
9191 * include/pupa: Renamed to ...
9192 * include/grub: ... this.
9193 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9194 * util/i386/pc/grub-mkimage.c: ... this.
9195 * util/i386/pc/pupa-setup.c: Renamed to ...
9196 * util/i386/pc/grub-setup.c: ... this.
9197 * util/pupa-emu.c: Renamed to ...
9198 * util/grub-emu.c: ... this.
9199
9200 2004-03-29 Marco Gerards <metgerards@student.han.nl>
9201
9202 Add support for the newworld apple macintosh (PPC). This has been
9203 tested on the powerbook 2000 only. It only adds support for
9204 generic ieee1275 functions, console and disk support. This should
9205 be easy to port to other architectures with support for Open
9206 Firmware.
9207
9208 * configure.ac: Accept the powerpc as host_cpu. In the case of
9209 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9210 specific tests are only executed while building for the i386.
9211 Inverse test for crosscompile.
9212 * genmk.rb (Utility): Allow assembler files.
9213 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9214 * conf/powerpc-ieee1275.rmk: New file.
9215 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9216 * disk/powerpc/ieee1275/partition.c: Likewise.
9217 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9218 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9219 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9220 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9221 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9222 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9223 * include/pupa/powerpc/ieee1275/loader.h
9224 * include/pupa/powerpc/setjmp.h: Likewise.
9225 * include/pupa/powerpc/types.h: Likewise.
9226 * kern/powerpc/ieee1275/init.c: Likewise.
9227 * kern/powerpc/ieee1275/openfw.c: Likewise.
9228 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9229
9230 These files were written by Johan Rydberg
9231 (jrydberg@night.trouble.net) and I only modified them slightly.
9232
9233 * boot/powerpc/ieee1275/cmain.c: New file.
9234 * boot/powerpc/ieee1275/crt0.S: Likewise.
9235 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9236 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9237
9238 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9239
9240 * Makefile.in: Update copyright.
9241 * genmodsrc.sh: Likewise.
9242 * gensymlist.sh: Likewise.
9243 * term/i386/pc/vga.c: Indent correctly.
9244
9245 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9246 bugreporting address.
9247 * util/i386/pc/pupa-setup.c (usage): Likewise,
9248 (main): Call pupa_ext2_init and pupa_ext2_fini.
9249
9250 * fs/fat.c (log2): Renamed to ...
9251 (fat_log2): ... this.
9252 All callers changed.
9253 * kern/misc.c (memcpy): Alias to pupa_memmove.
9254 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9255 lvalue cast.
9256 * util/console.c (pupa_ncurses_fini): Return 0.
9257
9258 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9259 Move fail label here.
9260 [__GNU__]: Don't warn when using stat.
9261 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9262 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9263 long int. Use strtol instead of strtoul.
9264
9265 2004-03-14 Marco Gerards <metgerards@student.han.nl>
9266
9267 * commands/boot.c: New file.
9268 * commands/cat.c: Likewise.
9269 * commands/cmp.c: Likewise.
9270 * commands/ls.c: Likewise.
9271 * commands/terminal.c: Likewise.
9272 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9273 (pupa_register_command): Changed interface to match the new
9274 argument parser.
9275 (pupa_command_execute): Changed (almost rewritten) so it uses
9276 pupa_split_command. Added support for setting variables using the
9277 syntax `foo=bar'.
9278 (rescue_command): Changed to work with the new argument parser.
9279 (terminal_command): Moved from here to commands/terminal.c.
9280 (set_command): New function.
9281 (unset_command): New function.
9282 (insmod_command): New function.
9283 (rmmod_command): New function.
9284 (lsmod_command): New function.
9285 (pupa_command_init): Don't initialize the command terminal
9286 anymore. Initialize the commands set, unset, insmod, rmmod and
9287 lsmod.
9288 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9289 (kernel_img_HEADERS): Add arg.h and env.h.
9290 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9291 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9292 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9293 normal/arg.c.
9294 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9295 terminal.mod.
9296 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9297 (boot_mod_SOURCES): New variable.
9298 (terminal_mod_SOURCES): Likewise.
9299 (ls_mod_SOURCES): Likewise.
9300 (cmp_mod_SOURCES): Likewise.
9301 (cat_mod_SOURCES): Likewise.
9302
9303 * normal/arg.c: New file.
9304 * kern/env.c: Likewise.
9305 * include/pupa/arg.h: Likewise.
9306 * include/pupa/env.h: Likewise.
9307 * font/manager.c (font_command): Changed to match argument parsing
9308 interface changes.
9309 (PUPA_MOD_INIT): Likewise.
9310 * hello/hello.c (pupa_cmd_hello): Likewise.
9311 (PUPA_MOD_INIT): Likewise.
9312 * include/pupa/disk.h: Include <pupa/device.h>.
9313 (pupa_print_partinfo): New prototype.
9314 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9315 (pupa_dl_get_prefix): Likewise.
9316 * include/pupa/misc.h: Include <pupa/err.h>.
9317 (pupa_isgraph): New prototype.
9318 (pupa_isdigit): Likewise.
9319 (pupa_split_cmdline): Likewise.
9320 * include/pupa/normal.h: Include <pupa/arg.h>.
9321 (pupa_command): Changed the prototype of the member `func' to
9322 match the argument parsing interface. Added member `options'.
9323 (pupa_register_command): Updated to match function.
9324 (pupa_arg_parse): New prototype.
9325 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9326 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9327 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9328 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9329 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9330 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9331 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9332 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9333 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9334 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9335 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9336 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9337 * kern/disk.c: Include <pupa/file.h>.
9338 (pupa_print_partinfo): New function.
9339 * kern/dl.c: Include <pupa/env.h>.
9340 (pupa_dl_dir): Variable removed.
9341 (pupa_dl_load): Use the environment variable `prefix' instead of
9342 the variable pupa_dl_dir.
9343 (pupa_dl_set_prefix): Function removed.
9344 (pupa_dl_get_prefix): Likewise.
9345 * kern/i386/pc/init.c: Include <pupa/env.h>.
9346 (pupa_machine_init): Use the environment variable `prefix' instead of
9347 using pupa_dl_set_prefix to set the prefix.
9348 * kern/main.c: Include <pupa/env.h>.
9349 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9350 using pupa_dl_get_prefix to get the prefix.
9351 * kern/misc.c: Include <pupa/env.h>.
9352 (pupa_isdigit): New function.
9353 (pupa_isgraph): Likewise.
9354 (pupa_ftoa): Likewise.
9355 (pupa_vsprintf): Added support for printing values of the type
9356 `double'. Make it possible to format variable output when using
9357 formatting like `%1.2%f'.
9358 (pupa_split_cmdline): New function.
9359 * kern/rescue.c: Include <pupa/env.h>.
9360 (next_word): Removed function.
9361 (pupa_rescue_cmd_prefix): Likewise.
9362 (pupa_rescue_cmd_set): New function.
9363 (pupa_rescue_cmd_unset): New function.
9364 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9365 split the command line instead of splitting it here. Added
9366 support for setting variables using the syntax `foo=bar'. Don't
9367 initialize the prefix command anymore. Initialized the set and
9368 unset commands.
9369 * normal/cmdline.c: Include <pupa/env.h>.
9370 (pupa_tab_complete): Added prototypes for print_simple_completion,
9371 print_partition_completion, add_completion, iterate_commands,
9372 iterate_dev, iterate_part and iterate_dir. Moved code to print
9373 partition information from here to kern/disk.c.
9374 (pupa_cmdline_run): Don't check if the funtion exists anymore.
9375 * normal/main.c: Include <pupa/env.h>.
9376 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9377 instead of using pupa_dl_get_prefix to get the prefix.
9378 * term/i386/pc/vga.c: Include <pupa/arg.h>.
9379 (check_vga_mem): Cast pointers to `void *' to silence a gcc
9380 warning.
9381 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9382 (pupa_vga_setcolor): Declare unused variables with `__attribute__
9383 ((unused))' to silence a gcc warning.
9384 (pupa_vga_setcolor): Likewise.
9385 (debug_command): Changed to match argument parsing
9386 interface changes.
9387 * util/pupa-emu.c: Include <pupa/env.h>.
9388 (options): Added 0's for unused fields to silence a gcc warning.
9389 (argp): Likewise.
9390 (main): Use the environment variable `prefix' instead of using
9391 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
9392 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
9393 and terminal.
9394
9395 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9396 * util/misc.c: Include <malloc.h>.
9397 (pupa_malloc): Rewritten so errors are correctly reported.
9398 (pupa_realloc): Likewise.
9399 (pupa_memalign): Likewise.
9400 (pupa_mm_init_region): Declare unused variables with
9401 `__attribute__ ((unused))' to silence a gcc warning.
9402 * normal/i386/setjmp.S: Remove tab at the end of the file to
9403 silence a gcc warning.
9404 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9405 variables with `__attribute__ ((unused))' to silence a gcc
9406 warning.
9407 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9408 local variable i unsigned to silence a gcc warning.
9409
9410 * kern/term.c: Include <pupa/misc.h>.
9411 (pupa_more_lines): New variable.
9412 (pupa_more): Likewise.
9413 (pupa_putcode): When the pager is active pause at the end of every
9414 screen.
9415 (pupa_set_more): New function.
9416 * include/pupa/term.h (pupa_set_more): New prototype.
9417
9418
9419 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
9420
9421 Now this project is GRUB 2 rather than PUPA. The location of
9422 the CVS repository was moved to GRUB's.
9423
9424 * configure.ac: Use bug-grub as the reporting address.
9425 Use GRUB instead of PUPA.
9426 Change the version number to 1.90.
9427
9428 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
9429
9430 * genkernsyms.sh: Updated copyright information.
9431 * genmk.rb: Likewise.
9432 * genmodsrc.sh: Likewise.
9433 * gensymlist.sh: Likewise.
9434 * boot/i386/pc/boot.S: Likewise.
9435 * boot/i386/pc/diskboot.S: Likewise.
9436 * disk/i386/pc/biosdisk.c: Likewise.
9437 * disk/i386/pc/partition.c: Likewise.
9438 * font/manager.c: Likewise.
9439 * fs/ext2.c: Likewise.
9440 * fs/fat.c: Likewise.
9441 * include/pupa/boot.h: Likewise.
9442 * include/pupa/device.h: Likewise.
9443 * include/pupa/disk.h: Likewise.
9444 * include/pupa/dl.h: Likewise.
9445 * include/pupa/elf.h: Likewise.
9446 * include/pupa/err.h: Likewise.
9447 * include/pupa/file.h: Likewise.
9448 * include/pupa/font.h: Likewise.
9449 * include/pupa/fs.h: Likewise.
9450 * include/pupa/kernel.h: Likewise.
9451 * include/pupa/loader.h: Likewise.
9452 * include/pupa/misc.h: Likewise.
9453 * include/pupa/mm.h: Likewise.
9454 * include/pupa/net.h: Likewise.
9455 * include/pupa/normal.h: Likewise.
9456 * include/pupa/rescue.h: Likewise.
9457 * include/pupa/setjmp.h: Likewise.
9458 * include/pupa/symbol.h: Likewise.
9459 * include/pupa/term.h: Likewise.
9460 * include/pupa/types.h: Likewise.
9461 * include/pupa/i386/setjmp.h: Likewise.
9462 * include/pupa/i386/types.h: Likewise.
9463 * include/pupa/i386/pc/biosdisk.h: Likewise.
9464 * include/pupa/i386/pc/boot.h: Likewise.
9465 * include/pupa/i386/pc/console.h: Likewise.
9466 * include/pupa/i386/pc/init.h: Likewise.
9467 * include/pupa/i386/pc/kernel.h: Likewise.
9468 * include/pupa/i386/pc/linux.h: Likewise.
9469 * include/pupa/i386/pc/loader.h: Likewise.
9470 * include/pupa/i386/pc/memory.h: Likewise.
9471 * include/pupa/i386/pc/multiboot.h: Likewise.
9472 * include/pupa/i386/pc/partition.h: Likewise.
9473 * include/pupa/i386/pc/time.h: Likewise.
9474 * include/pupa/i386/pc/vga.h: Likewise.
9475 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
9476 * include/pupa/util/getroot.h: Likewise.
9477 * include/pupa/util/misc.h: Likewise.
9478 * include/pupa/util/resolve.h: Likewise.
9479 * kern/device.c: Likewise.
9480 * kern/disk.c: Likewise.
9481 * kern/dl.c: Likewise.
9482 * kern/err.c: Likewise.
9483 * kern/file.c: Likewise.
9484 * kern/fs.c: Likewise.
9485 * kern/loader.c: Likewise.
9486 * kern/main.c: Likewise.
9487 * kern/misc.c: Likewise.
9488 * kern/mm.c: Likewise.
9489 * kern/rescue.c: Likewise.
9490 * kern/term.c: Likewise.
9491 * kern/i386/dl.c: Likewise.
9492 * kern/i386/pc/init.c: Likewise.
9493 * kern/i386/pc/lzo1x.S: Likewise.
9494 * kern/i386/pc/startup.S: Likewise.
9495 * loader/i386/pc/chainloader.c: Likewise.
9496 * loader/i386/pc/linux.c: Likewise.
9497 * loader/i386/pc/multiboot.c: Likewise.
9498 * normal/cmdline.c: Likewise.
9499 * normal/command.c: Likewise.
9500 * normal/main.c: Likewise.
9501 * normal/menu.c: Likewise.
9502 * normal/i386/setjmp.S: Likewise.
9503 * term/i386/pc/console.c: Likewise.
9504 * term/i386/pc/vga.c: Likewise.
9505 * util/console.c: Likewise.
9506 * util/genmoddep.c: Likewise.
9507 * util/misc.c: Likewise.
9508 * util/pupa-emu.c: Likewise.
9509 * util/resolve.c: Likewise.
9510 * util/unifont2pff.rb: Likewise.
9511 * util/i386/pc/biosdisk.c: Likewise.
9512 * util/i386/pc/getroot.c: Likewise.
9513 * util/i386/pc/pupa-mkimage.c: Likewise.
9514 * util/i386/pc/pupa-setup.c: Likewise.
9515
9516 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
9517
9518 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
9519 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
9520 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
9521 reading and reset it after reading.
9522 (pupa_ext2_close): Return PUPA_ERR_NONE.
9523
9524 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
9525 Correct value.
9526 (struct linux_kernel_header): Add kernel_version and
9527 initrd_addr_max.
9528 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
9529 pupa_file_read succeeds.
9530 (pupa_rescue_cmd_initrd): Implement.
9531
9532 2003-12-03 Marco Gerards <metgerards@student.han.nl>
9533
9534 * fs/ext2.c (pupa_ext2_label): New function.
9535 (pupa_ext2_fs): Added label.
9536 * fs/fat.c (pupa_fat_label): New function.
9537 (pupa_fat_fs): Added label.
9538 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
9539
9540 * kern/misc.c (pupa_strndup): New function.
9541 * include/pupa/misc.h (pupa_strndup): New prototype.
9542
9543 * include/pupa/normal.h: Include <pupa/err.h>.
9544 (pupa_set_history): New prototype.
9545 (pupa_iterate_commands): New prototype.
9546 * normal/cmdline.c: Include <pupa/machine/partition.h>,
9547 <pupa/disk.h>, <pupa/file.h>.
9548 (hist_size): New variable.
9549 (hist_lines): Likewise.
9550 (hist_end): Likewise.
9551 (hist_used): Likewise.
9552 (pupa_set_history): New function.
9553 (pupa_history_get): Likewise.
9554 (pupa_history_add): Likewise.
9555 (pupa_history_replace): Likewise.
9556 (pupa_tab_complete): Likewise.
9557 (pupa_cmdline_run): Added tab completion and history buffer. Tab
9558 completion shows partitionnames while completing partitions, this
9559 feature was suggested by Jeff Bailey.
9560 * normal/command.c (pupa_iterate_commands): New function.
9561 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
9562 (pupa_normal_init): Initialize history buffer.
9563 (PUPA_MOD_INIT): Likewise.
9564 (pupa_normal_fini): Free the history buffer.
9565 (PUPA_MOD_FINI): Likewise.
9566
9567 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
9568 key.
9569
9570 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
9571 * configure.ac [i386]: Check for regparam bug.
9572 (NESTED_FUNC_ATTR) [! i386]: Defined.
9573
9574 2003-11-17 Marco Gerards <metgerards@student.han.nl>
9575
9576 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
9577 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
9578 (pupa_emu_SOURCES): New variable.
9579 (pupa_emu_LDFLAGS): Likewise.
9580 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
9581 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
9582 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
9583 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9584 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
9585 (pupa_jmp_buf): New typedef.
9586 (pupa_setjmp) [PUPA_UTIL]: New macro.
9587 (pupa_longjmp) [PUPA_UTIL]: Likewise.
9588 * include/pupa/term.h (struct pupa_term): New member `refresh'.
9589 (pupa_refresh): New prototype.
9590 * include/pupa/util/getroot.h: New file.
9591 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
9592 it.
9593 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
9594 (pupa_rescue_cmd_cat): Likewise.
9595 (pupa_rescue_cmd_ls): Likewise.
9596 (pupa_rescue_cmd_testload): Likewise.
9597 (pupa_rescue_cmd_lsmod): Likewise.
9598 * normal/cmdline.c (pupa_cmdline_get): Likewise.
9599 * normal/menu.c (run_menu): Likewise.
9600 * kern/term.c (pupa_cls): Likewise.
9601 (pupa_refresh): New function.
9602 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
9603 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9604 * util/console.c: New file.
9605
9606 * util/i386/pc/getroot.c: New file.
9607 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
9608 (pupa_putchar): New function.
9609 (pupa_refresh): Likewise.
9610 (xgetcwd): Function moved to ...
9611 (strip_extra_slashes): Likewise.
9612 (get_prefix): Likewise.
9613 * util/i386/pc/getroot.c: ... here.
9614 (find_root_device): Function moved and renamed to...
9615 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
9616 Changed all callers.
9617 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
9618 and renamed to...
9619 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
9620 Changed all callers.
9621 * util/misc.c (pupa_memalign): New function.
9622 (pupa_mm_init_region): Likewise.
9623 (pupa_register_exported_symbols): Likewise.
9624 (pupa_putchar): Function removed.
9625 * util/pupa-emu.c: New file.
9626
9627 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
9628
9629 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
9630 (_multiboot_mod_SOURCES): New variable.
9631 (_multiboot_mod_CFLAGS): Likewise.
9632 * loader/i386/pc/multiboot.c: New file.
9633 * include/pupa/i386/pc/multiboot.h: Likewise.
9634 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
9635 (pupa_multiboot_real_boot): New function.
9636 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
9637 (pupa_multiboot_real_boot): New prototype.
9638 (pupa_rescue_cmd_multiboot): Likewise
9639 (pupa_rescue_cmd_module): Likewise.
9640
9641 * kern/loader.c (pupa_loader_set): Continue when
9642 pupa_loader_unload_func() fails.
9643 (pupa_loader_unset): New function.
9644 * include/pupa/loader.h (pupa_loader_unset): New prototype.
9645
9646 * kern/misc.c (pupa_stpcpy): New function.
9647 * include/pupa/misc.h (pupa_stpcpy): New prototype.
9648
9649 2003-11-12 Marco Gerards <metgerards@student.han.nl>
9650
9651 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
9652 for available extensions.
9653
9654 * include/pupa/i386/pc/time.h: New file.
9655 * kern/disk.c: Include <pupa/machine/time.h>.
9656 (PUPA_CACHE_TIMEOUT): New macro.
9657 (pupa_last_time): New variable.
9658 (pupa_disk_open): Flush the cache when there was a timeout.
9659 (pupa_disk_close): Reset the timer.
9660 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
9661 pupa_currticks.
9662 * util/misc.c: Include <sys/times.h>
9663 (pupa_get_rtc): New function.
9664
9665 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9666
9667 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
9668 as blocks.
9669 (pupa_ext2_get_file_block): Use blocks member.
9670
9671 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
9672 first block. Return -1 instead of pupa_errno on error.
9673
9674 2003-10-27 Marco Gerards <metgerards@student.han.nl>
9675
9676 * README: In the pupa-mkimage example use _chain instead of chain
9677 and ext2 instead of fat.
9678 * TODO: Replace ext2fs with jfs as an example. Add an item for
9679 adding journal playback for ext2fs.
9680 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
9681 (pkgdata_MODULES): Added ext2.mod.
9682 (ext2_mod_SOURCES): New variable.
9683 (ext2_mod_CFLAGS): Likewise.
9684 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
9685 * include/pupa/misc.h (pupa_strncpy): New prototype.
9686 (pupa_strcat): Likewise.
9687 (pupa_strncmp): Likewise.
9688 * kern/misc.c (pupa_strcat): Enable function.
9689 (pupa_strncpy): New function.
9690 (pupa_strncmp): Likewise.
9691 * fs/ext2.c: New file.
9692
9693 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
9694 when the read failed before retrying.
9695 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
9696 (_FILE_OFFSET_BITS): Likewise.
9697 * configure.ac: Added AC_SYS_LARGEFILE.
9698
9699 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9700
9701 * genmk.rb (PModule#rule): Make sure to get only symbol names
9702 from the output of nm.
9703 Reported by Robert Millan <zeratul2@wanadoo.es>.
9704
9705 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9706
9707 I forgot to check in these changes for a long time. This adds
9708 incomplete support for VGA console, and this is still very
9709 buggy. Also, a lot of consideration is required for I18N,
9710 UNICODE, and VGA font issues. Therefore, assume that this is
9711 such that "better than nothing".
9712
9713 * font/manager.c: New file.
9714 * include/pupa/font.h: Likewise.
9715 * include/pupa/i386/pc/vga.h: Likewise.
9716 * term/i386/pc/vga.c: Likewise.
9717 * util/unifont2pff.rb: Likewise.
9718
9719 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
9720 (pkgdata_MODULES): Added vga.mod and font.mod.
9721 (vga_mod_SOURCES): New variables.
9722 (vga_mod_CFLAGS): Likewise.
9723 (font_mod_SOURCES): Likewise.
9724 (font_mod_CFLAGS): Likewise.
9725
9726 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
9727
9728 * include/pupa/term.h: Include pupa/err.h.
9729 (struct pupa_term): Added init and fini.
9730 Changed the argument of putchar to pupa_uint32_t.
9731
9732 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
9733 (pupa_console_real_putchar): New prototype.
9734 (pupa_console_putchar): Removed.
9735 (pupa_console_checkkey): Exported.
9736 (pupa_console_getkey): Likewise.
9737
9738 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
9739 characters.
9740
9741 * kern/term.c (pupa_term_set_current): Rewritten.
9742 (pupa_putchar): Likewise.
9743 (pupa_putcode): New function.
9744
9745 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
9746 (pupa_console_real_putchar): ... this.
9747 (pupa_vga_set_mode): New function.
9748 (pupa_vga_get_font): Likewise.
9749
9750 * normal/command.c: Include pupa/term.h.
9751 (terminal_command): New function.
9752 (pupa_command_init): Register the command "terminal".
9753
9754 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
9755 (DISP_UP): Likewise.
9756 (DISP_RIGHT): Likewise.
9757 (DISP_DOWN): Likewise.
9758 (DISP_HLINE): Likewise.
9759 (DISP_VLINE): Likewise.
9760 (DISP_UL): Likewise.
9761 (DISP_UR): Likewise.
9762 (DISP_LL): Likewise.
9763 (DISP_LR): Likewise.
9764
9765 * term/i386/pc/console.c (pupa_console_putchar): New function.
9766
9767 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
9768
9769 * util/resolve.c (pupa_util_resolve_dependencies): BUG
9770 FIX. Reverse the path_list.
9771
9772 * include/pupa/normal.h: Export pupa_register_command and
9773 pupa_unregister_command.
9774
9775 * hello/hello.c (pupa_cmd_hello): New module.
9776 * conf/i386-pc.rmk: Added hello.mod.
9777
9778 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
9779
9780 * kern/i386/pc/lzo1x.S: New file.
9781
9782 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
9783 (compress_kernel): New variable.
9784 (generate_image): Heavily modified to support compressing a
9785 large part of the core image.
9786
9787 * util/misc.c (pupa_util_read_image): Fix a file descriptor
9788 leak.
9789 (pupa_util_load_image): New function.
9790
9791 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
9792 (pupa_compressed_size): New variable.
9793 (codestart): Enable Gate A20 here.
9794 Decompress the compressed part of the core image.
9795 Rearrange the code to put functions and variables which are
9796 required for initialization in the non-compressed part.
9797 Include lzo1x.S.
9798
9799 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
9800 here.
9801
9802 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
9803
9804 * include/pupa/i386/pc/kernel.h
9805 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
9806 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
9807 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9808 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9809 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
9810
9811 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
9812
9813 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
9814 (Utility#rule): Likewise.
9815
9816 * configure.ac: Check if LZO is available.
9817
9818 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
9819
9820 * include/pupa/normal.h: New file.
9821 * include/pupa/setjmp.h: Likewise.
9822 * include/pupa/i386/setjmp.h: Likewise.
9823 * normal/cmdline.c: Likewise.
9824 * normal/command.c: Likewise.
9825 * normal/main.c: Likewise.
9826 * normal/menu.c: Likewise.
9827 * normal/i386/setjmp.S: Likewise.
9828
9829 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
9830 (pupa_rescue_cmd_initrd): Likewise.
9831
9832 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
9833 Likewise.
9834
9835 * kern/i386/pc/startup.S (translation_table): New variable.
9836 (translate_keycode): New function.
9837 (pupa_console_getkey): Call translate_keycode.
9838
9839 * kern/rescue.c (attempt_normal_mode): New function.
9840 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
9841 it failed, print a message.
9842
9843 * kern/mm.c (pupa_real_malloc): Print more information when a
9844 free magic is broken.
9845 (pupa_free): If the first free header is not free actually, set
9846 it to P.
9847
9848 * kern/main.c (pupa_load_normal_mode): Just load the module
9849 "normal".
9850 (pupa_main): Don't print the message
9851 "Entering into rescue mode..." here.
9852
9853 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
9854 Declared.
9855 (pupa_rescue_cmd_initrd): Likewise.
9856 (pupa_rescue_cmd_initrd): Likewise.
9857
9858 * include/pupa/symbol.h (FUNCTION): Specify the type.
9859 (VARIABLE): Likewise.
9860
9861 * include/pupa/err.h (pupa_err_t): Added
9862 PUPA_ERR_UNKNOWN_COMMAND.
9863
9864 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
9865 (pupa_dl_get_prefix): Likewise.
9866
9867 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
9868 Added _chain.mod and _linux.mod instead of chain.mod and
9869 linux.mod.
9870 (chain_mod_SOURCES): Renamed to ...
9871 (_chain_mod_SOURCES): ... this.
9872 (chain_mod_CFLAGS): Renamed to ...
9873 (_chain_mod_CFLAGS): ... this.
9874 (linux_mod_SOURCES): Renamed to ...
9875 (_linux_mod_SOURCES): ... this.
9876 (linux_mod_CFLAGS): Renamed to ...
9877 (_linux_mod_CFLAGS): ... this.
9878 (normal_mod_SOURCES): New variable.
9879 (normal_mod_CFLAGS): Likewise.
9880 (normal_mod_ASFLAGS): Likewise.
9881
9882 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
9883
9884 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
9885 possible.
9886
9887 * kern/dl.c (pupa_dl_ref): Refer dependending modules
9888 recursively.
9889 (pupa_dl_unref): Unrefer depending modules recursively.
9890 Don't call pupa_dl_unload implicitly, because PUPA can crash if
9891 a module is unloaded before one depending on that module is
9892 unloaded.
9893 (pupa_dl_unload): Unload depending modules explicitly,
9894 if possible.
9895
9896 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
9897
9898 * include/pupa/i386/pc/linux.h: New file.
9899 * loader/i386/pc/linux.c: Likewise.
9900
9901 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
9902 Removed.
9903 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
9904 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
9905 of PUPA_CHAINLOADER_BOOT_SECTOR.
9906
9907 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
9908 (pupa_linux_prot_size): New variable.
9909 (pupa_linux_tmp_addr): Likewise.
9910 (pupa_linux_real_addr): Likewise.
9911 (pupa_linux_boot_zimage): New function.
9912 (pupa_linux_boot_bzimage): Likewise.
9913
9914 * kern/i386/pc/init.c (struct mem_region): New structure.
9915 (MAX_REGIONS): New macro.
9916 (mem_regions): New variable.
9917 (num_regions): Likewise.
9918 (pupa_os_area_addr): Likewise.
9919 (pupa_os_area_size): Likewise.
9920 (pupa_lower_mem): Likewise.
9921 (pupa_upper_mem): Likewise.
9922 (add_mem_region): New function.
9923 (compact_mem_regions): Likewise.
9924 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
9925 the size of the conventional memory and that of so-called upper
9926 memory (before the first memory hole).
9927 Instead of adding each found region to free memory, use
9928 add_mem_region and add them after removing overlaps.
9929 Also, add only 1/4 of the upper memory to free memory. The rest
9930 is used for loading OS images. Maybe this is ad hoc, but this
9931 makes it much easier to relocate OS images when booting.
9932
9933 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
9934 (pupa_enter_rescue_mode): Don't register initrd and module.
9935
9936 * kern/mm.c: Include pupa/dl.h.
9937
9938 * kern/main.c: Include pupa/file.h and pupa/device.h.
9939
9940 * kern/loader.c (pupa_loader_load_module_func): Removed.
9941 (pupa_loader_load_module): Likewise.
9942
9943 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
9944 ``.o''.
9945
9946 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
9947 (pupa_linux_tmp_addr): Likewise.
9948 (pupa_linux_real_addr): Likewise.
9949 (pupa_linux_boot_zimage): Likewise.
9950 (pupa_linux_boot_bzimage): Likewise.
9951
9952 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
9953 (pupa_upper_mem): Likewise.
9954 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
9955 module is too dangerous.
9956
9957 * include/pupa/loader.h (pupa_os_area_addr): Declared.
9958 (pupa_os_area_size): Likewise.
9959 (pupa_loader_set): Remove the first argument. Loader doesn't
9960 manage modules or initrd any longer.
9961 (pupa_loader_load_module): Removed.
9962
9963 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
9964 (linux_mod_SOURCES): New variable.
9965 (linux_mod_CFLAGS): Likewise.
9966
9967 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
9968
9969 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
9970 the length of a blocklist correctly.
9971
9972 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
9973 Use ioctl only if the OS file is a block device.
9974 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
9975 not very useful for normal files.
9976
9977 * kern/main.c (pupa_set_root_dev): New function.
9978 (pupa_load_normal_mode): Likewise.
9979 (pupa_main): Call those above.
9980
9981 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
9982 pupa_uint16_t.
9983
9984 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
9985
9986 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9987
9988 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
9989 (setup): Configure the installed partition information and the
9990 dl prefix.
9991
9992 * loader/i386/pc/chainloader.c (my_mod): New variable.
9993 (pupa_chainloader_unload): New function.
9994 (pupa_rescue_cmd_chainloader): Refer itself.
9995 (PUPA_MOD_INIT): Save its own module in MY_MOD.
9996
9997 * kern/i386/pc/startup.S (install_partition): Removed.
9998 (version_string): Likewise.
9999 (config_file): Likewise.
10000 (pupa_install_dos_part): New variable.
10001 (pupa_install_bsd_part): Likewise.
10002 (pupa_prefix): Likewise.
10003 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
10004
10005 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
10006 and pupa/misc.h.
10007 (make_install_device): New function.
10008 (pupa_machine_init): Set the dl prefix.
10009
10010 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
10011 (buf): Renamed to ...
10012 (linebuf): ... this.
10013 (pupa_rescue_cmd_prefix): New function.
10014 (pupa_rescue_cmd_insmod): Likewise.
10015 (pupa_rescue_cmd_rmmod): Likewise.
10016 (pupa_rescue_cmd_lsmod): Likewise.
10017 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
10018 rmmod and lsmod.
10019
10020 * kern/mm.c (pupa_memalign): If failed even after invalidating
10021 disk caches, unload unneeded modules and retry.
10022
10023 * kern/misc.c (pupa_memmove): New function.
10024 (pupa_memcpy): Removed.
10025 (pupa_strcpy): New function.
10026 (pupa_itoa): Made static.
10027
10028 * kern/dl.c (pupa_dl_iterate): New function.
10029 (pupa_dl_ref): Likewise.
10030 (pupa_dl_unref): Likewise.
10031 (pupa_dl_unload): Return if succeeded or not.
10032 (pupa_dl_unload_unneeded): New function.
10033 (pupa_dl_unload_all): Likewise.
10034 (pupa_dl_init): Renamed to ...
10035 (pupa_dl_set_prefix): ... this.
10036 (pupa_dl_get_prefix): New function.
10037
10038 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
10039 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
10040 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10041 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10042 (pupa_install_dos_part): Declared.
10043 (pupa_install_bsd_part): Likewise.
10044 (pupa_prefix): Likewise.
10045 (pupa_boot_drive): Likewise.
10046
10047 * include/pupa/types.h: Fix a typo.
10048
10049 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
10050 pupa_memmove.
10051 (pupa_memmove): Declared.
10052 (pupa_strcpy): Likewise.
10053
10054 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
10055 pupa_mod_init takes one argument, its own module.
10056 (pupa_dl_unload_unneeded): Declared.
10057 (pupa_dl_unload_all): Likewise.
10058 (pupa_dl_ref): Likewise.
10059 (pupa_dl_unref): Likewise.
10060 (pupa_dl_iterate): Likewise.
10061 (pupa_dl_init): Renamed to ...
10062 (pupa_dl_set_prefix): ... this.
10063 (pupa_dl_get_prefix): Declared.
10064
10065 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
10066 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
10067 unloaded.
10068 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
10069 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
10070
10071 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
10072 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
10073
10074 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10075
10076 * util/i386/pc/pupa-setup.c (setup): Define the internal
10077 function find_first_partition_start at the top level, because GCC
10078 3.0.x cannot compile internal functions in deeper scopes
10079 correctly.
10080 (find_root_device): Use lstat instead of stat.
10081 Don't follow symbolic links.
10082 Fix the path-constructing code.
10083
10084 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
10085 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
10086 by a BLKGETSIZE ioctl first, because block devices don't fill
10087 the member st_mode of the structure stat on Linux.
10088 [__linux__] (linux_find_partition): Use a temporary buffer
10089 REAL_DEV for the working space. Copy it to DEV before returning.
10090 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
10091 buffer cache consistent.
10092 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
10093 strncmp. The previous value was merely wrong.
10094 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
10095
10096 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
10097 FAT size is 12. The previous value was merely wrong.
10098
10099 * kern/main.c (pupa_main): Don't split the starting message from
10100 newlines.
10101
10102 * kern/term.c (pupa_putchar): Put CR after LF instead of before
10103 LF, because BIOS goes crazy about character attributes in this
10104 case.
10105
10106 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10107
10108 * include/i386/pc/util/biosdisk.h: New file.
10109 * util/i386/pc/biosdisk.c: Likewise.
10110 * util/i386/pc/pupa-setup.c: Likewise.
10111
10112 * Makefile.in (INCLUDE_DISTFILES): Added
10113 include/pupa/i386/pc/util/biosdisk.h.
10114 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
10115 directory util/i386/pc.
10116 (install-local): Added a rule for sbin_UTILITIES.
10117 (uninstall): Likewise.
10118
10119 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
10120
10121 * util/misc.c (xrealloc): New function.
10122 (pupa_malloc): Likewise.
10123 (pupa_free): Likewise.
10124 (pupa_realloc): Likewise.
10125 (pupa_stop): Likewise.
10126 (pupa_putchar): Likewise.
10127
10128 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
10129
10130 * include/pupa/util/misc.h (xrealloc): Declared.
10131
10132 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
10133 macro.
10134 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
10135 (PUPA_BOOT_MACHINE_BPB_END): ... this.
10136
10137 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
10138 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10139
10140 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
10141 way should be implemented.
10142 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10143
10144 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
10145 the size of NAME for safety.
10146 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
10147 0x88.
10148
10149 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
10150 (pupa_setup_SOURCES): Likewise.
10151
10152 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
10153
10154 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10155
10156 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
10157 bunch of pushl's from pusha, because this destroys the return
10158 value.
10159
10160 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10161
10162 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
10163 This means that any missing prototypes could be fatal. Also, you
10164 must take care when writing assembly code. See the comments at
10165 the beginning of startup.S, for more details.
10166
10167 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
10168 compilation mechanism.
10169 (pupa_chainloader_real_boot): Likewise.
10170 (pupa_biosdisk_rw_int13_extensions): Likewise.
10171 (pupa_biosdisk_rw_standard): Likewise.
10172 (pupa_biosdisk_check_int13_extensions): Likewise.
10173 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
10174 (pupa_biosdisk_get_diskinfo_standard): Likewise.
10175 (pupa_get_memsize): Likewise.
10176 (pupa_get_mmap_entry): Likewise.
10177 (pupa_console_putchar): Likewise.
10178 (pupa_console_setcursor): Likewise.
10179 (pupa_getrtsecs): Use pushl instead of push.
10180
10181 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
10182 memory instead of the stack for a mmap entry, because some
10183 BIOSes may ignore the maximum size and overflow.
10184
10185 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10186
10187 * genmk.rb (PModule#rule): Compile automatically generated
10188 sources with module-specific CFLAGS as well as other sources.
10189
10190 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10191
10192 * configure.ac: Check ld.
10193 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10194 respectively, before checking endianness and sizes.
10195
10196 * Makefile.in (LD): New variable.
10197
10198 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10199
10200 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10201
10202 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10203
10204 * Changelog: New file.
10205