]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / ChangeLog
CommitLineData
e9c6f39b 12005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
2
3 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
4 program with another one, because the old one didn't detect a bug
5 in gcc-3.4. Always use regparm 2, because the new test is still
6 not enough for gcc-4.0. Someone must investigate a simple test
7 case which detects a bug in gcc-4.0.
8
8de3495c 92005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10
11 * DISTLIST: Added normal/completion.c.
12
13 * normal/completion.c: New file.
14
15 * term/i386/pc/console.c (grub_console_getwh): New function.
16 (grub_console_term): Assign grub_console_getwh to getwh.
17
18 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
19 function is defined in normal/completion.c as
20 grub_normal_do_completion.
21 (grub_cmdline_get): Use grub_normal_do_completion instead of
22 grub_tab_complete.
23
24 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
25 returns non-zero, otherwise return 0.
26 (grub_partition_iterate): First, probe the partition map. Then,
27 call ITERATE only for this partition map.
28
29 * kern/misc.c (grub_strncmp): Rewritten.
30
31 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
32 returns non-zero. Otherwise return 0.
33
34 * include/grub/partition.h (grub_partition_map_iterate): Return
35 int instead of void.
36
37 * include/grub/normal.h (grub_normal_do_completion): New prototype.
38
39 * include/grub/misc.h (grub_strncmp): Change the type of N to
40 grub_size_t.
41
42 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
43 of void.
44
45 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
46 unsigned explictly before comparing it with I.
47
48 * kern/main.c (grub_env_write_root): Add the attribute unused into
49 VAR.
50
51 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
52 normal/completion.c.
53 (normal_mod_SOURCES): Likewise.
54 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
55 (normal_mod_SOURCES): Likewise.
56
57 * normal/command.c (grub_iterate_commands): If ITERATE returns
58 non-zero, return one immediately.
59
e85e144b 602005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
61
62 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
63 * kern/i386/pc/startup.S: Updated Global Descriptor table's
64 descriptions.
65 (grub_vbe_get_controller_info): New function.
66 (grub_vbe_get_mode_info): Likewise.
67 (grub_vbe_set_mode): Likewise.
68 (grub_vbe_get_mode): Likewise.
69 (grub_vbe_set_memory_window): Likewise.
70 (grub_vbe_get_memory_window): Likewise.
71 (grub_vbe_set_scanline_length): Likewise.
72 (grub_vbe_get_scanline_length): Likewise.
73 (grub_vbe_set_display_start): Likewise.
74 (grub_vbe_get_display_start): Likewise.
75 (grub_vbe_set_palette_data): Likewise.
76 * include/grub/i386/pc/vbe.h: New file.
77
c46153d2 782005-08-08 Hollis Blanchard <hollis@penguinppc.org>
79
80 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
81 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
82 * DISTLIST: Likewise.
83 * kern/ieee1275/of.c: Moved to ...
84 * kern/ieee1275/ieee1275.c: ... here.
85
0cb90c45 862005-08-08 Hollis Blanchard <hollis@penguinppc.org>
87
88 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
89 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
90 Pass 0 as `end' parameter to grub_strtoul().
91
a19fb360 922005-08-08 Hollis Blanchard <hollis@penguinppc.org>
93
94 * include/grub/powerpc/ieee1275/console.h: Do not include
95 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
96 ifdef.
97 (grub_console_cur_color): Remove i386-specific prototype.
98 (grub_console_real_putchar): Likewise.
99 (grub_console_checkkey): Likewise.
100 (grub_console_getkey): Likewise.
101 (grub_console_getxy): Likewise.
102 (grub_console_gotoxy): Likewise.
103 (grub_console_cls): Likewise.
104 (grub_console_setcursor): Likewise.
105 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
106 Include <grub/machine/console.h>.
107 * term/ieee1275/ofconsole.c: Likewise.
108
4ac9bd04 1092005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
110
111 * Makefile.in (LIBLZO): New variable.
112
113 * configure.ac: Check for LZO version 2.
114
115 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
116 lzo/lzo1x.h instead of lzo1x.h.
117
118 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
119 of -llzo.
120
121 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
122 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
123
124 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
125 copying the data from PARTITION to P.
126
f4917dfd 1272005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
128
129 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
130 negative, unload the module.
131
132 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
133 map is "pc_partition_map" but not "pc".
134 (usage): Fix the description. The options are --boot-image and
135 --core-image but not --boot-file or --core-file.
136 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
137 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
138 DEFAULT_DIRECTORY.
139
140 * util/i386/pc/grub-install.in: Do not specify --boot-file or
141 --core-file. Specify INSTALL_DEVICE as an argument.
142
143 * util/console.c: Include config.h.
144 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
145 [HAVE_NCURSES_H]: Include ncurses.h.
146 [HAVE_CURSES_H]: Include curses.h.
147 [!A_NORMAL] (A_NORMAL): Defined as zero.
148 [!A_STANDOUT] (A_STANDOUT): Likewise.
149
150 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
151 -lncurses.
152 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
153
154 * configure.ac: Check for curses libraries and headers.
155
156 * Makefile.in (LIBCURSES): New variable.
157
158 * genmk.rb (Script::rule): Set the executable bits.
159
160 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
161 name of the PC partition map is "pc_partition_map" but not "pc".
162
0e143073 1632005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
164
165 * util/i386/pc/grub-install.in (grub_probefs): New variable.
166 (modules): Likewise.
167 (usage): Added descriptions for --modules and --grub-probefs.
168 Handle --modules and --grub-probefs. Save the arguments in MODULES
169 and GRUB_PROBEFS, respectively.
170 Auto-detect a filesystem module against GRUBDIR. If the result is
171 empty and modules are not specified explicitly, abort the
172 installation. Add the result to MODULES.
173
174 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
175 disk/powerpc/ieee1275/ofdisk.c,
176 include/grub/powerpc/ieee1275/init.h and
177 term/powerpc/ieee1275/ofconsole.c.
178 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
179 term/ieee1275/ofconsole.c.
180
181 * include/grub/powerpc/ieee1275/console.h: Resurrected.
182
183 * COPYING: Upgraded to the latest version. Only the address of the
184 FSF office has changed.
185
efd6e6d5 1862005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
187
188 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
189 kern/ieee1275.c with kern/ieee1275/of.c.
190
191 * kern/ieee1275.c: Moved to ...
192 * kern/ieee1275/of.c: ... here.
193
8ceafda2 1942005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
195
196 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
197 readablity.
198
199 * config.guess: Updated to the latest version from gnulib.
200 * config.sub: Likewise.
201 * install.sh: Likewise.
202 * mkinstalldirs: Likewise.
203
204 * include/grub/console.h: Removed. This file is arch-specific. Do
205 not put this in include/grub.
206
207 * include/grub/i386/pc/console.h: Resurrected.
208
209 * util/console.c: Include grub/machine/console.h instead of
210 grub/console.h.
211 * util/grub-emu.c: Likewise.
212
267f6cd9 2132005-08-04 Marco Gerards <metgerards@student.han.nl>
214
215 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
216 hardcoded value.
217
218 From Vincent Pelletier <subdino2004@yahoo.fr>
219 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
220 Redefined to use grub_getwh.
221 (grub_term): New member named getwh.
222 (grub_getwh): New prototype.
223 * kern/term.c (grub_getwh): New function.
224 * term/i386/pc/console.c (grub_console_getwh): New function.
225 (grub_console_term): New member `getwh'.
226 * term/i386/pc/vga.c (grub_vga_getwh): New function.
227 (grub_vga_term): New member `getwh'.
228 * term/sparc64/ofconsole.c (grub_ofconsole_readkey): Use
229 grub_ssize_t.
230 (grub_ofconsole_getw): New function.
231 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
232 (grub_ofconsole_term): New field named getwh and new initial
233 value.
234
3be7266d 2352005-08-03 Hollis Blanchard <hollis@penguinppc.org>
236
237 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
238 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
239 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
240 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
241 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
242 of <grub/machine/ieee1275.h>.
243 * commands/ieee1275/reboot.c: Likewise.
244 * boot/powerpc/ieee1275/ieee1275.c: Move ...
245 * kern/ieee1275.c: ... to here. All users updated. Change all
246 parameter structs to use new type `grub_ieee1275_cell_t'.
247 * term/powerpc/ieee1275/ofconsole.c: Move ...
248 * term/ieee1275/ofconsole.c: ... to here. All users updated.
249 * disk/powerpc/ieee1275/ofdisk.c: Move ...
250 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
251 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
252 to return int.
253 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
254 Remove unused prototypes. All users updated.
255 * include/grub/powerpc/ieee1275/console.h: Removed.
256 * include/grub/powerpc/ieee1275/ieee1275.h: Define
257 `grub_ieee1275_cell_t'.
258 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
259 Cast comparisons with -1 to the correct type.
260 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
261 type to match `grub_ieee1275_entry_fn'.
262
8b5f3938 2632005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
264
265 * DISTLIST: Added util/i386/pc/grub-probefs.c.
266
267 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
268 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
269 partmap/sun.c.
270 (grub_probefs_SOURCES): New variable.
271
272 * util/i386/pc/grub-probefs.c: New file.
273
274 * util/i386/pc/grub-setup.c (main): Call
275 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
276 grub_hfs_init and grub_jfs_init to initialize the system. Call
277 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
278 grub_pc_partition_map_fini to finish the system.
279
ea409713 2802005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
281
282 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
283 function.
284 (grub_multiboot_load_elf32): Likewise.
285 (grub_multiboot_is_elf64): Likewise.
286 (grub_multiboot_load_elf64): Likewise.
287 (grub_multiboot_load_elf): Likewise.
288 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
289 an ELF32 or ELF64 file.
290 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
291
292 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
293 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
294 NULL before calling FS->LABEL.
295 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
296 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
297 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
298 before calling FS->LABEL.
299
141a288b 3002005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
301
302 * util/i386/pc/grub-install.in (datadir): New variable.
303 (libdir): Removed.
304 (pkgdatadir): New variable.
305 (pkglibdir): Removed.
306
0d5f8a54 3072005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
308
309 * DISTLIST: Added util/i386/pc/grub-install.in.
310
311 * util/i386/pc/grub-install.in: New file.
312
313 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
314 (grub_install_SOURCES): Likewise.
315
316 * genmk.rb: Added support for scripts.
317 (Script): New class.
318 (scripts): New variable.
319
320 * Makefile.in (install-local): Install sbin_SCRIPTS by
321 INSTALL_SCRIPT.
322 (uninstall): Remove sbin_SCRIPTS.
323
324 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
325 device, try to get a GRUB device by
326 grub_util_biosdisk_get_grub_dev.
327 Free DEST_DEV.
328
329 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
330 description for --device-map.
331
5f968e1e 3322005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
333
334 Change the semantics of variable hooks. They now return strings
335 instead of error values.
336
337 * util/i386/pc/grub-setup.c: Include grub/env.h.
338 (setup): Use grub_device_set_root instead of grub_env_set.
339
340 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
341 grub_env_get instead of grub_device_set_root and
342 grub_device_get_root, respectively.
343
344 * kern/main.c (grub_env_write_root): New function.
345 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
346 grub_env_set instead of grub_device_set_root.
347
348 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
349 many variables.
350 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
351 rather than calling ENV->WRITE_HOOK afterwards.
352 (grub_env_get): Return the result of ENV->READ_HOOK rather than
353 passing a pointer of a pointer.
354 (grub_register_variable_hook): Change the types of "read_hook" and
355 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
356 respectively.
357 Allocate the default empty string on the heap, because this string
358 may be freed later.
359
360 * kern/device.c: Include grub/env.h.
361 (grub_device_set_root): Removed.
362 (grub_device_get_root): Likewise.
363 (grub_device_open): Use grub_env_get instead of
364 grub_device_get_root.
365
366 * include/grub/env.h (grub_env_read_hook_t): New type.
367 (grub_env_write_hook_t): Likewise.
368 (grub_env_var): Change the types of "read_hook" and "write_hook"
369 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
370 (grub_register_variable_hook): Likewise.
371
372 * include/grub/device.h (grub_device_set_root): Removed.
373 (grub_device_set_root): Likewise.
374
375 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
376 make sure that DIRNAME terminates with '/', so that
377 grub_fat_find_dir will fail if PATH is not a directory.
378
379 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
380 from DIRNAME.
381 Use the qualifier auto for print_files and print_files_long.
382 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
383 as a regular file.
384 Put a newline only if there is no error.
385 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
386 used.
387
896f0afd 3882005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
389
390 * kern/partition.c (grub_partition_probe): Initialize PART to
391 NULL. Otherwise, when no partition map is registered, this returns
392 a garbage.
393
b28b81b2 3942005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
395
396 * partmap/apple.c (apple_partition_map_iterate): Check if POS
397 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
398 valid.
399
5f3607e0 4002005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
401
402 * commands/ls.c (grub_ls_list_disks): Print the filesystem
403 information on each device, if it does not have partitions. Print
404 "Device" instead of "Disk", because this function is not specific
405 to disk devices.
406
407 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
408 static to ensure that it is put on the memory rather than a
409 register.
410
502c87e8 4112005-07-17 Yoshinori Okuji <okuji@enbug.org>
412
413 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
414 (grub_cat_init): Likewise.
415 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
416 (options): Likewise.
417 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
418 (grub_configfile_init): Likewise.
419 * font/manager.c (GRUB_MOD_INIT): Likewise.
420 * commands/help.c (GRUB_MOD_INIT): Likewise.
421 (grub_help_init): Likewise.
422 * normal/command.c (grub_command_init): Likewise.
423 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
424 * disk/loopback.c (grub_loop_init): Likewise.
425 (GRUB_MOD_INIT): Likewise.
426 * commands/ls.c (grub_ls_init): Likewise.
427 (GRUB_MOD_INIT): Likewise.
428 (options): Likewise.
429 * commands/boot.c (grub_boot_init): Likewise.
430 (GRUB_MOD_INIT): Likewise.
431 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
432 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
433 (GRUB_MOD_INIT): Likewise.
434 * commands/cmp.c (grub_cmp_init): Likewise.
435 (GRUB_MOD_INIT): Likewise.
436
437 * normal/arg.c: Use <> instead of "" to include header files.
438 (SHORT_ARG_HELP): New macro.
439 (SHORT_ARG_USAGE): Likewise.
440 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
441 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
442 descriptions.
443 (find_short): Check if C is 'h' or 'u' explicitly.
444 (grub_arg_show_help): Use space characters instead of tabs. Treat
445 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
446 are shown with --help and --usage only if they are not used for
447 the command itself.
448 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
449 'h' and 'u'.
450
451 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
452 const into "longarg". Change the type of "shortarg" to int.
453
f806d18e 4542005-07-17 Yoshinori Okuji <okuji@enbug.org>
455
456 * boot/i386/pc/boot.S (boot_drive_check): New label.
457
458 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
459 macro.
460
461 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
462 which do not pass a boot drive correctly. Copied from GRUB Legacy.
463
e293232b 4642005-07-17 Yoshinori Okuji <okuji@enbug.org>
465
466 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
467 When turning off Gate A20, skip the check and return immediately,
468 because this is not fatal usually.
469
ebedfd00 4702005-07-17 Yoshinori Okuji <okuji@enbug.org>
471
472 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
473 be 0x7C00 instead of 0x8000.
474
475 * boot/i386/pc/pxeboot.S: Rewritten.
476
477 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
478 EXT_C.
479 (gate_a20_check_state): Read a byte from 0x108000. Invert the
480 result.
481
654fc59f 4822005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
483
484 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
485 robustness. This routine now supports a BIOS call and System
486 Control Port A to modify the gate A20.
487
488 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
489 Increased to 0x440.
490
09f9923f 4912005-07-12 Hollis Blanchard <hollis@penguinppc.org>
492
493 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
494 device path and resulting ihandle.
495 (grub_ofdisk_close): dprintf the ihandle being closed.
496 (grub_ofdisk_read): dprintf function parameters.
497 * kern/mm.c (grub_mm_init_region): Likewise.
498 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
499 (grub_linux_boot): dprintf the Linux entry point, initrd address and
500 size, and boot arguments.
501 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
502 before loading into memory.
503 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
504 before loading into memory.
505
7ef504d8 5062005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
507
508 * kern/mm.c: Added much documentation.
509 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
510 8, set to 5 instead of 8.
511
e0f050c2 5122005-07-10 Yoshinori Okuji <okuji@enbug.org>
513
514 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
515
516 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
517 (grub_mkdevicemap_SOURCES): New variable.
518
519 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
520 lib/device.c of GRUB Legacy.
521
7224189a 5222005-07-10 Yoshinori Okuji <okuji@enbug.org>
523
524 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
525 instead of PATH is NULL.
526
68c864eb 5272005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
528
529 * commands/cmp.c (BUFFER_SIZE): New macro.
530 (grub_cmd_cmp): Close the right file at the right time. Compare
531 only data just read. Don't report files of different size as
532 identical. Dynamically allocate buffers. Move variable
533 declarations at the beginning of function.
534
e6f3e614 5352005-07-09 Yoshinori Okuji <okuji@enbug.org>
536
537 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
538 reverse.
539
f8f1559a 5402004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
541
542 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
543 when backspace is pressed at beginning of line.
544
39c9d41d 5452005-07-03 Yoshinori Okuji <okuji@enbug.org>
546
547 * DISTLIST: Added genfslist.sh.
548
549 * normal/main.c (fs_module_list): New variable.
550 (autoload_fs_module): New function.
551 (read_fs_list): Likewise.
552 (grub_normal_execute): Call read_fs_list.
553
554 * kern/fs.c (grub_fs_autoload_hook): New variable.
555 (grub_fs_probe): Added support for auto-loading.
556
557 * include/grub/normal.h (struct grub_fs_module_list): New struct.
558 (grub_fs_module_list_t): New type.
559
560 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
561 (grub_fs_autoload_hook): New prototype.
562
563 * genfslist.sh: New file.
564
565 * genmk.rb: Added a rule to generate a filesystem list.
566
121c1d83 5672005-06-30 Marco Gerards <metgerards@student.han.nl>
568
569 * configure.ac: Fix the test for cross-compiling.
570
571 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
572 define GRUB_UTIL anymore.
573
574 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
575 so this function works on other systems than just big endian.
576 (load_modules): Likewise.
577 (add_segments): Likewise.
578
e75d76e1 5792005-06-23 Hollis Blanchard <hollis@penguinppc.org>
580
581 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
582 contains `l' modifier, get a long from va_arg().
583
50b5a0a7 5842005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
585
586 * kern/mm.c (grub_free): If the next free block which is being
587 merged is the first free block, set the first block to the block
588 being freed.
589 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
590
89371b20 5912005-05-08 Hollis Blanchard <hollis@penguinppc.org>
592
593 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
594 `grub_ieee1275_chosen'.
595
168d6e58 5962005-05-08 Hollis Blanchard <hollis@penguinppc.org>
597
598 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
599 (grub_ieee1275_chosen): New variable.
600 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
601 `chosen'.
602 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
603 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
604 Rename first argument to `phandle' for consistency.
605 (grub_ieee1275_get_property_length): Likewise.
606 (grub_ieee1275_next_property): Likewise. Change type of first argument
607 to grub_ieee1275_phandle_t.
608 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
609 Move export next to declaration.
610 (grub_ieee1275_chosen): New variable.
611 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
612 Correct cosmetic typo.
613 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
614 `grub_ieee1275_chosen'.
615 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
616 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
617 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
618 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
619 `grub_ieee1275_chosen'.
620
ca5baa3f 6212005-05-10 Hollis Blanchard <hollis@penguinppc.org>
622
623 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
624 /chosen/bootargs.
625 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
626 /chosen/bootargs as "variable=value" pairs.
627
708b345f 6282005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
629
630 * include/grub/misc.h (grub_dprintf): New macro.
631 (grub_real_dprintf): New prototype.
632 (grub_strword): Likewise.
633 (grub_iswordseparator): Likewise.
634 * kern/misc.c (grub_real_dprintf): New function.
635 (grub_strword): Likewise.
636 (grub_iswordseparator): Likewise.
637
f4c5e67c 6382005-04-30 Hollis Blanchard <hollis@penguinppc.org>
639
640 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
641 (roundup): Remove macro.
642 (grub_ieee1275_flags): Make static.
643 (grub_ieee1275_realmode): Remove.
644 (grub_ieee1275_test_flag): New function.
645 (grub_ieee1275_set_flag): Likewise.
646 (find_options): Rename to `grub_ieee1275_find_options'; update
647 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
648 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
649 (cmain): New prototype.
650 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
651 `grub_ieee1275_flags' directly.
652 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
653 machine/biosdisk.h.
654 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
655 Don't include grub/machine/init.h.
656 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
657 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
658 Remove prototype.
659 (grub_ieee1275_realmode): Likewise.
660 (grub_ieee1275_flag): New enum.
661 (grub_ieee1275_test_flag): New prototype.
662 (grub_ieee1275_set_flag): New prototype.
663 * include/grub/powerpc/ieee1275/init.h: Remove file.
664 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
665 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
666 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
667 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
668 comment.
669 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
670 `grub_ieee1275_test_flag'.
671 (grub_ieee1275_encode_devname): Likewise.
672
ed16607e 6732005-04-21 Hollis Blanchard <hollis@penguinppc.org>
674
675 * include/grub/powerpc/ieee1275/ieee1275.h
676 (grub_ieee1275_encode_devname): New prototype.
677 (grub_ieee1275_get_filename): Likewise.
678 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
679 function.
680 (grub_set_prefix): Likewise.
681 (grub_machine_init): Call grub_set_prefix.
682 * kern/powerpc/ieee1275/openfw.c: Fix typos.
683 (grub_parse_type): New enum.
684 (grub_ieee1275_get_devargs): New function.
685 (grub_ieee1275_get_devname): Likewise.
686 (grub_ieee1275_parse_args): Likewise.
687 (grub_ieee1275_get_filename): Likewise.
688 (grub_ieee1275_encode_devname): Likewise.
689
be369920 6902005-03-30 Marco Gerards <metgerards@student.han.nl>
691
692 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
693 `grub_loader_unset'.
694
a5ce3a4a 6952005-03-26 Hollis Blanchard <hollis@penguinppc.org>
696
697 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
698 instead of grub_ieee1275_interpret.
699 (grub_halt_init): New function.
700 (grub_halt_fini): Likewise.
701 (GRUB_MOD_INIT): Correct message grammar.
702 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
703 instead of grub_ieee1275_interpret.
704 (grub_reboot_init): New function.
705 (grub_reboot_fini): Likewise.
706 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
707 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
708 util/i386/pc/misc.c with commands/ieee1275/halt.c,
709 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
710 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
711 function.
712 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
713 Add prototype.
714 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
715 prototype.
716 (grub_halt): Likewise.
717 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
718 (cmain): Remove __attribute__((unused)).
719 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
720 (grub_heap_len): Likewise.
721 (grub_machine_fini): New function.
722 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
723 (grub_halt): Likewise.
724 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
725 function.
726 * util/powerpc/ieee1275/misc.c: New file.
727
0058f771 7282005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
729
730 * DISTLIST: New file.
731 * gendistlist.sh: Likewise.
732
733 * Makefile.in (COMMON_DISTFILES): Removed.
734 (BOOT_DISTFILES): Likewise.
735 (CONF_DISTFILES): Likewise.
736 (DISK_DISTFILES): Likewise.
737 (FS_DISTFILES): Likewise.
738 (INCLUDE_DISTFILES): Likewise.
739 (KERN_DISTFILES): Likewise.
740 (LOADER_DISTFILES): Likewise.
741 (TERM_DISTFILES): Likewise.
742 (UTIL_DISTFILES): Likewise.
743 (DISTFILES): Likewise.
744 (uninstall): Uninstall files in $(pkgdata_DATA).
745 (DISTLIST): New target.
746 (distdir): Use the contents of the file DISTLIST to get a list of
747 distributed files.
748
46b3b8a5 7492005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
750
751 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
752 descriptor. This is ported from GRUB Legacy.
753
754 * gencmdlist.sh: Added an extra semicolon to make it work with
755 old sed versions. Reported by Robert Bihlmeyer
756 <robbe@orcus.priv.at>.
757
5822ff87 7582005-03-08 Yoshinori Okuji <okuji@enbug.org>
759
760 Automatic loading of commands is supported.
761
762 * normal/main.c (read_command_list): New function.
763 (grub_normal_execute): Call read_command_list.
764
765 * normal/command.c (grub_register_command): Return zero or CMD.
766 Allocate CMD->NAME from the heap.
767 Initialize CMD->MODULE_NAME to zero.
768 Find the same name as well. If the same command is found and it is
769 a dummy command, overwrite members. If it is not a dummy command,
770 return zero.
771 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
772 (grub_command_find): If a dummy command is found, load a module
773 and retry to find a command only once.
774
775 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
776 make sure that each command is loaded.
777
778 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
779 macro.
780 (struct grub_command): Remove const from the member `name'.
781 Add a new member `module_name'.
782 (grub_register_command): Return grub_command_t.
783
784 * commands/help.c (grub_cmd_help): Call grub_command_find to make
785 sure that each command is loaded.
786
787 * genmk.rb (PModule::rule): Specify a module name without the
788 suffix ".mod" to gencmdlist.sh.
789
7b1f4b57 7902005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
791
792 * gencmdlist.sh: New file.
793
794 * genmk.rb (PModule::rule): Generate a rule for a command list.
795 Clean command.lst.
796 Generate command.lst from $(COMMANDFILES).
797
798 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
799 (DATA): Added $(pkgdata_DATA).
800 (install-local): Install files in $(pkgdata_DATA).
801
062aaf39 8022005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
803
804 * term/i386/pc/vga.c (debug_command): Removed.
805 (GRUB_MOD_INIT): Do not register the command "debug".
806
807 From Hollis Blanchard:
808 * commands/configfile.c: New file.
809 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
810 commands/configfile.c.
811 (pkgdata_MODULES): Added configfile.mod.
812 (configfile_mod_SOURCES): New variable.
813 (configfile_mod_CFLAGS): Likewise.
814 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
815 commands/configfile.c.
816 (pkgdata_MODULES): Added configfile.mod.
817 (configfile_mod_SOURCES): New variable.
818 (configfile_mod_CFLAGS): Likewise.
819 * util/grub-emu.c (main): Call grub_configfile_init and
820 grub_configfile_fini.
821 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
822 prototype.
823 [GRUB_UTIL] (grub_configfile_fini): Likewise.
824
cee01aa6 8252005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
826
827 * normal/arg.c (grub_arg_show_help): Do not show the bug report
828 address.
829
830 * commands/help.c (grub_cmd_help): Do not print newlines after
831 the last command in print_command_help.
832
93f3a1d8 8332005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
834
835 * commands/default.h: New file.
836 * commands/timeout.h: Likewise.
837 * normal/context.c: Likewise.
838
839 * util/misc.c: Do not include sys/times.h.
840 Include sys/time.h and grub/machine/time.h.
841 (grub_get_rtc): Rewritten with gettimeofday.
842
843 * util/grub-emu.c (main): Call grub_default_init and
844 grub_timeout_init before grub_normal_init, and call
845 grub_timeout_fini and grub_default_fini after grub_main.
846
847 * util/console.c (grub_ncurses_checkkey): Return the read
848 character or -1.
849
850 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
851 timeouts.
852
853 * normal/main.c (read_config_file): Push MENU. If this fails,
854 print an error and wait for a user input.
855 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
856 If a menu is empty or an error occurs, pop MENU.
857 (grub_normal_execute): Pop and free MENU after grub_menu_run
858 returns.
859
860 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
861
862 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
863 include time.h.
864 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
865 without GRUB_UTIL.
866 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
867 time.h.
868 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
869 without GRUB_UTIL.
870
871 * include/grub/normal.h (struct grub_menu_list): New struct.
872 (grub_menu_list_t): New type.
873 (struct grub_context): New struct.
874 (grub_context_t): New type.
875 (grub_register_command): Got rid of EXPORT_FUNC.
876 (grub_unregister_command): Likewise.
877 (grub_context_get): New prototype.
878 (grub_context_get_current_menu): Likewise.
879 (grub_context_push_menu): Likewise.
880 (grub_context_pop_menu): Likewise.
881 [GRUB_UTIL] (grub_default_init): Likewise.
882 [GRUB_UTIL] (grub_default_fini): Likewise.
883 [GRUB_UTIL] (grub_timeout_init): Likewise.
884 [GRUB_UTIL] (grub_timeout_fini): Likewise.
885
886 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
887 commands/timeout.c and normal/context.c.
888 (pkgdata_MODULES): Added default.mod and timeout.mod.
889 (normal_mod_SOURCES): Added normal/context.c.
890 (default_mod_SOURCES): New variable.
891 (default_mod_CFLAGS): Likewise.
892 (timeout_mod_SOURCES): Likewise.
893 (timeout_mod_CFLAGS): Likewise.
894 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
895 conf/i386-pc.rmk.
896 (pkgdata_MODULES): Added default.mod and timeout.mod.
897 (normal_mod_SOURCES): Added normal/context.c.
898 (default_mod_SOURCES): New variable.
899 (default_mod_CFLAGS): Likewise.
900 (timeout_mod_SOURCES): Likewise.
901 (timeout_mod_CFLAGS): Likewise.
902
903 * Makefile.in (all-local): Added $(MKFILES).
904
4ed2e1dd 9052005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
906
907 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
908 (grub_emu_SOURCES): Likewise.
909 (pkgdata_MODULES): Add `sun.mod'.
910 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
911 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
912 `partmap/sun.c'.
913 (pkgdata_MODULES): Add `sun.mod'.
914 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
915 * include/grub/partition.h (grub_sun_partition_map_init): New
916 prototype.
917 (grub_sun_partition_map_fini): Likewise.
918 * partmap/sun.c: New file.
919 * util/grub-emu.c (main): Initialize and de-initialize the sun
920 partitionmap support.
921
4d4e372e 9222005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
923
924 This implements an Emacs-like menu entry editor.
925
926 * normal/menu_entry.c: New file.
927
928 * util/console.c (grub_ncurses_putchar): Translate some Unicode
929 characters to ASCII.
930 (saved_char): New variable.
931 (grub_ncurses_checkkey): Rewritten completely.
932 (grub_ncurses_getkey): Likewise.
933 (grub_ncurses_init): Call raw instead of cbreak.
934
935 * normal/menu.c (print_entry): Do not put a space.
936 (init_page): Renamed to ...
937 (grub_menu_init_page): ... this. All callers changed.
938 (edit_menu_entry): Removed.
939 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
940
941 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
942
943 * kern/misc.c (grub_vprintf): Call grub_refresh.
944
945 * normal/menu.c (DISP_LEFT): Renamed to ...
946 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
947 * normal/menu.c (DISP_UP): Renamed to ...
948 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
949 * normal/menu.c (DISP_RIGHT): Renamed to ...
950 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
951 * normal/menu.c (DISP_DOWN): Renamed to ...
952 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
953 * normal/menu.c (DISP_HLINE): Renamed to ...
954 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
955 * normal/menu.c (DISP_VLINE): Renamed to ...
956 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
957 * normal/menu.c (DISP_UL): Renamed to ...
958 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
959 * normal/menu.c (DISP_UR): Renamed to ...
960 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
961 * normal/menu.c (DISP_LL): Renamed to ...
962 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
963 * normal/menu.c (DISP_LR): Renamed to ...
964 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
965 * normal/menu.c (TERM_WIDTH): Renamed to ...
966 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
967 * normal/menu.c (TERM_HEIGHT): Renamed to ...
968 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
969 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
970 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
971 * normal/menu.c (TERM_MARGIN): Renamed to ...
972 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
973 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
974 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
975 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
976 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
977 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
978 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
979 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
980 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
981 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
982 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
983 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
984 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
985 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
986 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
987 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
988 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
989 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
990 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
991 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
992 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
993 All callers changed.
994
995 * include/grub/normal.h: New prototype.
996
997 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
998 normal/menu_entry.c.
999 (normal_mod_SOURCES): Likewise.
1000 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1001 (normal_mod_SOURCES): Likewise.
1002
e6b92c8a 10032005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
1004
1005 * include/grub/normal.h (grub_halt_init): New prototype.
1006 (grub_halt_fini): Likewise.
1007 (grub_reboot_init): Likewise.
1008 (grub_reboot_fini): Likewise.
1009
1010 * util/grub-emu.c: Include signal.h.
1011 (main_env): New global variable.
1012 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
1013 catch C-c.
1014 (grub_machine_fini): New function.
1015 (main): Call grub_halt_init and grub_reboot_init before
1016 grub_main, and grub_reboot_fini and grub_halt_fini after it.
1017 Call setjmp with MAIN_ENV to go back afterwards.
1018 Call grub_machine_fini right before return.
1019
1020 * include/grub/util/misc.h: Include setjmp.h.
1021 (main_env): New prototype.
1022
1023 * include/grub/kernel.h (grub_machine_fini): New prototype.
1024 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
1025 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
1026
1027 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
1028 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
1029 * term/i386/pc/console.c (grub_console_fini): Likewise.
1030
1031 * util/i386/pc/misc.c: New file.
1032
1033 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1034 util/i386/pc/misc.c, commands/i386/pc/halt.c and
1035 commands/i386/pc/reboot.c.
1036
c642636f 10372005-02-14 Guillem Jover <guillem@hadrons.org>
1038
1039 * include/grub/dl.h (grub_dl_check_header): New prototype.
1040 (grub_arch_dl_check_header): Change return type to grub_err_t,
1041 remove size parameter and export function. Update all callers.
1042 * kern/dl.c (grub_dl_check_header): New function.
1043 (grub_dl_load_core): Use `grub_dl_check_header' instead of
1044 `grub_arch_dl_check_header'. Check ELF type. Check if sections
1045 are inside the core.
1046 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
1047 independent ELF header checks.
1048 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
1049 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
1050 `grub_dl_check_header' instead of explicit checks. Check for the
1051 ELF type.
1052 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
1053 `grub_dl_check_header' instead of explicit checks. Remove arch
1054 specific ELF header checks.
1055
e6b92c8a 1056 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
1057 argument SIZE.
1058
5eabe94b 10592005-02-13 Hollis Blanchard <hollis@penguinppc.org>
1060
1061 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
1062 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
1063
1b14a681 10642005-02-12 Hollis Blanchard <hollis@penguinppc.org>
1065
1066 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
1067 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1068 (part_map_iterate): Clear `grub_errno' and return 0 if
1069 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1070 * partmap/amiga.c (amiga_partition_map_iterate): Return
1071 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
1072 * partmap/apple.c (apple_partition_map_iterate): Likewise.
1073
aca108aa 10742005-02-01 Guillem Jover <guillem@hadrons.org>
1075
1076 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
1077 help info.
1078
c9f9c556 10792005-01-31 Marco Gerards <metgerards@student.han.nl>
1080
1081 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
1082 Removed prototype.
1083 (grub_rescue_cmd_linux): New prototype.
1084 (grub_rescue_cmd_initrd): Likewise.
1085 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
1086 `bi_rec'.
1087 (grub_linux_release_mem): Release the memory for the initrd.
1088 (grub_load_linux): Renamed from this...
1089 (grub_rescue_cmd_linux): ...To this. Changed all callers.
1090 Changed `entry' not to be static. Loop over memory regions to
1091 find another one when the default fails.
1092 (grub_rescue_cmd_initrd): New function.
1093 (grub_linux_init): Remove function.
1094 (grub_linux_fini): Likewise.
1095 (GRUB_MOD_INIT): Register `initrd'.
1096 (GRUB_MOD_FINI): Unregister `initrd'.
1097 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
1098 Function removed.
1099 (grub_linux_normal_fini): Likewise.
1100 (GRUB_MOD_INIT): Register `initrd'.
1101 (GRUB_MOD_FINI): Unregister `initrd'.
1102
990cf3aa 11032005-01-31 Marco Gerards <metgerards@student.han.nl>
1104
1105 * commands/help.c: New file.
1106 * normal/arg.c (show_help): Renamed to...
1107 (grub_arg_show_help): ... this.
1108 * commands/i386/pc/halt.c: New file.
1109 * commands/i386/pc/reboot.c: Likewise.
1110 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
1111 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
1112 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
1113 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
1114 variables.
1115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1116 `commands/help.c'.
1117 (pkgdata_MODULES): Add `help.mod'.
1118 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
1119 * grub/i386/pc/init.h (grub_reboot): New prototype.
1120 (grub_halt): Likewise.
1121 * include/grub/normal.h (grub_arg_show_help): New prototype.
1122 (grub_help_init): Likewise.
1123 (grub_help_fini): Likewise.
1124 * util/grub-emu.c (main): Initialize and deinitialize the help
1125 command.
1126
1127 * normal/cmdline.c (grub_cmdline_get): Doc fix.
1128
1129 * normal/command.c (grub_command_init): Fixed the description of
1130 the `set' and `unset' commands.
1131
11322005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 1133
1134 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
1135 function.
1136 * commands/ieee1275/halt.c: New file.
1137 * commands/ieee1275/reboot.c: Likewise.
1138 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
1139 `__attribute__ ((unused))'. Some GCS related fixed.
1140 (grub_suspend_init) [GRUB_UTIL]: Function removed.
1141 (grub_suspend_fini): Likewise.
1142 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
1143 and `halt.mod'.
1144 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
1145 (halt_mod_CFLAGS): New variables.
1146 * include/grub/powerpc/ieee1275/ieee1275.h
1147 (grub_ieee1275_interpret): New prototype.
1148
1ab09cc7 11492005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
1150
1151 * include/grub/misc.h (memmove): New prototype.
1152 (memcpy): Likewise.
1153
8b8cbdb2 11542005-01-22 Hollis Blanchard <hollis@penguinppc.org>
1155
1156 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
1157 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
1158
e3741a27 11592005-01-22 Marco Gerards <metgerards@student.han.nl>
1160
1161 * kern/misc.c (grub_strndup): Function rewritten.
1162
776bd780 11632005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
1164
1165 * normal/menu.c (TERM_WIDTH): Macro redefined.
1166 (TERM_TOP_BORDER_Y): Likewise.
1167 (draw_border): Replaced while-loop by a for-loop. Make the number
1168 of lines consistent with the number of lines displayed in
1169 print_entries. Added a margin below the rectangle.
1170 (print_entry): Make the entry fit in the rectangle.
1171 (print_entries): Display the scroll arrows next to the right
1172 border.
1173
78026bce 11742005-01-21 Marco Gerards <metgerards@student.han.nl>
1175
1176 * fs/minix.c (grub_minix_find_file): Reserve more space for
1177 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
1178 `grub_strncpy' to copy `path' into it.
1179
67bbaf0f 11802005-01-21 Marco Gerards <metgerards@student.han.nl>
1181
1182 Add the loopback device, a device via which files can be accessed
1183 as devices.
1184
1185 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
1186 (pkgdata_MODULES): Add loopback.mod.
1187 (loopback_mod_SOURCES): New variable.
1188 (loopback_mod_CFLAGS): Likewise.
1189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1190 `disk/loopback.c'.
1191 (pkgdata_MODULES): Add loopback.mod.
1192 (loopback_mod_SOURCES): New variable.
1193 (loopback_mod_CFLAGS): Likewise.
1194 * disk/loopback.c: new file.
1195 * include/grub/normal.h (grub_loop_init): New prototype.
1196 (grub_loop_fini): New prototype.
1197 * util/grub-emu.c (main): Initialize and de-initialize loopback
1198 support.
1199 * include/grub/disk.h (grub_disk_dev_id): Add
1200 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
1201
6f1c18bd 12022005-01-20 Hollis Blanchard <hollis@penguinppc.org>
1203
1204 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
1205 function.
1206 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
1207 (suspend_mod_SOURCES): New variable.
1208 (suspend_mod_CFLAGS): Likewise.
1209 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
1210 New prototype.
1211 * commands/ieee1275/suspend.c: New file.
1212
b38551da 12132005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1214
1215 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
1216 ((unused))' to `__attribute__ ((used))'.
1217 (GRUB_MOD_FINI): Likewise.
1218 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
1219 * genmk.rb (PModule): Assign space to common symbols when linking
1220 modules.
1221
777aff39 12222005-01-20 Marco Gerards <metgerards@student.han.nl>
1223
1224 * include/grub/mm.h (grub_mm_init_region): Change the type of the
1225 `unsigned' arguments to `grub_size_t'.
1226 (grub_malloc): Likewise.
1227 (grub_realloc): Likewise.
1228 (grub_memalign): Likewise.
1229 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
1230 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
1231 * util/misc.c (grub_malloc): Likewise.
1232 (grub_realloc): Likewise.
1233 * kern/mm.c (get_header_from_pointer): Change the casts to
1234 `unsigned' into a cast to `grub_size_t'.
1235
1236 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
1237 point to `currnode' when `currnode' is changed.
1238
1239 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
1240 Schottelius <nico-linux@schottelius.org>.
1241
d0ff18e1 12422005-01-09 Hollis Blanchard <hollis@penguinppc.org>
1243
1244 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
1245 (note_path): Remove variable.
1246 (GRUB_IEEE1275_NOTE_NAME): New macro.
1247 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
1248 (grub_ieee1275_note_hdr): New structure.
1249 (grub_ieee1275_note_desc): Likewise.
1250 (grub_ieee1275_note): Likewise.
1251 (load_note): Remove `dir' argument. All callers updated. Remove
1252 `note_img' and `path'. Do not load a file from `note_path'.
1253 Initialize a struct grub_ieee1275_note and write that to `out'.
1254 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
1255
4ca7004c 12562005-01-05 Marco Gerards <metgerards@student.han.nl>
1257
1258 * util/misc.c (grub_util_read_image): Revert last change. It
1259 called `grub_util_read_at', which seeks from the beginning of the
1260 file.
1261
0b412211 12622005-01-04 Hollis Blanchard <hollis@penguinppc.org>
1263
1264 * TODO: Add note about endianness in grub-mkimage.
1265 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
1266 section.
1267 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
1268 (grub_mkimage_SOURCES): New target.
1269 * include/grub/kernel.h (grub_start_addr): Remove variable.
1270 (grub_end_addr): Likewise.
1271 (grub_total_module_size): Likewise.
1272 (grub_kernel_image_size): Likewise.
1273 (GRUB_MODULE_MAGIC): New constant.
1274 (grub_module_info): New structure.
1275 (grub_arch_modules_addr): New prototype.
1276 (grub_get_end_addr): Remove prototype.
1277 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
1278 * include/grub/powerpc/ieee1275/kernel.h: New file.
1279 * include/grub/util/misc.h (grub_util_get_fp_size): New
1280 prototype.
1281 (grub_util_read_at): Likewise.
1282 (grub_util_write_image_at): Likewise.
1283 * kern/main.c (grub_get_end_addr): Remove function.
1284 (grub_load_modules): Call grub_arch_modules_addr instead of using
1285 grub_end_addr. Look for a grub_module_info struct in memory. Use
1286 the grub_module_info fields instead of calling grub_get_end_addr
1287 as loop conditions. Move grub_add_unused_region code here.
1288 (grub_add_unused_region): Remove function.
1289 * kern/i386/pc/init.c: Include grub/cache.h.
1290 (grub_machine_init): Remove call to grub_get_end_addr. Remove
1291 one call to add_mem_region.
1292 (grub_arch_modules_addr): New function.
1293 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
1294 (grub_total_module_size): Likewise.
1295 Include grub/machine/kernel.h.
1296 (grub_arch_modules_addr): New function.
1297 * util/grub-emu.c (grub_end_addr): Remove variable.
1298 (grub_total_module_size): Likewise.
1299 (grub_arch_modules_addr): New function.
1300 * util/misc.c: Include unistd.h.
1301 (grub_util_get_fp_size): New function.
1302 (grub_util_read_at): Likewise.
1303 (grub_util_write_image_at): Likewise.
1304 (grub_util_read_image): Call grub_util_read_at.
1305 (grub_util_write_image): Call grub_util_write_image_at.
1306 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
1307 additional memory in kernel_img for a struct grub_module_info.
1308 Fill in that grub_module_info.
1309 * util/powerpc/ieee1275/grub-mkimage.c: New file.
1310
458786f8 13112005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1312
1313 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
1314 New function.
1315 * include/grub/powerpc/ieee1275/ieee1275.h
1316 (grub_ieee1275_milliseconds): New prototype.
1317 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
1318 Change to 1000.
1319 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
1320 grub_ieee1275_milliseconds.
1321
ac507d1b 13222005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1323
1324 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
1325 variable.
1326 (find_options): New function.
1327 (cmain): Call find_options.
1328 * include/grub/powerpc/ieee1275/ieee1275.h
1329 (grub_ieee1275_realmode): New extern variable.
1330 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
1331 grub_map if grub_ieee1275_realmode is false.
1332
6b8fd1c4 13332004-12-29 Marco Gerards <metgerards@student.han.nl>
1334
1335 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
1336 lines are inserted and make it work like readline. Reported by
1337 Vincent Pelletier <subdino2004@yahoo.fr>.
1338
8514a1e0 13392004-12-28 Marco Gerards <metgerards@student.han.nl>
1340
1341 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
1342
1343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
1344 `kern/powerpc/cache.S'.
1345
924b6140 13462004-12-27 Marco Gerards <metgerards@student.han.nl>
1347
1348 * genmk.rb: Handle the `Program' class in the main loop. Written
1349 by Johan Rydberg <jrydberg@gnu.org>.
1350 (Program): New class.
1351 (programs): New variable.
1352 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
1353 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
1354 instead of "grub/kernel.h". Include <grub/machine/init.h>.
1355 (help_arch): Function removed.
1356 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
1357 `powerpc/libgcc.h' and `loader.h'.
1358 (pkgdata_PROGRAMS): New variable.
1359 (sbin_UTILITIES): Variable removed.
1360 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
1361 (grubof_SOURCES): Variable re-defined so it only includes the
1362 core functionality.
1363 (grubof_CFLAGS): Remove `-DGRUBOF'.
1364 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
1365 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
1366 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
1367 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
1368 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
1369 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
1370 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
1371 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
1372 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
1373 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
1374 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1375 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
1376 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
1377 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
1378 (pc_mod_CFLAGS): New variables.
1379 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
1380 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
1381 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
1382 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
1383 Moved from here...
1384 * include/grub/i386/pc/init.h (grub_os_area_addr)
1385 (rub_os_area_size): ... to here.
1386 * include/grub/powerpc/ieee1275/ieee1275.h
1387 (grub_ieee1275_entry_fn): Export symbol.
1388 * include/grub/powerpc/ieee1275/init.h: New file.
1389 * include/grub/powerpc/libgcc.h: Likewise.
1390 * include/grub/cache.h: Likewise.
1391 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
1392 <hollis@penguinppc.org>.
1393 * kern/dl.c: Include <grub/cache.h>.
1394 (grub_dl_flush_cache): New function.
1395 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
1396 for this module.
1397 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
1398 (grub_console_init): Removed prototypes.
1399 (grub_machine_init): Don't initialize the modules anymore.
1400 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
1401 static.
1402 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
1403 Macro undef removed.
1404 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
1405 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
1406 relocation `R_PPC_REL32'. Return an error when the relocation is
1407 unknown.
1408 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
1409 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
1410 * util/misc.c (grub_arch_sync_caches): Likewise.
1411
e4b47e0c 14122004-12-19 Marco Gerards <metgerards@student.han.nl>
1413
1414 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
1415 `symlist.c', add `grubof_symlist.c'.
1416 (symlist.c): Variable removed.
1417 (grubof_HEADERS): Variable added.
1418 (grubof_symlist.c): New target.
1419 (kernel_syms.lst): Use `grubof_HEADERS' instead of
1420 `kernel_img_HEADERS'.
1421 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
1422 * kern/powerpc/dl.c: New file.
1423 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
1424 Function removed.
1425 (grub_arch_dl_relocate_symbols): Likewise.
1426 (grub_register_exported_symbols): Likewise.
1427
4ceb3636 14282004-12-13 Marco Gerards <metgerards@student.han.nl>
1429
1430 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
1431 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
1432 to fail instead. Reported by Vincent Pelletier
1433 <subdino2004@yahoo.fr>.
1434
1435 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
1436 it is not allocated. Reported by Vincent Pelletier
1437 <subdino2004@yahoo.fr>.
1438
1439 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
1440 output so the output looks better.
1441
3f1578fe 14422004-12-04 Marco Gerards <metgerards@student.han.nl>
1443
1444 Modulize the partition map support and add support for the amiga
1445 partition map.
1446
1447 * commands/ls.c: Include <grub/partition.h> instead of
1448 <grub/machine/partition.h>.
1449 * kern/disk.c: Likewise.
1450 * kern/rescue.c: Likewise.
1451 * loader/i386/pc/chainloader.c: Likewise.
1452 * normal/cmdline.c: Likewise.
1453 * kern/powerpc/ieee1275/init.c: Likewise.
1454 (grub_machine_init): Call `grub_pc_partition_map_init',
1455 `grub_amiga_partition_map_init' and
1456 `grub_apple_partition_map_init'.
1457 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
1458 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
1459 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
1460 `partition.h' and `pc_partition.h'.
1461 (grub_setup_SOURCES): Remove
1462 `disk/i386/pc/partition.c'. Add `kern/partition.c',
1463 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
1464 (grub_emu_SOURCES): Likewise.
1465 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
1466 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
1467 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
1468 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
1469 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
1470 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
1471 (grubof_SOURCES): Likewise.
1472 * disk/i386/pc/partition.c: File removed.
1473 * disk/powerpc/ieee1275/partition.c: Likewise.
1474 * include/grub/powerpc/ieee1275/partition.h: Likewise.
1475 * include/grub/i386/pc/partition.h: Likewise.
1476 * kern/partition.c: New file.
1477 * partmap/amiga.c: Likewise.
1478 * partmap/apple.c: Likewise.
1479 * partmap/pc.c: Likewise.
1480 * include/grub/partition.h: Likewise..
1481 * include/grub/pc_partition.h: Likewise.
1482 * util/grub-emu.c: Include <grub/partition.h> instead of
1483 <grub/machine/partition.h>.
1484 (main): Call `grub_pc_partition_map_init',
1485 `grub_amiga_partition_map_init' and
1486 `grub_apple_partition_map_init' and deinitialize afterwards.
1487 * util/i386/pc/biosdisk.c: Include `#include
1488 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
1489 `<grub/machine/partition.h>'.
1490 * util/i386/pc/grub-setup.c: Likewise.
1491 * util/i386/pc/biosdisk.c: Likewise.
1492 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
1493 partition information in case of a PC partition.
1494 * util/i386/pc/grub-setup.c: Include `#include
1495 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
1496 `<grub/machine/partition.h>'.
1497 (setup): Only access the PC specific partition information in case
1498 of a PC partition.
1499
0ef4ced9 15002004-11-17 Hollis Blanchard <hollis@penguinppc.org>
1501
1502 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
1503 (grub_longjmp): Likewise.
1504 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
1505 20.
1506 * normal/powerpc/setjmp.S: New file.
1507 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
1508 `normal/powerpc/setjmp.S'.
1509 (grubof_CFLAGS): Add `-DGRUBOF'.
1510 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
1511 [GRUB_UTIL && !GRUBOF].
1512
19950e29 15132004-11-16 Marco Gerards <metgerards@student.han.nl>
1514
1515 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
1516 property named `name'. Correctly handle the error returned by
1517 `grub_ieee1275_finddevice' if a device can not be opened.
1518
a2fea427 15192004-11-02 Hollis Blanchard <hollis@penguinppc.org>
1520
1521 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
1522 `actual' for negativity.
1523 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
1524 kern/fshelp.c.
1525
41ea0ea3 15262004-11-01 Marco Gerards <metgerards@student.han.nl>
1527
1528 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
1529 (PAGE_OFFSET): New macro.
1530 (CRTC_ADDR_PORT): Likewise.
1531 (CRTC_DATA_PORT): Likewise.
1532 (START_ADDR_HIGH_REGISTER): Likewise.
1533 (START_ADDR_LOW_REGISTER): Likewise.
1534 (GRAPHICS_ADDR_PORT): Likewise.
1535 (GRAPHICS_DATA_PORT): Likewise.
1536 (READ_MAP_REGISTER): Likewise.
1537 (INPUT_STATUS1_REGISTER): Likewise.
1538 (INPUT_STATUS1_VERTR_BIT): Likewise.
1539 (page): New variable.
1540 (wait_vretrace): New function.
1541 (set_read_map): Likewise.
1542 (set_start_address): Likewise.
1543 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
1544 the right page.
1545 (check_vga_mem): Take the page into account.
1546 (write_char): Likewise.
1547 (write_cursor): Likewise.
1548 (scroll_up): Likewise. Copy the page to the page that is not
1549 shown and switch between both pages.
1550 (grub_vga_putchar): Fix off by one error.
1551 (grub_vga_cls): Wait for the vertical retrace. Take the page into
1552 account.
1553
ad0bd20b 15542004-11-01 Marco Gerards <metgerards@student.han.nl>
1555
1556 Add support for iso9660 (including rockridge).
1557
1558 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
1559 (iso9660_mod_SOURCES): New variable.
1560 (iso9660_mod_CFLAGS): Likewise.
1561 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
1562 * include/grub/fs.h (grub_iso9660_init): New prototype.
1563 * util/grub-emu.c (main): Call `grub_iso9660_init'.
1564 * fs/iso9660.c: New file.
1565
1566 * include/grub/misc.h (grub_strncat): New prototype.
1567 * kern/misc.c (grub_strncat): New function.
1568
1569 * fs/hfs.c (grub_hfs_mount): Translate the error
1570 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
1571 * fs/jfs.c (grub_jfs_mount): Likewise.
1572 * fs/ufs.c (grub_ufs_mount): Likewise.
1573
a5477a59 15742004-10-28 Hollis Blanchard <hollis@penguinppc.org>
1575
1576 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
1577 which initialized BAT registers.
1578 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
1579 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1580 Move from here...
1581 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
1582 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1583 ... to here.
1584 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
1585 (grub_mapclaim): Likewise.
1586 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
1587 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
1588 hand.
1589
9304c1f8 15902004-10-19 Hollis Blanchard <hollis@penguinppc.org>
1591
1592 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
1593 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
1594 -ffreestanding and -msoft-float.
1595
86f4ae25 15962004-10-15 Hollis Blanchard <hollis@penguinppc.org>
1597
1598 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
1599 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
1600 set in grub_ieee1275_flags.
1601
38912228 16022004-10-14 Hollis Blanchard <hollis@penguinppc.org>
1603
1604 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
1605 prototype.
1606 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
1607 grub_console_init first.
1608 Change the memory range used for grub_ieee1275_claim and
1609 grub_mm_init_region.
1610 Print an error message if the claim fails.
1611 Include <grub/misc.h>.
1612
d1923dc8 16132004-10-13 Hollis Blanchard <hollis@penguinppc.org>
1614
1615 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
1616 Call grub_children_iterate for device nodes of type `scsi',
1617 `ide', or `ata'.
1618 (grub_ofdisk_open): Remove manual device alias resolution.
1619 Fix memory leak when device cannot be opened.
1620 * include/grub/powerpc/ieee1275/ieee1275.h
1621 (grub_children_iterate): New prototype.
1622 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
1623 New function.
1624 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1625 Return -1 if args.size was -1.
1626
4512e4f3 16272004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1628
1629 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
1630 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
1631 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
1632 Open Firmware's memory for it; claim memory from _start to _end.
1633 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
1634 (_end): New extern.
1635 (_start): Zero BSS from __bss_start to _end.
1636 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1637 New extern.
1638 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
1639
4d61feb0 16402004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1641
ad0bd20b 1642 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
1643 -1 if args.base was -1.
4d61feb0 1644
026fa2f9 16452004-10-08 Hollis Blanchard <hollis@penguinppc.org>
1646
1647 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
1648 escape sequence instead of a literal ^L. Also call
1649 grub_ofconsole_gotoxy.
1650
9f2220ef 16512004-10-03 Hollis Blanchard <hollis@penguinppc.org>
1652
1653 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
1654 void * arguments to grub_addr_t. All callers updated. Also make
1655 the `result' argument optional.
1656 (grub_ieee1275_release): change void * arguments to grub_addr_t.
1657 All callers updated.
1658
8a572cd7 16592004-09-22 Hollis Blanchard <hollis@penguinppc.org>
1660
1661 * commands/ls.c (grub_ls_list_files): Use the string following the
1662 initial ')', if present, as the filesystem path.
1663 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
1664
1665 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
1666
18aa81f2 16672004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
1668
1669 Make the source code of the menu interface more readable.
1670
1671 * normal/menu.c: Include grub/mm.h.
1672 (TERM_WIDTH): New macro.
1673 (TERM_HEIGHT): Likewise.
1674 (TERM_INFO_HEIGHT): Likewise.
1675 (TERM_MARGIN): Likewise.
1676 (TERM_SCROLL_WIDTH): Likewise.
1677 (TERM_TOP_BORDER_Y): Likewise.
1678 (TERM_LEFT_BORDER_X): Likewise.
1679 (TERM_BORDER_WIDTH): Likewise.
1680 (TERM_MESSAGE_HEIGHT): Likewise.
1681 (TERM_BORDER_HEIGHT): Likewise.
1682 (TERM_NUM_ENTRIES): Likewise.
1683 (TERM_FIRST_ENTRY_Y): Likewise.
1684 (TERM_ENTRY_WIDTH): Likewise.
1685 (TERM_CURSOR_X): Likewise.
1686 (draw_border): Use macros instead of magic numbers.
1687 (print_entry): Likewise.
1688 (print_entries): Likewise.
1689 (run_menu): Likewise. Also, handle the key 'e'.
1690 (run_menu_entry): Ignore empty command lines.
1691 (print_message): Added a new argument EDIT. If EDIT is true,
1692 print a different message.
1693 (init_page): Likewise.
1694 (edit_menu_entry): New function. Not implemented yet.
1695
b47efe30 16962004-09-17 Marco Gerards <metgerards@student.han.nl>
1697
1698 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
1699 can be loaded from normal mode.
1700
1701 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
1702 `multiboot.mod'.
1703 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
1704 (multiboot_mod_CFLAGS): New variables.
1705 * loader/i386/pc/linux_normal.c: New file.
1706 * loader/i386/pc/multiboot_normal.c: Likewise.
1707
1708 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
1709 attribute `unused'.
1710
1711 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
1712 `fdiro' to read the mode information from instead of `diro'.
1713
1714 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
1715 looking up a symlink.
1716
1717 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
1718 macro.
1719 * normal/command.c (grub_command_execute): Don't parse the
1720 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
1721 flags of the command.
1722
1723 * normal/menu.c (grub_menu_run): Fix typo.
1724
da75ac71 17252004-09-14 Hollis Blanchard <hollis@penguinppc.org>
1726
1727 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
1728
1729 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
1730 `y + 1' instead of `y - 1'.
1731
1732 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
1733
062b24c2 17342004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
1735
1736 From Hollis Blanchard <hollis@penguinppc.org>:
1737 * kern/misc.c (memmove): New alias for grub_memmove.
1738 (memcmp): New alias for grub_memcmp.
1739 (memset): New alias for grub_memset.
1740 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1741 Change "int handle" to "grub_ieee1275_phandle_t handle".
1742 * include/grub/powerpc/ieee1275/ieee1275.h
1743 (grub_ieee1275_get_property): Likewise.
1744
8ddad845 17452004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
1746
1747 Added normal mode command `chainloader' as module chain.mod, which
1748 depends on normal.mod and _chain.mod.
1749
1750 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
1751 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
1752 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
1753 Deleted prototype.
1754 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
1755 but arguments parsing moved to ...
1756 (grub_chainloader_cmd): ... here. New function.
1757 * include/grub/i386/pc/chainloader.h: New file.
1758 * loader/i386/pc/chainloader_normal.c: Likewise.
1759
2c1f4ce3 17602004-09-11 Marco Gerards <metgerards@student.han.nl>
1761
1762 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
1763 (grub_mkimage_LDFLAGS): Likewise.
1764 (grub_emu_SOURCES): Likewise.
1765 (kernel_img_HEADERS): Added fshelp.h.
1766 * fs/ext2.c: Include <grub/fshelp.h>.
1767 (FILETYPE_REG): New macro.
1768 (FILETYPE_INO_REG): Likewise.
1769 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
1770 Changed all users.
1771 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
1772 all users.
1773 (grub_fshelp_node): New struct.
1774 (grub_ext2_data): Added member `diropen'. Changed member `inode'
1775 to a pointer.
1776 (grub_ext2_get_file_block): Removed function.
1777 (grub_ext2_read_block): New function.
1778 (grub_ext2_read_file): Replaced parameter `data' by `node'.
1779 This function was written.
1780 (grub_ext2_mount): Read the root inode. Create a diropen struct.
1781 (grub_ext2_find_file): Removed function.
1782 (grub_ext2_read_symlink): New function.
1783 (grub_ext2_iterate_dir): Likewise.
1784 (grub_ext2_open): Rewritten.
1785 (grub_ext2_dir): Rewritten.
1786 * include/grub/fshelp.h: New file.
1787 * fs/fshelp.c: Likewise.
1788
3c52136a 17892004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
1790
1791 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
1792 (print_message): Add a missing newline.
1793 (run_menu): Added timeout support.
1794 (run_menu_entry): New local function.
1795 (grub_menu_run): Added support for booting.
1796
1797 * kern/loader.c (grub_loader_is_loaded): New function.
1798
1799 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
1800 (grub_get_rtc): Exported.
1801
1802 * include/grub/i386/pc/time.h: Include grub/symbol.h.
1803 (grub_get_rtc): Exported.
1804
1805 * include/grub/normal.h (struct grub_command_list): Remove
1806 constant from the member `command'.
1807
1808 * include/grub/loader.h (grub_loader_is_loaded): Declared.
1809
1810 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
1811
1812 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
1813
aa033560 18142004-08-28 Marco Gerards <metgerards@student.han.nl>
1815
1816 Add support for the JFS filesystem.
1817
1818 * fs/jfs.c: New file.
1819 * include/grub/fs.h (grub_jfs_init): New prototype.
1820 (grub_jfs_fini): New prototype.
1821 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
1822 (grub_emu_SOURCES): Likewise.
1823 (pkgdata_MODULES): Add jfs.mod.
1824 (jfs_mod_SOURCES): New variable.
1825 (jfs_mod_CFLAGS): Likewise.
1826 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
1827 (grubof_SOURCES): Likewise.
1828 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
1829
1830 * fs/fat.c (grub_fat_find_dir): Convert the filename little
1831 endian to the host endian.
1832 (grub_fat_utf16_to_utf8): Move function from there...
1833 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
1834 the endianess of the source string anymore.
1835 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
1836
94bc45af 18372004-08-24 Marco Gerards <metgerards@student.han.nl>
1838
1839 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
1840 (grub_boot_fini) [GRUB_UTIL]: Likewise.
1841 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
1842 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
1843
1844 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
1845 (grub_hfs_iterate_dir): Make the function static. Add prototypes
1846 for `node_found' and `it_dir'.
1847 (grub_hfs_dir): Add prototype for `dir_hook'.
1848
1849 * fs/minix.c (grub_minix_get_file_block): Add prototype for
1850 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
1851 and `indir32' to silence a gcc warning.
1852
1853 * include/grub/fs.h (grub_hfs_init): New prototype.
1854 (grub_hfs_fini): Likewise.
1855
1856
97543f08 18572004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
1858
1859 Each disk device has its own id now. This is useful to make use
1860 of multiple disk devices.
1861
1862 * include/grub/disk.h (grub_disk_dev_id): New enum.
1863 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
1864 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
1865
1866 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
1867 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1868
1869 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
1870 GRUB_DISK_DEVICE_OFDISK_ID as an id.
1871
1872 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
1873 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1874
1875 * include/grub/disk.h (struct grub_disk_dev): Added a new member
1876 "id" which is used by the cache manager.
1877
1878 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
1879 of just "GRUB".
1880
64372eb4 18812004-08-18 Marco Gerards <metgerards@student.han.nl>
1882
1883 * fs/hfs.c: New file.
1884 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
1885 (grub_emu_SOURCES): Likewise.
1886 (pkgdata_MODULES): Add hfs.mod.
1887 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
1888 (grubof_SOURCES): Likewise.
1889 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
1890
1891 * include/grub/misc.h (grub_strncasecmp): Add prototype.
1892 * kern/misc.c (grub_strncasecmp): Add function.
1893
cc61b58f 18942004-08-14 Marco Gerards <metgerards@student.han.nl>
1895
1896 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
1897 with parentheses.
1898
1899 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
1900 (grub_ext2_dir): In case the directory entry type is unknown, read
1901 it from the inode.
1902
0ef123f6 19032004-08-02 Peter Bruin <pjbruin@dds.nl>
1904
1905 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
1906 grub_load_linux instead of grub_rescue_cmd_linux as second
1907 argument of grub_rescue_register_command.
1908
1909 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
1910
a447c5df 19112004-07-27 Marco Gerards <metgerards@student.han.nl>
1912
1913 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
1914 function.
1915 * commands/boot.c: Remove the check for `GRUB_UTIL'.
1916 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
1917 `loader/powerpc/ieee1275/linux.c',
1918 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
1919 * include/grub/powerpc/ieee1275/ieee1275.h
1920 (grub_ieee1275_release): New prototype.
1921 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
1922 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
1923 normal, boot, linux and linux_normal.
1924 * loader/powerpc/ieee1275/linux.c: New file.
1925 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1926
5a9e3546 19272004-07-12 Marco Gerards <metgerards@student.han.nl>
1928
1929 * normal/arg.c (grub_arg_parse): Correct error handling after
1930 reallocating the argumentlist (check if `argl' is not null instead
1931 of checking if `args' is not null).
1932 * kern/mm.c (grub_realloc): Return the same pointer when using the
1933 same region, instead of returning the header address.
1934
e15199cb 19352004-07-11 Marco Gerards <metgerards@student.han.nl>
1936
1937 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
1938 one block instead of two when looking for the initial partition.
1939 (grub_partition_probe): Initialize the local variable `p' with 0.
1940 Use base 10 for the grub_strtoul call.
1941 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
1942 need for one local variable.
1943 (grub_strtoul): Don't add the new value to `num', instead of that
1944 just assign it.
1945
020616c2 19462004-07-11 Marco Gerards <metgerards@student.han.nl>
1947
1948 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
1949 (pxeboot_img_SOURCES): New variable.
1950 (pxeboot_img_ASFLAGS): Likewise.
1951 (pxeboot_img_LDFLAGS): Likewise.
1952 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
1953 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
1954 <lode_leroy@hotmail.com>.
1955
6c51eb64 19562004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1957
1958 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
1959 there was no input.
1960
cfb12aff 19612004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1962
1963 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
1964 the history buffer logic.
1965
6eabba74 19662004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1967
1968 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
1969 (FILETYPE_INO_SYMLINK): New macros.
1970 (grub_ext2_find_file): Check if the node is a directory using the
1971 inode stat information instead of using the filetype in the
1972 dirent. Exclude the first character of an absolute symlink.
1973 (grub_ext2_dir): Mask out the filetype part of the mode member of
1974 the inode.
1975
66e19ef8 19762004-05-24 Marco Gerards <metgerards@student.han.nl>
1977
1978 Add support for UFS version 1 and 2. Add support for the minix
1979 filesystem version 1 and 2, both the variants with 14 and 30 long
1980 filenames.
1981
1982 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
1983 fs/minix.c.
1984 (grub_emu_SOURCES): Likewise.
1985 (pkgdata_MODULES): Add ufs.mod and minix.mod.
1986 (ufs_mod_SOURCES): New variable.
1987 (ufs_mod_CFLAGS): Likewise.
1988 (minix_mod_SOURCES): Likewise.
1989 (minix_mod_CFLAGS): Likewise.
1990 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
1991 fs/minix.c.
1992 (grubof_SOURCES): Likewise.
1993 * fs/ufs.c: New file.
1994 * fs/minix.c: New file.
1995 * include/grub/fs.h (grub_ufs_init): New prototype.
1996 (grub_ufs_fini): Likewise.
1997 (grub_minix_init): Likewise.
1998 (grub_minix_fini): Likewise.
1999 * util/grub-emu.c (main): Initialize and deinitialize UFS and
2000 minix fs.
2001
cc2e748a 20022004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
2003
2004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
2005 commands/ls.c, commands/terminal.c, commands/boot.c,
2006 commands/cmp.c and commands/cat.c.
2007 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
2008
2009 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
2010 "env.h"
2011
4b13b216 20122004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2013
2014 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
2015 and grub_, respectively. Because the conversion is trivial and
2016 mechanical, I omit the details here. Please refer to the CVS
2017 if you need more information.
2018
6a142551 20192004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2020
2021 * include/pupa: Renamed to ...
2022 * include/grub: ... this.
2023 * util/i386/pc/pupa-mkimage.c: Renamed to ...
2024 * util/i386/pc/grub-mkimage.c: ... this.
2025 * util/i386/pc/pupa-setup.c: Renamed to ...
2026 * util/i386/pc/grub-setup.c: ... this.
2027 * util/pupa-emu.c: Renamed to ...
2028 * util/grub-emu.c: ... this.
2029
e56cdf21 20302004-03-29 Marco Gerards <metgerards@student.han.nl>
2031
2032 Add support for the newworld apple macintosh (PPC). This has been
2033 tested on the powerbook 2000 only. It only adds support for
2034 generic ieee1275 functions, console and disk support. This should
2035 be easy to port to other architectures with support for Open
2036 Firmware.
2037
2038 * configure.ac: Accept the powerpc as host_cpu. In the case of
2039 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
2040 specific tests are only executed while building for the i386.
2041 Inverse test for crosscompile.
2042 * genmk.rb (Utility): Allow assembler files.
2043 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
2044 * conf/powerpc-ieee1275.rmk: New file.
2045 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
2046 * disk/powerpc/ieee1275/partition.c: Likewise.
2047 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
2048 * include/pupa/powerpc/ieee1275/console.h: Likewise.
2049 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
2050 * include/pupa/powerpc/ieee1275/time.h: Likewise.
2051 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
2052 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
2053 * include/pupa/powerpc/ieee1275/loader.h
2054 * include/pupa/powerpc/setjmp.h: Likewise.
2055 * include/pupa/powerpc/types.h: Likewise.
2056 * kern/powerpc/ieee1275/init.c: Likewise.
2057 * kern/powerpc/ieee1275/openfw.c: Likewise.
2058 * term/powerpc/ieee1275/ofconsole.c: Likewise.
2059
2060 These files were written by Johan Rydberg
2061 (jrydberg@night.trouble.net) and I only modified them slightly.
2062
2063 * boot/powerpc/ieee1275/cmain.c: New file.
2064 * boot/powerpc/ieee1275/crt0.S: Likewise.
2065 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
2066 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2067
8c8cc205 20682004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
2069
2070 * Makefile.in: Update copyright.
2071 * genmodsrc.sh: Likewise.
2072 * gensymlist.sh: Likewise.
2073 * term/i386/pc/vga.c: Indent correctly.
2074
2075 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
2076 bugreporting address.
2077 * util/i386/pc/pupa-setup.c (usage): Likewise,
2078 (main): Call pupa_ext2_init and pupa_ext2_fini.
2079
2080 * fs/fat.c (log2): Renamed to ...
2081 (fat_log2): ... this.
2082 All callers changed.
2083 * kern/misc.c (memcpy): Alias to pupa_memmove.
2084 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
2085 lvalue cast.
2086 * util/console.c (pupa_ncurses_fini): Return 0.
2087
2088 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
2089 Move fail label here.
2090 [__GNU__]: Don't warn when using stat.
2091 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
2092 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
2093 long int. Use strtol instead of strtoul.
2094
db1771cf 20952004-03-14 Marco Gerards <metgerards@student.han.nl>
2096
2097 * commands/boot.c: New file.
2098 * commands/cat.c: Likewise.
2099 * commands/cmp.c: Likewise.
2100 * commands/ls.c: Likewise.
2101 * commands/terminal.c: Likewise.
2102 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
2103 (pupa_register_command): Changed interface to match the new
2104 argument parser.
2105 (pupa_command_execute): Changed (almost rewritten) so it uses
2106 pupa_split_command. Added support for setting variables using the
2107 syntax `foo=bar'.
2108 (rescue_command): Changed to work with the new argument parser.
2109 (terminal_command): Moved from here to commands/terminal.c.
2110 (set_command): New function.
2111 (unset_command): New function.
2112 (insmod_command): New function.
2113 (rmmod_command): New function.
2114 (lsmod_command): New function.
2115 (pupa_command_init): Don't initialize the command terminal
2116 anymore. Initialize the commands set, unset, insmod, rmmod and
2117 lsmod.
2118 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
2119 (kernel_img_HEADERS): Add arg.h and env.h.
2120 (pupa_mkimage_LDFLAGS): Add kern/env.c.
2121 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
2122 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
2123 normal/arg.c.
2124 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
2125 terminal.mod.
2126 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
2127 (boot_mod_SOURCES): New variable.
2128 (terminal_mod_SOURCES): Likewise.
2129 (ls_mod_SOURCES): Likewise.
2130 (cmp_mod_SOURCES): Likewise.
2131 (cat_mod_SOURCES): Likewise.
2132
2133 * normal/arg.c: New file.
2134 * kern/env.c: Likewise.
2135 * include/pupa/arg.h: Likewise.
2136 * include/pupa/env.h: Likewise.
2137 * font/manager.c (font_command): Changed to match argument parsing
2138 interface changes.
2139 (PUPA_MOD_INIT): Likewise.
2140 * hello/hello.c (pupa_cmd_hello): Likewise.
2141 (PUPA_MOD_INIT): Likewise.
2142 * include/pupa/disk.h: Include <pupa/device.h>.
2143 (pupa_print_partinfo): New prototype.
2144 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
2145 (pupa_dl_get_prefix): Likewise.
2146 * include/pupa/misc.h: Include <pupa/err.h>.
2147 (pupa_isgraph): New prototype.
2148 (pupa_isdigit): Likewise.
2149 (pupa_split_cmdline): Likewise.
2150 * include/pupa/normal.h: Include <pupa/arg.h>.
2151 (pupa_command): Changed the prototype of the member `func' to
2152 match the argument parsing interface. Added member `options'.
2153 (pupa_register_command): Updated to match function.
2154 (pupa_arg_parse): New prototype.
2155 (pupa_hello_init) [PUPA_UTIL]: New prototype.
2156 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
2157 (pupa_ls_init) [PUPA_UTIL]: Likewise.
2158 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
2159 (pupa_cat_init) [PUPA_UTIL]: Likewise.
2160 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
2161 (pupa_boot_init) [PUPA_UTIL]: Likewise.
2162 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
2163 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
2164 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
2165 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
2166 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
2167 * kern/disk.c: Include <pupa/file.h>.
2168 (pupa_print_partinfo): New function.
2169 * kern/dl.c: Include <pupa/env.h>.
2170 (pupa_dl_dir): Variable removed.
2171 (pupa_dl_load): Use the environment variable `prefix' instead of
2172 the variable pupa_dl_dir.
2173 (pupa_dl_set_prefix): Function removed.
2174 (pupa_dl_get_prefix): Likewise.
2175 * kern/i386/pc/init.c: Include <pupa/env.h>.
2176 (pupa_machine_init): Use the environment variable `prefix' instead of
2177 using pupa_dl_set_prefix to set the prefix.
2178 * kern/main.c: Include <pupa/env.h>.
2179 (pupa_set_root_dev): Use the environment variable `prefix' instead of
2180 using pupa_dl_get_prefix to get the prefix.
2181 * kern/misc.c: Include <pupa/env.h>.
2182 (pupa_isdigit): New function.
2183 (pupa_isgraph): Likewise.
2184 (pupa_ftoa): Likewise.
2185 (pupa_vsprintf): Added support for printing values of the type
2186 `double'. Make it possible to format variable output when using
2187 formatting like `%1.2%f'.
2188 (pupa_split_cmdline): New function.
2189 * kern/rescue.c: Include <pupa/env.h>.
2190 (next_word): Removed function.
2191 (pupa_rescue_cmd_prefix): Likewise.
2192 (pupa_rescue_cmd_set): New function.
2193 (pupa_rescue_cmd_unset): New function.
2194 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
2195 split the command line instead of splitting it here. Added
2196 support for setting variables using the syntax `foo=bar'. Don't
2197 initialize the prefix command anymore. Initialized the set and
2198 unset commands.
2199 * normal/cmdline.c: Include <pupa/env.h>.
2200 (pupa_tab_complete): Added prototypes for print_simple_completion,
2201 print_partition_completion, add_completion, iterate_commands,
2202 iterate_dev, iterate_part and iterate_dir. Moved code to print
2203 partition information from here to kern/disk.c.
2204 (pupa_cmdline_run): Don't check if the funtion exists anymore.
2205 * normal/main.c: Include <pupa/env.h>.
2206 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
2207 instead of using pupa_dl_get_prefix to get the prefix.
2208 * term/i386/pc/vga.c: Include <pupa/arg.h>.
2209 (check_vga_mem): Cast pointers to `void *' to silence a gcc
2210 warning.
2211 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
2212 (pupa_vga_setcolor): Declare unused variables with `__attribute__
2213 ((unused))' to silence a gcc warning.
2214 (pupa_vga_setcolor): Likewise.
2215 (debug_command): Changed to match argument parsing
2216 interface changes.
2217 * util/pupa-emu.c: Include <pupa/env.h>.
2218 (options): Added 0's for unused fields to silence a gcc warning.
2219 (argp): Likewise.
2220 (main): Use the environment variable `prefix' instead of using
2221 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
2222 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
2223 and terminal.
2224
2225 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
2226 * util/misc.c: Include <malloc.h>.
2227 (pupa_malloc): Rewritten so errors are correctly reported.
2228 (pupa_realloc): Likewise.
2229 (pupa_memalign): Likewise.
2230 (pupa_mm_init_region): Declare unused variables with
2231 `__attribute__ ((unused))' to silence a gcc warning.
2232 * normal/i386/setjmp.S: Remove tab at the end of the file to
2233 silence a gcc warning.
2234 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
2235 variables with `__attribute__ ((unused))' to silence a gcc
2236 warning.
2237 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
2238 local variable i unsigned to silence a gcc warning.
2239
2240 * kern/term.c: Include <pupa/misc.h>.
2241 (pupa_more_lines): New variable.
2242 (pupa_more): Likewise.
2243 (pupa_putcode): When the pager is active pause at the end of every
2244 screen.
2245 (pupa_set_more): New function.
2246 * include/pupa/term.h (pupa_set_more): New prototype.
2247
2248
3b1139cb 22492004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
2250
2251 Now this project is GRUB 2 rather than PUPA. The location of
2252 the CVS repository was moved to GRUB's.
2253
2254 * configure.ac: Use bug-grub as the reporting address.
2255 Use GRUB instead of PUPA.
2256 Change the version number to 1.90.
2257
8367695c 22582004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
2259
2260 * genkernsyms.sh: Updated copyright information.
2261 * genmk.rb: Likewise.
2262 * genmodsrc.sh: Likewise.
2263 * gensymlist.sh: Likewise.
2264 * boot/i386/pc/boot.S: Likewise.
2265 * boot/i386/pc/diskboot.S: Likewise.
2266 * disk/i386/pc/biosdisk.c: Likewise.
2267 * disk/i386/pc/partition.c: Likewise.
2268 * font/manager.c: Likewise.
2269 * fs/ext2.c: Likewise.
2270 * fs/fat.c: Likewise.
2271 * include/pupa/boot.h: Likewise.
2272 * include/pupa/device.h: Likewise.
2273 * include/pupa/disk.h: Likewise.
2274 * include/pupa/dl.h: Likewise.
2275 * include/pupa/elf.h: Likewise.
2276 * include/pupa/err.h: Likewise.
2277 * include/pupa/file.h: Likewise.
2278 * include/pupa/font.h: Likewise.
2279 * include/pupa/fs.h: Likewise.
2280 * include/pupa/kernel.h: Likewise.
2281 * include/pupa/loader.h: Likewise.
2282 * include/pupa/misc.h: Likewise.
2283 * include/pupa/mm.h: Likewise.
2284 * include/pupa/net.h: Likewise.
2285 * include/pupa/normal.h: Likewise.
2286 * include/pupa/rescue.h: Likewise.
2287 * include/pupa/setjmp.h: Likewise.
2288 * include/pupa/symbol.h: Likewise.
2289 * include/pupa/term.h: Likewise.
2290 * include/pupa/types.h: Likewise.
2291 * include/pupa/i386/setjmp.h: Likewise.
2292 * include/pupa/i386/types.h: Likewise.
2293 * include/pupa/i386/pc/biosdisk.h: Likewise.
2294 * include/pupa/i386/pc/boot.h: Likewise.
2295 * include/pupa/i386/pc/console.h: Likewise.
2296 * include/pupa/i386/pc/init.h: Likewise.
2297 * include/pupa/i386/pc/kernel.h: Likewise.
2298 * include/pupa/i386/pc/linux.h: Likewise.
2299 * include/pupa/i386/pc/loader.h: Likewise.
2300 * include/pupa/i386/pc/memory.h: Likewise.
2301 * include/pupa/i386/pc/multiboot.h: Likewise.
2302 * include/pupa/i386/pc/partition.h: Likewise.
2303 * include/pupa/i386/pc/time.h: Likewise.
2304 * include/pupa/i386/pc/vga.h: Likewise.
2305 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
2306 * include/pupa/util/getroot.h: Likewise.
2307 * include/pupa/util/misc.h: Likewise.
2308 * include/pupa/util/resolve.h: Likewise.
2309 * kern/device.c: Likewise.
2310 * kern/disk.c: Likewise.
2311 * kern/dl.c: Likewise.
2312 * kern/err.c: Likewise.
2313 * kern/file.c: Likewise.
2314 * kern/fs.c: Likewise.
2315 * kern/loader.c: Likewise.
2316 * kern/main.c: Likewise.
2317 * kern/misc.c: Likewise.
2318 * kern/mm.c: Likewise.
2319 * kern/rescue.c: Likewise.
2320 * kern/term.c: Likewise.
2321 * kern/i386/dl.c: Likewise.
2322 * kern/i386/pc/init.c: Likewise.
2323 * kern/i386/pc/lzo1x.S: Likewise.
2324 * kern/i386/pc/startup.S: Likewise.
2325 * loader/i386/pc/chainloader.c: Likewise.
2326 * loader/i386/pc/linux.c: Likewise.
2327 * loader/i386/pc/multiboot.c: Likewise.
2328 * normal/cmdline.c: Likewise.
2329 * normal/command.c: Likewise.
2330 * normal/main.c: Likewise.
2331 * normal/menu.c: Likewise.
2332 * normal/i386/setjmp.S: Likewise.
2333 * term/i386/pc/console.c: Likewise.
2334 * term/i386/pc/vga.c: Likewise.
2335 * util/console.c: Likewise.
2336 * util/genmoddep.c: Likewise.
2337 * util/misc.c: Likewise.
2338 * util/pupa-emu.c: Likewise.
2339 * util/resolve.c: Likewise.
2340 * util/unifont2pff.rb: Likewise.
2341 * util/i386/pc/biosdisk.c: Likewise.
2342 * util/i386/pc/getroot.c: Likewise.
2343 * util/i386/pc/pupa-mkimage.c: Likewise.
2344 * util/i386/pc/pupa-setup.c: Likewise.
2345
e6eced71 23462004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
2347
2348 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
2349 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
2350 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
2351 reading and reset it after reading.
2352 (pupa_ext2_close): Return PUPA_ERR_NONE.
2353
2354 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
2355 Correct value.
2356 (struct linux_kernel_header): Add kernel_version and
2357 initrd_addr_max.
2358 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
2359 pupa_file_read succeeds.
2360 (pupa_rescue_cmd_initrd): Implement.
2361
5aded270 23622003-12-03 Marco Gerards <metgerards@student.han.nl>
2363
2364 * fs/ext2.c (pupa_ext2_label): New function.
2365 (pupa_ext2_fs): Added label.
2366 * fs/fat.c (pupa_fat_label): New function.
2367 (pupa_fat_fs): Added label.
2368 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
2369
2370 * kern/misc.c (pupa_strndup): New function.
2371 * include/pupa/misc.h (pupa_strndup): New prototype.
2372
2373 * include/pupa/normal.h: Include <pupa/err.h>.
2374 (pupa_set_history): New prototype.
2375 (pupa_iterate_commands): New prototype.
2376 * normal/cmdline.c: Include <pupa/machine/partition.h>,
2377 <pupa/disk.h>, <pupa/file.h>.
2378 (hist_size): New variable.
2379 (hist_lines): Likewise.
2380 (hist_end): Likewise.
2381 (hist_used): Likewise.
2382 (pupa_set_history): New function.
2383 (pupa_history_get): Likewise.
2384 (pupa_history_add): Likewise.
2385 (pupa_history_replace): Likewise.
2386 (pupa_tab_complete): Likewise.
2387 (pupa_cmdline_run): Added tab completion and history buffer. Tab
2388 completion shows partitionnames while completing partitions, this
2389 feature was suggested by Jeff Bailey.
2390 * normal/command.c (pupa_iterate_commands): New function.
2391 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
2392 (pupa_normal_init): Initialize history buffer.
2393 (PUPA_MOD_INIT): Likewise.
2394 (pupa_normal_fini): Free the history buffer.
2395 (PUPA_MOD_FINI): Likewise.
2396
2397 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
2398 key.
2399
2400 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
2401 * configure.ac [i386]: Check for regparam bug.
2402 (NESTED_FUNC_ATTR) [! i386]: Defined.
2403
1f7315a3 24042003-11-17 Marco Gerards <metgerards@student.han.nl>
2405
2406 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
2407 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
2408 (pupa_emu_SOURCES): New variable.
2409 (pupa_emu_LDFLAGS): Likewise.
2410 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
2411 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
2412 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
2413 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2414 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
2415 (pupa_jmp_buf): New typedef.
2416 (pupa_setjmp) [PUPA_UTIL]: New macro.
2417 (pupa_longjmp) [PUPA_UTIL]: Likewise.
2418 * include/pupa/term.h (struct pupa_term): New member `refresh'.
2419 (pupa_refresh): New prototype.
2420 * include/pupa/util/getroot.h: New file.
2421 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
2422 it.
2423 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
2424 (pupa_rescue_cmd_cat): Likewise.
2425 (pupa_rescue_cmd_ls): Likewise.
2426 (pupa_rescue_cmd_testload): Likewise.
2427 (pupa_rescue_cmd_lsmod): Likewise.
2428 * normal/cmdline.c (pupa_cmdline_get): Likewise.
2429 * normal/menu.c (run_menu): Likewise.
2430 * kern/term.c (pupa_cls): Likewise.
2431 (pupa_refresh): New function.
2432 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
2433 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2434 * util/console.c: New file.
2435
2436 * util/i386/pc/getroot.c: New file.
2437 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
2438 (pupa_putchar): New function.
2439 (pupa_refresh): Likewise.
2440 (xgetcwd): Function moved to ...
2441 (strip_extra_slashes): Likewise.
2442 (get_prefix): Likewise.
2443 * util/i386/pc/getroot.c: ... here.
2444 (find_root_device): Function moved and renamed to...
2445 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
2446 Changed all callers.
2447 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
2448 and renamed to...
2449 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
2450 Changed all callers.
2451 * util/misc.c (pupa_memalign): New function.
2452 (pupa_mm_init_region): Likewise.
2453 (pupa_register_exported_symbols): Likewise.
2454 (pupa_putchar): Function removed.
2455 * util/pupa-emu.c: New file.
2456
9a5c1ade 24572003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
2458
2459 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
2460 (_multiboot_mod_SOURCES): New variable.
2461 (_multiboot_mod_CFLAGS): Likewise.
2462 * loader/i386/pc/multiboot.c: New file.
2463 * include/pupa/i386/pc/multiboot.h: Likewise.
2464 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
2465 (pupa_multiboot_real_boot): New function.
2466 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
2467 (pupa_multiboot_real_boot): New prototype.
2468 (pupa_rescue_cmd_multiboot): Likewise
2469 (pupa_rescue_cmd_module): Likewise.
2470
2471 * kern/loader.c (pupa_loader_set): Continue when
2472 pupa_loader_unload_func() fails.
2473 (pupa_loader_unset): New function.
2474 * include/pupa/loader.h (pupa_loader_unset): New prototype.
2475
2476 * kern/misc.c (pupa_stpcpy): New function.
2477 * include/pupa/misc.h (pupa_stpcpy): New prototype.
2478
8e72a9c0 24792003-11-12 Marco Gerards <metgerards@student.han.nl>
2480
2481 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
2482 for available extensions.
2483
2484 * include/pupa/i386/pc/time.h: New file.
2485 * kern/disk.c: Include <pupa/machine/time.h>.
2486 (PUPA_CACHE_TIMEOUT): New macro.
2487 (pupa_last_time): New variable.
2488 (pupa_disk_open): Flush the cache when there was a timeout.
2489 (pupa_disk_close): Reset the timer.
2490 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
2491 pupa_currticks.
2492 * util/misc.c: Include <sys/times.h>
2493 (pupa_get_rtc): New function.
2494
c4adbd32 24952003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
2496
2497 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
2498 as blocks.
2499 (pupa_ext2_get_file_block): Use blocks member.
2500
2501 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
2502 first block. Return -1 instead of pupa_errno on error.
2503
bfd30f06 25042003-10-27 Marco Gerards <metgerards@student.han.nl>
2505
2506 * README: In the pupa-mkimage example use _chain instead of chain
2507 and ext2 instead of fat.
2508 * TODO: Replace ext2fs with jfs as an example. Add an item for
2509 adding journal playback for ext2fs.
2510 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
2511 (pkgdata_MODULES): Added ext2.mod.
2512 (ext2_mod_SOURCES): New variable.
2513 (ext2_mod_CFLAGS): Likewise.
2514 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
2515 * include/pupa/misc.h (pupa_strncpy): New prototype.
2516 (pupa_strcat): Likewise.
2517 (pupa_strncmp): Likewise.
2518 * kern/misc.c (pupa_strcat): Enable function.
2519 (pupa_strncpy): New function.
2520 (pupa_strncmp): Likewise.
2521 * fs/ext2.c: New file.
2522
2523 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
2524 when the read failed before retrying.
2525 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
2526 (_FILE_OFFSET_BITS): Likewise.
2527 * configure.ac: Added AC_SYS_LARGEFILE.
2528
98d15063 25292003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
2530
2531 * genmk.rb (PModule#rule): Make sure to get only symbol names
2532 from the output of nm.
2533 Reported by Robert Millan <zeratul2@wanadoo.es>.
2534
18d9c7cd 25352003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
2536
2537 I forgot to check in these changes for a long time. This adds
2538 incomplete support for VGA console, and this is still very
2539 buggy. Also, a lot of consideration is required for I18N,
2540 UNICODE, and VGA font issues. Therefore, assume that this is
2541 such that "better than nothing".
2542
2543 * font/manager.c: New file.
2544 * include/pupa/font.h: Likewise.
2545 * include/pupa/i386/pc/vga.h: Likewise.
2546 * term/i386/pc/vga.c: Likewise.
2547 * util/unifont2pff.rb: Likewise.
2548
2549 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
2550 (pkgdata_MODULES): Added vga.mod and font.mod.
2551 (vga_mod_SOURCES): New variables.
2552 (vga_mod_CFLAGS): Likewise.
2553 (font_mod_SOURCES): Likewise.
2554 (font_mod_CFLAGS): Likewise.
2555
2556 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
2557
2558 * include/pupa/term.h: Include pupa/err.h.
2559 (struct pupa_term): Added init and fini.
2560 Changed the argument of putchar to pupa_uint32_t.
2561
2562 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
2563 (pupa_console_real_putchar): New prototype.
2564 (pupa_console_putchar): Removed.
2565 (pupa_console_checkkey): Exported.
2566 (pupa_console_getkey): Likewise.
2567
2568 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
2569 characters.
2570
2571 * kern/term.c (pupa_term_set_current): Rewritten.
2572 (pupa_putchar): Likewise.
2573 (pupa_putcode): New function.
2574
2575 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
2576 (pupa_console_real_putchar): ... this.
2577 (pupa_vga_set_mode): New function.
2578 (pupa_vga_get_font): Likewise.
2579
2580 * normal/command.c: Include pupa/term.h.
2581 (terminal_command): New function.
2582 (pupa_command_init): Register the command "terminal".
2583
2584 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
2585 (DISP_UP): Likewise.
2586 (DISP_RIGHT): Likewise.
2587 (DISP_DOWN): Likewise.
2588 (DISP_HLINE): Likewise.
2589 (DISP_VLINE): Likewise.
2590 (DISP_UL): Likewise.
2591 (DISP_UR): Likewise.
2592 (DISP_LL): Likewise.
2593 (DISP_LR): Likewise.
2594
2595 * term/i386/pc/console.c (pupa_console_putchar): New function.
2596
977329f5 25972003-02-08 NIIBE Yutaka <gniibe@m17n.org>
2598
2599 * util/resolve.c (pupa_util_resolve_dependencies): BUG
2600 FIX. Reverse the path_list.
2601
2602 * include/pupa/normal.h: Export pupa_register_command and
2603 pupa_unregister_command.
2604
2605 * hello/hello.c (pupa_cmd_hello): New module.
2606 * conf/i386-pc.rmk: Added hello.mod.
2607
1f5ab428 26082003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
2609
2610 * kern/i386/pc/lzo1x.S: New file.
2611
2612 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
2613 (compress_kernel): New variable.
2614 (generate_image): Heavily modified to support compressing a
2615 large part of the core image.
2616
2617 * util/misc.c (pupa_util_read_image): Fix a file descriptor
2618 leak.
2619 (pupa_util_load_image): New function.
2620
2621 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
2622 (pupa_compressed_size): New variable.
2623 (codestart): Enable Gate A20 here.
2624 Decompress the compressed part of the core image.
2625 Rearrange the code to put functions and variables which are
2626 required for initialization in the non-compressed part.
2627 Include lzo1x.S.
2628
2629 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
2630 here.
2631
2632 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
2633
2634 * include/pupa/i386/pc/kernel.h
2635 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
2636 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
2637 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2638 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2639 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
2640
2641 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
2642
2643 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
2644 (Utility#rule): Likewise.
2645
2646 * configure.ac: Check if LZO is available.
2647
ce5bf700 26482003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
2649
2650 * include/pupa/normal.h: New file.
2651 * include/pupa/setjmp.h: Likewise.
2652 * include/pupa/i386/setjmp.h: Likewise.
2653 * normal/cmdline.c: Likewise.
2654 * normal/command.c: Likewise.
2655 * normal/main.c: Likewise.
2656 * normal/menu.c: Likewise.
2657 * normal/i386/setjmp.S: Likewise.
2658
2659 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
2660 (pupa_rescue_cmd_initrd): Likewise.
2661
2662 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
2663 Likewise.
2664
2665 * kern/i386/pc/startup.S (translation_table): New variable.
2666 (translate_keycode): New function.
2667 (pupa_console_getkey): Call translate_keycode.
2668
2669 * kern/rescue.c (attempt_normal_mode): New function.
2670 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
2671 it failed, print a message.
2672
2673 * kern/mm.c (pupa_real_malloc): Print more information when a
2674 free magic is broken.
2675 (pupa_free): If the first free header is not free actually, set
2676 it to P.
2677
2678 * kern/main.c (pupa_load_normal_mode): Just load the module
2679 "normal".
2680 (pupa_main): Don't print the message
2681 "Entering into rescue mode..." here.
2682
2683 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
2684 Declared.
2685 (pupa_rescue_cmd_initrd): Likewise.
2686 (pupa_rescue_cmd_initrd): Likewise.
2687
2688 * include/pupa/symbol.h (FUNCTION): Specify the type.
2689 (VARIABLE): Likewise.
2690
2691 * include/pupa/err.h (pupa_err_t): Added
2692 PUPA_ERR_UNKNOWN_COMMAND.
2693
2694 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
2695 (pupa_dl_get_prefix): Likewise.
2696
2697 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
2698 Added _chain.mod and _linux.mod instead of chain.mod and
2699 linux.mod.
2700 (chain_mod_SOURCES): Renamed to ...
2701 (_chain_mod_SOURCES): ... this.
2702 (chain_mod_CFLAGS): Renamed to ...
2703 (_chain_mod_CFLAGS): ... this.
2704 (linux_mod_SOURCES): Renamed to ...
2705 (_linux_mod_SOURCES): ... this.
2706 (linux_mod_CFLAGS): Renamed to ...
2707 (_linux_mod_CFLAGS): ... this.
2708 (normal_mod_SOURCES): New variable.
2709 (normal_mod_CFLAGS): Likewise.
2710 (normal_mod_ASFLAGS): Likewise.
2711
27122003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
2713
2714 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
2715 possible.
2716
2717 * kern/dl.c (pupa_dl_ref): Refer dependending modules
2718 recursively.
2719 (pupa_dl_unref): Unrefer depending modules recursively.
2720 Don't call pupa_dl_unload implicitly, because PUPA can crash if
2721 a module is unloaded before one depending on that module is
2722 unloaded.
2723 (pupa_dl_unload): Unload depending modules explicitly,
2724 if possible.
2725
c04da074 27262003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
2727
2728 * include/pupa/i386/pc/linux.h: New file.
2729 * loader/i386/pc/linux.c: Likewise.
2730
2731 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
2732 Removed.
2733 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
2734 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
2735 of PUPA_CHAINLOADER_BOOT_SECTOR.
2736
2737 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
2738 (pupa_linux_prot_size): New variable.
2739 (pupa_linux_tmp_addr): Likewise.
2740 (pupa_linux_real_addr): Likewise.
2741 (pupa_linux_boot_zimage): New function.
2742 (pupa_linux_boot_bzimage): Likewise.
2743
2744 * kern/i386/pc/init.c (struct mem_region): New structure.
2745 (MAX_REGIONS): New macro.
2746 (mem_regions): New variable.
2747 (num_regions): Likewise.
2748 (pupa_os_area_addr): Likewise.
2749 (pupa_os_area_size): Likewise.
2750 (pupa_lower_mem): Likewise.
2751 (pupa_upper_mem): Likewise.
2752 (add_mem_region): New function.
2753 (compact_mem_regions): Likewise.
2754 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
2755 the size of the conventional memory and that of so-called upper
2756 memory (before the first memory hole).
2757 Instead of adding each found region to free memory, use
2758 add_mem_region and add them after removing overlaps.
2759 Also, add only 1/4 of the upper memory to free memory. The rest
2760 is used for loading OS images. Maybe this is ad hoc, but this
2761 makes it much easier to relocate OS images when booting.
2762
2763 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
2764 (pupa_enter_rescue_mode): Don't register initrd and module.
2765
2766 * kern/mm.c: Include pupa/dl.h.
2767
2768 * kern/main.c: Include pupa/file.h and pupa/device.h.
2769
2770 * kern/loader.c (pupa_loader_load_module_func): Removed.
2771 (pupa_loader_load_module): Likewise.
2772
2773 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
2774 ``.o''.
2775
2776 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
2777 (pupa_linux_tmp_addr): Likewise.
2778 (pupa_linux_real_addr): Likewise.
2779 (pupa_linux_boot_zimage): Likewise.
2780 (pupa_linux_boot_bzimage): Likewise.
2781
2782 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
2783 (pupa_upper_mem): Likewise.
2784 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
2785 module is too dangerous.
2786
2787 * include/pupa/loader.h (pupa_os_area_addr): Declared.
2788 (pupa_os_area_size): Likewise.
2789 (pupa_loader_set): Remove the first argument. Loader doesn't
2790 manage modules or initrd any longer.
2791 (pupa_loader_load_module): Removed.
2792
2793 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
2794 (linux_mod_SOURCES): New variable.
2795 (linux_mod_CFLAGS): Likewise.
2796
a13f9237 27972003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
2798
2799 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
2800 the length of a blocklist correctly.
2801
2802 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
2803 Use ioctl only if the OS file is a block device.
2804 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
2805 not very useful for normal files.
2806
2807 * kern/main.c (pupa_set_root_dev): New function.
2808 (pupa_load_normal_mode): Likewise.
2809 (pupa_main): Call those above.
2810
2811 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
2812 pupa_uint16_t.
2813
2814 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
2815
a5ffe966 28162003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2817
2818 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
2819 (setup): Configure the installed partition information and the
2820 dl prefix.
2821
2822 * loader/i386/pc/chainloader.c (my_mod): New variable.
2823 (pupa_chainloader_unload): New function.
2824 (pupa_rescue_cmd_chainloader): Refer itself.
2825 (PUPA_MOD_INIT): Save its own module in MY_MOD.
2826
2827 * kern/i386/pc/startup.S (install_partition): Removed.
2828 (version_string): Likewise.
2829 (config_file): Likewise.
2830 (pupa_install_dos_part): New variable.
2831 (pupa_install_bsd_part): Likewise.
2832 (pupa_prefix): Likewise.
2833 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
2834
2835 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
2836 and pupa/misc.h.
2837 (make_install_device): New function.
2838 (pupa_machine_init): Set the dl prefix.
2839
2840 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
2841 (buf): Renamed to ...
2842 (linebuf): ... this.
2843 (pupa_rescue_cmd_prefix): New function.
2844 (pupa_rescue_cmd_insmod): Likewise.
2845 (pupa_rescue_cmd_rmmod): Likewise.
2846 (pupa_rescue_cmd_lsmod): Likewise.
2847 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
2848 rmmod and lsmod.
2849
2850 * kern/mm.c (pupa_memalign): If failed even after invalidating
2851 disk caches, unload unneeded modules and retry.
2852
2853 * kern/misc.c (pupa_memmove): New function.
2854 (pupa_memcpy): Removed.
2855 (pupa_strcpy): New function.
2856 (pupa_itoa): Made static.
2857
2858 * kern/dl.c (pupa_dl_iterate): New function.
2859 (pupa_dl_ref): Likewise.
2860 (pupa_dl_unref): Likewise.
2861 (pupa_dl_unload): Return if succeeded or not.
2862 (pupa_dl_unload_unneeded): New function.
2863 (pupa_dl_unload_all): Likewise.
2864 (pupa_dl_init): Renamed to ...
2865 (pupa_dl_set_prefix): ... this.
2866 (pupa_dl_get_prefix): New function.
2867
2868 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
2869 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
2870 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2871 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2872 (pupa_install_dos_part): Declared.
2873 (pupa_install_bsd_part): Likewise.
2874 (pupa_prefix): Likewise.
2875 (pupa_boot_drive): Likewise.
2876
2877 * include/pupa/types.h: Fix a typo.
2878
2879 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
2880 pupa_memmove.
2881 (pupa_memmove): Declared.
2882 (pupa_strcpy): Likewise.
2883
2884 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
2885 pupa_mod_init takes one argument, its own module.
2886 (pupa_dl_unload_unneeded): Declared.
2887 (pupa_dl_unload_all): Likewise.
2888 (pupa_dl_ref): Likewise.
2889 (pupa_dl_unref): Likewise.
2890 (pupa_dl_iterate): Likewise.
2891 (pupa_dl_init): Renamed to ...
2892 (pupa_dl_set_prefix): ... this.
2893 (pupa_dl_get_prefix): Declared.
2894
2895 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
2896 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
2897 unloaded.
2898 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
2899 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
2900
2901 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
2902 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
2903
012d7999 29042003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2905
2906 * util/i386/pc/pupa-setup.c (setup): Define the internal
2907 function find_first_partition_start at the top level, because GCC
2908 3.0.x cannot compile internal functions in deeper scopes
2909 correctly.
2910 (find_root_device): Use lstat instead of stat.
2911 Don't follow symbolic links.
2912 Fix the path-constructing code.
2913
2914 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
2915 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
2916 by a BLKGETSIZE ioctl first, because block devices don't fill
2917 the member st_mode of the structure stat on Linux.
2918 [__linux__] (linux_find_partition): Use a temporary buffer
2919 REAL_DEV for the working space. Copy it to DEV before returning.
2920 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
2921 buffer cache consistent.
2922 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
2923 strncmp. The previous value was merely wrong.
2924 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
2925
2926 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
2927 FAT size is 12. The previous value was merely wrong.
2928
2929 * kern/main.c (pupa_main): Don't split the starting message from
2930 newlines.
2931
2932 * kern/term.c (pupa_putchar): Put CR after LF instead of before
2933 LF, because BIOS goes crazy about character attributes in this
2934 case.
2935
1cc73a62 29362003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2937
2938 * include/i386/pc/util/biosdisk.h: New file.
2939 * util/i386/pc/biosdisk.c: Likewise.
2940 * util/i386/pc/pupa-setup.c: Likewise.
2941
2942 * Makefile.in (INCLUDE_DISTFILES): Added
2943 include/pupa/i386/pc/util/biosdisk.h.
2944 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
2945 directory util/i386/pc.
2946 (install-local): Added a rule for sbin_UTILITIES.
2947 (uninstall): Likewise.
2948
2949 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
2950
2951 * util/misc.c (xrealloc): New function.
2952 (pupa_malloc): Likewise.
2953 (pupa_free): Likewise.
2954 (pupa_realloc): Likewise.
2955 (pupa_stop): Likewise.
2956 (pupa_putchar): Likewise.
2957
2958 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
2959
2960 * include/pupa/util/misc.h (xrealloc): Declared.
2961
2962 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
2963 macro.
2964 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
2965 (PUPA_BOOT_MACHINE_BPB_END): ... this.
2966
2967 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
2968 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2969
2970 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
2971 way should be implemented.
2972 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2973
2974 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
2975 the size of NAME for safety.
2976 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
2977 0x88.
2978
2979 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
2980 (pupa_setup_SOURCES): Likewise.
2981
2982 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
2983
08b70fe8 29842002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2985
2986 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
2987 bunch of pushl's from pusha, because this destroys the return
2988 value.
2989
62ddcc8f 29902002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2991
2992 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
2993 This means that any missing prototypes could be fatal. Also, you
2994 must take care when writing assembly code. See the comments at
2995 the beginning of startup.S, for more details.
2996
2997 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
2998 compilation mechanism.
2999 (pupa_chainloader_real_boot): Likewise.
3000 (pupa_biosdisk_rw_int13_extensions): Likewise.
3001 (pupa_biosdisk_rw_standard): Likewise.
3002 (pupa_biosdisk_check_int13_extensions): Likewise.
3003 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
3004 (pupa_biosdisk_get_diskinfo_standard): Likewise.
3005 (pupa_get_memsize): Likewise.
3006 (pupa_get_mmap_entry): Likewise.
3007 (pupa_console_putchar): Likewise.
3008 (pupa_console_setcursor): Likewise.
3009 (pupa_getrtsecs): Use pushl instead of push.
3010
3011 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
3012 memory instead of the stack for a mmap entry, because some
3013 BIOSes may ignore the maximum size and overflow.
3014
3015 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
3016
3017 * genmk.rb (PModule#rule): Compile automatically generated
3018 sources with module-specific CFLAGS as well as other sources.
3019
9962ed99 30202002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3021
3022 * configure.ac: Check ld.
3023 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
3024 respectively, before checking endianness and sizes.
3025
3026 * Makefile.in (LD): New variable.
3027
abdfc3c5 30282002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3029
3030 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
3031
6a161fa9 30322002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3033
3034 * Changelog: New file.
3035