]> git.proxmox.com Git - grub2.git/blob - ChangeLog
2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / ChangeLog
1 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2
3 * DISTLIST: Added include/grub/i386/linux.h. Removed
4 include/grub/i386/pc/linux.h
5
6 * configure.ac (AC_INIT): Bumped to 1.94.
7
8 * config.guess: Updated from gnulib.
9 * config.sub: Likewise.
10 * install-sh: Likewise.
11 * mkinstalldirs: Likewise.
12
13 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
14
15 * conf/common.rmk (grub_modules_init.lst): Depended on
16 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
17 MODSRCFILES.
18
19 * genmk.rb (PModule::rule): Reverted the previous change.
20
21 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
22
23 * conf/common.rmk (grub_modules_init.lst): Depends on
24 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
25 that the target does not exist before producing.
26 (grub_modules_init.h): Remove the target before generating.
27 (grub_emu_init.c): Likewise.
28
29 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
30
31 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
32
33 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
34 for the target-specific tests. Make sure that we also have the
35 up-to-date target variables for those tests.
36
37 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
38
39 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
40 (PModule::rule): Likewise.
41
42 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
43
44 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
45 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
46 target-specific flags should be prefixed.
47 (PModule::rule): Likewise.
48
49 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
50
51 * configure.ac (CMP): Check if cmp is available explicitly.
52
53 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
54
55 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
56 (target_cpu): New variable.
57 (pkglibdir): Use target_cpu instead of host_cpu.
58
59 * util/i386/pc/grub-install.in (host_cpu): Removed.
60 (target_cpu): New variable.
61 (pkglibdir): Use target_cpu instead of host_cpu.
62
63 * util/genmoddep.c: Removed.
64
65 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
66 instead of GRUB_HOST_SIZEOF_VOID_P.
67 * kern/dl.c: Likewise.
68
69 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
70 ...
71 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
72 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
73 (GRUB_TARGET_SIZEOF_LONG): ... this.
74 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
75 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
76 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
77 to ...
78 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
79 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
80 (GRUB_TARGET_SIZEOF_LONG): ... this.
81 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
82 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
83 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
84 to ...
85 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
86 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
87 (GRUB_TARGET_SIZEOF_LONG): ... this.
88 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
89 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
90
91 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
92 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
93 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
94 instead of GRUB_HOST_SIZEOF_LONG.
95 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
96 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
97 GRUB_CPU_WORDS_BIGENDIAN.
98 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
99 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
100 grub_host_ssize_t.
101
102 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
103 (genmoddep_SOURCES): Likewise.
104 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
105 (genmoddep_SOURCES): Likewise.
106 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
107 (genmoddep_SOURCES): Likewise.
108 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
109 Likewise.
110 (genmoddep_SOURCES): Likewise.
111
112 * genmoddep.awk: New file.
113
114 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
115 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
116 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
117 (PModule::rule): Likewise.
118 (Program::rule): Likewise.
119 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
120 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
121 respectively.
122
123 * configure.ac: Rewritten intensively to use host and target
124 instead of build and host, respectively.
125
126 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
127 (host_cpu): Removed.
128 (target_cpu): New variable.
129 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
130 (BUILD_CC): Removed.
131 (BUILD_CFLAGS): Likewise.
132 (BUILD_CPPFLAGS): Likewise.
133 (TARGET_CC): New variable.
134 (TARGET_CFLAGS): Likewise.
135 (TARGET_CPPFLAGS): Likewise.
136 (TARGET_LDFLAGS): Likewise.
137 (AWK): Likewise.
138 (include): Use target_cpu instead of host_cpu.
139 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
140
141 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
142
143 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
144
145 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
146 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
147 field 'false' to 'exec_on_false'.
148 (grub_script_create_cmdif): Renamed argument names to reflect above
149 changes.
150
151 * normal/execute.c (grub_script_execute_cmdif): Likewise.
152
153 * normal/script.c (grub_script_create_cmdif): Likewise.
154
155 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
156
157 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
158 top.
159 (grub_hfsplus_btree_recptr): Likewise.
160 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
161 FILEBLOCK both to pass a block number and store next block
162 number.
163 (grub_hfsplus_read_block): Rewritten heavily to support an extent
164 overflow file correctly. Specify errors appropriately, because
165 fshelp expects that GRUB_ERRNO is set when fails. Reuse
166 grub_hfsplus_btree_recptr to get the pointer to a found key.
167 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
168 is found.
169
170 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
171 linux.mod.
172 (_linux_mod_SOURCES): New variable.
173 (_linux_mod_CFLAGS): Likewise.
174 (_linux_mod_LDFLAGS): Likewise.
175 (linux_mod_SOURCES): Likewise.
176 (linux_mod_CFLAGS): Likewise.
177 (linux_mod_LDFLAGS): Likewise.
178
179 * DISTLIST: Added loader/i386/efi/linux.c,
180 loader/i386/efi/linux_normal.c and
181 include/grub/i386/efi/loader.h.
182
183 * loader/i386/efi/linux.c: New file.
184 * loader/i386/efi/linux_normal.c: Likewise.
185 * include/grub/i386/efi/loader.h: Likewise.
186
187 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
188
189 * commands/blocklist.c: New file.
190
191 * DISTLIST: Added commands/blocklist.c.
192
193 * term/efi/console.c (grub_console_highlight_color): Use a lighter
194 color for the background, and a darker color for the foreground.
195 (grub_console_checkkey): Return READ_KEY.
196 (grub_console_cls): Set the background to
197 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
198
199 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
200
201 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
202 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
203
204 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
205 prototype.
206
207 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
208 BG. The spec is wrong again.
209
210 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
211 prototype.
212 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
213
214 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
215 commands/blocklist.c.
216 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
217
218 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
219 (blocklist_mod_SOURCES): New variable.
220 (blocklist_mod_CFLAGS): Likewise.
221 (blocklist_mod_LDFLAGS): Likewise.
222
223 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
224
225 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
226 duplication.
227 (lba_mode): Use %eax more intensively to reduce the code size.
228
229 2006-05-20 Marco Gerards <marco@gnu.org>
230
231 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
232
233 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
234 for `menuentry'.
235 (script): Accept leading newlines.
236 (newlines): New rule to describe 0 or more newlines.
237 (commands): Accept `command' with trailing newline. Fixed the
238 order in which arguments were passed to `grub_script_add_cmd'.
239 Accept commands separated by newlines.
240 (function): Changed to accept newlines.
241 (menuentry) Rewritten.
242
243 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
244 front of the list, instead of to the end.
245
246 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
247
248 * util/i386/pc/grub-install.in (bindir): New variable.
249 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
250 Shaver <lbgwjl@gmail.com>.
251
252 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
253
254 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
255 grub/machine/linux.h
256 * loader/i386/pc/linux.c: Likewise.
257
258 * include/grub/i386/pc/linux.h: Moved to ...
259 * include/grub/i386/linux.h: ... here.
260
261 * include/grub/i386/linux.h (struct linux_kernel_params): New
262 struct.
263
264 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
265
266 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
267 checking.
268 (grub_video_vbe_blit_glyph): Likewise.
269 (grub_video_vbe_blit_bitmap): Likewise.
270 (grub_video_vbe_blit_render_target): Likewise.
271
272 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
273
274 * configure.ac (--with-platform): Properly quote the square
275 brackets.
276
277 2006-05-08 Marco Gerards <marco@gnu.org>
278
279 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
280 this...
281 (kernel_elf_HEADERS): ...to this. Updated all users.
282 (grubof_symlist.c): Renamed from this...
283 (kernel_elf_symlist.c): ...to this. Updated all users.
284 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
285 (grubof_SOURCES): Renamed from this...
286 (kernel_elf_SOURCES): ...to this.
287 (grubof_HEADERS): Renamed from this...
288 (kernel_elf_HEADERS): ...to this.
289 (grubof_CFLAGS): Renamed from this...
290 (kernel_elf_CFLAGS): ...to this.
291 (grubof_ASFLAGS): Renamed from this...
292 (kernel_elf_ASFLAGS): ...to this.
293 (grubof_LDFLAGS): Renamed from this...
294 (kernel_elf_LDFLAGS): ...to this.
295
296 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
297 this...
298 (kernel_elf_HEADERS): ...to this. Updated all users.
299 (grubof_symlist.c): Renamed from this...
300 (kernel_elf_symlist.c): ...to this. Updated all users.
301 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
302 (grubof_SOURCES): Renamed from this...
303 (kernel_elf_SOURCES): ...to this.
304 (grubof_HEADERS): Renamed from this...
305 (kernel_elf_HEADERS): ...to this.
306 (grubof_CFLAGS): Renamed from this...
307 (kernel_elf_CFLAGS): ...to this.
308 (grubof_ASFLAGS): Renamed from this...
309 (kernel_elf_ASFLAGS): ...to this.
310 (grubof_LDFLAGS): Renamed from this...
311 (kernel_elf_LDFLAGS): ...to this.
312
313 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
314 `kernel.elf' instead of `grubof'.
315
316 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
317
318 Add --with-platform to configure. Use pkglibdir instead of
319 pkgdatadir. This is reported by Roger Leigh.
320
321 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
322 (host_vendor): Likewise.
323 (host_os): Likewise.
324 (pkgdatadir): Likewise.
325 (platform): New variable.
326 (pkglibdir): Likewise.
327 Use PKGLIBDIR instead of PKGDATADIR.
328
329 * util/i386/pc/grub-install.in (datadir): Removed.
330 (host_vendor): Likewise.
331 (host_os): Likewise.
332 (pkgdatadir): Likewise.
333 (platform): New variable.
334 (pkglibdir): Likewise.
335 Use PKGLIBDIR instead of PKGDATADIR.
336
337 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
338 instead of GRUB_DATADIR.
339 (main): Likewise.
340 * util/i386/pc/grub-mkimage.c (usage): Likewise.
341 (main): Likewise.
342 * util/i386/efi/grub-mkimage.c (usage): Likewise.
343 (main): Likewise.
344
345 * configure.ac (--with-platform): New option.
346 Use PLATFORM instead of HOST_VENDOR to specify a platform.
347
348 * Makefile.in: Include a makefile based on PLATFORM instead of
349 HOST_VENDOR.
350 (pkgdatadir): Not appended by the machine type.
351 (pkglibdir): Appended by the machine type.
352 (host_vendor): Removed.
353 (platform): New variable.
354 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
355 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
356 (uninstall): Likewise.
357
358 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
359
360 Use the environment context in the menu. Remove the commands
361 "default" and "timeout", and use variables instead.
362
363 * normal/menu.c: Include grub/env.h.
364 (print_entry): Cast TITLE to silence gcc.
365 (get_timeout): New function.
366 (set_timeout): Likewise.
367 (get_entry_number): Likewise.
368 (run_menu): Use a default entry, a fallback entry and a timeout
369 in the environment variables "default", "fallback" and
370 "timeout". Also, tweak the default entry if it is not within the
371 current menu entries.
372 (grub_menu_run): Use a fallback entry in the environment variable
373 "fallback".
374
375 * normal/main.c (read_config_file): Do not initialize
376 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
377 NEWMENU->TIMEOUT.
378 (grub_normal_execute): Use a data slot to store the menu.
379
380 * include/grub/normal.h (struct grub_menu): Removed default_entry,
381 fallback_entry and timeout.
382 (struct grub_menu_list): Removed.
383 (grub_menu_list_t): Likewise.
384 (struct grub_context): Likewise.
385 (grub_context_t): Likewise.
386 (grub_context_get): Likewise.
387 (grub_context_get_current_menu): Likewise.
388 (grub_context_push_menu): Likewise.
389 (grub_context_pop_menu): Likewise.
390 (grub_default_init): Likewise.
391 (grub_default_fini): Likewise.
392 (grub_timeout_init): Likewise.
393 (grub_timeout_fini): Likewise.
394
395 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
396 and timeout.mod.
397 (normal_mod_SOURCES): Removed normal/context.c.
398
399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
400 commands/default.c, commands/timeout.c and normal/context.c.
401 (normal_mod_SOURCES): Removed normal/context.c.
402
403 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
404 commands/timeout.c and normal/context.c.
405 (normal_mod_SOURCES): Removed normal/context.c.
406
407 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
408 commands/default.c, commands/timeout.c and normal/context.c.
409 (normal_mod_SOURCES): Removed normal/context.c.
410
411 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
412 timeout.mod.
413 (default_mod_SOURCES): Removed.
414 (default_mod_CFLAGS): Likewise.
415 (default_mod_LDFLAGS): Likewise.
416 (timeout_mod_SOURCES): Removed.
417 (timeout_mod_CFLAGS): Likewise.
418 (timeout_mod_LDFLAGS): Likewise.
419
420 * DISTLIST: Removed commands/default.c, commands/timeout.c and
421 normal/context.c.
422
423 * commands/default.c: Removed.
424 * commands/timeout.c: Likewise.
425 * normal/context.c: Likewise.
426
427 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
428
429 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
430
431 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
432
433 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
434 "next" to "prev" for readability.
435 (struct grub_env_sorted_var): New struct.
436 (grub_env_context): Renamed to ...
437 (initial_context): ... this.
438 (grub_env_var_context): Renamed to ...
439 (current_context): ... this.
440 (grub_env_find): Look only at CURRENT_CONTEXT.
441 (grub_env_context_open): Rewritten to copy exported variables from
442 previous context.
443 (grub_env_context_close): Rewritten according to the new
444 scheme. Also, add an assertion to prevent the initial context from
445 removed.
446 (grub_env_insert): Removed the code for the sorted list.
447 (grub_env_remove): Likewise.
448 (grub_env_export): Simply mark the variable with
449 GRUB_ENV_VAR_GLOBAL.
450 (grub_env_set): A cosmetic change for naming consistency.
451 (grub_env_get): Likewise.
452 (grub_env_unset): Likewise.
453 (grub_env_iterate): Rewritten to sort variables within this
454 function.
455 (grub_register_variable_hook): Fixed for naming consistency. Call
456 grub_env_find again, only if NAME is not found at the first time.
457 (mangle_data_slot_name): New function.
458 (grub_env_set_data_slot): Likewise.
459 (grub_env_get_data_slot): Likewise.
460 (grub_env_unset_data_slot): Likewise.
461
462 * include/grub/env.h (grub_env_var_type): New enum.
463 (GRUB_ENV_VAR_LOCAL): New constant.
464 (GRUB_ENV_VAR_GLOBAL): Likewise.
465 (GRUB_ENV_VAR_DATA): Likewise.
466 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
467 "type".
468 (grub_env_set): Replace VAR with NAME for consistency.
469 (grub_register_variable_hook): Likewise.
470 (grub_env_export): Specify the name of the argument.
471 (grub_env_set_data_slot): New prototype.
472 (grub_env_get_data_slot): Likewise.
473 (grub_env_unset_data_slot): Likewise.
474
475 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
476
477 Extend the loader so that GRUB can accept a loader which comes
478 back to GRUB when a loaded image exits. Also, this change adds
479 support for a chainloader on EFI.
480
481 * term/efi/console.c: Include grub/misc.h.
482 (grub_console_checkkey): Display a scan code on the top for
483 debugging. This will be removed once the EFI port gets stable.
484 Correct the scan code mapping.
485
486 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
487 allocate memory from larger regions, in order to reduce the number
488 of allocated regions. Otherwise, the MacOSX loader panics.
489 (filter_memory_map): Avoid less than 1MB for compatibility with
490 other loaders.
491 (add_memory_regions): Allocate from the tail of a region, if
492 possible, to avoid allocating a region near to 1MB, for the MacOSX
493 loader.
494
495 * kern/efi/init.c (grub_efi_set_prefix): Specify
496 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
497
498 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
499 argument IMAGE_HANDLE and specify it to get a loaded image.
500 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
501 grub_efi_get_loaded_image.
502 (grub_efi_get_filename): Divide the legnth by the size of
503 grub_efi_char16_t.
504 (grub_efi_get_device_path): New function.
505 (grub_efi_print_device_path): Print End Device Path nodes. Divide
506 the length by the size of grub_efi_char16_t for a file path device
507 path node.
508
509 * kern/loader.c (grub_loader_noreturn): New variable.
510 (grub_loader_set): Accept a new argument NORETURN. Set
511 GRUB_LOADER_NORETURN to NORETURN.
512 All callers changed.
513 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
514 grub_machine_fini.
515
516 * include/grub/efi/efi.h (grub_efi_get_device_path): New
517 prototype.
518 (grub_efi_get_loaded_image): Take an argument to specify an image
519 handle.
520
521 * include/grub/loader.h (grub_loader_set): Added one more argument
522 NORETURN.
523
524 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
525 instead of grub_efi_open_protocol.
526 (grub_efidisk_get_device_name): Likewise.
527 (grub_efidisk_close): Print a newline.
528 (grub_efidisk_get_device_handle): Fixed to use
529 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
530 GRUB_EFI_DEVICE_PATH_TYPE.
531
532 * disk/efi/efidisk.c (device_path_guid): Moved to ...
533 * kern/efi/efi.c (device_path_guid): ... here.
534
535 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
536 chain.mod.
537 (kernel_mod_HEADERS): Added efi/disk.h.
538 (_chain_mod_SOURCES): New variable.
539 (_chain_mod_CFLAGS): Likewise.
540 (_chain_mod_LDFLAGS): Likewise.
541 (chain_mod_SOURCES): Likewise.
542 (chain_mod_CFLAGS): Likewise.
543 (chain_mod_LDFLAGS): Likewise.
544
545 * DISTLIST: Added include/grub/efi/chainloader.h,
546 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
547
548 * include/grub/efi/chainloader.h: New file.
549 * loader/efi/chainloader.c: Likewise.
550 * loader/efi/chainloader_normal.c: Likewise.
551
552 2006-04-30 Marco Gerards <marco@gnu.org>
553
554 * commands/configfile.c (grub_cmd_source): New function.
555 (GRUB_MOD_INIT): Register the commands `source' and `.'.
556 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
557
558 2006-04-30 Marco Gerards <marco@gnu.org>
559
560 * normal/execute.c (grub_script_execute_cmd): Change the return
561 type to `grub_err_t'. Correctly return the error.
562 (grub_script_execute_cmdline): In case a command line is not a
563 command or a function, try to interpret it as an assignment.
564
565 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
566
567 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
568 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
569 skip a node whose name is obviously invalid as UTF-16,
570 i.e. contains a NUL character. Stop the iteration when the last
571 directory entry is found. Instead of using the return value of
572 grub_hfsplus_btree_iterate_node, store the value in RET and use
573 it, because the iterator can be stopped by the last directory
574 entry.
575
576 2006-04-30 Marco Gerards <marco@gnu.org>
577
578 * include/grub/env.h (grub_env_export): New prototype. Reported
579 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
580
581 2006-04-30 Marco Gerards <marco@gnu.org>
582
583 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
584 size of the extents in a catalog file record.
585
586 2006-04-29 Marco Gerards <marco@gnu.org>
587
588 * commands/configfile.c (grub_cmd_configfile): Execute the
589 configfile within its own context.
590
591 * include/grub/env.h (grub_env_context_open): New prototype.
592 (grub_env_context_close): Likewise.
593
594 * kern/env.c (grub_env): Removed.
595 (grub_env_sorted): Likewise.
596 (grub_env_context): New variable.
597 (grub_env_var_context): Likewise.
598 (grub_env_find): Search both the active context and the global
599 context.
600 (grub_env_context_open): New function.
601 (grub_env_context_close): Likewise.
602 (grub_env_insert): Likewise.
603 (grub_env_remove): Likewise.
604 (grub_env_export): Likewise.
605 (grub_env_set): Changed to use helper functions to avoid code
606 duplication.
607 (grub_env_iterate): Rewritten so both the current context and the
608 global context are being used.
609
610 * normal/command.c (export_command): New function.
611 (grub_command_init): Register the `export' function.
612
613 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
614
615 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
616 explicitly to suppress gcc's warnings.
617 * fs/fat.c (grub_fat_find_dir): Likewise.
618 (grub_fat_label): Likewise.
619 * fs/xfs.c (grub_xfs_read_inode): Likewise.
620 (grub_xfs_mount): Likewise.
621 (grub_xfs_label): Likewise.
622 * fs/affs.c (grub_affs_mount): Likewise.
623 (grub_affs_label): Likewise.
624 (grub_affs_iterate_dir): Likewise.
625 * fs/sfs.c (grub_sfs_mount): Likewise.
626 (grub_sfs_iterate_dir): Likewise.
627 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
628 * fs/hfs.c (grub_hfs_mount): Likewise.
629 (grub_hfs_cmp_catkeys): Likewise.
630 (grub_hfs_find_dir): Likewise.
631 (grub_hfs_dir): Likewise.
632 (grub_hfs_label): Likewise.
633 * fs/jfs.c (grub_jfs_mount): Likewise.
634 (grub_jfs_opendir): Likewise.
635 (grub_jfs_getent): Likewise.
636 (grub_jfs_lookup_symlink): Likewise.
637 (grub_jfs_label): Likewise.
638 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
639 (grub_hfsplus_iterate_dir): Likewise.
640 (grub_hfsplus_btree_iterate_node): Made static.
641
642 * util/grub-emu.c (prefix): New variable.
643 (grub_machine_set_prefix): New function.
644 (main): Do not set the environment variable "prefix" here. Only
645 set PREFIX, which is used later by grub_machine_set_prefix.
646
647 * include/grub/video.h: Do not include grub/symbol.h.
648 (grub_video_register): Not exported. This symbol is not defined in
649 the kernel.
650 (grub_video_unregister): Likewise.
651 (grub_video_iterate): Likewise.
652 (grub_video_setup): Likewise.
653 (grub_video_restore): Likewise.
654 (grub_video_get_info): Likewise.
655 (grub_video_get_blit_format): Likewise.
656 (grub_video_set_palette): Likewise.
657 (grub_video_get_palette): Likewise.
658 (grub_video_set_viewport): Likewise.
659 (grub_video_get_viewport): Likewise.
660 (grub_video_map_color): Likewise.
661 (grub_video_map_rgb): Likewise.
662 (grub_video_map_rgba): Likewise.
663 (grub_video_fill_rect): Likewise.
664 (grub_video_blit_glyph): Likewise.
665 (grub_video_blit_bitmap): Likewise.
666 (grub_video_blit_render_target): Likewise.
667 (grub_video_scroll): Likewise.
668 (grub_video_swap_buffers): Likewise.
669 (grub_video_create_render_target): Likewise.
670 (grub_video_delete_render_target): Likewise.
671 (grub_video_set_active_render_target): Likewise.
672
673 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
674 Undefined.
675 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
676
677 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
678 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
679 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
680 instead of $(srcdir)/genkernsyms.sh.
681
682 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
683 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
684 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
685 instead of $(srcdir)/genkernsyms.sh.
686
687 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
688 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
689 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
690 instead of $(srcdir)/genkernsyms.sh.
691
692 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
693 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
694 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
695 instead of $(srcdir)/genkernsyms.sh.
696
697 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
698 genkernsyms.sh.
699
700 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
701 genkernsyms.sh.
702 (gensymlist.sh): New target.
703 (genkernsyms.sh): Likewise.
704
705 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
706 genkernsyms.sh.in and gensymlist.sh.in.
707
708 * genkernsyms.sh: Removed.
709 * gensymlist.sh: Likewise.
710
711 * genkernsyms.sh.in: New file.
712 * gensymlist.sh.in: Likewise.
713
714 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
715
716 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
717 clobber "prefix", since we may have already set it manually.
718
719 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
720
721 * kern/misc.c (abort): New alias for grub_abort.
722
723 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
724
725 A new machine-specific function "grub_machine_set_prefix" is
726 defined. This is called after loading modules, so that a prefix
727 initialization can use modules. Also, this change adds an
728 intensive debugging feature for the memory manager via the
729 configure option "--enable-mm-debug".
730
731 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
732 PART.LEN.
733
734 * kern/sparc64/ieee1275/init.c (abort): Removed.
735 (grub_stop): Likewise.
736 (grub_exit): New function.
737 (grub_set_prefix): Renamed to ...
738 (grub_machine_set_prefix): ... this.
739 (grub_machine_init): Do not call grub_set_prefix.
740
741 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
742 (grub_machine_set_prefix): ... this.
743 (grub_machine_init): Do not call grub_set_prefix.
744
745 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
746 (grub_machine_init): Do not set the prefix here.
747
748 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
749
750 * kern/efi/init.c: Include grub/mm.h.
751 (grub_efi_set_prefix): New function.
752
753 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
754 (grub_efi_get_filename): New function.
755 (grub_print_device_path): Renamed to ...
756 (grub_efi_print_device_path): ... this.
757
758 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
759 [MM_DEBUG] (grub_realloc): Likewise.
760 [MM_DEBUG] (grub_free): Likewise.
761 [MM_DEBUG] (grub_memalign): Likewise.
762 [MM_DEBUG] (grub_mm_debug): New variable.
763 [MM_DEBUG] (grub_debug_malloc): New function.
764 [MM_DEBUG] (grub_debug_free): New function.
765 [MM_DEBUG] (grub_debug_realloc): New function.
766 [MM_DEBUG] (grub_debug_memalign): New function.
767
768 * kern/misc.c (grub_abort): Print a newline to distinguish
769 the message.
770
771 * kern/main.c (grub_main): Call grub_machine_set_prefix and
772 grub_set_root_dev after loading modules. This is necessary when
773 setting a prefix depends on modules.
774
775 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
776 (grub_efi_print_device_path): ... this.
777 (grub_efi_get_filename): New prototype.
778 (grub_efi_set_prefix): Likewise.
779
780 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
781 and grub/disk.h.
782 (grub_efidisk_get_device_handle): New prototype.
783 (grub_efidisk_get_device_name): Likewise.
784
785 * include/grub/mm.h: Include config.h.
786 (MM_DEBUG): Removed.
787 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
788 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
789 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
790 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
791 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
792 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
793 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
794 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
795 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
796
797 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
798
799 * disk/efi/efidisk.c: Include grub/partition.h.
800 (iterate_child_devices): New function.
801 (add_device): First, compare only last device path nodes, so that
802 devices are sorted by the types.
803 (grub_efidisk_get_device_handle): New function.
804 (grub_efidisk_get_device_name): Likewise.
805
806 * configure.ac (--enable-mm-debug): New option to enable the
807 memory manager debugging feature. This makes the binary much
808 bigger, so is disabled by default.
809
810 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
811
812 Use grub_abort instead of grub_stop, and grub_exit must be
813 define in each architecture now. Also, this change adds support
814 for EFI disks.
815
816 * util/i386/pc/grub-probefs.c: Include grub/term.h.
817 (grub_getkey): New function.
818 (grub_term_get_current): Likewise.
819
820 * util/i386/pc/grub-setup.c: Include grub/term.h.
821 (grub_getkey): New function.
822 (grub_term_get_current): Likewise.
823
824 * util/misc.c (grub_stop): Renamed to ...
825 (grub_exit): ... this.
826
827 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
828 (grub_exit): ... this.
829 (grub_machine_init): Use grub_abort instead of abort.
830 (grub_stop): Removed.
831
832 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
833 abort.
834
835 * kern/i386/pc/startup.S (grub_exit): New function.
836 (cold_reboot): New label.
837
838 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
839 (grub_efi_init): Call grub_efidisk_init.
840 (grub_efi_fini): Call grub_efidisk_fini.
841
842 * kern/efi/efi.c: Include grub/mm.h.
843 (grub_efi_console_control_guid): Renamed to ...
844 (console_control_guid): ... this.
845 (grub_efi_loaded_image_guid): Renamed to ...
846 (loaded_image_guid): ... this.
847 (grub_efi_locate_handle): New function.
848 (grub_efi_open_protocol): Likewise.
849 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
850 GRUB_EFI_CONSOLE_CONTROL_GUID.
851 (grub_efi_exit): Removed.
852 (grub_stop): Likewise.
853 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
854 (grub_exit): New function.
855 (grub_print_device_path): Likewise.
856
857 * kern/rescue.c (grub_rescue_cmd_exit): New function.
858 (grub_enter_rescue_mode): Register "exit".
859
860 * kern/misc.c (grub_real_dprintf): A cosmetic change.
861 (grub_abort): New function.
862
863 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
864
865 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
866
867 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
868
869 * include/grub/efi/efi.h (grub_efi_exit): Removed.
870 (grub_print_device_path): New prototype.
871 (grub_efi_locate_handle): Likewise.
872 (grub_efi_open_protocol): Likewise.
873
874 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
875 * disk/efi/efidisk.c: Likewise.
876
877 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
878
879 * include/grub/efi/console_control.h
880 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
881
882 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
883 last 8 bytes as an array.
884 (GRUB_EFI_DISK_IO_GUID): New macro.
885 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
886 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
887 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
888 grub_uint8_t.
889 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
890 (struct grub_efi_device_path): Rename the member "sub_type" to
891 "subtype".
892 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
893 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
894 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
895 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
896 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
897 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
898 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
899 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
900 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
901 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
902 (struct grub_efi_pci_device_path): New structure.
903 (grub_efi_pci_device_path_t): New type.
904 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
905 (struct grub_efi_pccard_device_path): New structure.
906 (grub_efi_pccard_device_path_t): New type.
907 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
908 (struct grub_efi_memory_mapped_device_path): New structure.
909 (grub_efi_memory_mapped_device_path_t): New type.
910 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
911 (struct grub_efi_vendor_device_path): New structure.
912 (grub_efi_vendor_device_path_t): New type.
913 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
914 (struct grub_efi_controller_device_path): New structure.
915 (grub_efi_controller_device_path_t): New type.
916 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
917 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
918 (struct grub_efi_acpi_device_path): New structure.
919 (grub_efi_acpi_device_path_t): New type.
920 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
921 (struct grub_efi_expanded_acpi_device_path): New structure.
922 (grub_efi_expanded_acpi_device_path_t): New type.
923 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
924 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
925 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
926 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
927 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
928 (struct grub_efi_atapi_device_path): New structure.
929 (grub_efi_atapi_device_path_t): New type.
930 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
931 (struct grub_efi_fibre_channel_device_path): New structure.
932 (grub_efi_fibre_channel_device_path_t): New type.
933 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
934 (struct grub_efi_1394_device_path): New structure.
935 (grub_efi_1394_device_path_t): New type.
936 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
937 (struct grub_efi_usb_device_path): New structure.
938 (grub_efi_usb_device_path_t): New type.
939 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
940 (struct grub_efi_usb_class_device_path): New structure.
941 (grub_efi_usb_class_device_path_t): New type.
942 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
943 (struct grub_efi_i2o_device_path): New structure.
944 (grub_efi_i2o_device_path_t): New type.
945 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
946 (struct grub_efi_mac_address_device_path): New structure.
947 (grub_efi_mac_address_device_path_t): New type.
948 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
949 (struct grub_efi_ipv4_device_path): New structure.
950 (grub_efi_ipv4_device_path_t): New type.
951 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
952 (struct grub_efi_ipv6_device_path): New structure.
953 (grub_efi_ipv6_device_path_t): New type.
954 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
955 (struct grub_efi_infiniband_device_path): New structure.
956 (grub_efi_infiniband_device_path_t): New type.
957 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
958 (struct grub_efi_uart_device_path): New structure.
959 (grub_efi_uart_device_path_t): New type.
960 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
961 (struct grub_efi_vendor_messaging_device_path): New structure.
962 (grub_efi_vendor_messaging_device_path_t): New type.
963 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
964 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
965 (struct grub_efi_hard_drive_device_path): New structure.
966 (grub_efi_hard_drive_device_path_t): New type.
967 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
968 (struct grub_efi_cdrom_device_path): New structure.
969 (grub_efi_cdrom_device_path_t): New type.
970 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
971 (struct grub_efi_vendor_media_device_path): New structure.
972 (grub_efi_vendor_media_device_path_t): New type.
973 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
974 (struct grub_efi_file_path_device_path): New structure.
975 (grub_efi_file_path_device_path_t): New type.
976 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
977 (struct grub_efi_protocol_device_path): New structure.
978 (grub_efi_protocol_device_path_t): New type.
979 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
980 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
981 (struct grub_efi_bios_device_path): New structure.
982 (grub_efi_bios_device_path_t): New type.
983 (struct grub_efi_disk_io): New structure.
984 (grub_efi_disk_io_t): New type.
985 (struct grub_efi_block_io_media): New structure.
986 (grub_efi_block_io_media_t): New type.
987 (struct grub_efi_block_io): New structure.
988 (grub_efi_block_io_t): New type.
989
990 * include/grub/misc.h (grub_stop): Removed.
991 (grub_exit): New prototype.
992 (grub_abort): Likewise.
993
994 * include/grub/disk.h (enum grub_disk_dev_id): Added
995 GRUB_DISK_DEVICE_EFIDISK_ID.
996
997 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
998 disk/efi/efidisk.c.
999 (kernel_syms.lst): Remove the target if an error occurs.
1000
1001 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
1002
1003 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
1004 as it was simply too buggy.
1005
1006 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
1007
1008 * kern/misc.c (grub_lltoa): New function.
1009 (grub_vsprintf): Added support for the long long suffix,
1010 i.e. "ll".
1011
1012 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
1013
1014 * Makefile.in (LDFLAGS): Add variable.
1015 (LD): Remove variable.
1016 * configure.ac: Add -m32 to LDFLAGS.
1017 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
1018 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
1019 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
1020 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
1021 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
1022 variables.
1023 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
1024 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
1025 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
1026
1027 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
1028
1029 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
1030 length for unknown glyph.
1031
1032 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
1033
1034 Add support for pre-loaded modules into the EFI port.
1035
1036 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
1037 completely. Accept one more argument DIR. The caller has changed.
1038
1039 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
1040
1041 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
1042 (grub_efi_loaded_image_guid): New variable.
1043 (grub_efi_get_loaded_image): New function.
1044 (grub_arch_modules_addr): Likewise.
1045
1046 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
1047 prototype.
1048
1049 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
1050 (struct grub_efi_loaded_image): New structure.
1051 (grub_efi_loaded_image_t): New type.
1052
1053 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
1054
1055 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
1056 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
1057 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
1058
1059 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
1060
1061 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
1062
1063 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
1064
1065 * DISTLIST: Added include/grub/efi/console.h,
1066 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
1067 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
1068
1069 * include/grub/efi/console.h: New file.
1070 * include/grub/efi/time.h: Likewise.
1071 * include/grub/i386/efi/kernel.h: Likewise.
1072 * kern/efi/init.c: Likewise.
1073 * kern/efi/mm.c: Likewise.
1074 * term/efi/console.c: Likewise.
1075
1076 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
1077 (grub_stop): Removed.
1078 (grub_get_rtc): Likewise.
1079 (grub_machine_init): Simply call grub_efi_init.
1080 (grub_machine_fini): Call grub_efi_fini.
1081
1082 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
1083 (grub_efi_output_string): Removed.
1084 (grub_efi_stall): New function.
1085 (grub_stop): Likewise.
1086 (grub_get_rtc): Likewise.
1087
1088 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
1089 (grub_efi_stall): New prototype.
1090 (grub_efi_allocate_pages): Likewise.
1091 (grub_efi_free_pages): Likewise.
1092 (grub_efi_get_memory_map): Likewise.
1093 (grub_efi_mm_init): Likewise.
1094 (grub_efi_mm_fini): Likewise.
1095 (grub_efi_init): Likewise.
1096 (grub_efi_fini): Likewise.
1097
1098 * include/grub/i386/efi/time.h: Do not include
1099 grub/symbol.h. Include grub/efi/time.h.
1100 (GRUB_TICKS_PER_SECOND): Removed.
1101 (grub_get_rtc): Likewise.
1102
1103 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
1104 Added padding. The EFI spec is buggy.
1105 (GRUB_EFI_BLACK): New macro.
1106 (GRUB_EFI_BLUE): Likewise.
1107 (GRUB_EFI_GREEN): Likewise.
1108 (GRUB_EFI_CYAN): Likewise.
1109 (GRUB_EFI_RED): Likewise.
1110 (GRUB_EFI_MAGENTA): Likewise.
1111 (GRUB_EFI_BROWN): Likewise.
1112 (GRUB_EFI_LIGHTGRAY): Likewise.
1113 (GRUB_EFI_BRIGHT): Likewise.
1114 (GRUB_EFI_DARKGRAY): Likewise.
1115 (GRUB_EFI_LIGHTBLUE): Likewise.
1116 (GRUB_EFI_LIGHTGREEN): Likewise.
1117 (GRUB_EFI_LIGHTCYAN): Likewise.
1118 (GRUB_EFI_LIGHTRED): Likewise.
1119 (GRUB_EFI_LIGHTMAGENTA): Likewise.
1120 (GRUB_EFI_YELLOW): Likewise.
1121 (GRUB_EFI_WHITE): Likewise.
1122 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
1123 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
1124 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
1125 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
1126 (GRUB_EFI_BACKGROUND_RED): Likewise.
1127 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
1128 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
1129 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
1130 (GRUB_EFI_TEXT_ATTR): Likewise.
1131
1132 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
1133 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
1134 (kernel_mod_HEADERS): Added efi/time.h.
1135
1136 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
1137
1138 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
1139 include/grub/efi/api.h, include/grub/efi/console_control.h,
1140 include/grub/efi/efi.h, include/grub/efi/pe32.h,
1141 include/grub/i386/efi/time.h, kern/efi/efi.c,
1142 kern/i386/efi/init.c, kern/i386/efi/startup.S,
1143 and util/i386/efi/grub-mkimage.c.
1144
1145 * Makefile.in (RMKFILES): Added i386-efi.rmk.
1146
1147 * genmk.rb (PModule#rule): Do not export symbols if
1148 #{prefix}_EXPORTS is set to "no".
1149
1150 * conf/i386-efi.mk: New file.
1151 * conf/i386-efi.rmk: Likewise.
1152 * include/grub/efi/api.h: Likewise.
1153 * include/grub/efi/console_control.h: Likewise.
1154 * include/grub/efi/efi.h: Likewise.
1155 * include/grub/efi/pe32.h: Likewise.
1156 * include/grub/i386/efi/time.h: Likewise.
1157 * kern/efi/efi.c: Likewise.
1158 * kern/i386/efi/init.c: Likewise.
1159 * kern/i386/efi/startup.S: Likewise.
1160 * util/i386/efi/grub-mkimage.c: Likewise.
1161
1162 2006-04-17 Marco Gerards <marco@gnu.org>
1163
1164 * include/grub/script.h: Include <grub/parser.h> and
1165 "grub_script.tab.h".
1166 (struct grub_lexer_param): New struct.
1167 (struct grub_parser_param): Likewise.
1168 (grub_script_create_arglist): Pass the state in an argument.
1169 (grub_script_add_arglist): Likewise.
1170 (grub_script_create_cmdline): Likewise.
1171 (grub_script_create_cmdblock): Likewise.
1172 (grub_script_create_cmdif): Likewise.
1173 (grub_script_create_cmdmenu): Likewise.
1174 (grub_script_add_cmd): Likewise.
1175 (grub_script_arg_add): Likewise.
1176 (grub_script_lexer_ref): Likewise.
1177 (grub_script_lexer_deref): Likewise.
1178 (grub_script_lexer_record_start): Likewise.
1179 (grub_script_lexer_record_stop): Likewise.
1180 (grub_script_mem_record): Likewise.
1181 (grub_script_mem_record_stop): Likewise.
1182 (grub_script_malloc): Likewise.
1183 (grub_script_yylex): Likewise.
1184 (grub_script_yyparse): Likewise.
1185 (grub_script_yyerror): Likewise.
1186 (grub_script_yylex): Likewise.
1187 (grub_script_lexer_init): Return the state.
1188
1189 * normal/lexer.c (grub_script_lexer_state): Removed variable.
1190 (grub_script_lexer_done): Likewise.
1191 (grub_script_lexer_getline): Likewise.
1192 (grub_script_lexer_refs): Likewise.
1193 (script): Likewise.
1194 (newscript): Likewise.
1195 (record): Likewise.
1196 (recording): Likewise.
1197 (recordpos): Likewise.
1198 (recordlen): Likewise.
1199 (grub_script_lexer_init): Return the state instead of setting
1200 global variables.
1201 (grub_script_lexer_ref): Use the newly added argument for state
1202 instead of globals.
1203 (grub_script_lexer_deref): Likewise.
1204 (grub_script_lexer_record_start): Likewise.
1205 (grub_script_lexer_record_stop): Likewise.
1206 (recordchar): Likewise.
1207 (nextchar): Likewise.
1208 (grub_script_yylex2): Likewise.
1209 (grub_script_yylex): Likewise.
1210 (grub_script_yyerror): Likewise.
1211
1212 * normal/parser.y (func_mem): Removed variable.
1213 (menu_entry): Likewise.
1214 (err): Likewise.
1215 (%lex-param): New parser option.
1216 (%parse-param): Likewise.
1217 (script): Always return the AST.
1218 (argument): Pass the state around.
1219 (arguments): Likewise.
1220 (grubcmd): Likewise.
1221 (commands): Likewise.
1222 (function): Likewise.
1223 (menuentry): Likewise.
1224 (if_statement): Likewise.
1225 (if): Likewise.
1226
1227 * normal/script.c (grub_script_memused): Removed variable.
1228 (grub_script_parsed): Likewise.
1229 (grub_script_malloc): Added a state argument. Use that instead of
1230 global variables.
1231 (grub_script_mem_record): Likewise.
1232 (grub_script_mem_record_stop): Likewise.
1233 (grub_script_arg_add): Likewise.
1234 (grub_script_add_arglist): Likewise.
1235 (grub_script_create_cmdline): Likewise.
1236 (grub_script_create_cmdif): Likewise.
1237 (grub_script_create_cmdmenu): Likewise.
1238 (grub_script_add_cmd): Likewise.
1239 (grub_script_parse): Setup the state before calling the parser.
1240
1241 2006-04-16 Marco Gerards <marco@gnu.org>
1242
1243 * normal/command.c (grub_command_init): Remove the title command.
1244
1245 * normal/lexer.c (grub_script_yylex): Renamed from this...
1246 (grub_script_yylex2): ... to this.
1247 (grub_script_yylex): New function. Temporary
1248 introduced to filter some tokens.
1249 (grub_script_yyerror): Print a newline.
1250
1251 * normal/main.c (read_config_file): Output information about the
1252 lines that contain errors. Wait for a key after all lines have
1253 been processed. Don't return an empty menu.
1254
1255 * normal/parser.y (func_mem): Don't initialize.
1256 (menu_entry): Likewise.
1257 (err): New variable.
1258 (script): Don't return anything when an error was encountered.
1259 (ws, returns): Removed rules.
1260 (argument): Disabled concatenated variable support.
1261 (arguments): Remove explicit separators.
1262 (grubcmd): Likewise.
1263 (function): Likewise.
1264 (menuentry): Likewise.
1265 (if): Likewise.
1266 (commands): Likewise. Add error handling.
1267
1268 * normal/script.c (grub_script_create_cmdline): If
1269 `grub_script_parsed' is 0, assume the parser encountered an error.
1270
1271 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
1272
1273 * configure.ac: Add support for EFI. Fix the typo
1274 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
1275
1276 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
1277
1278 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
1279 foreign multibyte characters should be shown correctly.
1280
1281 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
1282
1283 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
1284 calculation.
1285 (read_config_file): Made it to close file before returning.
1286
1287 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
1288
1289 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
1290 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
1291 video/i386/pc/vbefill.c.
1292
1293 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
1294 video/i386/pc/vbefill.c.
1295
1296 * include/grub/video.h (grub_video_blit_format): New enum.
1297 (grub_video_mode_info): Added new member blit_format.
1298 (grub_video_get_blit_format): New function prototype.
1299
1300 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
1301 function prototype.
1302 (grub_video_vbe_map_rgb): Likewise.
1303 (grub_video_vbe_unmap_color): Likewise.
1304
1305 * include/grub/i386/pc/vbeblit.h: New file.
1306
1307 * include/grub/i386/pc/vbefill.h: New file.
1308
1309 * video/video.c (grub_video_get_blit_format): New function.
1310 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
1311 (grub_video_vbe_map_rgb): Likewise.
1312 (grub_video_vbe_unmap_color): Likewise.
1313
1314 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
1315 optimized fills.
1316 (grub_video_vbe_blit_render_target): Changed to use more optimized
1317 blits.
1318 (grub_video_vbe_setup): Added detection for optimized settings.
1319 (grub_video_vbe_create_render_target): Likewise.
1320
1321 * video/i386/pc/vbeblit.c: New file.
1322
1323 * video/i386/pc/vbefill.c: New file.
1324
1325 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
1326
1327 * font/manager.c (grub_font_get_glyph): Removed font fixup from
1328 here...
1329
1330 * util/unifont2pff.rb: ... and moved it to here. Improved argument
1331 parsing to support both hex and dec ranges. If filename was missing
1332 show usage information.
1333
1334 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
1335
1336 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
1337 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
1338
1339 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
1340 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
1341 (video_mod_SOURCES): Added.
1342 (video_mod_CFLAGS): Likewise.
1343 (video_mod_LDFLAGS): Likewise.
1344 (gfxterm_mod_SOURCES): Likewise.
1345 (gfxterm_mod_CFLAGS): Likewise.
1346 (gfxterm_mod_LDFLAGS): Likewise.
1347 (videotest_mod_SOURCES): Likewise.
1348 (videotest_mod_CFLAGS): Likewise.
1349 (videotest_mod_LDFLAGS): Likewise.
1350 (vesafb_mod_SOURCES): Removed.
1351 (vesafb_mod_CFLAGS): Likewise.
1352 (vesafb_mod_LDFLAGS): Likewise.
1353 (vga_mod_SOURCES): Likewise.
1354 (vga_mod_CFLAGS): Likewise.
1355 (vga_mod_LDFLAGS): Likewise.
1356
1357 * commands/videotest.c: New file.
1358
1359 * font/manager.c (fill_with_default_glyph): Modified to use
1360 grub_font_glyph.
1361 (grub_font_get_glyph): Likewise.
1362 (fontmanager): Renamed from this...
1363 (font_manager): ... to this.
1364
1365 * include/grub/font.h (grub_font_glyph): Added new structure.
1366 (grub_font_get_glyph): Modified to use grub_font_glyph.
1367
1368 * include/grub/misc.h (grub_abs): Added as inline function.
1369
1370 * include/grub/video.h: New file.
1371
1372 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
1373 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
1374 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
1375 (grub_vbe_get_controller_info): Renamed from this...
1376 (grub_vbe_bios_get_controller_info): ... to this.
1377 (grub_vbe_get_mode_info): Renamed from this...
1378 (grub_vbe_bios_get_mode_info): ... to this.
1379 (grub_vbe_set_mode): Renamed from this...
1380 (grub_vbe_bios_set_mode): ... to this.
1381 (grub_vbe_get_mode): Renamed from this...
1382 (grub_vbe_bios_get_mode): ... to this.
1383 (grub_vbe_set_memory_window): Renamed from this...
1384 (grub_vbe_bios_set_memory_window): ... to this.
1385 (grub_vbe_get_memory_window): Renamed from this...
1386 (grub_vbe_bios_get_memory_window): ... to this.
1387 (grub_vbe_set_scanline_length): Renamed from this...
1388 (grub_vbe_set_scanline_length): ... to this.
1389 (grub_vbe_get_scanline_length): Renamed from this...
1390 (grub_vbe_bios_get_scanline_length): ... to this.
1391 (grub_vbe_set_display_start): Renamed from this...
1392 (grub_vbe_bios_set_display_start): ... to this.
1393 (grub_vbe_get_display_start): Renamed from this...
1394 (grub_vbe_bios_get_display_start): ... to this.
1395 (grub_vbe_set_palette_data): Renamed from this...
1396 (grub_vbe_bios_set_palette_data): ... to this.
1397 (grub_vbe_set_pixel_rgb): Removed.
1398 (grub_vbe_set_pixel_index): Likewise.
1399
1400 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
1401 from this...
1402 (grub_vbe_bios_get_controller_info): ... to this.
1403 (grub_vbe_get_mode_info): Renamed from this...
1404 (grub_vbe_bios_get_mode_info): ... to this.
1405 (grub_vbe_set_mode): Renamed from this...
1406 (grub_vbe_bios_set_mode): ... to this.
1407 (grub_vbe_get_mode): Renamed from this...
1408 (grub_vbe_bios_get_mode): ... to this.
1409 (grub_vbe_set_memory_window): Renamed from this...
1410 (grub_vbe_bios_set_memory_window): ... to this.
1411 (grub_vbe_get_memory_window): Renamed from this...
1412 (grub_vbe_bios_get_memory_window): ... to this.
1413 (grub_vbe_set_scanline_length): Renamed from this...
1414 (grub_vbe_set_scanline_length): ... to this.
1415 (grub_vbe_get_scanline_length): Renamed from this...
1416 (grub_vbe_bios_get_scanline_length): ... to this.
1417 (grub_vbe_set_display_start): Renamed from this...
1418 (grub_vbe_bios_set_display_start): ... to this.
1419 (grub_vbe_get_display_start): Renamed from this...
1420 (grub_vbe_bios_get_display_start): ... to this.
1421 (grub_vbe_set_palette_data): Renamed from this...
1422 (grub_vbe_bios_set_palette_data): ... to this.
1423 (grub_vbe_bios_get_controller_info): Fixed problem with registers
1424 getting corrupted after calling it. Added more pushes and pops.
1425 (grub_vbe_bios_set_mode): Likewise.
1426 (grub_vbe_bios_get_mode): Likewise.
1427 (grub_vbe_bios_get_memory_window): Likewise.
1428 (grub_vbe_bios_set_scanline_length): Likewise.
1429 (grub_vbe_bios_get_scanline_length): Likewise.
1430 (grub_vbe_bios_get_display_start): Likewise.
1431 (grub_vbe_bios_set_palette_data): Likewise.
1432
1433 * normal/cmdline.c (cl_set_pos): Refresh the screen.
1434 (cl_insert): Likewise.
1435 (cl_delete): Likewise.
1436
1437 * term/gfxterm.c: New file.
1438
1439 * term/i386/pc/vesafb.c: Removed file.
1440
1441 * video/video.c: New file.
1442
1443 * video/i386/pc/vbe.c (real2pm): Added new function.
1444 (grub_video_vbe_draw_pixel): Likewise.
1445 (grub_video_vbe_get_video_ptr): Likewise.
1446 (grub_video_vbe_get_pixel): Likewise
1447 (grub_video_vbe_init): Likewise.
1448 (grub_video_vbe_fini): Likewise.
1449 (grub_video_vbe_setup): Likewise.
1450 (grub_video_vbe_get_info): Likewise.
1451 (grub_video_vbe_set_palette): Likewise.
1452 (grub_video_vbe_get_palette): Likewise.
1453 (grub_video_vbe_set_viewport): Likewise.
1454 (grub_video_vbe_get_viewport): Likewise.
1455 (grub_video_vbe_map_color): Likewise.
1456 (grub_video_vbe_map_rgb): Likewise.
1457 (grub_video_vbe_map_rgba): Likewise.
1458 (grub_video_vbe_unmap_color): Likewise.
1459 (grub_video_vbe_fill_rect): Likewise.
1460 (grub_video_vbe_blit_glyph): Likewise.
1461 (grub_video_vbe_blit_bitmap): Likewise.
1462 (grub_video_vbe_blit_render_target): Likewise.
1463 (grub_video_vbe_scroll): Likewise.
1464 (grub_video_vbe_swap_buffers): Likewise.
1465 (grub_video_vbe_create_render_target): Likewise.
1466 (grub_video_vbe_delete_render_target): Likewise.
1467 (grub_video_vbe_set_active_render_target): Likewise.
1468 (grub_vbe_set_pixel_rgb): Remove function.
1469 (grub_vbe_set_pixel_index): Likewise.
1470 (index_color_mode): Remove static variable.
1471 (active_mode): Likewise.
1472 (framebuffer): Likewise.
1473 (bytes_per_scan_line): Likewise.
1474 (grub_video_vbe_adapter): Added new static variable.
1475 (framebuffer): Likewise.
1476 (render_target): Likewise.
1477 (initial_mode): Likewise.
1478 (mode_in_use): Likewise.
1479 (mode_list): Likewise.
1480
1481 2006-03-10 Marco Gerards <marco@gnu.org>
1482
1483 * configure.ac (AC_INIT): Bumped to 1.93.
1484
1485 * DISTLIST: Added `include/grub/hfs.h'.
1486
1487 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
1488
1489 * boot/i386/pc/boot.S (general_error): Before looping, try INT
1490 18H, which might help the BIOS falling back to next boot media.
1491
1492 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
1493
1494 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
1495 Poe Chen <poe.poechen@gmail.com>.
1496
1497 2006-01-17 Marco Gerards <marco@gnu.org>
1498
1499 * include/grub/normal.h: Include <grub/script.h>.
1500 (grub_command_list): Removed struct.
1501 (grub_command_list_t): Removed type.
1502 (grub_menu_entry): Remove members `num' and `command_list'. Add
1503 members `commands' and `sourcecode'.
1504 * include/grub/script.h: Add inclusion guards.
1505 (grub_script_cmd_menuentry): New struct.
1506 (grub_script_execute_menuentry): New prototype.
1507 (grub_script_lexer_record_start): Likewise.
1508 (grub_script_lexer_record_stop): Likewise.
1509 * normal/execute.c (grub_script_execute_menuentry): New function.
1510 * normal/lexer.c (record, recording, recordpos, recordlen): New
1511 variables.
1512 (grub_script_lexer_record_start): New function.
1513 (grub_script_lexer_record_stop): Likewise.
1514 (recordchar): Likewise.
1515 (nextchar): Likewise.
1516 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
1517 2048 as the buffer size. Add the tokens `menuentry' and `@'.
1518 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
1519 (current_menu): New variable.
1520 (free_menu): Mainly rewritten.
1521 (grub_normal_menu_addentry): New function.
1522 (read_config_file): Rewritten.
1523 * normal/menu.c (run_menu_entry): Mainly rewritten.
1524 * normal/menu_entry.c (make_screen): Rewritten te code to insert
1525 the menu entry.
1526 (run): Mainly rewritten.
1527 * normal/parser.y (menu_entry): New variable.
1528 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
1529 (menuentry): New rule.
1530 (command): Add `menuentry'.
1531 (if_statement): Allow additional returns before `fi'.
1532 * normal/script.c (grub_script_create_cmdmenu): New function.
1533
1534 2006-01-03 Marco Gerards <marco@gnu.org>
1535
1536 * INSTALL: GNU Bison is required.
1537 * configure.ac: Rewritten the test to detect Bison.
1538 * Makefile.in (YACC): New variable. Reported by Xun Sun
1539 <xun.sun.cn@gmail.com>.
1540
1541 2006-01-03 Marco Gerards <marco@gnu.org>
1542
1543 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
1544 the HFS+ filesystem to filesystem blocks.
1545 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
1546 GCC warning is silenced.
1547
1548 2006-01-03 Marco Gerards <marco@gnu.org>
1549
1550 * partmap/apple.c (apple_partition_map_iterate): Convert the data
1551 read from disk from big endian to host byte order.
1552
1553 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
1554
1555 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
1556 documentation.
1557 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
1558 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
1559 embedded HFS+ filesystem.
1560 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
1561 (grub_hfs_sblock): Move from here...
1562 * include/grub/hfs.h: To here... New file.
1563 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
1564 documentation.
1565 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
1566 New macros.
1567 (grub_hfsplus_volheader): Change type of member `magic' to
1568 `grub_uint16_t'.
1569 (grub_hfsplus_data): Add new member `embedded_offset'.
1570 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
1571 returned block.
1572 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
1573 Calculate the offset.
1574
1575 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1576
1577 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
1578 Removed.
1579 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
1580
1581 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1582
1583 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
1584 ENV->NAME is NULL after allocating ENV->VALUE.
1585
1586 2005-12-25 Marco Gerards <marco@gnu.org>
1587
1588 * kern/env.c (grub_env_set): Rewritten the error handling code.
1589
1590 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1591
1592 * geninit.sh: Made more robust, and more portable.
1593
1594 2005-12-25 Marco Gerards <marco@gnu.org>
1595
1596 Add support for Apple HFS+ filesystems.
1597
1598 * fs/hfsplus.c: New file.
1599
1600 * DISTLIST: Added `fs/hfsplus.c'.
1601
1602 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
1603 (hfsplus_mod_SOURCES): New variable.
1604 (hfsplus_mod_CFLAGS): Likewise.
1605 (hfsplus_mod_LDFLAGS): Likewise.
1606 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
1607 (grub_setup_SOURCES): Likewise.
1608 (grub_mkdevicemap_SOURCES): Likewise.
1609 (grub_emu_SOURCES): Likewise.
1610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1611
1612 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
1613
1614 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
1615
1616 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1617
1618 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
1619 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
1620 include/grub/parser.h, include/grub/script.h, kern/parser.c,
1621 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
1622 normal/lexer.c, normal/parser.y, normal/script.c, and
1623 partmap/gpt.c.
1624 Removed kern/sparc64/cache.c.
1625
1626 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
1627 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
1628 grub_emu_init.c.
1629
1630 * configure.ac (AC_INIT): Bumped to 1.92.
1631
1632 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
1633
1634 * kern/err.c (grub_error_push): Added new function to support error
1635 stacks.
1636 (grub_error_pop): Likewise.
1637 (grub_error_stack_items): New local variable to support error stacks.
1638 (grub_error_stack_pos): Likewise.
1639 (grub_error_stack_assert): Likewise.
1640 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
1641 stack depth.
1642 (grub_print_error): Added support to print errors from error stack.
1643
1644 * include/grub/err.h (grub_error_push): Added function prototype.
1645 (grub_error_pop): Likewise.
1646
1647 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
1648
1649 * configure.ac: Accept `powerpc64' as host_cpu.
1650 (amd64): Rename to `biarch32'.
1651
1652 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
1653 non-cacheline-aligned addresses.
1654
1655 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
1656 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
1657 if `size' is non-zero.
1658
1659 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
1660
1661 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
1662 and `cd' to make sure the filename is not prefixed with a
1663 directory name.
1664 (pkgdata_MODULES): Add `gpt.mod'.
1665 (gpt_mod_SOURCES): New variable.
1666 (gpt_mod_CFLAGS): Likewise.
1667 (gpt_mod_LDFLAGS): Likewise.
1668
1669 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
1670
1671 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
1672 New macro.
1673
1674 * partmap/gpt.c: New file.
1675
1676 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
1677 GPT partition map is detected.
1678
1679 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
1680
1681 * commands/i386/pc/play.c: New file.
1682 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
1683 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
1684 macros.
1685
1686 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
1687
1688 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
1689 ((unused))' to silence gcc warning.
1690
1691 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
1692
1693 * configure.ac: Correct `AC_PROG_YACC' test.
1694
1695 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1696
1697 * util/powerpc/ieee1275/grub-install.in: Run the mount point
1698 check before installing files.
1699
1700 2005-11-22 Mike Small <smallm@panix.com>
1701
1702 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
1703 number regex so multidigit numbers are recognized correctly.
1704
1705 2005-11-22 Mike Small <smallm@panix.com>
1706
1707 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
1708 debugging message before attempting to claim memory.
1709 (grub_rescue_cmd_initrd): Add a claim debugging message and try
1710 multiple addresses in case of failure.
1711
1712 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1713
1714 * term/tparm.c (get_space): Remove empty `if' statement.
1715
1716 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
1717
1718 * kern/parser.c (check_varstate): Rename `state' to 's'.
1719
1720 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1721
1722 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
1723 variable definitions to the beginning of each function. Sort stack
1724 variables by size.
1725 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
1726 `buf' argument to `char *'.
1727
1728 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1729
1730 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
1731 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
1732 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
1733 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
1734 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
1735 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
1736 configfile.mod, search.mod, gzio.mod and test.mod.
1737 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
1738 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
1739 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
1740 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
1741 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
1742 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
1743 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
1744 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
1745 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
1746 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
1747 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
1748 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
1749 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
1750 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
1751 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
1752 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
1753 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1754 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
1755 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
1756 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
1757 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
1758 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
1759 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
1760
1761 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
1762 `grep --include'.
1763 (pkgdata_MODULES): Add test.mod.
1764
1765 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1766
1767 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
1768 appending to variables with "+=".
1769 (PModule): Use full pathname to generate *.lst filenames.
1770
1771 * Makefile.in: Fixed list rules moved from genmk.rb.
1772 (.DELETE_ON_ERROR): New special target.
1773 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
1774
1775 * conf/i386-pc.rmk: Include conf/common.mk.
1776 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
1777 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
1778 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
1779 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
1780 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
1781 configfile.mod, search.mod, gzio.mod and test.mod.
1782 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
1783 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
1784 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
1785 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
1786 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
1787 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
1788 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
1789 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
1790 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
1791 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
1792 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
1793 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
1794 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
1795 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
1796 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
1797 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
1798 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1799 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
1800 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
1801 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
1802 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
1803 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
1804 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
1805 here...
1806 * conf/common.rmk: ... to here. New file.
1807
1808 * conf/common.mk: New file.
1809
1810 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
1811
1812 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
1813 (grub_script.tab.c): ... here.
1814
1815 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
1816 (grub_script.tab.c): ... here.
1817
1818 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
1819 (grub_script.tab.c): ... here.
1820
1821 * normal/command.c (grub_command_find): Fixed a memory leak of
1822 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
1823
1824 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1825
1826 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
1827 "@" which marks the start of a comment on ARM.
1828 (VARIABLE): Likewise.
1829
1830 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1831
1832 Add support for Linux/ADFS partition tables.
1833
1834 * partmap/acorn.c: New file.
1835
1836 * include/grub/acorn_filecore.h: Likewise.
1837
1838 * DISTLIST: Added `partmap/acorn.c' and
1839 `include/grub/acorn_filecore.h'.
1840
1841 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1842 `partmap/acorn.c'.
1843 (pkgdata_MODULES): Add `acorn.mod'.
1844 (acorn_mod_SOURCES): New variable.
1845 (acorn_mod_CFLAGS): Likewise.
1846
1847 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
1848 `partmap/acorn.c'.
1849 (pkgdata_MODULES): Add `acorn.mod'.
1850 (acorn_mod_SOURCES): New variable.
1851 (acorn_mod_CFLAGS): Likewise.
1852
1853 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
1854 (pkgdata_MODULES): Add `acorn.mod'.
1855 (acorn_mod_SOURCES): New variable.
1856 (acorn_mod_CFLAGS): Likewise.
1857 (acorn_mod_LDFLAGS): Likewise.
1858
1859 * include/types.h (grub_disk_addr_t): New typedef.
1860
1861 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
1862
1863 * geninit.sh: New file.
1864
1865 * geninitheader.sh: Likewise.
1866
1867 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
1868 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
1869 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
1870 * commands/configfile.c (grub_configfile_init)
1871 (grub_configfile_fini): Likewise.
1872 * commands/default.c (grub_default_init, grub_default_fini):
1873 Likewise.
1874 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
1875 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
1876 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
1877 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
1878 Likewise.
1879 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
1880 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
1881 Likewise.
1882 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
1883 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
1884 Likewise.
1885 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
1886 Likewise.
1887 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
1888 Likewise.
1889 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
1890 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
1891 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
1892 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
1893 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
1894 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
1895 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
1896 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
1897 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
1898 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
1899 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
1900 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
1901 * partmap/amiga.c (grub_amiga_partition_map_init)
1902 (grub_amiga_partition_map_fini): Likewise.
1903 * partmap/apple.c (grub_apple_partition_map_init)
1904 (grub_apple_partition_map_fini): Likewise.
1905 * partmap/pc.c (grub_pc_partition_map_init)
1906 (grub_pc_partition_map_fini): Likewise.
1907 * partmap/sun.c (grub_sun_partition_map_init,
1908 grub_sun_partition_map_fini): Likewise.
1909 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
1910 Likewise.
1911
1912 * util/grub-emu.c: Include <grub_modules_init.h>.
1913 (main): Don't initialize and de-initialize any modules directly,
1914 use `grub_init_all' and `grub_fini_all' instead.
1915
1916 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
1917 `grub_vesafb_mod_init'.
1918 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
1919 all users.
1920 * term/i386/pc/vga.c (grub_vga_init): Renamed to
1921 `grub_vga_mod_init'. Updated all users.
1922 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
1923
1924 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
1925 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
1926 rules.
1927
1928 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
1929 Generate a function to initialize the module in utilities.
1930 Updated all callers.
1931 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
1932 initialize the module in utilities. Updated all callers.
1933
1934 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
1935
1936 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
1937 escape sequence and a literal ^L to clear the screen.
1938
1939 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
1940 when returning from Open Firmware.
1941
1942 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
1943
1944 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
1945 (grub_ofconsole_height): Likewise.
1946 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
1947 manually insert a '\n'.
1948 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
1949 `grub_ofconsole_height'. Return early if these are already set.
1950
1951 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
1952
1953 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
1954 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
1955 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
1956 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
1957 and `normal/script.c'.
1958 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1959 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1960 (test_mod_SOURCES): New variable.
1961 (test_mod_CFLAGS): Likewise.
1962 (test_mod_LDFLAGS): Likewise.
1963 (pkgdata_MODULES): Add `test.mod'.
1964 (grub_script.tab.c): New rule.
1965 (grub_script.tab.h): Likewise.
1966
1967 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
1968
1969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1970 `commands/test.c', `normal/execute.c', `normal/lexer.c',
1971 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1972 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1973 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1974 (test_mod_SOURCES): New variable.
1975 (test_mod_CFLAGS): Likewise.
1976 (pkgdata_MODULES): Add `test.mod'.
1977 (grub_script.tab.c): New rule.
1978 (grub_script.tab.h): Likewise.
1979
1980 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
1981
1982 Add initial scripting support.
1983
1984 * commands/test.c: New file.
1985 * include/grub/script.h: Likewise.
1986 * normal/execute.c: Likewise.
1987 * normal/function.c: Likewise.
1988 * normal/lexer.c: Likewise.
1989 * normal/parser.y: Likewise.
1990 * normal/script.c: Likewise.
1991
1992 * configure.ac: Add `AC_PROG_YACC' test.
1993
1994 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
1995 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
1996 `normal/function.c' and `normal/script.c'.
1997 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1998 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1999 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
2000 variables.
2001 (pkgdata_MODULES): Add `test.mod'.
2002 (grub_script.tab.c): New rule.
2003 (grub_script.tab.h): Likewise.
2004
2005 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
2006
2007 * include/grub/normal.h (grub_test_init): New prototype.
2008 (grub_test_fini): Likewise.
2009
2010 * normal/command.c: Include <grub/script.h>.
2011 (grub_command_execute): Rewritten.
2012
2013 * util/grub-emu.c (main): Call `grub_test_init' and
2014 `grub_test_fini'.
2015
2016 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2017
2018 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
2019 to 0.
2020 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
2021 there are no pending characters.
2022
2023 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2024
2025 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
2026 `grub_strndup' to drop device arguments. Replace unnecessary
2027 `grub_strndup' with `grub_strdup'.
2028
2029 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2030
2031 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
2032 `debug' environment variable has been set.
2033
2034 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
2035
2036 * Makefile.in (install-local): Use $(DATA).
2037 (uninstall): Likewise.
2038 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
2039 (sbin_UTILITIES): ... to here.
2040 (sbin_SCRIPTS): New variable.
2041 (grub_install_SOURCES): New variable.
2042 * util/powerpc/ieee1275/grub-install.in: New file.
2043 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
2044 variable.
2045 (add_segments): Call `grub_util_get_path'.
2046
2047 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
2048
2049 From Timothy Baldwin:
2050 * commands/ls.c (grub_ls_list_files): Close FILE with
2051 grub_file_close.
2052 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
2053
2054 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
2055
2056 * include/grub/parser.h: New file.
2057
2058 * kern/parser.c: Likewise.
2059
2060 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
2061 (grub_setup_SOURCES): Likewise.
2062 (grub_probefs_SOURCES): Likewise.
2063 (grub_emu_SOURCES): Likewise.
2064 (kernel_img_HEADERS): Add `parser.h'.
2065
2066 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
2067 (grub_emu_SOURCES): Add `kern/parser.c'.
2068 (grubof_SOURCES): Likewise.
2069
2070 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
2071 (grubof_SOURCES): Add `kern/parser.c'.
2072
2073 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
2074
2075 * kern/misc.c (grub_split_cmdline): Removed function.
2076
2077 * kern/rescue.c: Include <grub/parser.h>.
2078 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
2079 of `grub_split_cmdline'.
2080
2081 * normal/command.c: Include <grub/parser.h>.
2082 (grub_command_execute): Use `grub_parser_split_cmdline' instead
2083 of `grub_split_cmdline'.
2084
2085 * normal/completion.c: Include <grub/parser.h>.
2086 (cmdline_state): New variable.
2087 (iterate_dir): End the filename with a quote depending on the
2088 command line state.
2089 (get_state): new function.
2090 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
2091 split the arguments and determine the current argument. When the
2092 argument string is not quoted, escape all spaces.
2093
2094 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
2095
2096 * normal/sparc64/setjmp.S: New file.
2097
2098 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
2099
2100 * include/grub/sparc64/libgcc.h: New file.
2101 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
2102 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
2103 normal/sparc64/setjmp.c.
2104
2105 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
2106
2107 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
2108 * kern/sparc64/cache.S: New file.
2109 * kern/sparc64/cache.c: Removed.
2110 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
2111 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
2112 -mtune=ultrasparc.
2113 (COMMON_LDFLAGS): Add -melf64_sparc.
2114 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
2115 (grubof_SOURCES): Use cache.S instead of cache.c.
2116 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
2117 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
2118 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
2119 commented though.
2120 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
2121 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
2122 (linux_mod_CFLAGS): Commented out.
2123 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
2124 out because module isn't built.
2125 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
2126 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
2127 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
2128 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
2129 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
2130 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
2131 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
2132 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
2133 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
2134 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
2135 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
2136 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
2137 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
2138 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
2139
2140 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
2141
2142 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
2143 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
2144 longer, because HFS should not be used on PC.
2145
2146 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2147
2148 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
2149 consistently within the loop.
2150
2151 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
2152
2153 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
2154 directory can not be read.
2155
2156 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2157
2158 * configure.ac (AC_INIT): Increase the version number to 1.91.
2159
2160 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
2161 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
2162 term/i386/pc/serial.c.
2163
2164 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2165
2166 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
2167 file size must be permitted.
2168
2169 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
2170 between %ah and %al.
2171
2172 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2173
2174 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
2175 grub_uint64_t.
2176 Call the hook with a NUL-terminated filename.
2177 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
2178 grub_cpu_to_be32.
2179
2180 * kern/term.c (cursor_state): New variable.
2181 (grub_term_set_current): Reset the cursor state on a new
2182 terminal.
2183 (grub_setcursor): Rewritten to use CURSOR_STATE.
2184 (grub_getcursor): New function.
2185
2186 * include/grub/term.h (grub_getcursor): New prototype.
2187
2188 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
2189 integers on ARM. Reported by Timothy Baldwin
2190 <T.E.Baldwin99@members.leeds.ac.uk>.
2191
2192 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
2193
2194 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
2195 allocated.
2196 (grub_sfs_dir): Likewise.
2197
2198 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
2199
2200 Add support for the SFS filesystem.
2201
2202 * fs/sfs.c: New file.
2203
2204 * DISTLIST: Added `fs/sfs.c'.
2205
2206 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
2207 (grub_probefs_SOURCES): Likewise.
2208 (grub_emu_SOURCES): Likewise.
2209 (pkgdata_MODULES): Add `sfs.mod'.
2210 (sfs_mod_SOURCES): New variable.
2211 (sfs_mod_CFLAGS): Likewise.
2212 (sfs_mod_LDFLAGS): Likewise.
2213
2214 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
2215 (pkgdata_MODULES): Add `sfs.mod'.
2216 (sfs_mod_SOURCES): New variable.
2217 (sfs_mod_CFLAGS): Likewise.
2218
2219 * util/grub-emu.c (main): Call `grub_sfs_init' and
2220 `grub_sfs_fini'.
2221
2222 * include/grub/fs.h (grub_sfs_init): New prototype.
2223 (grub_sfs_fini): Likewise.
2224
2225 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
2226
2227 Add support for the AFFS filesystem.
2228
2229 * fs/affs.c: New file.
2230
2231 * DISTLIST: Added `fs/affs.c'.
2232
2233 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
2234 (grub_probefs_SOURCES): Likewise.
2235 (grub_emu_SOURCES): Likewise.
2236 (pkgdata_MODULES): Add `affs.mod'.
2237 (affs_mod_SOURCES): New variable.
2238 (affs_mod_CFLAGS): Likewise.
2239 (affs_mod_LDFLAGS): Likewise.
2240
2241 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
2242 (pkgdata_MODULES): Add `affs.mod'.
2243 (affs_mod_SOURCES): New variable.
2244 (affs_mod_CFLAGS): Likewise.
2245
2246 * util/grub-emu.c (main): Call `grub_affs_init' and
2247 `grub_affs_fini'.
2248
2249 * include/grub/fs.h (grub_affs_init): New prototype.
2250 (grub_affs_fini): Likewise.
2251
2252 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
2253
2254 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
2255
2256 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
2257
2258 * configure.ac: Accept `x86_64' as host_cpu. In that case add
2259 `-m32' to CFLAGS.
2260
2261 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
2262 linking.
2263
2264 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
2265 (COMMON_LDFLAGS): New variable.
2266 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
2267 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
2268 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
2269 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
2270 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
2271 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
2272 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
2273 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
2274 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
2275 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
2276 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
2277 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
2278 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
2279 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
2280 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
2281 variables.
2282 (normal_mod_ASFLAGS): Add `-m32'.
2283
2284 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
2285 (grub_host_size_t, grub_host_ssize_t): New types.
2286 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
2287 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
2288 `GRUB_HOST_SIZEOF_VOID_P'.
2289
2290 * include/grub/kernel.h (struct grub_module_header): Type of
2291 member offset changed to `grub_host_off_t'. Type of member size
2292 changed to `grub_host_size_t'.
2293 (struct grub_module_info): Type of member offset changed to
2294 `grub_host_off_t'. Type of member size changed to
2295 `grub_host_size_t'.
2296
2297 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
2298
2299 Make GRUB's kernel compliant to Multiboot Specification.
2300
2301 * kern/i386/pc/startup.S (multiboot_header): New label.
2302 (multiboot_entry): Likewise.
2303 (multiboot_trampoline): Likewise.
2304
2305 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2306 Increased to 0x4A0.
2307
2308 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
2309 put parentheses after a question mark.
2310 [!GRUB_UTIL] (my_mod): New variable.
2311
2312 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
2313
2314 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
2315
2316 Adds support for the XFS filesystem. Btrees are not supported
2317 yet.
2318
2319 * fs/xfs.c: New file.
2320
2321 * DISTLIST: Added `fs/xfs.c'.
2322
2323 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
2324 (grub_probefs_SOURCES): Likewise.
2325 (grub_emu_SOURCES): Likewise.
2326 (pkgdata_MODULES): Add `xfs.mod'.
2327 (xfs_mod_SOURCES): New variable.
2328 (xfs_mod_CFLAGS): Likewise.
2329
2330 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
2331 (pkgdata_MODULES): Add `xfs.mod'.
2332 (xfs_mod_SOURCES): New variable.
2333 (xfs_mod_CFLAGS): Likewise.
2334
2335 * util/grub-emu.c (main): Call `grub_xfs_init' and
2336 `grub_xfs_fini'.
2337
2338 * include/grub/fs.h (grub_xfs_init): New prototype.
2339 (grub_xfs_fini): Likewise.
2340
2341
2342 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
2343
2344 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
2345 color modes, allow greater than 16 colors to be configured as
2346 a default palette.
2347
2348 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2349
2350 * normal/completion.c (complete_arguments): Add the qualifier
2351 const into OPTIONS.
2352
2353 From Omniflux <omniflux+lists@omniflux.com>:
2354 * include/grub/terminfo.h: New file.
2355 * include/grub/tparm.h: Likewise.
2356 * include/grub/i386/pc/serial.h: Likewise.
2357 * term/terminfo.c: Likewise.
2358 * term/tparm.c: Likewise.
2359 * term/i386/pc/serial.c: Likewise.
2360 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
2361 serial.mod.
2362 (terminfo_mod_SOURCES): New variable.
2363 (terminfo_mod_CFLAGS): Likewise.
2364 (serial_mod_SOURCES): Likewise.
2365 (serial_mod_CFLAGS): Likewise.
2366
2367 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
2368
2369 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
2370 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
2371 and kern/powerpc/ieee1275/cmain.c, respectively.
2372
2373 * boot/powerpc/ieee1275/crt0.S: Moved to ...
2374 * kern/powerpc/ieee1275/crt0.S: ... here.
2375
2376 * boot/powerpc/ieee1275/cmain.c: Moved to ...
2377 * kern/powerpc/ieee1275/cmain.c: ... here.
2378
2379 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
2380 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
2381 instead of boot/powerpc/ieee1275/crt0.S and
2382 boot/powerpc/ieee1275/cmain.c, respectively.
2383
2384 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
2385 sectors. It was not used anyway.
2386
2387 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
2388
2389 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
2390 `unused parameter' warning.
2391
2392 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
2393
2394 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
2395 function.
2396 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
2397 getcharwidth.
2398
2399 2005-08-28 Marco Gerards <metgerards@student.han.nl>
2400
2401 * include/grub/normal.h (enum grub_completion_type): Added
2402 `GRUB_COMPLETION_TYPE_ARGUMENT'.
2403
2404 * normal/cmdline.c (print_completion): Handle
2405 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
2406 * normal/menu_entry.c (store_completion): Likewise.
2407
2408 * normal/completion.c (complete_arguments): New function.
2409 (grub_normal_do_completion): Call `complete_arguments' when the
2410 current words start with a dash.
2411
2412 2005-08-27 Marco Gerards <metgerards@student.han.nl>
2413
2414 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
2415 `gzio.mod' instead of `io.mod').
2416
2417 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
2418
2419 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
2420 (DISTDIRS): Added io and video.
2421 Rewrite the search routine to make an output consistently.
2422
2423 * DISTLIST: Added conf/sparc64-ieee1275.mk,
2424 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
2425 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
2426 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
2427 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
2428 util/powerpc/ieee1275/misc.c.
2429
2430 * include/grub/gzio.h: New file.
2431 * io/gzio.c: Likewise.
2432
2433 * kern/file.c (grub_file_close): Call grub_device_close only if
2434 FILE->DEVICE is not NULL.
2435
2436 * include/grub/mm.h [!NULL] (NULL): New macro.
2437
2438 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
2439
2440 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
2441 (pkgdata_MODULES): Added gzio.mod.
2442 (gzio_mod_SOURCES): New variable.
2443 (gzio_mod_CFLAGS): Likewise.
2444
2445 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
2446 (pkgdata_MODULES): Added gzio.mod.
2447 (gzio_mod_SOURCES): New variable.
2448 (gzio_mod_CFLAGS): Likewise.
2449
2450 * commands/cat.c: Include grub/gzio.h.
2451 (grub_cmd_cat): Use grub_gzfile_open instead of
2452 grub_file_open.
2453
2454 * commands/cmp.c: Include grub/gzio.h.
2455 (grub_cmd_cmp): Use grub_gzfile_open instead of
2456 grub_file_open.
2457
2458 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
2459 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
2460 grub_file_open.
2461 (grub_rescue_cmd_module): Likewise.
2462
2463 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
2464
2465 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
2466 kern/sparc64/ieee1275/init.c because it contains _start.
2467 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
2468
2469 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
2470
2471 * configure.ac: Add support for sparc64 host with ieee1275
2472 firmware.
2473 * configure: Generated from configure.ac.
2474 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
2475 instead of int.
2476 (grub_ofdisk_read): Likewise.
2477 (grub_ofdisk_open): Use %p to print pointer values, and cast the
2478 pointers as (void *) to remove a warning.
2479 (grub_ofdisk_close): Likewise.
2480 (grub_ofdisk_read): Likewise.
2481 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
2482 returns, so make it return void to remove a warning.
2483 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
2484 Corresponding prototype change.
2485 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
2486 values, and cast the pointers as (void *) to remove a warning.
2487 (grub_mm_dump): Likewise.
2488 * conf/sparc64-ieee1275.mk: New file.
2489 * conf/sparc64-ieee1275.rmk: Likewise.
2490 * include/grub/sparc64/setjmp.h: Likewise.
2491 * include/grub/sparc64/types.h: Likewise.
2492 * include/grub/sparc64/ieee1275/console.h: Likewise.
2493 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2494 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2495 * include/grub/sparc64/ieee1275/time.h: Likewise.
2496 * kern/sparc64/cache.c: Likewise.
2497 * kern/sparc64/dl.c: Likewise.
2498 * kern/sparc64/ieee1275/init.c: Likewise.
2499 * kern/sparc64/ieee1275/openfw.c: Likewise.
2500
2501 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
2502
2503 * util/console.c (grub_ncurses_putchar): If C is greater than
2504 0x7f, set C to a question mark.
2505 (grub_ncurses_getcharwidth): New function.
2506 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
2507 getcharwidth.
2508
2509 * normal/menu.c (print_entry): Made aware of Unicode. First,
2510 convert TITLE to UCS-4, and predict the cursor position by
2511 grub_getcharwidth.
2512
2513 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
2514 const to SRC.
2515 * kern/misc.c (grub_utf16_to_utf8): Likewise.
2516
2517 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2518
2519 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
2520 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
2521 grub_strcat.
2522
2523 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
2524 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
2525 grub_strcpy and grub_strlen. Take it into account that a space
2526 character is inserted as a delimiter.
2527
2528 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2529
2530 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
2531 invalid magic in thre error.
2532
2533 * commands/search.c: New file.
2534
2535 * util/grub-emu.c (main): Call grub_search_init and
2536 grub_search_fini.
2537
2538 * kern/rescue.c (grub_rescue_print_disks): Removed.
2539 (grub_rescue_print_devices): New function.
2540 (grub_rescue_cmd_ls): Use grub_device_iterate with
2541 grub_rescue_print_devices instead of grub_disk_dev_iterate with
2542 grub_rescue_print_disks.
2543
2544 * kern/partition.c (grub_partition_iterate): Return the result of
2545 PARTMAP->ITERATE instead of GRUB_ERRNO.
2546
2547 * kern/device.c: Include grub/partition.h.
2548 (grub_device_iterate): New function.
2549
2550 * include/grub/partition.h (grub_partition_iterate): Return int
2551 instead of grub_err_t.
2552
2553 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
2554 prototype.
2555 [GRUB_UTIL] (grub_search_fini): Likewise.
2556
2557 * include/grub/device.h (grub_device_iterate): New prototype.
2558
2559 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2560 commands/search.c.
2561 (pkgdata_MODULES): Added search.mod.
2562 (search_mod_SOURCES): New variable.
2563 (search_mod_CFLAGS): Likewise.
2564
2565 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
2566 (pkgdata_MODULES): Added search.mod.
2567 (search_mod_SOURCES): New variable.
2568 (search_mod_CFLAGS): Likewise.
2569
2570 * commands/ls.c (grub_ls_list_disks): Renamed to ...
2571 (grub_ls_list_devices): ... this, and use grub_device_iterate.
2572 All callers changed.
2573
2574 * DISTLIST: Added commands/search.c.
2575
2576 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2577
2578 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
2579 conversion.
2580 (grub_getcharwidth): New function.
2581
2582 * kern/misc.c (grub_utf8_to_ucs4): New function.
2583
2584 * include/grub/term.h (struct grub_term): Added a new member
2585 "getcharwidth".
2586 (grub_getcharwidth): New prototype.
2587
2588 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
2589
2590 * term/i386/pc/console.c (map_char): New function. Segregated from
2591 grub_console_putchar.
2592 (grub_console_putchar): Use map_char.
2593 (grub_console_getcharwidth): New function.
2594 (grub_console_term): Specified grub_console_getcharwidth as
2595 getcharwidth.
2596
2597 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
2598 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
2599
2600 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
2601 GRUB_ERRNO.
2602 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
2603 on grub_strtoul completely.
2604 (write_char): Declare local variables in the beginning of the
2605 function.
2606 (grub_vesafb_getcharwidth): New function.
2607 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
2608 getcharwidth.
2609
2610 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
2611
2612 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
2613 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
2614 commands/i386/pc/vbetest.c.
2615
2616 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
2617 call grub_vbe_get_controller_info again, because the returned
2618 information is volatile.
2619 (grub_vbe_set_video_mode): Mostly rewritten.
2620 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
2621 grub_vbe_status_t correctly.
2622 (grub_vbe_get_video_mode_info): Likewise.
2623 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
2624 several if statements.
2625
2626 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
2627 * commands/i386/pc/vbeinfo.c: ... this.
2628
2629 * commands/i386/pc/vbe_test.c: Renamed to ...
2630 * commands/i386/pc/vbetest.c: ... this.
2631
2632 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
2633 ...
2634 (grub_cmd_vbeinfo): ... this. Save video modes before
2635 iterating. Skip a video mode, if it is not available, not enough
2636 information is given or it is monochrome. Show the memory
2637 model. Leave the interpretation of MODEVAR to grub_strtoul
2638 completely.
2639 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
2640 (GRUB_MOD_FINI): Likewise.
2641
2642 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
2643 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
2644 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
2645 duplicated grub_env_get. Leave the interpretation of MODEVAR to
2646 grub_strtoul completely.
2647 (real2pm): Removed.
2648 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
2649 (GRUB_MOD_FINI): Likewise.
2650
2651 * normal/misc.c: Include grub/mm.h.
2652
2653 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
2654 vbe_list_modes with vbetest.mod and vbeinfo.mod.
2655 (vbe_list_modes_mod_SOURCES): Removed.
2656 (vbe_list_modes_mod_CFLAGS): Likewise.
2657 (vbe_test_mod_SOURCES): Likewise.
2658 (vbe_test_mod_CFLAGS): Likewise.
2659 (vbeinfo_mod_SOURCES): New variable.
2660 (vbeinfo_mod_CFLAGS): Likewise.
2661 (vbetest_mod_SOURCES): Likewise.
2662 (vbetest_mod_CFLAGS): Likewise.
2663
2664 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
2665
2666 * normal/misc.c: New file.
2667
2668 * DISTLIST: Added normal/misc.c.
2669
2670 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
2671 DISK to HOOK. Call HOOK with DISK.
2672 * partmap/apple.c (apple_partition_map_iterate): Likewise.
2673 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2674 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2675
2676 * normal/menu_entry.c (struct screen): Added a new member
2677 "completion_shown".
2678 (completion_buffer): New global variable.
2679 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
2680 (store_completion): New function.
2681 (complete): Likewise.
2682 (clear_completions): Likewise.
2683 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
2684 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
2685 a tab, call complete.
2686
2687 * normal/completion.c (disk_dev): Removed.
2688 (print_simple_completion): Likewise.
2689 (print_partition_completion): Likewise.
2690 (print_func): New global variable.
2691 (add_completion): Do not take the arguments WHAT or PRINT any
2692 longer. Added a new argument TYPE. Instead of printing directly,
2693 call PRINT_FUNC if not NULL.
2694 All callers changed.
2695 (complete_device): Use a local variable DEV instead of
2696 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
2697 (grub_normal_do_completion): Take a new argument HOOK. Do not
2698 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
2699 empty string, return NULL instead.
2700 All callers changed.
2701
2702 * normal/cmdline.c (print_completion): New function.
2703
2704 * kern/partition.c (grub_partition_iterate): Add an argument DISK
2705 to HOOK.
2706 All callers changed.
2707
2708 * kern/disk.c (grub_print_partinfo): Removed.
2709
2710 * include/grub/partition.h (struct grub_partition_map): Add a new
2711 argument DISK into HOOK of ITERATE.
2712 (grub_partition_iterate): Add a new argument DISK to HOOK.
2713
2714 * include/grub/normal.h (enum grub_completion_type): New enum.
2715 (grub_completion_type_t): New type.
2716 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
2717 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
2718 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
2719 (GRUB_COMPLETION_TYPE_FILE): Likewise.
2720 (grub_normal_do_completion): Added a new argument HOOK.
2721 (grub_normal_print_device_info): New prototype.
2722
2723 * include/grub/disk.h (grub_print_partinfo): Removed.
2724
2725 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
2726 (normal_mod_SOURCES): Likewise.
2727 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2728 (normal_mod_SOURCES): Likewise.
2729
2730 * commands/ls.c (grub_ls_list_disks): Use
2731 grub_normal_print_device_info instead of grub_print_partinfo. Free
2732 PNAME.
2733 (grub_ls_list_files): Use grub_normal_print_device_info instead of
2734 duplicating the code.
2735
2736 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
2737
2738 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
2739 follow GCS more precisely.
2740 * commands/i386/pc/vbe_test.c: Likewise.
2741 * include/grub/i386/pc/vbe.h: Likewise.
2742 * term/i386/pc/vesafb.c: Likewise.
2743 * video/i386/pc/vbe.c: Likewise.
2744
2745 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
2746
2747 * DISTLIST: Added term/i386/pc/vesafb.c
2748 DISTLIST: Added video/i386/pc/vbe.c
2749 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
2750 DISTLIST: Added commands/i386/pc/vbe_test.c.
2751 * commands/i386/pc/vbe_list_modes.c: New file.
2752 * commands/i386/pc/vbe_test.c: Likewise.
2753 * term/i386/pc/vesafb.c: Likewise.
2754 * video/i386/pc/vbe.c: Likewise.
2755 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
2756 (grub_vbe_probe) Added prototype.
2757 (grub_vbe_set_video_mode) Likewise.
2758 (grub_vbe_get_video_mode) Likewise.
2759 (grub_vbe_get_video_mode_info) Likewise.
2760 (grub_vbe_set_pixel_rgb) Likewise.
2761 (grub_vbe_set_pixel_index) Likewise.
2762 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
2763 (pkgdata_MODULES): Added vesafb.mod.
2764 (pkgdata_MODULES): Added vbe_list_modes.mod.
2765 (pkgdata_MODULES): Added vbe_test.mod.
2766 (vbe_mod_SOURCES): Added.
2767 (vbe_mod_CFLAGS): Likewise.
2768 (vesafb_mod_SOURCES): Likewise.
2769 (vesafb_mod_CFLAGS): Likewise.
2770 (vbe_list_modes_mod_SOURCES): Likewise.
2771 (vbe_list_modes_mod_CFLAGS): Likewise.
2772 (vbe_test_mod_SOURCES): Likewise.
2773 (vbe_test_mod_CFLAGS): Likewise.
2774
2775 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
2776
2777 * normal/command.c (grub_command_execute): If INTERACTIVE is
2778 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
2779 CMDLINE. Disable the pager if INTERACTIVE is true.
2780 All callers are changed.
2781
2782 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
2783 before reading a config file.
2784 * normal/main.c (read_config_file): Even if a command is not
2785 found, register it if it is within an entry.
2786
2787 * util/grub-emu.c: Include sys/types.h and unistd.h.
2788 (options): Added --hold.
2789 (struct arguments): Added a new member "hold".
2790 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
2791 missing.
2792 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
2793 cleared by a debugger, if it is not zero.
2794
2795 * include/grub/normal.h (grub_command_execute): Add an argument
2796 INTERACTIVE.
2797
2798 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
2799
2800 * DISTLIST: Added include/grub/i386/pc/vbe.h.
2801
2802 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
2803
2804 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
2805 program with another one, because the old one didn't detect a bug
2806 in gcc-3.4. Always use regparm 2, because the new test is still
2807 not enough for gcc-4.0. Someone must investigate a simple test
2808 case which detects a bug in gcc-4.0.
2809
2810 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
2811
2812 * DISTLIST: Added normal/completion.c.
2813
2814 * normal/completion.c: New file.
2815
2816 * term/i386/pc/console.c (grub_console_getwh): New function.
2817 (grub_console_term): Assign grub_console_getwh to getwh.
2818
2819 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
2820 function is defined in normal/completion.c as
2821 grub_normal_do_completion.
2822 (grub_cmdline_get): Use grub_normal_do_completion instead of
2823 grub_tab_complete.
2824
2825 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
2826 returns non-zero, otherwise return 0.
2827 (grub_partition_iterate): First, probe the partition map. Then,
2828 call ITERATE only for this partition map.
2829
2830 * kern/misc.c (grub_strncmp): Rewritten.
2831
2832 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
2833 returns non-zero. Otherwise return 0.
2834
2835 * include/grub/partition.h (grub_partition_map_iterate): Return
2836 int instead of void.
2837
2838 * include/grub/normal.h (grub_normal_do_completion): New prototype.
2839
2840 * include/grub/misc.h (grub_strncmp): Change the type of N to
2841 grub_size_t.
2842
2843 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
2844 of void.
2845
2846 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
2847 unsigned explictly before comparing it with I.
2848
2849 * kern/main.c (grub_env_write_root): Add the attribute unused into
2850 VAR.
2851
2852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2853 normal/completion.c.
2854 (normal_mod_SOURCES): Likewise.
2855 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2856 (normal_mod_SOURCES): Likewise.
2857
2858 * normal/command.c (grub_iterate_commands): If ITERATE returns
2859 non-zero, return one immediately.
2860
2861 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
2862
2863 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
2864 * kern/i386/pc/startup.S: Updated Global Descriptor table's
2865 descriptions.
2866 (grub_vbe_get_controller_info): New function.
2867 (grub_vbe_get_mode_info): Likewise.
2868 (grub_vbe_set_mode): Likewise.
2869 (grub_vbe_get_mode): Likewise.
2870 (grub_vbe_set_memory_window): Likewise.
2871 (grub_vbe_get_memory_window): Likewise.
2872 (grub_vbe_set_scanline_length): Likewise.
2873 (grub_vbe_get_scanline_length): Likewise.
2874 (grub_vbe_set_display_start): Likewise.
2875 (grub_vbe_get_display_start): Likewise.
2876 (grub_vbe_set_palette_data): Likewise.
2877 * include/grub/i386/pc/vbe.h: New file.
2878
2879 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2880
2881 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
2882 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
2883 * DISTLIST: Likewise.
2884 * kern/ieee1275/of.c: Moved to ...
2885 * kern/ieee1275/ieee1275.c: ... here.
2886
2887 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2888
2889 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
2890 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
2891 Pass 0 as `end' parameter to grub_strtoul().
2892
2893 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2894
2895 * include/grub/powerpc/ieee1275/console.h: Do not include
2896 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
2897 ifdef.
2898 (grub_console_cur_color): Remove i386-specific prototype.
2899 (grub_console_real_putchar): Likewise.
2900 (grub_console_checkkey): Likewise.
2901 (grub_console_getkey): Likewise.
2902 (grub_console_getxy): Likewise.
2903 (grub_console_gotoxy): Likewise.
2904 (grub_console_cls): Likewise.
2905 (grub_console_setcursor): Likewise.
2906 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
2907 Include <grub/machine/console.h>.
2908 * term/ieee1275/ofconsole.c: Likewise.
2909
2910 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
2911
2912 * Makefile.in (LIBLZO): New variable.
2913
2914 * configure.ac: Check for LZO version 2.
2915
2916 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
2917 lzo/lzo1x.h instead of lzo1x.h.
2918
2919 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
2920 of -llzo.
2921
2922 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
2923 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
2924
2925 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
2926 copying the data from PARTITION to P.
2927
2928 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2929
2930 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
2931 negative, unload the module.
2932
2933 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
2934 map is "pc_partition_map" but not "pc".
2935 (usage): Fix the description. The options are --boot-image and
2936 --core-image but not --boot-file or --core-file.
2937 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
2938 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
2939 DEFAULT_DIRECTORY.
2940
2941 * util/i386/pc/grub-install.in: Do not specify --boot-file or
2942 --core-file. Specify INSTALL_DEVICE as an argument.
2943
2944 * util/console.c: Include config.h.
2945 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
2946 [HAVE_NCURSES_H]: Include ncurses.h.
2947 [HAVE_CURSES_H]: Include curses.h.
2948 [!A_NORMAL] (A_NORMAL): Defined as zero.
2949 [!A_STANDOUT] (A_STANDOUT): Likewise.
2950
2951 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
2952 -lncurses.
2953 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
2954
2955 * configure.ac: Check for curses libraries and headers.
2956
2957 * Makefile.in (LIBCURSES): New variable.
2958
2959 * genmk.rb (Script::rule): Set the executable bits.
2960
2961 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
2962 name of the PC partition map is "pc_partition_map" but not "pc".
2963
2964 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2965
2966 * util/i386/pc/grub-install.in (grub_probefs): New variable.
2967 (modules): Likewise.
2968 (usage): Added descriptions for --modules and --grub-probefs.
2969 Handle --modules and --grub-probefs. Save the arguments in MODULES
2970 and GRUB_PROBEFS, respectively.
2971 Auto-detect a filesystem module against GRUBDIR. If the result is
2972 empty and modules are not specified explicitly, abort the
2973 installation. Add the result to MODULES.
2974
2975 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
2976 disk/powerpc/ieee1275/ofdisk.c,
2977 include/grub/powerpc/ieee1275/init.h and
2978 term/powerpc/ieee1275/ofconsole.c.
2979 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
2980 term/ieee1275/ofconsole.c.
2981
2982 * include/grub/powerpc/ieee1275/console.h: Resurrected.
2983
2984 * COPYING: Upgraded to the latest version. Only the address of the
2985 FSF office has changed.
2986
2987 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2988
2989 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
2990 kern/ieee1275.c with kern/ieee1275/of.c.
2991
2992 * kern/ieee1275.c: Moved to ...
2993 * kern/ieee1275/of.c: ... here.
2994
2995 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
2996
2997 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
2998 readablity.
2999
3000 * config.guess: Updated to the latest version from gnulib.
3001 * config.sub: Likewise.
3002 * install.sh: Likewise.
3003 * mkinstalldirs: Likewise.
3004
3005 * include/grub/console.h: Removed. This file is arch-specific. Do
3006 not put this in include/grub.
3007
3008 * include/grub/i386/pc/console.h: Resurrected.
3009
3010 * util/console.c: Include grub/machine/console.h instead of
3011 grub/console.h.
3012 * util/grub-emu.c: Likewise.
3013
3014 2005-08-04 Marco Gerards <metgerards@student.han.nl>
3015
3016 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
3017 hardcoded value.
3018
3019 From Vincent Pelletier <subdino2004@yahoo.fr>
3020 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
3021 Redefined to use grub_getwh.
3022 (grub_term): New member named getwh.
3023 (grub_getwh): New prototype.
3024 * kern/term.c (grub_getwh): New function.
3025 * term/i386/pc/console.c (grub_console_getwh): New function.
3026 (grub_console_term): New member `getwh'.
3027 * term/i386/pc/vga.c (grub_vga_getwh): New function.
3028 (grub_vga_term): New member `getwh'.
3029 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
3030 grub_ssize_t.
3031 (grub_ofconsole_getw): New function.
3032 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
3033 (grub_ofconsole_term): New field named getwh and new initial
3034 value.
3035
3036 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
3037
3038 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
3039 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
3040 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
3041 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
3042 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
3043 of <grub/machine/ieee1275.h>.
3044 * commands/ieee1275/reboot.c: Likewise.
3045 * boot/powerpc/ieee1275/ieee1275.c: Move ...
3046 * kern/ieee1275.c: ... to here. All users updated. Change all
3047 parameter structs to use new type `grub_ieee1275_cell_t'.
3048 * term/powerpc/ieee1275/ofconsole.c: Move ...
3049 * term/ieee1275/ofconsole.c: ... to here. All users updated.
3050 * disk/powerpc/ieee1275/ofdisk.c: Move ...
3051 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
3052 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
3053 to return int.
3054 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
3055 Remove unused prototypes. All users updated.
3056 * include/grub/powerpc/ieee1275/console.h: Removed.
3057 * include/grub/powerpc/ieee1275/ieee1275.h: Define
3058 `grub_ieee1275_cell_t'.
3059 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
3060 Cast comparisons with -1 to the correct type.
3061 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
3062 type to match `grub_ieee1275_entry_fn'.
3063
3064 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
3065
3066 * DISTLIST: Added util/i386/pc/grub-probefs.c.
3067
3068 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
3069 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
3070 partmap/sun.c.
3071 (grub_probefs_SOURCES): New variable.
3072
3073 * util/i386/pc/grub-probefs.c: New file.
3074
3075 * util/i386/pc/grub-setup.c (main): Call
3076 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
3077 grub_hfs_init and grub_jfs_init to initialize the system. Call
3078 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
3079 grub_pc_partition_map_fini to finish the system.
3080
3081 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
3082
3083 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
3084 function.
3085 (grub_multiboot_load_elf32): Likewise.
3086 (grub_multiboot_is_elf64): Likewise.
3087 (grub_multiboot_load_elf64): Likewise.
3088 (grub_multiboot_load_elf): Likewise.
3089 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
3090 an ELF32 or ELF64 file.
3091 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
3092
3093 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
3094 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
3095 NULL before calling FS->LABEL.
3096 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
3097 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
3098 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
3099 before calling FS->LABEL.
3100
3101 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
3102
3103 * util/i386/pc/grub-install.in (datadir): New variable.
3104 (libdir): Removed.
3105 (pkgdatadir): New variable.
3106 (pkglibdir): Removed.
3107
3108 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
3109
3110 * DISTLIST: Added util/i386/pc/grub-install.in.
3111
3112 * util/i386/pc/grub-install.in: New file.
3113
3114 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
3115 (grub_install_SOURCES): Likewise.
3116
3117 * genmk.rb: Added support for scripts.
3118 (Script): New class.
3119 (scripts): New variable.
3120
3121 * Makefile.in (install-local): Install sbin_SCRIPTS by
3122 INSTALL_SCRIPT.
3123 (uninstall): Remove sbin_SCRIPTS.
3124
3125 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
3126 device, try to get a GRUB device by
3127 grub_util_biosdisk_get_grub_dev.
3128 Free DEST_DEV.
3129
3130 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
3131 description for --device-map.
3132
3133 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
3134
3135 Change the semantics of variable hooks. They now return strings
3136 instead of error values.
3137
3138 * util/i386/pc/grub-setup.c: Include grub/env.h.
3139 (setup): Use grub_device_set_root instead of grub_env_set.
3140
3141 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
3142 grub_env_get instead of grub_device_set_root and
3143 grub_device_get_root, respectively.
3144
3145 * kern/main.c (grub_env_write_root): New function.
3146 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
3147 grub_env_set instead of grub_device_set_root.
3148
3149 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
3150 many variables.
3151 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
3152 rather than calling ENV->WRITE_HOOK afterwards.
3153 (grub_env_get): Return the result of ENV->READ_HOOK rather than
3154 passing a pointer of a pointer.
3155 (grub_register_variable_hook): Change the types of "read_hook" and
3156 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
3157 respectively.
3158 Allocate the default empty string on the heap, because this string
3159 may be freed later.
3160
3161 * kern/device.c: Include grub/env.h.
3162 (grub_device_set_root): Removed.
3163 (grub_device_get_root): Likewise.
3164 (grub_device_open): Use grub_env_get instead of
3165 grub_device_get_root.
3166
3167 * include/grub/env.h (grub_env_read_hook_t): New type.
3168 (grub_env_write_hook_t): Likewise.
3169 (grub_env_var): Change the types of "read_hook" and "write_hook"
3170 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
3171 (grub_register_variable_hook): Likewise.
3172
3173 * include/grub/device.h (grub_device_set_root): Removed.
3174 (grub_device_set_root): Likewise.
3175
3176 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
3177 make sure that DIRNAME terminates with '/', so that
3178 grub_fat_find_dir will fail if PATH is not a directory.
3179
3180 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
3181 from DIRNAME.
3182 Use the qualifier auto for print_files and print_files_long.
3183 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
3184 as a regular file.
3185 Put a newline only if there is no error.
3186 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
3187 used.
3188
3189 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
3190
3191 * kern/partition.c (grub_partition_probe): Initialize PART to
3192 NULL. Otherwise, when no partition map is registered, this returns
3193 a garbage.
3194
3195 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
3196
3197 * partmap/apple.c (apple_partition_map_iterate): Check if POS
3198 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
3199 valid.
3200
3201 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
3202
3203 * commands/ls.c (grub_ls_list_disks): Print the filesystem
3204 information on each device, if it does not have partitions. Print
3205 "Device" instead of "Disk", because this function is not specific
3206 to disk devices.
3207
3208 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
3209 static to ensure that it is put on the memory rather than a
3210 register.
3211
3212 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
3213
3214 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
3215 (grub_cat_init): Likewise.
3216 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
3217 (options): Likewise.
3218 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
3219 (grub_configfile_init): Likewise.
3220 * font/manager.c (GRUB_MOD_INIT): Likewise.
3221 * commands/help.c (GRUB_MOD_INIT): Likewise.
3222 (grub_help_init): Likewise.
3223 * normal/command.c (grub_command_init): Likewise.
3224 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
3225 * disk/loopback.c (grub_loop_init): Likewise.
3226 (GRUB_MOD_INIT): Likewise.
3227 * commands/ls.c (grub_ls_init): Likewise.
3228 (GRUB_MOD_INIT): Likewise.
3229 (options): Likewise.
3230 * commands/boot.c (grub_boot_init): Likewise.
3231 (GRUB_MOD_INIT): Likewise.
3232 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
3233 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
3234 (GRUB_MOD_INIT): Likewise.
3235 * commands/cmp.c (grub_cmp_init): Likewise.
3236 (GRUB_MOD_INIT): Likewise.
3237
3238 * normal/arg.c: Use <> instead of "" to include header files.
3239 (SHORT_ARG_HELP): New macro.
3240 (SHORT_ARG_USAGE): Likewise.
3241 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
3242 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
3243 descriptions.
3244 (find_short): Check if C is 'h' or 'u' explicitly.
3245 (grub_arg_show_help): Use space characters instead of tabs. Treat
3246 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
3247 are shown with --help and --usage only if they are not used for
3248 the command itself.
3249 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
3250 'h' and 'u'.
3251
3252 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
3253 const into "longarg". Change the type of "shortarg" to int.
3254
3255 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
3256
3257 * boot/i386/pc/boot.S (boot_drive_check): New label.
3258
3259 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
3260 macro.
3261
3262 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
3263 which do not pass a boot drive correctly. Copied from GRUB Legacy.
3264
3265 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
3266
3267 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
3268 When turning off Gate A20, skip the check and return immediately,
3269 because this is not fatal usually.
3270
3271 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
3272
3273 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
3274 be 0x7C00 instead of 0x8000.
3275
3276 * boot/i386/pc/pxeboot.S: Rewritten.
3277
3278 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
3279 EXT_C.
3280 (gate_a20_check_state): Read a byte from 0x108000. Invert the
3281 result.
3282
3283 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
3284
3285 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
3286 robustness. This routine now supports a BIOS call and System
3287 Control Port A to modify the gate A20.
3288
3289 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3290 Increased to 0x440.
3291
3292 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
3293
3294 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
3295 device path and resulting ihandle.
3296 (grub_ofdisk_close): dprintf the ihandle being closed.
3297 (grub_ofdisk_read): dprintf function parameters.
3298 * kern/mm.c (grub_mm_init_region): Likewise.
3299 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
3300 (grub_linux_boot): dprintf the Linux entry point, initrd address and
3301 size, and boot arguments.
3302 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
3303 before loading into memory.
3304 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
3305 before loading into memory.
3306
3307 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
3308
3309 * kern/mm.c: Added much documentation.
3310 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
3311 8, set to 5 instead of 8.
3312
3313 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
3314
3315 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
3316
3317 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
3318 (grub_mkdevicemap_SOURCES): New variable.
3319
3320 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
3321 lib/device.c of GRUB Legacy.
3322
3323 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
3324
3325 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
3326 instead of PATH is NULL.
3327
3328 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
3329
3330 * commands/cmp.c (BUFFER_SIZE): New macro.
3331 (grub_cmd_cmp): Close the right file at the right time. Compare
3332 only data just read. Don't report files of different size as
3333 identical. Dynamically allocate buffers. Move variable
3334 declarations at the beginning of function.
3335
3336 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
3337
3338 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
3339 reverse.
3340
3341 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
3342
3343 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
3344 when backspace is pressed at beginning of line.
3345
3346 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
3347
3348 * DISTLIST: Added genfslist.sh.
3349
3350 * normal/main.c (fs_module_list): New variable.
3351 (autoload_fs_module): New function.
3352 (read_fs_list): Likewise.
3353 (grub_normal_execute): Call read_fs_list.
3354
3355 * kern/fs.c (grub_fs_autoload_hook): New variable.
3356 (grub_fs_probe): Added support for auto-loading.
3357
3358 * include/grub/normal.h (struct grub_fs_module_list): New struct.
3359 (grub_fs_module_list_t): New type.
3360
3361 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
3362 (grub_fs_autoload_hook): New prototype.
3363
3364 * genfslist.sh: New file.
3365
3366 * genmk.rb: Added a rule to generate a filesystem list.
3367
3368 2005-06-30 Marco Gerards <metgerards@student.han.nl>
3369
3370 * configure.ac: Fix the test for cross-compiling.
3371
3372 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
3373 define GRUB_UTIL anymore.
3374
3375 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
3376 so this function works on other systems than just big endian.
3377 (load_modules): Likewise.
3378 (add_segments): Likewise.
3379
3380 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
3381
3382 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
3383 contains `l' modifier, get a long from va_arg().
3384
3385 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
3386
3387 * kern/mm.c (grub_free): If the next free block which is being
3388 merged is the first free block, set the first block to the block
3389 being freed.
3390 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
3391
3392 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
3393
3394 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
3395 `grub_ieee1275_chosen'.
3396
3397 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
3398
3399 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
3400 (grub_ieee1275_chosen): New variable.
3401 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
3402 `chosen'.
3403 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
3404 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
3405 Rename first argument to `phandle' for consistency.
3406 (grub_ieee1275_get_property_length): Likewise.
3407 (grub_ieee1275_next_property): Likewise. Change type of first argument
3408 to grub_ieee1275_phandle_t.
3409 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
3410 Move export next to declaration.
3411 (grub_ieee1275_chosen): New variable.
3412 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
3413 Correct cosmetic typo.
3414 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
3415 `grub_ieee1275_chosen'.
3416 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
3417 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
3418 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
3419 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
3420 `grub_ieee1275_chosen'.
3421
3422 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
3423
3424 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
3425 /chosen/bootargs.
3426 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
3427 /chosen/bootargs as "variable=value" pairs.
3428
3429 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
3430
3431 * include/grub/misc.h (grub_dprintf): New macro.
3432 (grub_real_dprintf): New prototype.
3433 (grub_strword): Likewise.
3434 (grub_iswordseparator): Likewise.
3435 * kern/misc.c (grub_real_dprintf): New function.
3436 (grub_strword): Likewise.
3437 (grub_iswordseparator): Likewise.
3438
3439 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
3440
3441 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
3442 (roundup): Remove macro.
3443 (grub_ieee1275_flags): Make static.
3444 (grub_ieee1275_realmode): Remove.
3445 (grub_ieee1275_test_flag): New function.
3446 (grub_ieee1275_set_flag): Likewise.
3447 (find_options): Rename to `grub_ieee1275_find_options'; update
3448 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
3449 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
3450 (cmain): New prototype.
3451 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
3452 `grub_ieee1275_flags' directly.
3453 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
3454 machine/biosdisk.h.
3455 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
3456 Don't include grub/machine/init.h.
3457 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
3458 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
3459 Remove prototype.
3460 (grub_ieee1275_realmode): Likewise.
3461 (grub_ieee1275_flag): New enum.
3462 (grub_ieee1275_test_flag): New prototype.
3463 (grub_ieee1275_set_flag): New prototype.
3464 * include/grub/powerpc/ieee1275/init.h: Remove file.
3465 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
3466 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
3467 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
3468 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
3469 comment.
3470 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
3471 `grub_ieee1275_test_flag'.
3472 (grub_ieee1275_encode_devname): Likewise.
3473
3474 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
3475
3476 * include/grub/powerpc/ieee1275/ieee1275.h
3477 (grub_ieee1275_encode_devname): New prototype.
3478 (grub_ieee1275_get_filename): Likewise.
3479 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
3480 function.
3481 (grub_set_prefix): Likewise.
3482 (grub_machine_init): Call grub_set_prefix.
3483 * kern/powerpc/ieee1275/openfw.c: Fix typos.
3484 (grub_parse_type): New enum.
3485 (grub_ieee1275_get_devargs): New function.
3486 (grub_ieee1275_get_devname): Likewise.
3487 (grub_ieee1275_parse_args): Likewise.
3488 (grub_ieee1275_get_filename): Likewise.
3489 (grub_ieee1275_encode_devname): Likewise.
3490
3491 2005-03-30 Marco Gerards <metgerards@student.han.nl>
3492
3493 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
3494 `grub_loader_unset'.
3495
3496 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
3497
3498 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
3499 instead of grub_ieee1275_interpret.
3500 (grub_halt_init): New function.
3501 (grub_halt_fini): Likewise.
3502 (GRUB_MOD_INIT): Correct message grammar.
3503 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
3504 instead of grub_ieee1275_interpret.
3505 (grub_reboot_init): New function.
3506 (grub_reboot_fini): Likewise.
3507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
3508 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
3509 util/i386/pc/misc.c with commands/ieee1275/halt.c,
3510 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
3511 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
3512 function.
3513 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
3514 Add prototype.
3515 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
3516 prototype.
3517 (grub_halt): Likewise.
3518 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
3519 (cmain): Remove __attribute__((unused)).
3520 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
3521 (grub_heap_len): Likewise.
3522 (grub_machine_fini): New function.
3523 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
3524 (grub_halt): Likewise.
3525 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
3526 function.
3527 * util/powerpc/ieee1275/misc.c: New file.
3528
3529 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3530
3531 * DISTLIST: New file.
3532 * gendistlist.sh: Likewise.
3533
3534 * Makefile.in (COMMON_DISTFILES): Removed.
3535 (BOOT_DISTFILES): Likewise.
3536 (CONF_DISTFILES): Likewise.
3537 (DISK_DISTFILES): Likewise.
3538 (FS_DISTFILES): Likewise.
3539 (INCLUDE_DISTFILES): Likewise.
3540 (KERN_DISTFILES): Likewise.
3541 (LOADER_DISTFILES): Likewise.
3542 (TERM_DISTFILES): Likewise.
3543 (UTIL_DISTFILES): Likewise.
3544 (DISTFILES): Likewise.
3545 (uninstall): Uninstall files in $(pkgdata_DATA).
3546 (DISTLIST): New target.
3547 (distdir): Use the contents of the file DISTLIST to get a list of
3548 distributed files.
3549
3550 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3551
3552 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
3553 descriptor. This is ported from GRUB Legacy.
3554
3555 * gencmdlist.sh: Added an extra semicolon to make it work with
3556 old sed versions. Reported by Robert Bihlmeyer
3557 <robbe@orcus.priv.at>.
3558
3559 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
3560
3561 Automatic loading of commands is supported.
3562
3563 * normal/main.c (read_command_list): New function.
3564 (grub_normal_execute): Call read_command_list.
3565
3566 * normal/command.c (grub_register_command): Return zero or CMD.
3567 Allocate CMD->NAME from the heap.
3568 Initialize CMD->MODULE_NAME to zero.
3569 Find the same name as well. If the same command is found and it is
3570 a dummy command, overwrite members. If it is not a dummy command,
3571 return zero.
3572 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
3573 (grub_command_find): If a dummy command is found, load a module
3574 and retry to find a command only once.
3575
3576 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
3577 make sure that each command is loaded.
3578
3579 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
3580 macro.
3581 (struct grub_command): Remove const from the member `name'.
3582 Add a new member `module_name'.
3583 (grub_register_command): Return grub_command_t.
3584
3585 * commands/help.c (grub_cmd_help): Call grub_command_find to make
3586 sure that each command is loaded.
3587
3588 * genmk.rb (PModule::rule): Specify a module name without the
3589 suffix ".mod" to gencmdlist.sh.
3590
3591 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
3592
3593 * gencmdlist.sh: New file.
3594
3595 * genmk.rb (PModule::rule): Generate a rule for a command list.
3596 Clean command.lst.
3597 Generate command.lst from $(COMMANDFILES).
3598
3599 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
3600 (DATA): Added $(pkgdata_DATA).
3601 (install-local): Install files in $(pkgdata_DATA).
3602
3603 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
3604
3605 * term/i386/pc/vga.c (debug_command): Removed.
3606 (GRUB_MOD_INIT): Do not register the command "debug".
3607
3608 From Hollis Blanchard:
3609 * commands/configfile.c: New file.
3610 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3611 commands/configfile.c.
3612 (pkgdata_MODULES): Added configfile.mod.
3613 (configfile_mod_SOURCES): New variable.
3614 (configfile_mod_CFLAGS): Likewise.
3615 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
3616 commands/configfile.c.
3617 (pkgdata_MODULES): Added configfile.mod.
3618 (configfile_mod_SOURCES): New variable.
3619 (configfile_mod_CFLAGS): Likewise.
3620 * util/grub-emu.c (main): Call grub_configfile_init and
3621 grub_configfile_fini.
3622 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
3623 prototype.
3624 [GRUB_UTIL] (grub_configfile_fini): Likewise.
3625
3626 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
3627
3628 * normal/arg.c (grub_arg_show_help): Do not show the bug report
3629 address.
3630
3631 * commands/help.c (grub_cmd_help): Do not print newlines after
3632 the last command in print_command_help.
3633
3634 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
3635
3636 * commands/default.h: New file.
3637 * commands/timeout.h: Likewise.
3638 * normal/context.c: Likewise.
3639
3640 * util/misc.c: Do not include sys/times.h.
3641 Include sys/time.h and grub/machine/time.h.
3642 (grub_get_rtc): Rewritten with gettimeofday.
3643
3644 * util/grub-emu.c (main): Call grub_default_init and
3645 grub_timeout_init before grub_normal_init, and call
3646 grub_timeout_fini and grub_default_fini after grub_main.
3647
3648 * util/console.c (grub_ncurses_checkkey): Return the read
3649 character or -1.
3650
3651 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
3652 timeouts.
3653
3654 * normal/main.c (read_config_file): Push MENU. If this fails,
3655 print an error and wait for a user input.
3656 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
3657 If a menu is empty or an error occurs, pop MENU.
3658 (grub_normal_execute): Pop and free MENU after grub_menu_run
3659 returns.
3660
3661 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
3662
3663 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
3664 include time.h.
3665 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
3666 without GRUB_UTIL.
3667 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
3668 time.h.
3669 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
3670 without GRUB_UTIL.
3671
3672 * include/grub/normal.h (struct grub_menu_list): New struct.
3673 (grub_menu_list_t): New type.
3674 (struct grub_context): New struct.
3675 (grub_context_t): New type.
3676 (grub_register_command): Got rid of EXPORT_FUNC.
3677 (grub_unregister_command): Likewise.
3678 (grub_context_get): New prototype.
3679 (grub_context_get_current_menu): Likewise.
3680 (grub_context_push_menu): Likewise.
3681 (grub_context_pop_menu): Likewise.
3682 [GRUB_UTIL] (grub_default_init): Likewise.
3683 [GRUB_UTIL] (grub_default_fini): Likewise.
3684 [GRUB_UTIL] (grub_timeout_init): Likewise.
3685 [GRUB_UTIL] (grub_timeout_fini): Likewise.
3686
3687 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
3688 commands/timeout.c and normal/context.c.
3689 (pkgdata_MODULES): Added default.mod and timeout.mod.
3690 (normal_mod_SOURCES): Added normal/context.c.
3691 (default_mod_SOURCES): New variable.
3692 (default_mod_CFLAGS): Likewise.
3693 (timeout_mod_SOURCES): Likewise.
3694 (timeout_mod_CFLAGS): Likewise.
3695 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
3696 conf/i386-pc.rmk.
3697 (pkgdata_MODULES): Added default.mod and timeout.mod.
3698 (normal_mod_SOURCES): Added normal/context.c.
3699 (default_mod_SOURCES): New variable.
3700 (default_mod_CFLAGS): Likewise.
3701 (timeout_mod_SOURCES): Likewise.
3702 (timeout_mod_CFLAGS): Likewise.
3703
3704 * Makefile.in (all-local): Added $(MKFILES).
3705
3706 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
3707
3708 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
3709 (grub_emu_SOURCES): Likewise.
3710 (pkgdata_MODULES): Add `sun.mod'.
3711 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
3712 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3713 `partmap/sun.c'.
3714 (pkgdata_MODULES): Add `sun.mod'.
3715 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
3716 * include/grub/partition.h (grub_sun_partition_map_init): New
3717 prototype.
3718 (grub_sun_partition_map_fini): Likewise.
3719 * partmap/sun.c: New file.
3720 * util/grub-emu.c (main): Initialize and de-initialize the sun
3721 partitionmap support.
3722
3723 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
3724
3725 This implements an Emacs-like menu entry editor.
3726
3727 * normal/menu_entry.c: New file.
3728
3729 * util/console.c (grub_ncurses_putchar): Translate some Unicode
3730 characters to ASCII.
3731 (saved_char): New variable.
3732 (grub_ncurses_checkkey): Rewritten completely.
3733 (grub_ncurses_getkey): Likewise.
3734 (grub_ncurses_init): Call raw instead of cbreak.
3735
3736 * normal/menu.c (print_entry): Do not put a space.
3737 (init_page): Renamed to ...
3738 (grub_menu_init_page): ... this. All callers changed.
3739 (edit_menu_entry): Removed.
3740 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
3741
3742 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
3743
3744 * kern/misc.c (grub_vprintf): Call grub_refresh.
3745
3746 * normal/menu.c (DISP_LEFT): Renamed to ...
3747 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
3748 * normal/menu.c (DISP_UP): Renamed to ...
3749 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
3750 * normal/menu.c (DISP_RIGHT): Renamed to ...
3751 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
3752 * normal/menu.c (DISP_DOWN): Renamed to ...
3753 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
3754 * normal/menu.c (DISP_HLINE): Renamed to ...
3755 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
3756 * normal/menu.c (DISP_VLINE): Renamed to ...
3757 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
3758 * normal/menu.c (DISP_UL): Renamed to ...
3759 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
3760 * normal/menu.c (DISP_UR): Renamed to ...
3761 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
3762 * normal/menu.c (DISP_LL): Renamed to ...
3763 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
3764 * normal/menu.c (DISP_LR): Renamed to ...
3765 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
3766 * normal/menu.c (TERM_WIDTH): Renamed to ...
3767 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
3768 * normal/menu.c (TERM_HEIGHT): Renamed to ...
3769 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
3770 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
3771 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
3772 * normal/menu.c (TERM_MARGIN): Renamed to ...
3773 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
3774 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
3775 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
3776 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
3777 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
3778 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
3779 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
3780 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
3781 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
3782 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
3783 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
3784 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
3785 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
3786 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
3787 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
3788 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
3789 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
3790 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
3791 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
3792 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
3793 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
3794 All callers changed.
3795
3796 * include/grub/normal.h: New prototype.
3797
3798 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3799 normal/menu_entry.c.
3800 (normal_mod_SOURCES): Likewise.
3801 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3802 (normal_mod_SOURCES): Likewise.
3803
3804 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
3805
3806 * include/grub/normal.h (grub_halt_init): New prototype.
3807 (grub_halt_fini): Likewise.
3808 (grub_reboot_init): Likewise.
3809 (grub_reboot_fini): Likewise.
3810
3811 * util/grub-emu.c: Include signal.h.
3812 (main_env): New global variable.
3813 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
3814 catch C-c.
3815 (grub_machine_fini): New function.
3816 (main): Call grub_halt_init and grub_reboot_init before
3817 grub_main, and grub_reboot_fini and grub_halt_fini after it.
3818 Call setjmp with MAIN_ENV to go back afterwards.
3819 Call grub_machine_fini right before return.
3820
3821 * include/grub/util/misc.h: Include setjmp.h.
3822 (main_env): New prototype.
3823
3824 * include/grub/kernel.h (grub_machine_fini): New prototype.
3825 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
3826 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
3827
3828 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
3829 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
3830 * term/i386/pc/console.c (grub_console_fini): Likewise.
3831
3832 * util/i386/pc/misc.c: New file.
3833
3834 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3835 util/i386/pc/misc.c, commands/i386/pc/halt.c and
3836 commands/i386/pc/reboot.c.
3837
3838 2005-02-14 Guillem Jover <guillem@hadrons.org>
3839
3840 * include/grub/dl.h (grub_dl_check_header): New prototype.
3841 (grub_arch_dl_check_header): Change return type to grub_err_t,
3842 remove size parameter and export function. Update all callers.
3843 * kern/dl.c (grub_dl_check_header): New function.
3844 (grub_dl_load_core): Use `grub_dl_check_header' instead of
3845 `grub_arch_dl_check_header'. Check ELF type. Check if sections
3846 are inside the core.
3847 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
3848 independent ELF header checks.
3849 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
3850 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
3851 `grub_dl_check_header' instead of explicit checks. Check for the
3852 ELF type.
3853 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
3854 `grub_dl_check_header' instead of explicit checks. Remove arch
3855 specific ELF header checks.
3856
3857 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
3858 argument SIZE.
3859
3860 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
3861
3862 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
3863 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
3864
3865 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
3866
3867 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
3868 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
3869 (part_map_iterate): Clear `grub_errno' and return 0 if
3870 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
3871 * partmap/amiga.c (amiga_partition_map_iterate): Return
3872 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
3873 * partmap/apple.c (apple_partition_map_iterate): Likewise.
3874
3875 2005-02-01 Guillem Jover <guillem@hadrons.org>
3876
3877 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
3878 help info.
3879
3880 2005-01-31 Marco Gerards <metgerards@student.han.nl>
3881
3882 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
3883 Removed prototype.
3884 (grub_rescue_cmd_linux): New prototype.
3885 (grub_rescue_cmd_initrd): Likewise.
3886 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
3887 `bi_rec'.
3888 (grub_linux_release_mem): Release the memory for the initrd.
3889 (grub_load_linux): Renamed from this...
3890 (grub_rescue_cmd_linux): ...To this. Changed all callers.
3891 Changed `entry' not to be static. Loop over memory regions to
3892 find another one when the default fails.
3893 (grub_rescue_cmd_initrd): New function.
3894 (grub_linux_init): Remove function.
3895 (grub_linux_fini): Likewise.
3896 (GRUB_MOD_INIT): Register `initrd'.
3897 (GRUB_MOD_FINI): Unregister `initrd'.
3898 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
3899 Function removed.
3900 (grub_linux_normal_fini): Likewise.
3901 (GRUB_MOD_INIT): Register `initrd'.
3902 (GRUB_MOD_FINI): Unregister `initrd'.
3903
3904 2005-01-31 Marco Gerards <metgerards@student.han.nl>
3905
3906 * commands/help.c: New file.
3907 * normal/arg.c (show_help): Renamed to...
3908 (grub_arg_show_help): ... this.
3909 * commands/i386/pc/halt.c: New file.
3910 * commands/i386/pc/reboot.c: Likewise.
3911 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
3912 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
3913 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
3914 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
3915 variables.
3916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3917 `commands/help.c'.
3918 (pkgdata_MODULES): Add `help.mod'.
3919 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
3920 * grub/i386/pc/init.h (grub_reboot): New prototype.
3921 (grub_halt): Likewise.
3922 * include/grub/normal.h (grub_arg_show_help): New prototype.
3923 (grub_help_init): Likewise.
3924 (grub_help_fini): Likewise.
3925 * util/grub-emu.c (main): Initialize and deinitialize the help
3926 command.
3927
3928 * normal/cmdline.c (grub_cmdline_get): Doc fix.
3929
3930 * normal/command.c (grub_command_init): Fixed the description of
3931 the `set' and `unset' commands.
3932
3933 2005-01-31 Marco Gerards <metgerards@student.han.nl>
3934
3935 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
3936 function.
3937 * commands/ieee1275/halt.c: New file.
3938 * commands/ieee1275/reboot.c: Likewise.
3939 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
3940 `__attribute__ ((unused))'. Some GCS related fixed.
3941 (grub_suspend_init) [GRUB_UTIL]: Function removed.
3942 (grub_suspend_fini): Likewise.
3943 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
3944 and `halt.mod'.
3945 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
3946 (halt_mod_CFLAGS): New variables.
3947 * include/grub/powerpc/ieee1275/ieee1275.h
3948 (grub_ieee1275_interpret): New prototype.
3949
3950 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
3951
3952 * include/grub/misc.h (memmove): New prototype.
3953 (memcpy): Likewise.
3954
3955 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
3956
3957 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
3958 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
3959
3960 2005-01-22 Marco Gerards <metgerards@student.han.nl>
3961
3962 * kern/misc.c (grub_strndup): Function rewritten.
3963
3964 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
3965
3966 * normal/menu.c (TERM_WIDTH): Macro redefined.
3967 (TERM_TOP_BORDER_Y): Likewise.
3968 (draw_border): Replaced while-loop by a for-loop. Make the number
3969 of lines consistent with the number of lines displayed in
3970 print_entries. Added a margin below the rectangle.
3971 (print_entry): Make the entry fit in the rectangle.
3972 (print_entries): Display the scroll arrows next to the right
3973 border.
3974
3975 2005-01-21 Marco Gerards <metgerards@student.han.nl>
3976
3977 * fs/minix.c (grub_minix_find_file): Reserve more space for
3978 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
3979 `grub_strncpy' to copy `path' into it.
3980
3981 2005-01-21 Marco Gerards <metgerards@student.han.nl>
3982
3983 Add the loopback device, a device via which files can be accessed
3984 as devices.
3985
3986 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
3987 (pkgdata_MODULES): Add loopback.mod.
3988 (loopback_mod_SOURCES): New variable.
3989 (loopback_mod_CFLAGS): Likewise.
3990 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3991 `disk/loopback.c'.
3992 (pkgdata_MODULES): Add loopback.mod.
3993 (loopback_mod_SOURCES): New variable.
3994 (loopback_mod_CFLAGS): Likewise.
3995 * disk/loopback.c: new file.
3996 * include/grub/normal.h (grub_loop_init): New prototype.
3997 (grub_loop_fini): New prototype.
3998 * util/grub-emu.c (main): Initialize and de-initialize loopback
3999 support.
4000 * include/grub/disk.h (grub_disk_dev_id): Add
4001 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
4002
4003 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
4004
4005 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
4006 function.
4007 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
4008 (suspend_mod_SOURCES): New variable.
4009 (suspend_mod_CFLAGS): Likewise.
4010 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
4011 New prototype.
4012 * commands/ieee1275/suspend.c: New file.
4013
4014 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4015
4016 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
4017 ((unused))' to `__attribute__ ((used))'.
4018 (GRUB_MOD_FINI): Likewise.
4019 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
4020 * genmk.rb (PModule): Assign space to common symbols when linking
4021 modules.
4022
4023 2005-01-20 Marco Gerards <metgerards@student.han.nl>
4024
4025 * include/grub/mm.h (grub_mm_init_region): Change the type of the
4026 `unsigned' arguments to `grub_size_t'.
4027 (grub_malloc): Likewise.
4028 (grub_realloc): Likewise.
4029 (grub_memalign): Likewise.
4030 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
4031 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
4032 * util/misc.c (grub_malloc): Likewise.
4033 (grub_realloc): Likewise.
4034 * kern/mm.c (get_header_from_pointer): Change the casts to
4035 `unsigned' into a cast to `grub_size_t'.
4036
4037 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
4038 point to `currnode' when `currnode' is changed.
4039
4040 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
4041 Schottelius <nico-linux@schottelius.org>.
4042
4043 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
4044
4045 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
4046 (note_path): Remove variable.
4047 (GRUB_IEEE1275_NOTE_NAME): New macro.
4048 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
4049 (grub_ieee1275_note_hdr): New structure.
4050 (grub_ieee1275_note_desc): Likewise.
4051 (grub_ieee1275_note): Likewise.
4052 (load_note): Remove `dir' argument. All callers updated. Remove
4053 `note_img' and `path'. Do not load a file from `note_path'.
4054 Initialize a struct grub_ieee1275_note and write that to `out'.
4055 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
4056
4057 2005-01-05 Marco Gerards <metgerards@student.han.nl>
4058
4059 * util/misc.c (grub_util_read_image): Revert last change. It
4060 called `grub_util_read_at', which seeks from the beginning of the
4061 file.
4062
4063 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
4064
4065 * TODO: Add note about endianness in grub-mkimage.
4066 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
4067 section.
4068 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
4069 (grub_mkimage_SOURCES): New target.
4070 * include/grub/kernel.h (grub_start_addr): Remove variable.
4071 (grub_end_addr): Likewise.
4072 (grub_total_module_size): Likewise.
4073 (grub_kernel_image_size): Likewise.
4074 (GRUB_MODULE_MAGIC): New constant.
4075 (grub_module_info): New structure.
4076 (grub_arch_modules_addr): New prototype.
4077 (grub_get_end_addr): Remove prototype.
4078 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
4079 * include/grub/powerpc/ieee1275/kernel.h: New file.
4080 * include/grub/util/misc.h (grub_util_get_fp_size): New
4081 prototype.
4082 (grub_util_read_at): Likewise.
4083 (grub_util_write_image_at): Likewise.
4084 * kern/main.c (grub_get_end_addr): Remove function.
4085 (grub_load_modules): Call grub_arch_modules_addr instead of using
4086 grub_end_addr. Look for a grub_module_info struct in memory. Use
4087 the grub_module_info fields instead of calling grub_get_end_addr
4088 as loop conditions. Move grub_add_unused_region code here.
4089 (grub_add_unused_region): Remove function.
4090 * kern/i386/pc/init.c: Include grub/cache.h.
4091 (grub_machine_init): Remove call to grub_get_end_addr. Remove
4092 one call to add_mem_region.
4093 (grub_arch_modules_addr): New function.
4094 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
4095 (grub_total_module_size): Likewise.
4096 Include grub/machine/kernel.h.
4097 (grub_arch_modules_addr): New function.
4098 * util/grub-emu.c (grub_end_addr): Remove variable.
4099 (grub_total_module_size): Likewise.
4100 (grub_arch_modules_addr): New function.
4101 * util/misc.c: Include unistd.h.
4102 (grub_util_get_fp_size): New function.
4103 (grub_util_read_at): Likewise.
4104 (grub_util_write_image_at): Likewise.
4105 (grub_util_read_image): Call grub_util_read_at.
4106 (grub_util_write_image): Call grub_util_write_image_at.
4107 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
4108 additional memory in kernel_img for a struct grub_module_info.
4109 Fill in that grub_module_info.
4110 * util/powerpc/ieee1275/grub-mkimage.c: New file.
4111
4112 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
4113
4114 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
4115 New function.
4116 * include/grub/powerpc/ieee1275/ieee1275.h
4117 (grub_ieee1275_milliseconds): New prototype.
4118 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
4119 Change to 1000.
4120 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
4121 grub_ieee1275_milliseconds.
4122
4123 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
4124
4125 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
4126 variable.
4127 (find_options): New function.
4128 (cmain): Call find_options.
4129 * include/grub/powerpc/ieee1275/ieee1275.h
4130 (grub_ieee1275_realmode): New extern variable.
4131 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
4132 grub_map if grub_ieee1275_realmode is false.
4133
4134 2004-12-29 Marco Gerards <metgerards@student.han.nl>
4135
4136 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
4137 lines are inserted and make it work like readline. Reported by
4138 Vincent Pelletier <subdino2004@yahoo.fr>.
4139
4140 2004-12-28 Marco Gerards <metgerards@student.han.nl>
4141
4142 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
4143
4144 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
4145 `kern/powerpc/cache.S'.
4146
4147 2004-12-27 Marco Gerards <metgerards@student.han.nl>
4148
4149 * genmk.rb: Handle the `Program' class in the main loop. Written
4150 by Johan Rydberg <jrydberg@gnu.org>.
4151 (Program): New class.
4152 (programs): New variable.
4153 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
4154 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
4155 instead of "grub/kernel.h". Include <grub/machine/init.h>.
4156 (help_arch): Function removed.
4157 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
4158 `powerpc/libgcc.h' and `loader.h'.
4159 (pkgdata_PROGRAMS): New variable.
4160 (sbin_UTILITIES): Variable removed.
4161 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
4162 (grubof_SOURCES): Variable re-defined so it only includes the
4163 core functionality.
4164 (grubof_CFLAGS): Remove `-DGRUBOF'.
4165 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
4166 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
4167 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
4168 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
4169 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
4170 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
4171 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
4172 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
4173 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
4174 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
4175 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4176 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
4177 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
4178 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
4179 (pc_mod_CFLAGS): New variables.
4180 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
4181 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
4182 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
4183 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
4184 Moved from here...
4185 * include/grub/i386/pc/init.h (grub_os_area_addr)
4186 (rub_os_area_size): ... to here.
4187 * include/grub/powerpc/ieee1275/ieee1275.h
4188 (grub_ieee1275_entry_fn): Export symbol.
4189 * include/grub/powerpc/ieee1275/init.h: New file.
4190 * include/grub/powerpc/libgcc.h: Likewise.
4191 * include/grub/cache.h: Likewise.
4192 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
4193 <hollis@penguinppc.org>.
4194 * kern/dl.c: Include <grub/cache.h>.
4195 (grub_dl_flush_cache): New function.
4196 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
4197 for this module.
4198 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
4199 (grub_console_init): Removed prototypes.
4200 (grub_machine_init): Don't initialize the modules anymore.
4201 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
4202 static.
4203 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
4204 Macro undef removed.
4205 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
4206 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
4207 relocation `R_PPC_REL32'. Return an error when the relocation is
4208 unknown.
4209 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
4210 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
4211 * util/misc.c (grub_arch_sync_caches): Likewise.
4212
4213 2004-12-19 Marco Gerards <metgerards@student.han.nl>
4214
4215 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
4216 `symlist.c', add `grubof_symlist.c'.
4217 (symlist.c): Variable removed.
4218 (grubof_HEADERS): Variable added.
4219 (grubof_symlist.c): New target.
4220 (kernel_syms.lst): Use `grubof_HEADERS' instead of
4221 `kernel_img_HEADERS'.
4222 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
4223 * kern/powerpc/dl.c: New file.
4224 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
4225 Function removed.
4226 (grub_arch_dl_relocate_symbols): Likewise.
4227 (grub_register_exported_symbols): Likewise.
4228
4229 2004-12-13 Marco Gerards <metgerards@student.han.nl>
4230
4231 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
4232 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
4233 to fail instead. Reported by Vincent Pelletier
4234 <subdino2004@yahoo.fr>.
4235
4236 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
4237 it is not allocated. Reported by Vincent Pelletier
4238 <subdino2004@yahoo.fr>.
4239
4240 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
4241 output so the output looks better.
4242
4243 2004-12-04 Marco Gerards <metgerards@student.han.nl>
4244
4245 Modulize the partition map support and add support for the amiga
4246 partition map.
4247
4248 * commands/ls.c: Include <grub/partition.h> instead of
4249 <grub/machine/partition.h>.
4250 * kern/disk.c: Likewise.
4251 * kern/rescue.c: Likewise.
4252 * loader/i386/pc/chainloader.c: Likewise.
4253 * normal/cmdline.c: Likewise.
4254 * kern/powerpc/ieee1275/init.c: Likewise.
4255 (grub_machine_init): Call `grub_pc_partition_map_init',
4256 `grub_amiga_partition_map_init' and
4257 `grub_apple_partition_map_init'.
4258 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
4259 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
4260 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
4261 `partition.h' and `pc_partition.h'.
4262 (grub_setup_SOURCES): Remove
4263 `disk/i386/pc/partition.c'. Add `kern/partition.c',
4264 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
4265 (grub_emu_SOURCES): Likewise.
4266 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
4267 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
4268 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
4269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
4270 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
4271 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
4272 (grubof_SOURCES): Likewise.
4273 * disk/i386/pc/partition.c: File removed.
4274 * disk/powerpc/ieee1275/partition.c: Likewise.
4275 * include/grub/powerpc/ieee1275/partition.h: Likewise.
4276 * include/grub/i386/pc/partition.h: Likewise.
4277 * kern/partition.c: New file.
4278 * partmap/amiga.c: Likewise.
4279 * partmap/apple.c: Likewise.
4280 * partmap/pc.c: Likewise.
4281 * include/grub/partition.h: Likewise..
4282 * include/grub/pc_partition.h: Likewise.
4283 * util/grub-emu.c: Include <grub/partition.h> instead of
4284 <grub/machine/partition.h>.
4285 (main): Call `grub_pc_partition_map_init',
4286 `grub_amiga_partition_map_init' and
4287 `grub_apple_partition_map_init' and deinitialize afterwards.
4288 * util/i386/pc/biosdisk.c: Include `#include
4289 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
4290 `<grub/machine/partition.h>'.
4291 * util/i386/pc/grub-setup.c: Likewise.
4292 * util/i386/pc/biosdisk.c: Likewise.
4293 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
4294 partition information in case of a PC partition.
4295 * util/i386/pc/grub-setup.c: Include `#include
4296 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
4297 `<grub/machine/partition.h>'.
4298 (setup): Only access the PC specific partition information in case
4299 of a PC partition.
4300
4301 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
4302
4303 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
4304 (grub_longjmp): Likewise.
4305 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
4306 20.
4307 * normal/powerpc/setjmp.S: New file.
4308 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
4309 `normal/powerpc/setjmp.S'.
4310 (grubof_CFLAGS): Add `-DGRUBOF'.
4311 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
4312 [GRUB_UTIL && !GRUBOF].
4313
4314 2004-11-16 Marco Gerards <metgerards@student.han.nl>
4315
4316 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
4317 property named `name'. Correctly handle the error returned by
4318 `grub_ieee1275_finddevice' if a device can not be opened.
4319
4320 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
4321
4322 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
4323 `actual' for negativity.
4324 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
4325 kern/fshelp.c.
4326
4327 2004-11-01 Marco Gerards <metgerards@student.han.nl>
4328
4329 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
4330 (PAGE_OFFSET): New macro.
4331 (CRTC_ADDR_PORT): Likewise.
4332 (CRTC_DATA_PORT): Likewise.
4333 (START_ADDR_HIGH_REGISTER): Likewise.
4334 (START_ADDR_LOW_REGISTER): Likewise.
4335 (GRAPHICS_ADDR_PORT): Likewise.
4336 (GRAPHICS_DATA_PORT): Likewise.
4337 (READ_MAP_REGISTER): Likewise.
4338 (INPUT_STATUS1_REGISTER): Likewise.
4339 (INPUT_STATUS1_VERTR_BIT): Likewise.
4340 (page): New variable.
4341 (wait_vretrace): New function.
4342 (set_read_map): Likewise.
4343 (set_start_address): Likewise.
4344 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
4345 the right page.
4346 (check_vga_mem): Take the page into account.
4347 (write_char): Likewise.
4348 (write_cursor): Likewise.
4349 (scroll_up): Likewise. Copy the page to the page that is not
4350 shown and switch between both pages.
4351 (grub_vga_putchar): Fix off by one error.
4352 (grub_vga_cls): Wait for the vertical retrace. Take the page into
4353 account.
4354
4355 2004-11-01 Marco Gerards <metgerards@student.han.nl>
4356
4357 Add support for iso9660 (including rockridge).
4358
4359 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
4360 (iso9660_mod_SOURCES): New variable.
4361 (iso9660_mod_CFLAGS): Likewise.
4362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
4363 * include/grub/fs.h (grub_iso9660_init): New prototype.
4364 * util/grub-emu.c (main): Call `grub_iso9660_init'.
4365 * fs/iso9660.c: New file.
4366
4367 * include/grub/misc.h (grub_strncat): New prototype.
4368 * kern/misc.c (grub_strncat): New function.
4369
4370 * fs/hfs.c (grub_hfs_mount): Translate the error
4371 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
4372 * fs/jfs.c (grub_jfs_mount): Likewise.
4373 * fs/ufs.c (grub_ufs_mount): Likewise.
4374
4375 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
4376
4377 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
4378 which initialized BAT registers.
4379 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
4380 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
4381 Move from here...
4382 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
4383 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
4384 ... to here.
4385 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
4386 (grub_mapclaim): Likewise.
4387 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
4388 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
4389 hand.
4390
4391 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
4392
4393 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
4394 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
4395 -ffreestanding and -msoft-float.
4396
4397 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
4398
4399 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
4400 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
4401 set in grub_ieee1275_flags.
4402
4403 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
4404
4405 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
4406 prototype.
4407 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
4408 grub_console_init first.
4409 Change the memory range used for grub_ieee1275_claim and
4410 grub_mm_init_region.
4411 Print an error message if the claim fails.
4412 Include <grub/misc.h>.
4413
4414 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
4415
4416 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
4417 Call grub_children_iterate for device nodes of type `scsi',
4418 `ide', or `ata'.
4419 (grub_ofdisk_open): Remove manual device alias resolution.
4420 Fix memory leak when device cannot be opened.
4421 * include/grub/powerpc/ieee1275/ieee1275.h
4422 (grub_children_iterate): New prototype.
4423 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
4424 New function.
4425 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
4426 Return -1 if args.size was -1.
4427
4428 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
4429
4430 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
4431 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
4432 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
4433 Open Firmware's memory for it; claim memory from _start to _end.
4434 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
4435 (_end): New extern.
4436 (_start): Zero BSS from __bss_start to _end.
4437 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
4438 New extern.
4439 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
4440
4441 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
4442
4443 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
4444 -1 if args.base was -1.
4445
4446 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
4447
4448 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
4449 escape sequence instead of a literal ^L. Also call
4450 grub_ofconsole_gotoxy.
4451
4452 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
4453
4454 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
4455 void * arguments to grub_addr_t. All callers updated. Also make
4456 the `result' argument optional.
4457 (grub_ieee1275_release): change void * arguments to grub_addr_t.
4458 All callers updated.
4459
4460 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
4461
4462 * commands/ls.c (grub_ls_list_files): Use the string following the
4463 initial ')', if present, as the filesystem path.
4464 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
4465
4466 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
4467
4468 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
4469
4470 Make the source code of the menu interface more readable.
4471
4472 * normal/menu.c: Include grub/mm.h.
4473 (TERM_WIDTH): New macro.
4474 (TERM_HEIGHT): Likewise.
4475 (TERM_INFO_HEIGHT): Likewise.
4476 (TERM_MARGIN): Likewise.
4477 (TERM_SCROLL_WIDTH): Likewise.
4478 (TERM_TOP_BORDER_Y): Likewise.
4479 (TERM_LEFT_BORDER_X): Likewise.
4480 (TERM_BORDER_WIDTH): Likewise.
4481 (TERM_MESSAGE_HEIGHT): Likewise.
4482 (TERM_BORDER_HEIGHT): Likewise.
4483 (TERM_NUM_ENTRIES): Likewise.
4484 (TERM_FIRST_ENTRY_Y): Likewise.
4485 (TERM_ENTRY_WIDTH): Likewise.
4486 (TERM_CURSOR_X): Likewise.
4487 (draw_border): Use macros instead of magic numbers.
4488 (print_entry): Likewise.
4489 (print_entries): Likewise.
4490 (run_menu): Likewise. Also, handle the key 'e'.
4491 (run_menu_entry): Ignore empty command lines.
4492 (print_message): Added a new argument EDIT. If EDIT is true,
4493 print a different message.
4494 (init_page): Likewise.
4495 (edit_menu_entry): New function. Not implemented yet.
4496
4497 2004-09-17 Marco Gerards <metgerards@student.han.nl>
4498
4499 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
4500 can be loaded from normal mode.
4501
4502 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
4503 `multiboot.mod'.
4504 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
4505 (multiboot_mod_CFLAGS): New variables.
4506 * loader/i386/pc/linux_normal.c: New file.
4507 * loader/i386/pc/multiboot_normal.c: Likewise.
4508
4509 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
4510 attribute `unused'.
4511
4512 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
4513 `fdiro' to read the mode information from instead of `diro'.
4514
4515 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
4516 looking up a symlink.
4517
4518 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
4519 macro.
4520 * normal/command.c (grub_command_execute): Don't parse the
4521 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
4522 flags of the command.
4523
4524 * normal/menu.c (grub_menu_run): Fix typo.
4525
4526 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
4527
4528 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
4529
4530 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
4531 `y + 1' instead of `y - 1'.
4532
4533 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
4534
4535 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
4536
4537 From Hollis Blanchard <hollis@penguinppc.org>:
4538 * kern/misc.c (memmove): New alias for grub_memmove.
4539 (memcmp): New alias for grub_memcmp.
4540 (memset): New alias for grub_memset.
4541 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
4542 Change "int handle" to "grub_ieee1275_phandle_t handle".
4543 * include/grub/powerpc/ieee1275/ieee1275.h
4544 (grub_ieee1275_get_property): Likewise.
4545
4546 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
4547
4548 Added normal mode command `chainloader' as module chain.mod, which
4549 depends on normal.mod and _chain.mod.
4550
4551 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
4552 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
4553 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
4554 Deleted prototype.
4555 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
4556 but arguments parsing moved to ...
4557 (grub_chainloader_cmd): ... here. New function.
4558 * include/grub/i386/pc/chainloader.h: New file.
4559 * loader/i386/pc/chainloader_normal.c: Likewise.
4560
4561 2004-09-11 Marco Gerards <metgerards@student.han.nl>
4562
4563 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
4564 (grub_mkimage_LDFLAGS): Likewise.
4565 (grub_emu_SOURCES): Likewise.
4566 (kernel_img_HEADERS): Added fshelp.h.
4567 * fs/ext2.c: Include <grub/fshelp.h>.
4568 (FILETYPE_REG): New macro.
4569 (FILETYPE_INO_REG): Likewise.
4570 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
4571 Changed all users.
4572 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
4573 all users.
4574 (grub_fshelp_node): New struct.
4575 (grub_ext2_data): Added member `diropen'. Changed member `inode'
4576 to a pointer.
4577 (grub_ext2_get_file_block): Removed function.
4578 (grub_ext2_read_block): New function.
4579 (grub_ext2_read_file): Replaced parameter `data' by `node'.
4580 This function was written.
4581 (grub_ext2_mount): Read the root inode. Create a diropen struct.
4582 (grub_ext2_find_file): Removed function.
4583 (grub_ext2_read_symlink): New function.
4584 (grub_ext2_iterate_dir): Likewise.
4585 (grub_ext2_open): Rewritten.
4586 (grub_ext2_dir): Rewritten.
4587 * include/grub/fshelp.h: New file.
4588 * fs/fshelp.c: Likewise.
4589
4590 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
4591
4592 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
4593 (print_message): Add a missing newline.
4594 (run_menu): Added timeout support.
4595 (run_menu_entry): New local function.
4596 (grub_menu_run): Added support for booting.
4597
4598 * kern/loader.c (grub_loader_is_loaded): New function.
4599
4600 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
4601 (grub_get_rtc): Exported.
4602
4603 * include/grub/i386/pc/time.h: Include grub/symbol.h.
4604 (grub_get_rtc): Exported.
4605
4606 * include/grub/normal.h (struct grub_command_list): Remove
4607 constant from the member `command'.
4608
4609 * include/grub/loader.h (grub_loader_is_loaded): Declared.
4610
4611 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
4612
4613 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
4614
4615 2004-08-28 Marco Gerards <metgerards@student.han.nl>
4616
4617 Add support for the JFS filesystem.
4618
4619 * fs/jfs.c: New file.
4620 * include/grub/fs.h (grub_jfs_init): New prototype.
4621 (grub_jfs_fini): New prototype.
4622 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
4623 (grub_emu_SOURCES): Likewise.
4624 (pkgdata_MODULES): Add jfs.mod.
4625 (jfs_mod_SOURCES): New variable.
4626 (jfs_mod_CFLAGS): Likewise.
4627 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
4628 (grubof_SOURCES): Likewise.
4629 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
4630
4631 * fs/fat.c (grub_fat_find_dir): Convert the filename little
4632 endian to the host endian.
4633 (grub_fat_utf16_to_utf8): Move function from there...
4634 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
4635 the endianess of the source string anymore.
4636 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
4637
4638 2004-08-24 Marco Gerards <metgerards@student.han.nl>
4639
4640 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
4641 (grub_boot_fini) [GRUB_UTIL]: Likewise.
4642 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
4643 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
4644
4645 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
4646 (grub_hfs_iterate_dir): Make the function static. Add prototypes
4647 for `node_found' and `it_dir'.
4648 (grub_hfs_dir): Add prototype for `dir_hook'.
4649
4650 * fs/minix.c (grub_minix_get_file_block): Add prototype for
4651 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
4652 and `indir32' to silence a gcc warning.
4653
4654 * include/grub/fs.h (grub_hfs_init): New prototype.
4655 (grub_hfs_fini): Likewise.
4656
4657
4658 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
4659
4660 Each disk device has its own id now. This is useful to make use
4661 of multiple disk devices.
4662
4663 * include/grub/disk.h (grub_disk_dev_id): New enum.
4664 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
4665 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
4666
4667 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
4668 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
4669
4670 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
4671 GRUB_DISK_DEVICE_OFDISK_ID as an id.
4672
4673 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
4674 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
4675
4676 * include/grub/disk.h (struct grub_disk_dev): Added a new member
4677 "id" which is used by the cache manager.
4678
4679 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
4680 of just "GRUB".
4681
4682 2004-08-18 Marco Gerards <metgerards@student.han.nl>
4683
4684 * fs/hfs.c: New file.
4685 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
4686 (grub_emu_SOURCES): Likewise.
4687 (pkgdata_MODULES): Add hfs.mod.
4688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
4689 (grubof_SOURCES): Likewise.
4690 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
4691
4692 * include/grub/misc.h (grub_strncasecmp): Add prototype.
4693 * kern/misc.c (grub_strncasecmp): Add function.
4694
4695 2004-08-14 Marco Gerards <metgerards@student.han.nl>
4696
4697 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
4698 with parentheses.
4699
4700 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
4701 (grub_ext2_dir): In case the directory entry type is unknown, read
4702 it from the inode.
4703
4704 2004-08-02 Peter Bruin <pjbruin@dds.nl>
4705
4706 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
4707 grub_load_linux instead of grub_rescue_cmd_linux as second
4708 argument of grub_rescue_register_command.
4709
4710 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
4711
4712 2004-07-27 Marco Gerards <metgerards@student.han.nl>
4713
4714 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
4715 function.
4716 * commands/boot.c: Remove the check for `GRUB_UTIL'.
4717 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
4718 `loader/powerpc/ieee1275/linux.c',
4719 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
4720 * include/grub/powerpc/ieee1275/ieee1275.h
4721 (grub_ieee1275_release): New prototype.
4722 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
4723 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
4724 normal, boot, linux and linux_normal.
4725 * loader/powerpc/ieee1275/linux.c: New file.
4726 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4727
4728 2004-07-12 Marco Gerards <metgerards@student.han.nl>
4729
4730 * normal/arg.c (grub_arg_parse): Correct error handling after
4731 reallocating the argumentlist (check if `argl' is not null instead
4732 of checking if `args' is not null).
4733 * kern/mm.c (grub_realloc): Return the same pointer when using the
4734 same region, instead of returning the header address.
4735
4736 2004-07-11 Marco Gerards <metgerards@student.han.nl>
4737
4738 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
4739 one block instead of two when looking for the initial partition.
4740 (grub_partition_probe): Initialize the local variable `p' with 0.
4741 Use base 10 for the grub_strtoul call.
4742 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
4743 need for one local variable.
4744 (grub_strtoul): Don't add the new value to `num', instead of that
4745 just assign it.
4746
4747 2004-07-11 Marco Gerards <metgerards@student.han.nl>
4748
4749 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
4750 (pxeboot_img_SOURCES): New variable.
4751 (pxeboot_img_ASFLAGS): Likewise.
4752 (pxeboot_img_LDFLAGS): Likewise.
4753 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
4754 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
4755 <lode_leroy@hotmail.com>.
4756
4757 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4758
4759 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
4760 there was no input.
4761
4762 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4763
4764 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
4765 the history buffer logic.
4766
4767 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4768
4769 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
4770 (FILETYPE_INO_SYMLINK): New macros.
4771 (grub_ext2_find_file): Check if the node is a directory using the
4772 inode stat information instead of using the filetype in the
4773 dirent. Exclude the first character of an absolute symlink.
4774 (grub_ext2_dir): Mask out the filetype part of the mode member of
4775 the inode.
4776
4777 2004-05-24 Marco Gerards <metgerards@student.han.nl>
4778
4779 Add support for UFS version 1 and 2. Add support for the minix
4780 filesystem version 1 and 2, both the variants with 14 and 30 long
4781 filenames.
4782
4783 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
4784 fs/minix.c.
4785 (grub_emu_SOURCES): Likewise.
4786 (pkgdata_MODULES): Add ufs.mod and minix.mod.
4787 (ufs_mod_SOURCES): New variable.
4788 (ufs_mod_CFLAGS): Likewise.
4789 (minix_mod_SOURCES): Likewise.
4790 (minix_mod_CFLAGS): Likewise.
4791 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
4792 fs/minix.c.
4793 (grubof_SOURCES): Likewise.
4794 * fs/ufs.c: New file.
4795 * fs/minix.c: New file.
4796 * include/grub/fs.h (grub_ufs_init): New prototype.
4797 (grub_ufs_fini): Likewise.
4798 (grub_minix_init): Likewise.
4799 (grub_minix_fini): Likewise.
4800 * util/grub-emu.c (main): Initialize and deinitialize UFS and
4801 minix fs.
4802
4803 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
4804
4805 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
4806 commands/ls.c, commands/terminal.c, commands/boot.c,
4807 commands/cmp.c and commands/cat.c.
4808 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
4809
4810 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
4811 "env.h"
4812
4813 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4814
4815 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
4816 and grub_, respectively. Because the conversion is trivial and
4817 mechanical, I omit the details here. Please refer to the CVS
4818 if you need more information.
4819
4820 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4821
4822 * include/pupa: Renamed to ...
4823 * include/grub: ... this.
4824 * util/i386/pc/pupa-mkimage.c: Renamed to ...
4825 * util/i386/pc/grub-mkimage.c: ... this.
4826 * util/i386/pc/pupa-setup.c: Renamed to ...
4827 * util/i386/pc/grub-setup.c: ... this.
4828 * util/pupa-emu.c: Renamed to ...
4829 * util/grub-emu.c: ... this.
4830
4831 2004-03-29 Marco Gerards <metgerards@student.han.nl>
4832
4833 Add support for the newworld apple macintosh (PPC). This has been
4834 tested on the powerbook 2000 only. It only adds support for
4835 generic ieee1275 functions, console and disk support. This should
4836 be easy to port to other architectures with support for Open
4837 Firmware.
4838
4839 * configure.ac: Accept the powerpc as host_cpu. In the case of
4840 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
4841 specific tests are only executed while building for the i386.
4842 Inverse test for crosscompile.
4843 * genmk.rb (Utility): Allow assembler files.
4844 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
4845 * conf/powerpc-ieee1275.rmk: New file.
4846 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
4847 * disk/powerpc/ieee1275/partition.c: Likewise.
4848 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
4849 * include/pupa/powerpc/ieee1275/console.h: Likewise.
4850 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
4851 * include/pupa/powerpc/ieee1275/time.h: Likewise.
4852 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
4853 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
4854 * include/pupa/powerpc/ieee1275/loader.h
4855 * include/pupa/powerpc/setjmp.h: Likewise.
4856 * include/pupa/powerpc/types.h: Likewise.
4857 * kern/powerpc/ieee1275/init.c: Likewise.
4858 * kern/powerpc/ieee1275/openfw.c: Likewise.
4859 * term/powerpc/ieee1275/ofconsole.c: Likewise.
4860
4861 These files were written by Johan Rydberg
4862 (jrydberg@night.trouble.net) and I only modified them slightly.
4863
4864 * boot/powerpc/ieee1275/cmain.c: New file.
4865 * boot/powerpc/ieee1275/crt0.S: Likewise.
4866 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
4867 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
4868
4869 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
4870
4871 * Makefile.in: Update copyright.
4872 * genmodsrc.sh: Likewise.
4873 * gensymlist.sh: Likewise.
4874 * term/i386/pc/vga.c: Indent correctly.
4875
4876 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
4877 bugreporting address.
4878 * util/i386/pc/pupa-setup.c (usage): Likewise,
4879 (main): Call pupa_ext2_init and pupa_ext2_fini.
4880
4881 * fs/fat.c (log2): Renamed to ...
4882 (fat_log2): ... this.
4883 All callers changed.
4884 * kern/misc.c (memcpy): Alias to pupa_memmove.
4885 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
4886 lvalue cast.
4887 * util/console.c (pupa_ncurses_fini): Return 0.
4888
4889 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
4890 Move fail label here.
4891 [__GNU__]: Don't warn when using stat.
4892 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
4893 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
4894 long int. Use strtol instead of strtoul.
4895
4896 2004-03-14 Marco Gerards <metgerards@student.han.nl>
4897
4898 * commands/boot.c: New file.
4899 * commands/cat.c: Likewise.
4900 * commands/cmp.c: Likewise.
4901 * commands/ls.c: Likewise.
4902 * commands/terminal.c: Likewise.
4903 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
4904 (pupa_register_command): Changed interface to match the new
4905 argument parser.
4906 (pupa_command_execute): Changed (almost rewritten) so it uses
4907 pupa_split_command. Added support for setting variables using the
4908 syntax `foo=bar'.
4909 (rescue_command): Changed to work with the new argument parser.
4910 (terminal_command): Moved from here to commands/terminal.c.
4911 (set_command): New function.
4912 (unset_command): New function.
4913 (insmod_command): New function.
4914 (rmmod_command): New function.
4915 (lsmod_command): New function.
4916 (pupa_command_init): Don't initialize the command terminal
4917 anymore. Initialize the commands set, unset, insmod, rmmod and
4918 lsmod.
4919 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
4920 (kernel_img_HEADERS): Add arg.h and env.h.
4921 (pupa_mkimage_LDFLAGS): Add kern/env.c.
4922 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
4923 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
4924 normal/arg.c.
4925 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
4926 terminal.mod.
4927 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
4928 (boot_mod_SOURCES): New variable.
4929 (terminal_mod_SOURCES): Likewise.
4930 (ls_mod_SOURCES): Likewise.
4931 (cmp_mod_SOURCES): Likewise.
4932 (cat_mod_SOURCES): Likewise.
4933
4934 * normal/arg.c: New file.
4935 * kern/env.c: Likewise.
4936 * include/pupa/arg.h: Likewise.
4937 * include/pupa/env.h: Likewise.
4938 * font/manager.c (font_command): Changed to match argument parsing
4939 interface changes.
4940 (PUPA_MOD_INIT): Likewise.
4941 * hello/hello.c (pupa_cmd_hello): Likewise.
4942 (PUPA_MOD_INIT): Likewise.
4943 * include/pupa/disk.h: Include <pupa/device.h>.
4944 (pupa_print_partinfo): New prototype.
4945 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
4946 (pupa_dl_get_prefix): Likewise.
4947 * include/pupa/misc.h: Include <pupa/err.h>.
4948 (pupa_isgraph): New prototype.
4949 (pupa_isdigit): Likewise.
4950 (pupa_split_cmdline): Likewise.
4951 * include/pupa/normal.h: Include <pupa/arg.h>.
4952 (pupa_command): Changed the prototype of the member `func' to
4953 match the argument parsing interface. Added member `options'.
4954 (pupa_register_command): Updated to match function.
4955 (pupa_arg_parse): New prototype.
4956 (pupa_hello_init) [PUPA_UTIL]: New prototype.
4957 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
4958 (pupa_ls_init) [PUPA_UTIL]: Likewise.
4959 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
4960 (pupa_cat_init) [PUPA_UTIL]: Likewise.
4961 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
4962 (pupa_boot_init) [PUPA_UTIL]: Likewise.
4963 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
4964 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
4965 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
4966 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
4967 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
4968 * kern/disk.c: Include <pupa/file.h>.
4969 (pupa_print_partinfo): New function.
4970 * kern/dl.c: Include <pupa/env.h>.
4971 (pupa_dl_dir): Variable removed.
4972 (pupa_dl_load): Use the environment variable `prefix' instead of
4973 the variable pupa_dl_dir.
4974 (pupa_dl_set_prefix): Function removed.
4975 (pupa_dl_get_prefix): Likewise.
4976 * kern/i386/pc/init.c: Include <pupa/env.h>.
4977 (pupa_machine_init): Use the environment variable `prefix' instead of
4978 using pupa_dl_set_prefix to set the prefix.
4979 * kern/main.c: Include <pupa/env.h>.
4980 (pupa_set_root_dev): Use the environment variable `prefix' instead of
4981 using pupa_dl_get_prefix to get the prefix.
4982 * kern/misc.c: Include <pupa/env.h>.
4983 (pupa_isdigit): New function.
4984 (pupa_isgraph): Likewise.
4985 (pupa_ftoa): Likewise.
4986 (pupa_vsprintf): Added support for printing values of the type
4987 `double'. Make it possible to format variable output when using
4988 formatting like `%1.2%f'.
4989 (pupa_split_cmdline): New function.
4990 * kern/rescue.c: Include <pupa/env.h>.
4991 (next_word): Removed function.
4992 (pupa_rescue_cmd_prefix): Likewise.
4993 (pupa_rescue_cmd_set): New function.
4994 (pupa_rescue_cmd_unset): New function.
4995 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
4996 split the command line instead of splitting it here. Added
4997 support for setting variables using the syntax `foo=bar'. Don't
4998 initialize the prefix command anymore. Initialized the set and
4999 unset commands.
5000 * normal/cmdline.c: Include <pupa/env.h>.
5001 (pupa_tab_complete): Added prototypes for print_simple_completion,
5002 print_partition_completion, add_completion, iterate_commands,
5003 iterate_dev, iterate_part and iterate_dir. Moved code to print
5004 partition information from here to kern/disk.c.
5005 (pupa_cmdline_run): Don't check if the funtion exists anymore.
5006 * normal/main.c: Include <pupa/env.h>.
5007 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
5008 instead of using pupa_dl_get_prefix to get the prefix.
5009 * term/i386/pc/vga.c: Include <pupa/arg.h>.
5010 (check_vga_mem): Cast pointers to `void *' to silence a gcc
5011 warning.
5012 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
5013 (pupa_vga_setcolor): Declare unused variables with `__attribute__
5014 ((unused))' to silence a gcc warning.
5015 (pupa_vga_setcolor): Likewise.
5016 (debug_command): Changed to match argument parsing
5017 interface changes.
5018 * util/pupa-emu.c: Include <pupa/env.h>.
5019 (options): Added 0's for unused fields to silence a gcc warning.
5020 (argp): Likewise.
5021 (main): Use the environment variable `prefix' instead of using
5022 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
5023 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
5024 and terminal.
5025
5026 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
5027 * util/misc.c: Include <malloc.h>.
5028 (pupa_malloc): Rewritten so errors are correctly reported.
5029 (pupa_realloc): Likewise.
5030 (pupa_memalign): Likewise.
5031 (pupa_mm_init_region): Declare unused variables with
5032 `__attribute__ ((unused))' to silence a gcc warning.
5033 * normal/i386/setjmp.S: Remove tab at the end of the file to
5034 silence a gcc warning.
5035 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
5036 variables with `__attribute__ ((unused))' to silence a gcc
5037 warning.
5038 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
5039 local variable i unsigned to silence a gcc warning.
5040
5041 * kern/term.c: Include <pupa/misc.h>.
5042 (pupa_more_lines): New variable.
5043 (pupa_more): Likewise.
5044 (pupa_putcode): When the pager is active pause at the end of every
5045 screen.
5046 (pupa_set_more): New function.
5047 * include/pupa/term.h (pupa_set_more): New prototype.
5048
5049
5050 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
5051
5052 Now this project is GRUB 2 rather than PUPA. The location of
5053 the CVS repository was moved to GRUB's.
5054
5055 * configure.ac: Use bug-grub as the reporting address.
5056 Use GRUB instead of PUPA.
5057 Change the version number to 1.90.
5058
5059 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
5060
5061 * genkernsyms.sh: Updated copyright information.
5062 * genmk.rb: Likewise.
5063 * genmodsrc.sh: Likewise.
5064 * gensymlist.sh: Likewise.
5065 * boot/i386/pc/boot.S: Likewise.
5066 * boot/i386/pc/diskboot.S: Likewise.
5067 * disk/i386/pc/biosdisk.c: Likewise.
5068 * disk/i386/pc/partition.c: Likewise.
5069 * font/manager.c: Likewise.
5070 * fs/ext2.c: Likewise.
5071 * fs/fat.c: Likewise.
5072 * include/pupa/boot.h: Likewise.
5073 * include/pupa/device.h: Likewise.
5074 * include/pupa/disk.h: Likewise.
5075 * include/pupa/dl.h: Likewise.
5076 * include/pupa/elf.h: Likewise.
5077 * include/pupa/err.h: Likewise.
5078 * include/pupa/file.h: Likewise.
5079 * include/pupa/font.h: Likewise.
5080 * include/pupa/fs.h: Likewise.
5081 * include/pupa/kernel.h: Likewise.
5082 * include/pupa/loader.h: Likewise.
5083 * include/pupa/misc.h: Likewise.
5084 * include/pupa/mm.h: Likewise.
5085 * include/pupa/net.h: Likewise.
5086 * include/pupa/normal.h: Likewise.
5087 * include/pupa/rescue.h: Likewise.
5088 * include/pupa/setjmp.h: Likewise.
5089 * include/pupa/symbol.h: Likewise.
5090 * include/pupa/term.h: Likewise.
5091 * include/pupa/types.h: Likewise.
5092 * include/pupa/i386/setjmp.h: Likewise.
5093 * include/pupa/i386/types.h: Likewise.
5094 * include/pupa/i386/pc/biosdisk.h: Likewise.
5095 * include/pupa/i386/pc/boot.h: Likewise.
5096 * include/pupa/i386/pc/console.h: Likewise.
5097 * include/pupa/i386/pc/init.h: Likewise.
5098 * include/pupa/i386/pc/kernel.h: Likewise.
5099 * include/pupa/i386/pc/linux.h: Likewise.
5100 * include/pupa/i386/pc/loader.h: Likewise.
5101 * include/pupa/i386/pc/memory.h: Likewise.
5102 * include/pupa/i386/pc/multiboot.h: Likewise.
5103 * include/pupa/i386/pc/partition.h: Likewise.
5104 * include/pupa/i386/pc/time.h: Likewise.
5105 * include/pupa/i386/pc/vga.h: Likewise.
5106 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
5107 * include/pupa/util/getroot.h: Likewise.
5108 * include/pupa/util/misc.h: Likewise.
5109 * include/pupa/util/resolve.h: Likewise.
5110 * kern/device.c: Likewise.
5111 * kern/disk.c: Likewise.
5112 * kern/dl.c: Likewise.
5113 * kern/err.c: Likewise.
5114 * kern/file.c: Likewise.
5115 * kern/fs.c: Likewise.
5116 * kern/loader.c: Likewise.
5117 * kern/main.c: Likewise.
5118 * kern/misc.c: Likewise.
5119 * kern/mm.c: Likewise.
5120 * kern/rescue.c: Likewise.
5121 * kern/term.c: Likewise.
5122 * kern/i386/dl.c: Likewise.
5123 * kern/i386/pc/init.c: Likewise.
5124 * kern/i386/pc/lzo1x.S: Likewise.
5125 * kern/i386/pc/startup.S: Likewise.
5126 * loader/i386/pc/chainloader.c: Likewise.
5127 * loader/i386/pc/linux.c: Likewise.
5128 * loader/i386/pc/multiboot.c: Likewise.
5129 * normal/cmdline.c: Likewise.
5130 * normal/command.c: Likewise.
5131 * normal/main.c: Likewise.
5132 * normal/menu.c: Likewise.
5133 * normal/i386/setjmp.S: Likewise.
5134 * term/i386/pc/console.c: Likewise.
5135 * term/i386/pc/vga.c: Likewise.
5136 * util/console.c: Likewise.
5137 * util/genmoddep.c: Likewise.
5138 * util/misc.c: Likewise.
5139 * util/pupa-emu.c: Likewise.
5140 * util/resolve.c: Likewise.
5141 * util/unifont2pff.rb: Likewise.
5142 * util/i386/pc/biosdisk.c: Likewise.
5143 * util/i386/pc/getroot.c: Likewise.
5144 * util/i386/pc/pupa-mkimage.c: Likewise.
5145 * util/i386/pc/pupa-setup.c: Likewise.
5146
5147 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
5148
5149 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
5150 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
5151 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
5152 reading and reset it after reading.
5153 (pupa_ext2_close): Return PUPA_ERR_NONE.
5154
5155 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
5156 Correct value.
5157 (struct linux_kernel_header): Add kernel_version and
5158 initrd_addr_max.
5159 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
5160 pupa_file_read succeeds.
5161 (pupa_rescue_cmd_initrd): Implement.
5162
5163 2003-12-03 Marco Gerards <metgerards@student.han.nl>
5164
5165 * fs/ext2.c (pupa_ext2_label): New function.
5166 (pupa_ext2_fs): Added label.
5167 * fs/fat.c (pupa_fat_label): New function.
5168 (pupa_fat_fs): Added label.
5169 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
5170
5171 * kern/misc.c (pupa_strndup): New function.
5172 * include/pupa/misc.h (pupa_strndup): New prototype.
5173
5174 * include/pupa/normal.h: Include <pupa/err.h>.
5175 (pupa_set_history): New prototype.
5176 (pupa_iterate_commands): New prototype.
5177 * normal/cmdline.c: Include <pupa/machine/partition.h>,
5178 <pupa/disk.h>, <pupa/file.h>.
5179 (hist_size): New variable.
5180 (hist_lines): Likewise.
5181 (hist_end): Likewise.
5182 (hist_used): Likewise.
5183 (pupa_set_history): New function.
5184 (pupa_history_get): Likewise.
5185 (pupa_history_add): Likewise.
5186 (pupa_history_replace): Likewise.
5187 (pupa_tab_complete): Likewise.
5188 (pupa_cmdline_run): Added tab completion and history buffer. Tab
5189 completion shows partitionnames while completing partitions, this
5190 feature was suggested by Jeff Bailey.
5191 * normal/command.c (pupa_iterate_commands): New function.
5192 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
5193 (pupa_normal_init): Initialize history buffer.
5194 (PUPA_MOD_INIT): Likewise.
5195 (pupa_normal_fini): Free the history buffer.
5196 (PUPA_MOD_FINI): Likewise.
5197
5198 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
5199 key.
5200
5201 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
5202 * configure.ac [i386]: Check for regparam bug.
5203 (NESTED_FUNC_ATTR) [! i386]: Defined.
5204
5205 2003-11-17 Marco Gerards <metgerards@student.han.nl>
5206
5207 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
5208 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
5209 (pupa_emu_SOURCES): New variable.
5210 (pupa_emu_LDFLAGS): Likewise.
5211 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
5212 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
5213 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
5214 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
5215 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
5216 (pupa_jmp_buf): New typedef.
5217 (pupa_setjmp) [PUPA_UTIL]: New macro.
5218 (pupa_longjmp) [PUPA_UTIL]: Likewise.
5219 * include/pupa/term.h (struct pupa_term): New member `refresh'.
5220 (pupa_refresh): New prototype.
5221 * include/pupa/util/getroot.h: New file.
5222 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
5223 it.
5224 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
5225 (pupa_rescue_cmd_cat): Likewise.
5226 (pupa_rescue_cmd_ls): Likewise.
5227 (pupa_rescue_cmd_testload): Likewise.
5228 (pupa_rescue_cmd_lsmod): Likewise.
5229 * normal/cmdline.c (pupa_cmdline_get): Likewise.
5230 * normal/menu.c (run_menu): Likewise.
5231 * kern/term.c (pupa_cls): Likewise.
5232 (pupa_refresh): New function.
5233 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
5234 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
5235 * util/console.c: New file.
5236
5237 * util/i386/pc/getroot.c: New file.
5238 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
5239 (pupa_putchar): New function.
5240 (pupa_refresh): Likewise.
5241 (xgetcwd): Function moved to ...
5242 (strip_extra_slashes): Likewise.
5243 (get_prefix): Likewise.
5244 * util/i386/pc/getroot.c: ... here.
5245 (find_root_device): Function moved and renamed to...
5246 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
5247 Changed all callers.
5248 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
5249 and renamed to...
5250 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
5251 Changed all callers.
5252 * util/misc.c (pupa_memalign): New function.
5253 (pupa_mm_init_region): Likewise.
5254 (pupa_register_exported_symbols): Likewise.
5255 (pupa_putchar): Function removed.
5256 * util/pupa-emu.c: New file.
5257
5258 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
5259
5260 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
5261 (_multiboot_mod_SOURCES): New variable.
5262 (_multiboot_mod_CFLAGS): Likewise.
5263 * loader/i386/pc/multiboot.c: New file.
5264 * include/pupa/i386/pc/multiboot.h: Likewise.
5265 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
5266 (pupa_multiboot_real_boot): New function.
5267 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
5268 (pupa_multiboot_real_boot): New prototype.
5269 (pupa_rescue_cmd_multiboot): Likewise
5270 (pupa_rescue_cmd_module): Likewise.
5271
5272 * kern/loader.c (pupa_loader_set): Continue when
5273 pupa_loader_unload_func() fails.
5274 (pupa_loader_unset): New function.
5275 * include/pupa/loader.h (pupa_loader_unset): New prototype.
5276
5277 * kern/misc.c (pupa_stpcpy): New function.
5278 * include/pupa/misc.h (pupa_stpcpy): New prototype.
5279
5280 2003-11-12 Marco Gerards <metgerards@student.han.nl>
5281
5282 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
5283 for available extensions.
5284
5285 * include/pupa/i386/pc/time.h: New file.
5286 * kern/disk.c: Include <pupa/machine/time.h>.
5287 (PUPA_CACHE_TIMEOUT): New macro.
5288 (pupa_last_time): New variable.
5289 (pupa_disk_open): Flush the cache when there was a timeout.
5290 (pupa_disk_close): Reset the timer.
5291 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
5292 pupa_currticks.
5293 * util/misc.c: Include <sys/times.h>
5294 (pupa_get_rtc): New function.
5295
5296 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5297
5298 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
5299 as blocks.
5300 (pupa_ext2_get_file_block): Use blocks member.
5301
5302 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
5303 first block. Return -1 instead of pupa_errno on error.
5304
5305 2003-10-27 Marco Gerards <metgerards@student.han.nl>
5306
5307 * README: In the pupa-mkimage example use _chain instead of chain
5308 and ext2 instead of fat.
5309 * TODO: Replace ext2fs with jfs as an example. Add an item for
5310 adding journal playback for ext2fs.
5311 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
5312 (pkgdata_MODULES): Added ext2.mod.
5313 (ext2_mod_SOURCES): New variable.
5314 (ext2_mod_CFLAGS): Likewise.
5315 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
5316 * include/pupa/misc.h (pupa_strncpy): New prototype.
5317 (pupa_strcat): Likewise.
5318 (pupa_strncmp): Likewise.
5319 * kern/misc.c (pupa_strcat): Enable function.
5320 (pupa_strncpy): New function.
5321 (pupa_strncmp): Likewise.
5322 * fs/ext2.c: New file.
5323
5324 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
5325 when the read failed before retrying.
5326 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
5327 (_FILE_OFFSET_BITS): Likewise.
5328 * configure.ac: Added AC_SYS_LARGEFILE.
5329
5330 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
5331
5332 * genmk.rb (PModule#rule): Make sure to get only symbol names
5333 from the output of nm.
5334 Reported by Robert Millan <zeratul2@wanadoo.es>.
5335
5336 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
5337
5338 I forgot to check in these changes for a long time. This adds
5339 incomplete support for VGA console, and this is still very
5340 buggy. Also, a lot of consideration is required for I18N,
5341 UNICODE, and VGA font issues. Therefore, assume that this is
5342 such that "better than nothing".
5343
5344 * font/manager.c: New file.
5345 * include/pupa/font.h: Likewise.
5346 * include/pupa/i386/pc/vga.h: Likewise.
5347 * term/i386/pc/vga.c: Likewise.
5348 * util/unifont2pff.rb: Likewise.
5349
5350 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
5351 (pkgdata_MODULES): Added vga.mod and font.mod.
5352 (vga_mod_SOURCES): New variables.
5353 (vga_mod_CFLAGS): Likewise.
5354 (font_mod_SOURCES): Likewise.
5355 (font_mod_CFLAGS): Likewise.
5356
5357 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
5358
5359 * include/pupa/term.h: Include pupa/err.h.
5360 (struct pupa_term): Added init and fini.
5361 Changed the argument of putchar to pupa_uint32_t.
5362
5363 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
5364 (pupa_console_real_putchar): New prototype.
5365 (pupa_console_putchar): Removed.
5366 (pupa_console_checkkey): Exported.
5367 (pupa_console_getkey): Likewise.
5368
5369 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
5370 characters.
5371
5372 * kern/term.c (pupa_term_set_current): Rewritten.
5373 (pupa_putchar): Likewise.
5374 (pupa_putcode): New function.
5375
5376 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
5377 (pupa_console_real_putchar): ... this.
5378 (pupa_vga_set_mode): New function.
5379 (pupa_vga_get_font): Likewise.
5380
5381 * normal/command.c: Include pupa/term.h.
5382 (terminal_command): New function.
5383 (pupa_command_init): Register the command "terminal".
5384
5385 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
5386 (DISP_UP): Likewise.
5387 (DISP_RIGHT): Likewise.
5388 (DISP_DOWN): Likewise.
5389 (DISP_HLINE): Likewise.
5390 (DISP_VLINE): Likewise.
5391 (DISP_UL): Likewise.
5392 (DISP_UR): Likewise.
5393 (DISP_LL): Likewise.
5394 (DISP_LR): Likewise.
5395
5396 * term/i386/pc/console.c (pupa_console_putchar): New function.
5397
5398 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
5399
5400 * util/resolve.c (pupa_util_resolve_dependencies): BUG
5401 FIX. Reverse the path_list.
5402
5403 * include/pupa/normal.h: Export pupa_register_command and
5404 pupa_unregister_command.
5405
5406 * hello/hello.c (pupa_cmd_hello): New module.
5407 * conf/i386-pc.rmk: Added hello.mod.
5408
5409 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
5410
5411 * kern/i386/pc/lzo1x.S: New file.
5412
5413 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
5414 (compress_kernel): New variable.
5415 (generate_image): Heavily modified to support compressing a
5416 large part of the core image.
5417
5418 * util/misc.c (pupa_util_read_image): Fix a file descriptor
5419 leak.
5420 (pupa_util_load_image): New function.
5421
5422 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
5423 (pupa_compressed_size): New variable.
5424 (codestart): Enable Gate A20 here.
5425 Decompress the compressed part of the core image.
5426 Rearrange the code to put functions and variables which are
5427 required for initialization in the non-compressed part.
5428 Include lzo1x.S.
5429
5430 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
5431 here.
5432
5433 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
5434
5435 * include/pupa/i386/pc/kernel.h
5436 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
5437 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
5438 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
5439 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
5440 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
5441
5442 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
5443
5444 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
5445 (Utility#rule): Likewise.
5446
5447 * configure.ac: Check if LZO is available.
5448
5449 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
5450
5451 * include/pupa/normal.h: New file.
5452 * include/pupa/setjmp.h: Likewise.
5453 * include/pupa/i386/setjmp.h: Likewise.
5454 * normal/cmdline.c: Likewise.
5455 * normal/command.c: Likewise.
5456 * normal/main.c: Likewise.
5457 * normal/menu.c: Likewise.
5458 * normal/i386/setjmp.S: Likewise.
5459
5460 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
5461 (pupa_rescue_cmd_initrd): Likewise.
5462
5463 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
5464 Likewise.
5465
5466 * kern/i386/pc/startup.S (translation_table): New variable.
5467 (translate_keycode): New function.
5468 (pupa_console_getkey): Call translate_keycode.
5469
5470 * kern/rescue.c (attempt_normal_mode): New function.
5471 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
5472 it failed, print a message.
5473
5474 * kern/mm.c (pupa_real_malloc): Print more information when a
5475 free magic is broken.
5476 (pupa_free): If the first free header is not free actually, set
5477 it to P.
5478
5479 * kern/main.c (pupa_load_normal_mode): Just load the module
5480 "normal".
5481 (pupa_main): Don't print the message
5482 "Entering into rescue mode..." here.
5483
5484 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
5485 Declared.
5486 (pupa_rescue_cmd_initrd): Likewise.
5487 (pupa_rescue_cmd_initrd): Likewise.
5488
5489 * include/pupa/symbol.h (FUNCTION): Specify the type.
5490 (VARIABLE): Likewise.
5491
5492 * include/pupa/err.h (pupa_err_t): Added
5493 PUPA_ERR_UNKNOWN_COMMAND.
5494
5495 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
5496 (pupa_dl_get_prefix): Likewise.
5497
5498 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
5499 Added _chain.mod and _linux.mod instead of chain.mod and
5500 linux.mod.
5501 (chain_mod_SOURCES): Renamed to ...
5502 (_chain_mod_SOURCES): ... this.
5503 (chain_mod_CFLAGS): Renamed to ...
5504 (_chain_mod_CFLAGS): ... this.
5505 (linux_mod_SOURCES): Renamed to ...
5506 (_linux_mod_SOURCES): ... this.
5507 (linux_mod_CFLAGS): Renamed to ...
5508 (_linux_mod_CFLAGS): ... this.
5509 (normal_mod_SOURCES): New variable.
5510 (normal_mod_CFLAGS): Likewise.
5511 (normal_mod_ASFLAGS): Likewise.
5512
5513 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
5514
5515 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
5516 possible.
5517
5518 * kern/dl.c (pupa_dl_ref): Refer dependending modules
5519 recursively.
5520 (pupa_dl_unref): Unrefer depending modules recursively.
5521 Don't call pupa_dl_unload implicitly, because PUPA can crash if
5522 a module is unloaded before one depending on that module is
5523 unloaded.
5524 (pupa_dl_unload): Unload depending modules explicitly,
5525 if possible.
5526
5527 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
5528
5529 * include/pupa/i386/pc/linux.h: New file.
5530 * loader/i386/pc/linux.c: Likewise.
5531
5532 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
5533 Removed.
5534 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
5535 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
5536 of PUPA_CHAINLOADER_BOOT_SECTOR.
5537
5538 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
5539 (pupa_linux_prot_size): New variable.
5540 (pupa_linux_tmp_addr): Likewise.
5541 (pupa_linux_real_addr): Likewise.
5542 (pupa_linux_boot_zimage): New function.
5543 (pupa_linux_boot_bzimage): Likewise.
5544
5545 * kern/i386/pc/init.c (struct mem_region): New structure.
5546 (MAX_REGIONS): New macro.
5547 (mem_regions): New variable.
5548 (num_regions): Likewise.
5549 (pupa_os_area_addr): Likewise.
5550 (pupa_os_area_size): Likewise.
5551 (pupa_lower_mem): Likewise.
5552 (pupa_upper_mem): Likewise.
5553 (add_mem_region): New function.
5554 (compact_mem_regions): Likewise.
5555 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
5556 the size of the conventional memory and that of so-called upper
5557 memory (before the first memory hole).
5558 Instead of adding each found region to free memory, use
5559 add_mem_region and add them after removing overlaps.
5560 Also, add only 1/4 of the upper memory to free memory. The rest
5561 is used for loading OS images. Maybe this is ad hoc, but this
5562 makes it much easier to relocate OS images when booting.
5563
5564 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
5565 (pupa_enter_rescue_mode): Don't register initrd and module.
5566
5567 * kern/mm.c: Include pupa/dl.h.
5568
5569 * kern/main.c: Include pupa/file.h and pupa/device.h.
5570
5571 * kern/loader.c (pupa_loader_load_module_func): Removed.
5572 (pupa_loader_load_module): Likewise.
5573
5574 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
5575 ``.o''.
5576
5577 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
5578 (pupa_linux_tmp_addr): Likewise.
5579 (pupa_linux_real_addr): Likewise.
5580 (pupa_linux_boot_zimage): Likewise.
5581 (pupa_linux_boot_bzimage): Likewise.
5582
5583 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
5584 (pupa_upper_mem): Likewise.
5585 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
5586 module is too dangerous.
5587
5588 * include/pupa/loader.h (pupa_os_area_addr): Declared.
5589 (pupa_os_area_size): Likewise.
5590 (pupa_loader_set): Remove the first argument. Loader doesn't
5591 manage modules or initrd any longer.
5592 (pupa_loader_load_module): Removed.
5593
5594 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
5595 (linux_mod_SOURCES): New variable.
5596 (linux_mod_CFLAGS): Likewise.
5597
5598 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
5599
5600 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
5601 the length of a blocklist correctly.
5602
5603 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
5604 Use ioctl only if the OS file is a block device.
5605 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
5606 not very useful for normal files.
5607
5608 * kern/main.c (pupa_set_root_dev): New function.
5609 (pupa_load_normal_mode): Likewise.
5610 (pupa_main): Call those above.
5611
5612 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
5613 pupa_uint16_t.
5614
5615 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
5616
5617 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5618
5619 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
5620 (setup): Configure the installed partition information and the
5621 dl prefix.
5622
5623 * loader/i386/pc/chainloader.c (my_mod): New variable.
5624 (pupa_chainloader_unload): New function.
5625 (pupa_rescue_cmd_chainloader): Refer itself.
5626 (PUPA_MOD_INIT): Save its own module in MY_MOD.
5627
5628 * kern/i386/pc/startup.S (install_partition): Removed.
5629 (version_string): Likewise.
5630 (config_file): Likewise.
5631 (pupa_install_dos_part): New variable.
5632 (pupa_install_bsd_part): Likewise.
5633 (pupa_prefix): Likewise.
5634 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
5635
5636 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
5637 and pupa/misc.h.
5638 (make_install_device): New function.
5639 (pupa_machine_init): Set the dl prefix.
5640
5641 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
5642 (buf): Renamed to ...
5643 (linebuf): ... this.
5644 (pupa_rescue_cmd_prefix): New function.
5645 (pupa_rescue_cmd_insmod): Likewise.
5646 (pupa_rescue_cmd_rmmod): Likewise.
5647 (pupa_rescue_cmd_lsmod): Likewise.
5648 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
5649 rmmod and lsmod.
5650
5651 * kern/mm.c (pupa_memalign): If failed even after invalidating
5652 disk caches, unload unneeded modules and retry.
5653
5654 * kern/misc.c (pupa_memmove): New function.
5655 (pupa_memcpy): Removed.
5656 (pupa_strcpy): New function.
5657 (pupa_itoa): Made static.
5658
5659 * kern/dl.c (pupa_dl_iterate): New function.
5660 (pupa_dl_ref): Likewise.
5661 (pupa_dl_unref): Likewise.
5662 (pupa_dl_unload): Return if succeeded or not.
5663 (pupa_dl_unload_unneeded): New function.
5664 (pupa_dl_unload_all): Likewise.
5665 (pupa_dl_init): Renamed to ...
5666 (pupa_dl_set_prefix): ... this.
5667 (pupa_dl_get_prefix): New function.
5668
5669 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
5670 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
5671 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
5672 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
5673 (pupa_install_dos_part): Declared.
5674 (pupa_install_bsd_part): Likewise.
5675 (pupa_prefix): Likewise.
5676 (pupa_boot_drive): Likewise.
5677
5678 * include/pupa/types.h: Fix a typo.
5679
5680 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
5681 pupa_memmove.
5682 (pupa_memmove): Declared.
5683 (pupa_strcpy): Likewise.
5684
5685 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
5686 pupa_mod_init takes one argument, its own module.
5687 (pupa_dl_unload_unneeded): Declared.
5688 (pupa_dl_unload_all): Likewise.
5689 (pupa_dl_ref): Likewise.
5690 (pupa_dl_unref): Likewise.
5691 (pupa_dl_iterate): Likewise.
5692 (pupa_dl_init): Renamed to ...
5693 (pupa_dl_set_prefix): ... this.
5694 (pupa_dl_get_prefix): Declared.
5695
5696 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
5697 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
5698 unloaded.
5699 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
5700 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
5701
5702 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
5703 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
5704
5705 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
5706
5707 * util/i386/pc/pupa-setup.c (setup): Define the internal
5708 function find_first_partition_start at the top level, because GCC
5709 3.0.x cannot compile internal functions in deeper scopes
5710 correctly.
5711 (find_root_device): Use lstat instead of stat.
5712 Don't follow symbolic links.
5713 Fix the path-constructing code.
5714
5715 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
5716 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
5717 by a BLKGETSIZE ioctl first, because block devices don't fill
5718 the member st_mode of the structure stat on Linux.
5719 [__linux__] (linux_find_partition): Use a temporary buffer
5720 REAL_DEV for the working space. Copy it to DEV before returning.
5721 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
5722 buffer cache consistent.
5723 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
5724 strncmp. The previous value was merely wrong.
5725 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
5726
5727 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
5728 FAT size is 12. The previous value was merely wrong.
5729
5730 * kern/main.c (pupa_main): Don't split the starting message from
5731 newlines.
5732
5733 * kern/term.c (pupa_putchar): Put CR after LF instead of before
5734 LF, because BIOS goes crazy about character attributes in this
5735 case.
5736
5737 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
5738
5739 * include/i386/pc/util/biosdisk.h: New file.
5740 * util/i386/pc/biosdisk.c: Likewise.
5741 * util/i386/pc/pupa-setup.c: Likewise.
5742
5743 * Makefile.in (INCLUDE_DISTFILES): Added
5744 include/pupa/i386/pc/util/biosdisk.h.
5745 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
5746 directory util/i386/pc.
5747 (install-local): Added a rule for sbin_UTILITIES.
5748 (uninstall): Likewise.
5749
5750 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
5751
5752 * util/misc.c (xrealloc): New function.
5753 (pupa_malloc): Likewise.
5754 (pupa_free): Likewise.
5755 (pupa_realloc): Likewise.
5756 (pupa_stop): Likewise.
5757 (pupa_putchar): Likewise.
5758
5759 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
5760
5761 * include/pupa/util/misc.h (xrealloc): Declared.
5762
5763 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
5764 macro.
5765 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
5766 (PUPA_BOOT_MACHINE_BPB_END): ... this.
5767
5768 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
5769 [PUPA_UTIL] (pupa_fat_fini): Likewise.
5770
5771 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
5772 way should be implemented.
5773 [PUPA_UTIL] (pupa_fat_fini): Likewise.
5774
5775 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
5776 the size of NAME for safety.
5777 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
5778 0x88.
5779
5780 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
5781 (pupa_setup_SOURCES): Likewise.
5782
5783 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
5784
5785 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
5786
5787 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
5788 bunch of pushl's from pusha, because this destroys the return
5789 value.
5790
5791 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
5792
5793 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
5794 This means that any missing prototypes could be fatal. Also, you
5795 must take care when writing assembly code. See the comments at
5796 the beginning of startup.S, for more details.
5797
5798 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
5799 compilation mechanism.
5800 (pupa_chainloader_real_boot): Likewise.
5801 (pupa_biosdisk_rw_int13_extensions): Likewise.
5802 (pupa_biosdisk_rw_standard): Likewise.
5803 (pupa_biosdisk_check_int13_extensions): Likewise.
5804 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
5805 (pupa_biosdisk_get_diskinfo_standard): Likewise.
5806 (pupa_get_memsize): Likewise.
5807 (pupa_get_mmap_entry): Likewise.
5808 (pupa_console_putchar): Likewise.
5809 (pupa_console_setcursor): Likewise.
5810 (pupa_getrtsecs): Use pushl instead of push.
5811
5812 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
5813 memory instead of the stack for a mmap entry, because some
5814 BIOSes may ignore the maximum size and overflow.
5815
5816 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
5817
5818 * genmk.rb (PModule#rule): Compile automatically generated
5819 sources with module-specific CFLAGS as well as other sources.
5820
5821 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5822
5823 * configure.ac: Check ld.
5824 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
5825 respectively, before checking endianness and sizes.
5826
5827 * Makefile.in (LD): New variable.
5828
5829 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5830
5831 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
5832
5833 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5834
5835 * Changelog: New file.
5836