]> git.proxmox.com Git - grub2.git/blob - ChangeLog
2008-11-01 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
1 2008-11-01 Robert Millan <rmh@aybabtu.com>
2
3 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4 (TARGET_CPPFLAGS): Likewise.
5 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6
7 2008-11-01 Carles Pina i Estany <carles@pina.cat>
8
9 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
10
11 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
12
13 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
14 addition of objects until the code is not going to be able to fail.
15
16 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
17
18 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
19 (add a missing NULL check, and correct them by moving the pointer
20 operations after the actual check).
21
22 2008-10-29 Robert Millan <rmh@aybabtu.com>
23
24 * util/i386/pc/grub-install.in: Handle empty string as output from
25 make_system_path_relative_to_its_root().
26
27 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
28
29 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
30 circular metadata worst case scenario. If the metadata is circular
31 then copy the wrap in place.
32 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
33 project lib/format_text/layout.h
34 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
35
36 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
37
38 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
39
40 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
41
42 * util/update-grub_lib.in: Mention filename in warning message.
43
44 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
45
46 * NEWS: Update for rename of update-grub to grub-mkconfig.
47
48 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
49
50 * util/update-grub_lib.in: Copy to ...
51 * util/grub-mkconfig_lib.in: ... this. Update all users.
52 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
53 * util/update-grub.in: Rename to ...
54 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
55 option. Add `--output' option to allow users to specify the generated
56 configuration file. Default to stdout.
57 (update_grub_dir): Rename to ...
58 (grub_mkconfig_dir): ... this.
59 (grub_cfg): Default to an empty string.
60 * conf/common.rmk (update-grub): Rename to ...
61 (grub-mkconfig): ... this.
62 (update-grub_lib): Copy to ...
63 (grub-mkconfig_lib): ... this.
64 (update-grub_SCRIPTS): Copy to ...
65 (grub-mkconfig_SCRIPTS): ... this. Update all users.
66 (update-grub_DATA): Rename to ...
67 (grub-mkconfig_DATA): ... this.
68
69 2008-09-28 Robert Millan <rmh@aybabtu.com>
70
71 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
72 to `modified'. Add the real `created' field.
73 (grub_iso9660_uuid): Use `modified' rather than `created' for
74 constructing the UUID.
75
76 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
77
78 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
79 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
80
81 2008-09-28 Bean <bean123ch@gmail.com>
82
83 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
84 Thanks to Christian Franke for finding this bug.
85
86 2008-09-25 Robert Millan <rmh@aybabtu.com>
87
88 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
89 instances of grub_util_get_disk_name() (see previous commit).
90
91 2008-09-25 Robert Millan <rmh@aybabtu.com>
92
93 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
94 `util/i386/get_disk_name.c'.
95 * conf/i386-efi.rmk: Likewise.
96 * conf/x86_64-efi.rmk: Likewise.
97 * conf/i386-coreboot.rmk: Likewise.
98 * conf/i386-ieee1275.rmk: Likewise.
99 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
100 `util/ieee1275/get_disk_name.c'.
101 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
102 * util/ieee1275/get_disk_name.c: Remove file.
103 * util/i386/get_disk_name.c: Remove file.
104 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
105 "hd%d" for device.map entries, rather than using
106 grub_util_get_disk_name().
107
108 2008-09-24 Carles Pina i Estany <carles@pina.cat>
109
110 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
111 warning.
112 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
113
114 2008-09-24 Carles Pina i Estany <carles@pina.cat>
115
116 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
117 Changed to 0x5100.
118 (GRUB_TERM_PPAGE): Changed to 0x4900.
119
120 2008-09-24 Robert Millan <rmh@aybabtu.com>
121
122 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
123 macros (they were i386-pc specific).
124 * include/grub/sparc64/ieee1275/console.h: Likewise.
125 * include/grub/efi/console.h: Likewise.
126
127 2008-09-22 Bean <bean123ch@gmail.com>
128
129 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
130 resident and in attribute list.
131
132 * include/grub/ntfs.h (BMP_LEN): Removed.
133
134 2008-09-22 Bean <bean123ch@gmail.com>
135
136 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
137 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
138
139 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
140 error occurs, as grub_disk_open will call grub_disk_close, which will
141 call p->close (scsi).
142
143 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
144
145 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
146 (AC_PREREQ): Bumped to 2.59.
147 (AC_TRY_COMPILE): Replace obsolete macro with ...
148 (AC_COMPILE_IFELSE): ... this.
149 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
150 (AC_LINK_IFELSE): ... this.
151
152 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
153
154 * autogen.sh: Add a call to `gendistlist.sh'.
155
156 2008-09-19 Christian Franke <franke@computer.org>
157
158 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
159 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
160 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
161 Export __enable_execute_stack() to modules.
162 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
163 New function.
164
165 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
166
167 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
168 Sort the list.
169
170 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
171
172 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
173 #include <grub/util/hostdisk.h>.
174
175 2008-09-08 Robert Millan <rmh@aybabtu.com>
176
177 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
178 segments when their filesz is zero (grub_file_read() interprets
179 zero-size as "read until EOF", which results in memory corruption).
180 Use `lowest_segment' rather than 0 for calculating the current
181 segment load address.
182
183 2008-09-08 Robert Millan <rmh@aybabtu.com>
184
185 * util/hostdisk.c (open_device): Replace a grub_util_info() call
186 with grub_dprintf("hostdisk", ...), as it was so verbose that it
187 clobbered useful information.
188
189 2008-09-08 Robert Millan <rmh@aybabtu.com>
190
191 * include/grub/util/biosdisk.h: Move to ...
192 * include/grub/util/hostdisk.h: ... here. Update all users.
193 * util/biosdisk.c: Move to ...
194 * util/hostdisk.c: ... here. Update all users.
195
196 2008-09-07 Robert Millan <rmh@aybabtu.com>
197
198 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
199 variables.
200 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
201 and length can be stored directly in the `mbi->mmap_addr' and
202 `mbi->mmap_length' struct fields.
203
204 2008-09-07 Robert Millan <rmh@aybabtu.com>
205
206 * conf/i386.rmk: New file. Provides declaration for building
207 `cpuid.mod'.
208 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
209 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
210 variables.
211 Include `conf/i386.mk'.
212 * conf/i386-efi.rmk: Likewise.
213 * conf/x86_64-efi.rmk: Likewise.
214 * conf/i386-coreboot.rmk: Likewise.
215 * conf/i386-ieee1275.rmk: Likewise.
216
217 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
218
219 Based on patch created by Colin D Bennett <colin@gibibit.com>.
220 Adds optimization support for BGR based modes.
221
222 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
223 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
224 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
225 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
226 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
227 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
228 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
229 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
230 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
231 (grub_video_i386_vbeblit_index_index): Likewise.
232 (grub_video_i386_vbeblit_replace_directN): Added.
233 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
234 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
235 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
236 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
237 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
238 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
239 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
240 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
241 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
242 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
243 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
244 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
245 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
246
247 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
248 (grub_video_i386_vbefill_R8G8B8): Likewise.
249 (grub_video_i386_vbefill_index): Likewise.
250 (grub_video_i386_vbefill_direct32): Added.
251 (grub_video_i386_vbefill_direct24): Likewise.
252 (grub_video_i386_vbefill_direct16): Likewise.
253 (grub_video_i386_vbefill_direct8): Likewise.
254
255 * include/grub/video.h (grub_video_blit_format): Removed
256 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
257 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
258 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
259 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
260 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
261
262 * video/video.c (grub_video_get_blit_format): Updated to use new
263 blit formats. Added handling for 16 bit color modes.
264
265 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
266 fillers.
267 (common_blitter): Updated to use new blitters.
268
269 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
270 Removed.
271 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
272 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
273 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
274 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
275 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
276 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
277 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
278 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
279 (grub_video_i386_vbeblit_index_index): Likewise.
280 (grub_video_i386_vbeblit_replace_directN): Added.
281 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
282 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
283 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
284 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
285 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
286 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
287 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
288 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
289 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
290 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
291 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
292 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
293 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
294
295 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
296 (grub_video_i386_vbefill_R8G8B8): Likewise.
297 (grub_video_i386_vbefill_index): Likewise.
298 (grub_video_i386_vbefill_direct32): Added.
299 (grub_video_i386_vbefill_direct24): Likewise.
300 (grub_video_i386_vbefill_direct16): Likewise.
301 (grub_video_i386_vbefill_direct8): Likewise.
302
303 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
304 types.
305
306 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
307 types.
308
309 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
310 blitter types.
311
312 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
313 types.
314
315 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
316
317 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
318 RAID level 1.
319
320 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
321
322 * fs/iso9660.c (grub_iso9660_date): New structure.
323 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
324 (grub_iso9660_uuid): New function.
325
326 2008-09-05 Bean <bean123ch@gmail.com>
327
328 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
329
330 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
331 insensitive bit for names in Win32 and Win32 & DOS namespace.
332
333 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
334
335 * include/grub/types.h (LONG_MAX): Likewise.
336
337 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
338
339 * util/getroot.c: Include <config.h>.
340 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
341 add support for /dev/md/N devices and handle LVM double dash escaping.
342
343 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
344
345 * config.guess: Update to latest version from config git.
346 * config.sub: Likewise.
347
348 2008-09-03 Robert Millan <rmh@aybabtu.com>
349
350 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
351 `disk->total_sectors'.
352
353 2008-09-01 Colin D Bennett <colin@gibibit.com>
354
355 * include/grub/normal.h: Fixed incorrect comment for
356 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
357
358 2008-09-01 Colin D Bennett <colin@gibibit.com>
359
360 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
361 values with defines.
362
363 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
364 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
365 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
366 (GRUB_VBE_MODEATTR_COLOR): Likewise.
367 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
368 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
369 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
370 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
371 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
372 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
373 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
374 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
375 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
376 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
377 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
378 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
379 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
380 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
381 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
382
383 2008-08-31 Robert Millan <rmh@aybabtu.com>
384
385 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
386 declaration.
387 (grub_multiboot): Fix a few warnings.
388
389 2008-08-31 Robert Millan <rmh@aybabtu.com>
390
391 * loader/i386/pc/multiboot.c: Update comment not to say that
392 boot_device support is unimplemented.
393
394 2008-08-31 Robert Millan <rmh@aybabtu.com>
395
396 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
397 or memory map support are unimplemented.
398
399 2008-08-31 Colin D Bennett <colin@gibibit.com>
400
401 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
402
403 2008-08-31 Colin D Bennett <colin@gibibit.com>
404
405 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
406 total video memory in 'vbeinfo' output; show color format details for
407 each video mode.
408
409 2008-08-30 Pavel Roskin <proski@gnu.org>
410
411 * util/genmoddep.c: Remove for real this time.
412 * DISTLIST: Remove util/genmoddep.c.
413
414 2008-08-30 Robert Millan <rmh@aybabtu.com>
415
416 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
417 as required by Multiboot spec (it was already 4-byte aligned, but
418 only by chance).
419
420 2008-08-29 Pavel Roskin <proski@gnu.org>
421
422 * kern/powerpc/ieee1275/crt0.S: Rename to ...
423 * kern/powerpc/ieee1275/startup.S: ... this.
424 * conf/powerpc-ieee1275.rmk: Adjust for the above.
425 * DISTLIST: Likewise.
426
427 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
428 grub/cpu/kernel.h. Add start label for consistency with other
429 platforms. Add grub_prefix immediately after start. Add jump
430 to the code after grub_prefix.
431 * include/grub/powerpc/kernel.h: Provide valid values for
432 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
433
434 2008-08-29 Bean <bean123ch@gmail.com>
435
436 * configure.ac: Change host_os to cygwin for mingw.
437 (asprintf): New check for function.
438
439 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
440 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
441
442 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
443 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
444 sync, sleep and grub_util_get_disk_size for mingw.
445
446 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
447 to get size in mingw.
448 (open_device): Use flag O_BINARY if it's defined.
449 (find_root_device): Add dummy code for mingw.
450
451 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
452 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
453 (get_scsi_disk_name): Return 0 for mingw.
454
455 * util/hostfs.c: #include <grub/util/misc.h>.
456 (grub_hostfs_open): Use "rb" flag to open file, use
457 grub_util_get_disk_size to get disk size for mingw.
458
459 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
460 (asprintf): New function if HAVE_ASPRINTF is not set.
461 (sync): New function for mingw.
462 (sleep): Likewise.
463 (grub_util_get_disk_size): Likewise.
464
465 2008-08-28 Pavel Roskin <proski@gnu.org>
466
467 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
468 kern/time.c.
469
470 2008-08-28 Robert Millan <rmh@aybabtu.com>
471
472 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
473
474 2008-08-28 Robert Millan <rmh@aybabtu.com>
475
476 Change find_grub_drive() syntax so it doesn't prevent it from
477 detecting NULL names as errors.
478
479 * util/biosdisk.c (find_grub_drive): Move free slot search code
480 from here ...
481 (find_free_slot): ... to here.
482 (read_device_map): Use find_free_slot() to search for free slots.
483
484 2008-08-27 Marco Gerards <marco@gnu.org>
485
486 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
487 (scsi_mod_SOURCES): New variable.
488 (scsi_mod_CFLAGS): Likewise
489 (scsi_mod_LDFLAGS): Likewise.
490
491 * disk/scsi.c: New file.
492
493 * include/grub/scsi.h: Likewise.
494
495 * include/grub/scsicmd.h: Likewise.
496
497 * disk/ata.c: Include <grub/scsi.h>.
498 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
499 instead.
500 (grub_ata_iterate): Skip ATAPI devices.
501 (grub_ata_open): Only handle ATAPI devices.
502 (struct grub_atapi_read): Removed.
503 (grub_atapi_readsector): Likewise.
504 (grub_ata_read): No longer handle ATAPI devices.
505 (grub_ata_write): Likewise.
506 (grub_atapi_iterate): New function.
507 (grub_atapi_read): Likewise.
508 (grub_atapi_write): Likewise.
509 (grub_atapi_open): Likewise.
510 (grub_atapi_close): Likewise.
511 (grub_atapi_dev): New variable.
512 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
513 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
514
515 * include/grub/disk.h (enum grub_disk_dev_id): Add
516 `GRUB_DISK_DEVICE_SCSI_ID'.
517
518 2008-08-26 Robert Millan <rmh@aybabtu.com>
519
520 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
521 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
522 descriptive.
523
524 2008-08-23 Bean <bean123ch@gmail.com>
525
526 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
527 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
528 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
529 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
530 dm_nv.mod.
531 (raid5rec_mod_SOURCES): New macro.
532 (raid5rec_mod_CFLAGS): Likewise.
533 (raid5rec_mod_LDFLAGS): Likewise.
534 (raid6rec_mod_SOURCES): Likewise.
535 (raid6rec_mod_CFLAGS): Likewise.
536 (raid6rec_mod_LDFLAGS): Likewise.
537 (mdraid_mod_SOURCES): Likewise.
538 (mdraid_mod_CFLAGS): Likewise.
539 (mdraid_mod_LDFLAGS): Likewise.
540 (dm_nv_mod_SOURCES): Likewise.
541 (dm_nv_mod_CFLAGS): Likewise.
542 (dm_nv_mod_LDFLAGS): Likewise.
543
544 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
545 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
546 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
547
548 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
549 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
550
551 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
552
553 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
554
555 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
556
557 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
558
559 * disk/raid5_recover.c: New file.
560
561 * disk/raid6_recover.c: Likewise.
562
563 * disk/mdraid_linux.c: Likewise.
564
565 * disk/dmraid_nvidia.c: Likewise.
566
567 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
568 ULONG_MAX.
569
570 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
571 calculate the size of raid device.
572 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
573 different layout of raid5.
574 (grub_raid_scan_device): Remove code specific to mdraid.
575 (grub_raid_list): New variable.
576 (free_array): New function.
577 (grub_raid_register): Likewise.
578 (grub_raid_unregister): Likewise.
579 (grub_raid_rescan): Likewise.
580 (GRUB_MOD_INIT): Don't iterate device here.
581 (GRUB_MOD_FINI): Use free_array to release resource.
582
583 * include/grub/raid.h: Remove macro and structure specific to mdraid.
584 (grub_raid5_recover_func_t): New function variable type.
585 (grub_raid6_recover_func_t): Likewise.
586 (grub_raid5_recover_func): New variable.
587 (grub_raid6_recover_func): Likewise.
588 (grub_raid_register): New function.
589 (grub_raid_unregister): Likewise.
590 (grub_raid_rescan): Likewise.
591 (grub_raid_block_xor): Likewise.
592
593 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
594 (CMD_CRC): New macro.
595 (part): Removed.
596 (read_file): Handle device as well as file.
597 (cmd_crc): New function.
598 (fstest): Handle multiple disks.
599 (options): Remove part, raw and long, add root and diskcount.
600 (usage): Add crc, remove -p, -r, -l, add -r and -c.
601 (main): Find the first non option entry and ignore subsequence options,
602 add handling for the new options, support multiple disks.
603
604 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
605
606 2008-08-23 Bean <bean123ch@gmail.com>
607
608 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
609
610 * genfslist.sh: Ignore kernel.mod.
611
612 * genpartmaplist.sh: Likewise.
613
614 2008-08-23 Robert Millan <rmh@aybabtu.com>
615
616 * util/getroot.c (find_root_device): Skip anything that starts with
617 a dot, not just directories. This avoids things like /dev/.tmp.md0.
618
619 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
620
621 * util/update-grub.in (GRUB_GFXMODE): Export variable.
622 * util/grub.d/00_header.in: Allow the administrator to change default
623 gfxmode via ${GRUB_GFXMODE}.
624
625 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
626
627 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
628
629 2008-08-21 Robert Millan <rmh@aybabtu.com>
630
631 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
632 loader.
633 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
634 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
635
636 2008-08-20 Carles Pina i Estany <carles@pina.cat>
637
638 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
639 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
640
641 2008-08-19 Robert Millan <rmh@aybabtu.com>
642
643 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
644 (struct grub_virtual_screen): Remove `cursor_color'.
645 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
646 initialization.
647 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
648
649 2008-08-18 Robert Millan <rmh@aybabtu.com>
650
651 Unify (identical) linux_normal.c files.
652 * loader/i386/efi/linux_normal.c: Move from here ...
653 * loader/linux_normal.c: ... to here. Update all users.
654 * loader/i386/pc/linux_normal.c: Delete. Update all users.
655 * loader/i386/ieee1275/linux_normal.c: Likewise.
656
657 2008-08-18 Robert Millan <rmh@aybabtu.com>
658
659 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
660 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
661 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
662 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
663 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
664 New macros.
665 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
666 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
667 (GRUB_LINUX_CL_END_OFFSET): ... to here.
668 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
669 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
670 (GRUB_EFI_CL_END_OFFSET): Rename to ...
671 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
672 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
673 Initialize `params->video_cursor_x' and `params->video_cursor_y'
674 portably using grub_getxy().
675 Replace `-EFI' with `-bzImage' in boot message.
676
677 2008-08-17 Robert Millan <rmh@aybabtu.com>
678
679 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
680
681 2008-08-17 Robert Millan <rmh@aybabtu.com>
682
683 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
684
685 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
686 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
687 (grub_machine_mmap_iterate): New function declaration.
688 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
689 structure.
690 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
691 macros.
692
693 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
694 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
695 Move e820 parsing from here ...
696 * kern/i386/pc/mmap.c: New file.
697 (grub_machine_mmap_iterate): ... to here.
698
699 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
700 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
701 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
702 (grub_available_iterate): Redeclare to return `void', and redeclare
703 its hook to use grub_uint64_t as addr and size parameters, and rename
704 to ...
705 (grub_machine_mmap_iterate): ... this. Update all users.
706
707 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
708 to make it more readable. Rename to ...
709 (grub_machine_mmap_iterate): ... this.
710
711 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
712 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
713 (grub_multiboot): Allocate an extra region after the payload, and fill
714 it with a Multiboot memory map. Adjust a.out loader to calculate size
715 with the extra space.
716 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
717 with the extra space.
718
719 2008-08-17 Carles Pina i Estany <carles@pina.cat>
720
721 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
722
723 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
724
725 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
726 mdate-sh to the list `find' searches for.
727 * DISTLIST: Regenerated.
728
729 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
730
731 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
732 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
733 genmoddep.awk, gensymlist.sh.in.
734 (DISTDIRS): Add bus, docs, hook, lib.
735 * DISTLIST: Regenerated.
736 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
737
738 2008-08-16 Robert Millan <rmh@aybabtu.com>
739
740 * disk/raid.c (grub_raid_init): Handle/report errors set by
741 grub_device_iterate().
742 * disk/lvm.c (grub_lvm_init): Likewise.
743
744 2008-08-15 Bean <bean123ch@gmail.com>
745
746 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
747 and datehook.mod.
748 (datetime_mod_SOURCES): New macro.
749 (datetime_mod_CFLAGS): Likewise.
750 (datetime_mod_LDFLAGS): Likewise.
751 (date_mod_SOURCES): Likewise.
752 (date_mod_CFLAGS): Likewise.
753 (date_mod_LDFLAGS): Likewise.
754 (datehook_mod_SOURCES): Likewise.
755 (datehook_mod_CFLAGS): Likewise.
756 (datehook_mod_LDFLAGS): Likewise.
757
758 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
759 and datehook.mod.
760 (datetime_mod_SOURCES): New macro.
761 (datetime_mod_CFLAGS): Likewise.
762 (datetime_mod_LDFLAGS): Likewise.
763 (date_mod_SOURCES): Likewise.
764 (date_mod_CFLAGS): Likewise.
765 (date_mod_LDFLAGS): Likewise.
766 (datehook_mod_SOURCES): Likewise.
767 (datehook_mod_CFLAGS): Likewise.
768 (datehook_mod_LDFLAGS): Likewise.
769
770 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
771 and datehook.mod.
772 (datetime_mod_SOURCES): New macro.
773 (datetime_mod_CFLAGS): Likewise.
774 (datetime_mod_LDFLAGS): Likewise.
775 (date_mod_SOURCES): Likewise.
776 (date_mod_CFLAGS): Likewise.
777 (date_mod_LDFLAGS): Likewise.
778 (datehook_mod_SOURCES): Likewise.
779 (datehook_mod_CFLAGS): Likewise.
780 (datehook_mod_LDFLAGS): Likewise.
781
782 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
783 and datehook.mod.
784 (datetime_mod_SOURCES): New macro.
785 (datetime_mod_CFLAGS): Likewise.
786 (datetime_mod_LDFLAGS): Likewise.
787 (date_mod_SOURCES): Likewise.
788 (date_mod_CFLAGS): Likewise.
789 (date_mod_LDFLAGS): Likewise.
790 (datehook_mod_SOURCES): Likewise.
791 (datehook_mod_CFLAGS): Likewise.
792 (datehook_mod_LDFLAGS): Likewise.
793
794 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
795 and datehook.mod.
796 (datetime_mod_SOURCES): New macro.
797 (datetime_mod_CFLAGS): Likewise.
798 (datetime_mod_LDFLAGS): Likewise.
799 (date_mod_SOURCES): Likewise.
800 (date_mod_CFLAGS): Likewise.
801 (date_mod_LDFLAGS): Likewise.
802 (datehook_mod_SOURCES): Likewise.
803 (datehook_mod_CFLAGS): Likewise.
804 (datehook_mod_LDFLAGS): Likewise.
805
806 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
807
808 * commands/date.c: New file.
809
810 * hook/datehook.c: Likewise.
811
812 * include/grub/lib/datetime.h: Likewise.
813
814 * include/grub/i386/cmos.h: Likewise.
815
816 * lib/datetime.c: Likewise.
817
818 * lib/i386/datetime.c: Likewise.
819
820 * lib/efi/datetime.c: Likewise.
821
822 2008-08-14 Robert Millan <rmh@aybabtu.com>
823
824 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
825 (grub_mkelfimage_SOURCES): New variable.
826 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
827
828 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
829 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
830 * conf/powerpc-ieee1275.rmk: Likewise.
831 * conf/i386-ieee1275.rmk: Likewise.
832
833 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
834 * kern/i386/coreboot/init.c: Likewise.
835
836 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
837 with `<grub/cpu/kernel.h>'.
838 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
839 to ...
840 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
841 * kern/i386/coreboot/startup.S: Likewise.
842
843 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
844 (GRUB_MOD_GAP): Remove.
845 * include/grub/powerpc/kernel.h: New file.
846 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
847 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
848 * include/grub/i386/kernel.h: New file.
849 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
850 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
851 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
852
853 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
854 `grub-mkelfimage'.
855 Use --directory when invoking grub_mkimage.
856
857 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
858 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
859 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
860 and GRUB_KERNEL_CPU_PREFIX.
861
862 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
863
864 * include/grub/err.h (grub_err_printf): New function prototype.
865 * util/misc.c (grub_err_printf): New function.
866 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
867 grub_printf.
868 * kern/err.c (grub_print_error): Use grub_err_printf.
869
870 2008-08-13 Robert Millan <rmh@aybabtu.com>
871
872 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
873
874 2008-08-13 Robert Millan <rmh@aybabtu.com>
875
876 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
877 boot entry.
878
879 2008-08-12 Robert Millan <rmh@aybabtu.com>
880
881 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
882 of the relocation code from here ...
883 (grub_multiboot): ... to here.
884 (forward_relocator, backward_relocator): Move from here ...
885 * kern/i386/loader.S (grub_multiboot_forward_relocator)
886 (grub_multiboot_backward_relocator): ... to here.
887 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
888 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
889 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
890 (grub_multiboot_forward_relocator_end)
891 (grub_multiboot_backward_relocator)
892 (grub_multiboot_backward_relocator_end): New variables.
893
894 2008-08-12 Bean <bean123ch@gmail.com>
895
896 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
897
898 2008-08-11 Robert Millan <rmh@aybabtu.com>
899
900 * kern/i386/linuxbios/startup.S: Move from here ...
901 * kern/i386/coreboot/startup.S: ... to here.
902
903 * kern/i386/linuxbios/init.c: Move from here ...
904 * kern/i386/coreboot/init.c: ... to here.
905
906 * kern/i386/linuxbios/table.c: Move from here ...
907 * kern/i386/coreboot/mmap.c: ... to here.
908
909 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
910
911 2008-08-11 Robert Millan <rmh@aybabtu.com>
912
913 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
914 errors. Leave it to the upper layer to handle them.
915
916 2008-08-09 Christian Franke <franke@computer.org>
917
918 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
919 * conf/common.rmk: Install `grub-pe2elf' only if requested.
920 Install `grub.d/10_windows' only on Cygwin.
921 * configure.ac: Add subst of `target_os'.
922 Check `target_os' also before setting TARGET_OBJ2ELF.
923 Add `--enable-grub-pe2elf'.
924
925 2008-08-08 Robert Millan <rmh@aybabtu.com>
926
927 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
928 (grub_last_time): Change type to grub_uint64_t.
929 (grub_disk_open): Migrate code from to using grub_get_time_ms().
930 (grub_disk_close): Likewise.
931
932 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
933 (run_menu): Migrate code from to using grub_get_time_ms().
934
935 * util/misc.c (grub_get_time_ms): New function.
936
937 2008-08-08 Marco Gerards <marco@gnu.org>
938
939 * disk/ata.c (grub_ata_regget): Change return type to
940 `grub_uint8_t'.
941 (grub_ata_regget2): Likewise.
942 (grub_ata_wait_status): New function.
943 (grub_ata_wait_busy): Removed function, updated all users to use
944 `grub_ata_wait_status'.
945 (grub_ata_wait_drq): Likewise.
946 (grub_ata_cmd): New function.
947 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
948 error handling.
949 (grub_ata_pio_write): Add error handling.
950 (grub_atapi_identify): Likewise.
951 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
952 handling.
953 (grub_ata_identify): Use `grub_ata_cmd' and improve error
954 handling. Actually use the detected registers. Reorder the
955 detection logic such that it is easier to read.
956 (grub_ata_pciinit): Do not assign the same ID to each controller.
957 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
958 handling.
959 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
960
961 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
962
963 2008-08-08 Marco Gerards <marco@gnu.org>
964
965 * NEWS: Update.
966
967 2008-08-07 Bean <bean123ch@gmail.com>
968
969 * include/grub/x86_64/pci.h: New file.
970
971 2008-08-07 Christian Franke <franke@computer.org>
972
973 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
974 (TIMER2_GATE): Likewise.
975 (grub_pit_wait): Add enable/disable of the timer2 gate
976 bit of port 0x61. This fixes a possible infinite loop.
977
978 2008-08-07 Bean <bean123ch@gmail.com>
979
980 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
981 kern/i386/tsc.c and kern/i386/pit.c.
982
983 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
984 x86_64 platform.
985
986 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
987 <grub/i386/tsc.h>.
988
989 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
990
991 2008-08-07 Bean <bean123ch@gmail.com>
992
993 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
994
995 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
996
997 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
998 multiple inclusion. Add #include <grub/types.h>.
999
1000 2008-08-06 Christian Franke <franke@computer.org>
1001
1002 * conf/common.rmk: Build and install `10_windows'.
1003 * util/grub.d/10_windows.in: New script.
1004
1005 2008-08-06 Pavel Roskin <proski@gnu.org>
1006
1007 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1008
1009 2008-08-06 Robert Millan <rmh@aybabtu.com>
1010
1011 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1012 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1013
1014 2008-08-06 Bean <bean123ch@gmail.com>
1015
1016 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1017 (grub_pxefs_fs_int): Remove dummy definition.
1018 (grub_pxefs_open): Use data->block_size to store the current block
1019 size setting.
1020 (grub_pxefs_read): Use block size stored in data->block_size. As the
1021 value of grub_pxe_blksize can be changed after the file is opened.
1022
1023 2008-08-06 Bean <bean123ch@gmail.com>
1024
1025 * fs/i386/pc/pxe.c (curr_file): new variable.
1026 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1027 require the dummy internal file system anymore.
1028 (grub_pxefs_read): Removed.
1029 (grub_pxefs_close): Likewise.
1030 (grub_pxefs_fs_int): Likewise.
1031 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1032 connection when we switch file.
1033 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1034
1035 2008-08-06 Robert Millan <rmh@aybabtu.com>
1036
1037 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1038 `halt.mod'.
1039 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1040 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1041
1042 * kern/i386/halt.c: New file.
1043 * kern/i386/reboot.c: Likewise.
1044 * include/grub/i386/reboot.h: Likewise.
1045 * include/grub/i386/halt.h: Likewise.
1046
1047 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1048 Include `<grub/cpu/halt.h>'.
1049 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1050 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1051
1052 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1053 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1054 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1055 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1056 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1057 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1058 from here ...
1059 * include/grub/i386/at_keyboard.h: ... to here.
1060
1061 2008-08-05 Robert Millan <rmh@aybabtu.com>
1062
1063 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1064 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1065 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1066 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1067 `kern/generic/millisleep.c'.
1068
1069 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1070 instead of grub_get_rtc().
1071 (grub_tsc_init): Initialize `tsc_boot_time'.
1072
1073 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1074 (grub_machine_init): Use grub_tsc_init() rather than
1075 installing an RTC-based handler via grub_install_get_time_ms().
1076
1077 * kern/i386/pit.c: New file.
1078 * include/grub/i386/pit.h: Likewise.
1079
1080 2008-08-05 Bean <bean123ch@gmail.com>
1081
1082 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1083
1084 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1085 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1086 (pxe_mod_SOURCES): New macro.
1087 (pxe_mod_CFLAGS): Likewise.
1088 (pxe_mod_LDFLAGS): Likewise.
1089 (pxecmd_mod_SOURCES): Likewise.
1090 (pxecmd_mod_CFLAGS): Likewise.
1091 (pxecmd_mod_LDFLAGS): Likewise.
1092
1093 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1094 (grub_pxe_call): Likewise.
1095
1096 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1097
1098 * commands/i386/pc/pxecmd.c: New file.
1099
1100 * fs/i386/pc/pxe.c: Likewise.
1101
1102 * include/grub/i386/pc/pxe.h: Likewise.
1103
1104 2008-08-05 Bean <bean123ch@gmail.com>
1105
1106 * util/console.c (grub_console_cur_color): New variable.
1107 (grub_console_standard_color): Likewise.
1108 (grub_console_normal_color): Likewise.
1109 (grub_console_highlight_color): Likewise.
1110 (color_map): Likewise.
1111 (use_color): Likewise.
1112 (NUM_COLORS): New macro.
1113 (grub_ncurses_setcolorstate): Handle color properly.
1114 (grub_ncurses_setcolor): Don't change color here, just remember the
1115 settings, color will be set in grub_ncurses_setcolorstate.
1116 (grub_ncurses_getcolor): New function.
1117 (grub_ncurses_init): Initialize color pairs.
1118 (grub_ncurses_term): New member grub_ncurses_getcolor.
1119
1120 2008-08-05 Colin D Bennett <colin@gibibit.com>
1121
1122 High resolution timer support. Implemented for x86 CPUs using TSC.
1123 Extracted generic grub_millisleep() so it's linked in only as needed.
1124 This requires a Pentium compatible CPU; if the RDTSC instruction is
1125 not supported, then it falls back on the generic grub_get_time_ms()
1126 implementation that uses the machine's RTC.
1127
1128 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1129 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1130 `kern/generic/millisleep.c'.
1131
1132 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1133 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1134
1135 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1136 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1137
1138 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1139
1140 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1141 `kern/generic/millisleep.c'.
1142
1143 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1144
1145 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1146
1147 * kern/generic/rtc_get_time_ms.c: New file.
1148
1149 * kern/generic/millisleep.c: New file.
1150
1151 * kern/misc.c: Don't include
1152 <kern/time.h> anymore.
1153 (grub_millisleep_generic): Removed.
1154
1155 * commands/sleep.c (grub_interruptible_millisleep): Uses
1156 grub_get_time_ms() instead of grub_get_rtc().
1157
1158 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1159 function.
1160 (grub_cpu_is_cpuid_supported): New inline function.
1161 (grub_cpu_is_tsc_supported): New inline function.
1162 (grub_tsc_init): New function prototype.
1163 (grub_tsc_get_time_ms): New function prototype.
1164
1165 * kern/i386/tsc.c (grub_get_time_ms): New file.
1166
1167 * include/grub/time.h: Include <grub/types.h.
1168 (grub_millisleep_generic): Removed.
1169 (grub_get_time_ms): New prototype.
1170 (grub_install_get_time_ms): New prototype.
1171 (grub_rtc_get_time_ms): New prototype.
1172
1173 * kern/time.c (grub_get_time_ms): New function.
1174 (grub_install_get_time_ms): New function.
1175
1176 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1177 <grub/time.h> anymore.
1178 (grub_millisleep): Removed.
1179 (grub_machine_init): Call grub_tsc_init.
1180
1181 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1182 get_time_ms() implementation.
1183
1184 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1185 (ieee1275_get_time_ms): New function.
1186 (grub_machine_init): Install get_time_ms() implementation.
1187
1188 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1189 (grub_machine_init): Call grub_tsc_init().
1190 (grub_millisleep): Removed.
1191
1192 * kern/ieee1275/init.c (grub_millisleep): Removed.
1193 (grub_machine_init): Install ieee1275_get_time_ms()
1194 implementation.
1195 (ieee1275_get_time_ms): New function.
1196 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1197 real work.
1198
1199 2008-08-05 Marco Gerards <marco@gnu.org>
1200
1201 * disk/ata.c: Include <grub/pci.h>.
1202 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1203 (grub_ata_initialize): Rewritten.
1204 (grub_ata_device_initialize): New function.
1205
1206 2008-08-04 Pavel Roskin <proski@gnu.org>
1207
1208 * kern/main.c: Include grub/mm.h.
1209
1210 2008-08-04 Robert Millan <rmh@aybabtu.com>
1211
1212 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1213 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1214 corruption problem).
1215
1216 2008-08-04 Robert Millan <rmh@aybabtu.com>
1217
1218 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1219 warnings introduced in my last commit.
1220
1221 2008-08-03 Robert Millan <rmh@aybabtu.com>
1222
1223 Make PCI available on all i386 architectures.
1224
1225 * include/grub/i386/pc/pci.h: Move from here ...
1226 * include/grub/i386/pci.h: ... to here.
1227
1228 * include/grub/i386/pc/pci.h: Remove.
1229 * include/grub/i386/efi/pci.h: Remove.
1230 * include/grub/x86_64/efi/pci.h: Remove.
1231
1232 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1233 `<grub/cpu/pci.h>'.
1234
1235 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1236 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1237 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1238
1239 * conf/i386-ieee1275.rmk: Likewise.
1240
1241 2008-08-03 Robert Millan <rmh@aybabtu.com>
1242
1243 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1244 (grub_console_setcursor): Make it possible to set cursor off.
1245
1246 2008-08-03 Robert Millan <rmh@aybabtu.com>
1247
1248 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1249 of modules instead of assuming which platform provides what.
1250 * util/update-grub.in: Likewise.
1251
1252 2008-08-03 Robert Millan <rmh@aybabtu.com>
1253
1254 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1255 instead of `grub_install_dos_part' to determine whether a drive needs
1256 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1257 because it can be overridden when loading GRUB via Multiboot).
1258
1259 2008-08-02 Robert Millan <rmh@aybabtu.com>
1260
1261 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1262
1263 2008-08-02 Robert Millan <rmh@aybabtu.com>
1264
1265 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1266 of informational grub_dprintf() calls.
1267
1268 2008-08-02 Robert Millan <rmh@aybabtu.com>
1269
1270 * disk/memdisk.c (memdisk_size): Don't initialize.
1271 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1272
1273 * include/grub/i386/pc/kernel.h
1274 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1275 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1276 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1277 (grub_arch_memdisk_size): Remove.
1278
1279 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1280 field (was only used to transfer a constant). Add `type' field to
1281 support multiple module types.
1282 (grub_module_iterate): New function.
1283
1284 * kern/device.c (grub_device_open): Do not hide error messages
1285 when grub_disk_open() fails. Use grub_print_error() instead.
1286
1287 * kern/i386/pc/init.c (grub_arch_modules_addr)
1288 (grub_arch_memdisk_size): Remove functions.
1289 (grub_arch_modules_addr): Return the module address in high memory
1290 (now that it isn't copied anymore).
1291
1292 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1293 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1294 decompression routine (grub_total_module_size already includes that
1295 now). Don't copy modules back to low memory.
1296
1297 * kern/main.c: Include `<grub/mm.h>'.
1298 (grub_load_modules): Split out (and use) ...
1299 (grub_module_iterate): ... this function, which iterates through
1300 module objects and runs a hook.
1301 Comment out grub_mm_init_region() call, as it would cause non-ELF
1302 modules to be overwritten.
1303
1304 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1305 the memdisk image in its own region, make it part of the module list.
1306 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1307 (main): Parse --memdisk|-m option, and pass user-provided path as
1308 parameter to generate_image().
1309 (add_segments): Pass `memdisk_path' down to load_modules().
1310 (load_modules): Embed memdisk image in module section when requested.
1311 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1312 `header.type' instead of `header.offset'.
1313
1314 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1315 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1316 (memdisk_mod_LDFLAGS): New variables.
1317 * conf/i386-coreboot.rmk: Likewise.
1318 * conf/i386-ieee1275.rmk: Likewise.
1319
1320 2008-08-02 Robert Millan <rmh@aybabtu.com>
1321
1322 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1323 (backward_relocator): New variables. Used to allocate and relocate
1324 the payload, respectively.
1325 (grub_multiboot_load_elf32): Load into heap instead of requested
1326 address, install the appropriate relocator code in each bound of
1327 the payload, and set the entry point such that
1328 grub_multiboot_real_boot() will jump to one of them.
1329
1330 * kern/i386/loader.S (grub_multiboot_payload_size)
1331 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1332 (grub_multiboot_payload_entry_offset): New variables.
1333 (grub_multiboot_real_boot): Set cpu context to what the relocator
1334 expects, and jump to the relocator instead of the payload.
1335
1336 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1337 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1338 (grub_multiboot_payload_entry_offset): Export.
1339
1340 2008-08-01 Bean <bean123ch@gmail.com>
1341
1342 * normal/menu_entry.c (editor_getline): Don't return the original
1343 string as result, as it will be released by lexer once it has done
1344 using it.
1345
1346 2008-08-01 Robert Millan <rmh@aybabtu.com>
1347
1348 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1349 within menuentries, not before them.
1350 util/grub.d/10_hurd.in: Likewise.
1351
1352 2008-08-01 Bean <bean123ch@gmail.com>
1353
1354 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1355 (bufio_mod_SOURCES): New macro.
1356 (bufio_mod_CFLAGS): Likewise.
1357 (bufio_mod_LDFLAGS): Likewise.
1358
1359 * include/grub/bufio.h: New file.
1360
1361 * io/bufio.c: Likewise.
1362
1363 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1364 (grub_video_reader_png): Use grub_buffile_open to open file.
1365
1366 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1367 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1368
1369 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1370 (grub_video_reader_tga): Use grub_buffile_open to open file.
1371
1372 * font/manager.c: Include <grub/bufio.h>.
1373 (add_font): Use grub_buffile_open to open file.
1374
1375 2008-07-31 Robert Millan <rmh@aybabtu.com>
1376
1377 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1378 ELF segments, use a macro for arbitrarily accessing any of them instead
1379 of preparing a pointer that allows access to one at a time.
1380 (grub_multiboot_load_elf64): Likewise.
1381
1382 2008-07-31 Bean <bean123ch@gmail.com>
1383
1384 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1385 GRUB_KERNEL_MACHINE_DATA_END.
1386
1387 2008-07-30 Robert Millan <rmh@aybabtu.com>
1388
1389 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1390 Increase from 0x50 to 0x60.
1391 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1392 use UUIDs to identify the root drive for them. If that's not
1393 possible, abort.
1394 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1395 check, for cross-disk installs.
1396
1397 2008-07-30 Robert Millan <rmh@aybabtu.com>
1398
1399 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1400 is non-empty, use it to set the `prefix' environment variable instead
1401 of the usual approach.
1402 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1403 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1404 environment variable instead of dummy make_install_device().
1405
1406 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1407 (start): Insert a data section, with `grub_prefix' variable.
1408 * kern/i386/linuxbios/startup.S: Likewise.
1409
1410 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1411 New variable reference.
1412 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1413 New macro. Defines offset of `grub_prefix' within startup.S (relative
1414 to `start').
1415 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1416 section within startup.S (relative to `start').
1417 * include/grub/i386/coreboot/kernel.h: Likewise.
1418
1419 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1420 Overwrite grub_prefix with its contents, at the beginning of the
1421 first segment.
1422 (main): Understand -p|--prefix.
1423
1424 2008-07-30 Robert Millan <rmh@aybabtu.com>
1425
1426 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1427
1428 2008-07-30 Robert Millan <rmh@aybabtu.com>
1429
1430 * term/i386/pc/vga_text.c (grub_console_cls): Use
1431 grub_console_gotoxy() to go back to beginning of the screen.
1432 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1433
1434 2008-07-29 Christian Franke <franke@computer.org>
1435
1436 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1437 Add conversion of emulated mount points on Cygwin.
1438
1439 2008-07-29 Christian Franke <franke@computer.org>
1440
1441 * util/update-grub.in: Add a check for admin
1442 group on Cygwin.
1443 Remove old `grub.cfg.new' before creation.
1444 Add `-f' to `mv' to handle the different filesystem
1445 semantics of Windows.
1446
1447 2008-07-29 Bean <bean123ch@gmail.com>
1448
1449 * normal/main.c (get_line): Fix buffer overflow bug.
1450
1451 2008-07-28 Robert Millan <rmh@aybabtu.com>
1452
1453 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1454 (struct grub_apple_header): New struct. Describes the layout of
1455 the partmap header.
1456 (apple_partition_map_iterate): Check the header magic as well as the
1457 partition magic (which was already being checked).
1458
1459 2008-07-28 Pavel Roskin <proski@gnu.org>
1460
1461 * genmk.rb: Add a warning to the beginning of the output that
1462 it's a generated file and should not be edited.
1463
1464 2008-07-28 Robert Millan <rmh@aybabtu.com>
1465
1466 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1467 with the same number are found, just use issue a warning with
1468 grub_dprintf(), as this error has been reported to be non-fatal.
1469
1470 2008-07-27 Robert Millan <rmh@aybabtu.com>
1471
1472 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1473 information.
1474
1475 2008-07-27 Bean <bean123ch@gmail.com>
1476
1477 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1478 (grub_fat_find_dir): Ignore case when comparing filename.
1479
1480 2008-07-27 Bean <bean123ch@gmail.com>
1481
1482 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1483 smallino, as it's more descriptive, and i8count can be confused with
1484 the other field count.
1485 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1486 inode type.
1487
1488 2008-07-27 Bean <bean123ch@gmail.com>
1489
1490 * commands/crc.c: New file.
1491
1492 * lib/crc.c: Likewise.
1493
1494 * include/grub/lib/crc.h: Likewise.
1495
1496 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1497
1498 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1499 (hexdump): Move this function to ...
1500
1501 * lib/hexdump.c: ... here.
1502
1503 * include/grub/hexdump.h: Renamed to ...
1504
1505 * include/grub/lib/hexdump.h: ... this.
1506
1507 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1508
1509 * util/grub-editenv.c: Likewise.
1510
1511 * include/envblk.h: Renamed to ...
1512
1513 * include/lib/envblk.h: ... this.
1514
1515 * util/envblk.c: Renamed to ...
1516
1517 * lib/envblk.c: ... this.
1518
1519 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1520 lib/hexdump.c.
1521 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1522 (pkglib_MODULES): Add crc.mod.
1523 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1524 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1525 (crc_mod_SOURCES): New macro.
1526 (crc_mod_CFLAGS): Likewise.
1527 (crc_mod_LDFLAGS): Likewise.
1528
1529 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1530
1531 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1532
1533 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1534
1535 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1536
1537 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1538
1539 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1540
1541 * commands/help.c: Include <grub/term.h>.
1542 (TERM_WIDTH): Removed. Updated all users.
1543
1544 2008-07-27 Pavel Roskin <proski@gnu.org>
1545
1546 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1547 spurious warnings about a comment within a comment.
1548
1549 2008-07-25 Robert Millan <rmh@aybabtu.com>
1550
1551 * util/getroot.c (find_root_device): Skip devices that match
1552 /dev/dm-[0-9]. This lets the real device be found for any type of
1553 abstraction (LVM, EVMS, RAID..).
1554 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1555 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1556 device is found first, find_root_device() will now skip it.
1557
1558 2008-07-24 Pavel Roskin <proski@gnu.org>
1559
1560 * include/grub/types.h: Use __builtin_bswap32() and
1561 __builtin_bswap64() with gcc 4.3 and newer.
1562
1563 2008-07-24 Christian Franke <franke@computer.org>
1564
1565 * util/i386/pc/grub-install.in: If `--debug' is specified,
1566 pass `--verbose' to grub-setup.
1567 Abort script if make_system_path_relative_to_its_root() fails.
1568
1569 2008-07-24 Bean <bean123ch@gmail.com>
1570
1571 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1572 variable `target_platform' should be `platform'.
1573
1574 2008-07-24 Bean <bean123ch@gmail.com>
1575
1576 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1577 (grub_png_init_fixed_block): New function.
1578 (grub_png_decode_image_data): Handle fixed huffman code compression.
1579
1580 2008-07-24 Bean <bean123ch@gmail.com>
1581
1582 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1583 (grub_pe2elf_SOURCES): New macro.
1584 (CLEANFILES): Add grub-pe2elf.
1585
1586 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1587 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1588 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1589 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1590 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1591 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1592 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1593 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1594 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1595 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1596 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1597 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1598 (GRUB_PE32_DT_FUNCTION): Likewise.
1599 (GRUB_PE32_REL_I386_DIR32): Likewise.
1600 (GRUB_PE32_REL_I386_REL32): Likewise.
1601 (grub_pe32_symbol): New structure.
1602 (grub_pe32_reloc): Likewise.
1603
1604 * util/grub-pe2elf.c: New file.
1605
1606 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1607 start symbol in non pc platform.
1608
1609 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1610
1611 The following patches are from Christian Franke.
1612
1613 * include/grub/dl.h: Remove .previous, gas supports this only
1614 for ELF format.
1615
1616 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1617 Remove .type, gas supports this only for ELF format.
1618
1619 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1620 nullbytes in symbol table. This fixes an infinite loop if table is
1621 zero filled.
1622
1623 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1624 TARGET_IMG_LDFLAGS and EXEEXT.
1625
1626 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1627 TARGET_IMG_LDFLAGS_AC.
1628 (grub_CHECK_STACK_ARG_PROBE): New function.
1629
1630 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1631
1632 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1633
1634 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1635 to set TARGET_IMG_LD* accordingly.
1636 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1637 Add call to grub_CHECK_STACK_ARG_PROBE.
1638 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1639
1640 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1641
1642 * genmk.rb: Add EXEEXT to CLEANFILES.
1643
1644 2008-07-23 Robert Millan <rmh@aybabtu.com>
1645
1646 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1647 define the codes for arrows and lines used for the menu).
1648 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1649 as well.
1650
1651 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1652 fonts, because the latter are too slow.
1653
1654 2008-07-21 Bean <bean123ch@gmail.com>
1655
1656 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1657 a20. Run keyboard test last, as it will cause macbook to halt.
1658
1659 2008-07-18 Pavel Roskin <proski@gnu.org>
1660
1661 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1662 load foreign architecture modules correctly anyway. Keep
1663 support for loading host architecture modules, whether we
1664 compile them or not.
1665
1666 2008-07-17 Pavel Roskin <proski@gnu.org>
1667
1668 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1669 change target_cpu. The compiler default can mismatch target_cpu
1670 in any case.
1671
1672 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1673 * kern/efi/efi.c: Likewise.
1674
1675 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1676 target compiler is functional.
1677 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1678 are set up.
1679
1680 * configure.ac: Default to efi platform for x86_64-apple. Allow
1681 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1682 adjustments from the rest, only do them if target is not
1683 explicitly given. Merge other adjustments with the final sanity
1684 check. Remove an extraneous check for supported CPU. Be
1685 specific which CPU and which platform is not supported.
1686
1687 * configure.ac: Default to pc platform for x86_64.
1688
1689 2008-07-17 Robert Millan <rmh@aybabtu.com>
1690
1691 Partial LinuxBIOS -> Coreboot rename.
1692
1693 * conf/i386-linuxbios.rmk: Renamed to ...
1694 * conf/i386-coreboot.rmk: ... this.
1695 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1696 * configure.ac: Accept "coreboot" as input platform (but maintain
1697 compatibility with "linuxbios").
1698 * include/grub/i386/linuxbios: Renamed to ...
1699 * include/grub/i386/coreboot: ... this.
1700
1701 2008-07-17 Bean <bean123ch@gmail.com>
1702
1703 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1704 (appleldr_mod_SOURCE): New variable.
1705 (appleldr_mod_CFLAGS): Likewise.
1706 (appleldr_mod_LDFLAGS): Likewise.
1707 (pci_mod_SOURCES): Likewise.
1708 (pci_mod_CFLAGS): Likewise.
1709 (pci_mod_LDFLAGS): Likewise.
1710 (lspci_mod_SOURCES): Likewise.
1711 (lspci_mod_CFLAGS): Likewise.
1712 (lspci_mod_LDFLAGS): Likewise.
1713
1714 * conf/x86_64-efi.rmk: New file.
1715
1716 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1717 macro.
1718 (grub_efidisk_write): Likewise.
1719
1720 * include/efi/api.h (efi_call_0): New macro.
1721 (efi_call_1): Likewise.
1722 (efi_call_2): Likewise.
1723 (efi_call_3): Likewise.
1724 (efi_call_4): Likewise.
1725 (efi_call_5): Likewise.
1726 (efi_call_6): Likewise.
1727
1728 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1729 grub_rescue_cmd_chainloader.
1730
1731 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1732 (grub_pe32_optional_header): Change some fields based on i386 or
1733 x86_64 platform.
1734 (GRUB_PE32_PE32_MAGIC): Likewise.
1735
1736 * include/grub/efi/uga_draw.h: New file.
1737
1738 * include/grub/elf.h (STN_ABS): New constant.
1739 (R_X86_64_NONE): Relocation constant for x86_64.
1740 (R_X86_64_64): Likewise.
1741 (R_X86_64_PC32): Likewise.
1742 (R_X86_64_GOT32): Likewise.
1743 (R_X86_64_PLT32): Likewise.
1744 (R_X86_64_COPY): Likewise.
1745 (R_X86_64_GLOB_DAT): Likewise.
1746 (R_X86_64_JUMP_SLOT): Likewise.
1747 (R_X86_64_RELATIVE): Likewise.
1748 (R_X86_64_GOTPCREL): Likewise.
1749 (R_X86_64_32): Likewise.
1750 (R_X86_64_32S): Likewise.
1751 (R_X86_64_16): Likewise.
1752 (R_X86_64_PC16): Likewise.
1753 (R_X86_64_8): Likewise.
1754 (R_X86_64_PC8): Likewise.
1755
1756 * include/grub/i386/efi/pci.h: New file.
1757
1758 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1759 Change it value based on platform.
1760 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1761 (GRUB_E820_RAM): Likewise.
1762 (GRUB_E820_RESERVED): Likewise.
1763 (GRUB_E820_ACPI): Likewise.
1764 (GRUB_E820_NVS): Likewise.
1765 (GRUB_E820_EXEC_CODE): Likewise.
1766 (GRUB_E820_MAX_ENTRY): Likewise.
1767 (grub_e820_mmap): New structure.
1768 (linux_kernel_header): Change the efi field according to different
1769 kernel version, also field from linux_kernel_header.
1770
1771 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1772
1773 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1774 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1775 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1776 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1777 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1778 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1779 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1780 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1781 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1782 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1783
1784 * include/grub/x86_64/efi/kernel.h: New file.
1785
1786 * include/grub/x86_64/efi/loader.h: Likewise.
1787
1788 * include/grub/x86_64/efi/machine.h: Likewise.
1789
1790 * include/grub/x86_64/efi/pci.h: Likewise.
1791
1792 * include/grub/x86_64/efi/time.h: Likewise.
1793
1794 * include/grub/x86_64/linux.h: Likewise.
1795
1796 * include/grub/x86_64/setjmp.h: Likewise.
1797
1798 * include/grub/x86_64/time.h: Likewise.
1799
1800 * include/grub/x86_64/types.h: Likewise.
1801
1802 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1803 GRUB_TARGET_SIZEOF_VOID_P.
1804
1805 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1806 (grub_efi_locate_handle): Likewise.
1807 (grub_efi_open_protocol): Likewise.
1808 (grub_efi_set_text_mode): Likewise.
1809 (grub_efi_stall): Likewise.
1810 (grub_exit): Likewise.
1811 (grub_reboot): Likewise.
1812 (grub_halt): Likewise.
1813 (grub_efi_exit_boot_services): Likewise.
1814 (grub_get_rtc): Likewise.
1815
1816 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1817 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1818 (grub_efi_allocate_pages): Wrap efi calls.
1819 (grub_efi_free_pages): Wrap efi calls.
1820 (grub_efi_get_memory_map): Wrap efi calls.
1821
1822 * kern/x86_64/dl.c: New file.
1823
1824 * kern/x86_64/efi/callwrap.S: Likewise.
1825
1826 * kern/x86_64/efi/startup.S: Likewise.
1827
1828 * loader/efi/appleloader.c: Likewise.
1829
1830 * loader/efi/chainloader.c (cmdline): New variable.
1831 (grub_chainloader_unload): Wrap efi calls.
1832 (grub_chainloader_boot): Likewise.
1833 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1834 command line.
1835
1836 * loader/efi/chainloader_normal.c (chainloader_command):
1837 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1838 command line.
1839
1840 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1841 method.
1842 (grub_e820_add_region): New function.
1843 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1844 booting.
1845 (grub_find_video_card): New function.
1846 (grub_linux_setup_video): New function.
1847 (grub_rescue_cmd_linux): Probe for video information.
1848
1849 * normal/x86_64/setjmp.S: New file.
1850
1851 * term/efi/console.c (map_char): New function.
1852 (grub_console_putchar): Map unicode char.
1853 (grub_console_checkkey): Wrap efi calls.
1854 (grub_console_getkey): Likewise.
1855 (grub_console_getwh): Likewise.
1856 (grub_console_gotoxy): Likewise.
1857 (grub_console_cls): Likewise.
1858 (grub_console_setcolorstate): Likewise.
1859 (grub_console_setcursor): Likewise.
1860
1861 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1862
1863 2008-07-16 Pavel Roskin <proski@gnu.org>
1864
1865 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1866 format strings.
1867
1868 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1869 pointer, not an integer. This fixes a warning and prevents
1870 precision loss on 64-bit systems.
1871 (relocate_addresses): Remove unneeded cast.
1872
1873 2008-07-15 Pavel Roskin <proski@gnu.org>
1874
1875 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1876
1877 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1878
1879 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1880 Fix comparison between signed and unsigned.
1881
1882 * include/grub/i386/ieee1275/console.h: Declare
1883 grub_console_init() and grub_console_fini().
1884
1885 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1886 It's empty and unused.
1887
1888 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1889 beginning to avoid warnings with some compilers.
1890
1891 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1892 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1893
1894 2008-07-14 Pavel Roskin <proski@gnu.org>
1895
1896 * kern/env.c (grub_register_variable_hook): Don't copy empty
1897 string, it leaks memory. Pass "" to grub_env_set(), it should
1898 handle constant strings.
1899
1900 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1901 * commands/cmp.c (grub_cmd_cmp): Likewise.
1902 * kern/dl.c (grub_dl_flush_cache): Likewise.
1903 (grub_dl_load_core): Likewise.
1904 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1905 (grub_elf64_load_phdrs): Likewise.
1906
1907 2008-07-13 Pavel Roskin <proski@gnu.org>
1908
1909 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1910 between signed and unsigned.
1911 (LzmaEnc_Finish): Fix warning about an unused parameter.
1912
1913 2008-07-13 Bean <bean123ch@gmail.com>
1914
1915 * Makefile.in (enable_lzo): New rule.
1916
1917 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1918
1919 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1920
1921 * boot/i386/pc/lnxboot.S: #include <config.h>.
1922
1923 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1924 its value according to the compression algorithm used, lzo or lzma.
1925
1926 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1927 compression algorithm according to configure macro.
1928
1929 * kern/i386/pc/startup.S (codestart): Likewise.
1930
1931 * kern/i386/pc/lzma_decode.S: New file.
1932
1933 * include/grub/lib/LzFind.h: Likewise.
1934
1935 * include/grub/lib/LzHash.h: Likewise.
1936
1937 * include/grub/lib/LzmaDec.h: Likewise.
1938
1939 * include/grub/lib/LzmaEnc.h: Likewise.
1940
1941 * include/grub/lib/LzmaTypes.h: Likewise.
1942
1943 * lib/LzFind.c: Likewise.
1944
1945 * lib/LzmaDec.c: Likewise.
1946
1947 * lib/LzmaEnc.c: Likewise.
1948
1949 2008-07-13 Bean <bean123ch@gmail.com>
1950
1951 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1952 (grub_ext4_extent_header): New structure.
1953 (grub_ext4_extent): Likewise.
1954 (grub_ext4_extent_idx): Likewise.
1955 (grub_ext4_find_leaf): New function.
1956 (grub_ext2_read_block): Handle extents.
1957
1958 2008-07-12 Robert Millan <rmh@aybabtu.com>
1959
1960 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1961
1962 2008-07-11 Robert Millan <rmh@aybabtu.com>
1963
1964 * util/grub.d/40_custom.in: New file. Example on how to add custom
1965 entries to /etc/grub.d.
1966 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1967 40_custom (implicitly, by merging all the grub.d rules).
1968
1969 2008-07-11 Pavel Roskin <proski@gnu.org>
1970
1971 * commands/read.c (grub_getline): Fix invalid memory access.
1972 Don't add newline to the variable value.
1973
1974 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1975 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1976 (serial_hw_get_port): Check validity of the port number.
1977 (grub_cmd_serial): Check return value of serial_hw_get_port().
1978
1979 2008-07-07 Pavel Roskin <proski@gnu.org>
1980
1981 * boot/i386/pc/diskboot.S (notification_string): Replace
1982 "Loading kernel" with just "loading". This is shorter, less
1983 confusing and saves a few bytes for possible future changes.
1984
1985 2008-07-05 Pavel Roskin <proski@gnu.org>
1986
1987 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1988 size for ATAPI devices, they are undefined. Output sector
1989 number in decimal form.
1990
1991 * disk/ata.c: Use named constants for status bits.
1992
1993 2008-07-04 Pavel Roskin <proski@gnu.org>
1994
1995 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1996 grub_addr_t before casting it to the void pointer to fix a
1997 warning. Non-addressable regions are discarded earlier.
1998 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1999 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2000 (check_signature): Don't shadow table_header.
2001 (grub_linuxbios_table_iterate): Cast numeric constants to
2002 grub_linuxbios_table_header_t.
2003 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2004 grub_stop().
2005
2006 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2007 prevent warnings.
2008
2009 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2010 pointer, which can cause warnings. Support 64-bit addresses.
2011
2012 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2013 of sizeof(long). This fixes PowerPC image generation on x86_64.
2014
2015 2008-07-04 Robert Millan <rmh@aybabtu.com>
2016
2017 This fixes a performance issue when pc & gpt partmap iterators
2018 didn't abort iteration even after our hook found what it was
2019 looking for (often causing expensive probes of non-existent drives).
2020
2021 Some callers relied on previous buggy behaviour, since they would
2022 rise an error when their own hooks caused early abortion of its
2023 iteration.
2024
2025 * kern/device.c (grub_device_open): Improve error message.
2026 * disk/lvm.c (grub_lvm_open): Likewise.
2027 * disk/raid.c (grub_raid_open): Likewise.
2028
2029 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2030 when hook requests it, independently of grub_errno.
2031 (pc_partition_map_probe): Do not fail when find_func() caused
2032 early abortion of pc_partition_map_iterate().
2033
2034 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2035 when hook requests it, independently of grub_errno.
2036 (gpt_partition_map_probe): Do not fail when find_func() caused
2037 early abortion of gpt_partition_map_iterate().
2038
2039 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2040 when hook requests it, independently of grub_errno. Do not fail when
2041 part_map_iterate_hook() caused early abortion of p->iterate().
2042
2043 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2044 when grub_partition_iterate() returned with non-zero.
2045
2046 2008-07-03 Pavel Roskin <proski@gnu.org>
2047
2048 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2049 like we do in grub_ata_pio_read().
2050 (grub_ata_readwrite): Always write individual sectors. Fix the
2051 sector count for the remainder.
2052 (grub_ata_write): Enable writing to ATA devices. Correctly
2053 report error for ATAPI devices.
2054
2055 2008-07-02 Pavel Roskin <proski@gnu.org>
2056
2057 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2058 warning.
2059
2060 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2061 for every read sector, we already increment it for the whole
2062 batch. This fixes reading more than 256 sectors at once.
2063
2064 * util/grub-editenv.c (cmd_info): Cast argument to long
2065 explicitly. ptrdiff_t reduces to int on i386.
2066
2067 * util/grub-editenv.c (main): Be specific which parameter is
2068 missing.
2069
2070 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2071 (memdisk): Make memdisk_orig_addr a pointer.
2072
2073 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2074 for file offsets, use grub_off_t instead. Fix printf format
2075 warnings.
2076
2077 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2078 there. Real unexpected warnings should not drown in the noise
2079 about known problems.
2080
2081 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2082 grub_disk_addr_t for memory addresses.
2083
2084 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2085 explicitly to fix a warning.
2086
2087 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2088
2089 * Makefile.in (MODULE_LDFLAGS): New variable.
2090 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2091 the linker accepts --build-id=none.
2092 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2093 MODULE_LDFLAGS.
2094 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2095
2096 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2097 those in Linux XFS code. Provide a way to access 64-bit parent
2098 inode.
2099 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2100 the end of struct grub_xfs_dir_header.
2101
2102 2008-07-02 Bean <bean123ch@gmail.com>
2103
2104 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2105 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2106 and GRUB_IEEE1275_FLAG_NO_ANSI.
2107
2108 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2109 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2110 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2111
2112 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2113 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2114
2115 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2116 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2117
2118 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2119 esc sequence on non ANSI terminal.
2120 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2121
2122 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2123 beginning of file.
2124
2125 2008-07-02 Bean <bean123ch@gmail.com>
2126
2127 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2128 (grub_editenv_SOURCES): New variable.
2129 (pkglib_MODULES): Add loadenv.mod.
2130 (loadenv_mod_SOURCES): New variable.
2131 (loadenv_mod_CFLAGS): Likewise.
2132 (loadenv_mod_LDFLAGS): Likewise.
2133
2134 * include/grub/envblk.h: New file.
2135
2136 * util/envblk.c: New file.
2137
2138 * util/grub-editenv.c: New file.
2139
2140 * commands/loadenv.c: New file.
2141
2142 2008-07-01 Pavel Roskin <proski@gnu.org>
2143
2144 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2145 not unsigned char. This fixes warnings and is consistent with
2146 other tags.
2147
2148 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2149
2150 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2151
2152 * term/tparm.c (analyze): Always set *popcount.
2153
2154 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2155 cast to fix a warning.
2156
2157 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2158 cast to suppress a warning.
2159
2160 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2161 grub_fshelp_read_file() expects.
2162
2163 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2164 write uuid as a 32-bit value in CPU byte order, so declare and
2165 use it as such.
2166
2167 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2168 long if the format specifier expects it.
2169 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2170 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2171 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2172 long to fix a warning.
2173 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2174 grub_dprintf() arguments to fix warnings.
2175
2176 2008-06-30 Pavel Roskin <proski@gnu.org>
2177
2178 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2179 install_bsd_part immediately before core.img is embedded or
2180 modified on disk. This fixes core.img verification if core.img
2181 cannot be embedded.
2182
2183 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2184 core_path to calculate the blocklist.
2185 Patch from Javier Martín <lordhabbit@gmail.com>
2186
2187 2008-06-29 Robert Millan <rmh@aybabtu.com>
2188
2189 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2190 block to disk block.
2191 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2192 Patch from Niels Böhm <bitbucket@arcor.de>
2193
2194 2008-06-29 Robert Millan <rmh@aybabtu.com>
2195
2196 * util/update-grub_lib.in (font_path): Search for fonts in
2197 /boot/grub first, which is more likely to be readable (we aren't
2198 deciding where fonts live, just looking for them).
2199
2200 2008-06-26 Pavel Roskin <proski@gnu.org>
2201
2202 * util/biosdisk.c (read_device_map): Don't leave dead map
2203 entries for devices failing stat() check.
2204
2205 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2206 core_path_dev for the core.img path on the target device.
2207
2208 2008-06-26 Robert Millan <rmh@aybabtu.com>
2209
2210 * disk/fs_uuid.c: New file.
2211 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2212 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2213 (fs_uuid_mod_LDFLAGS): New variables.
2214 * include/grub/disk.h (grub_disk_dev_id): Add
2215 `GRUB_DISK_DEVICE_UUID_ID'.
2216 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2217 implement iterate().
2218
2219 2008-06-26 Robert Millan <rmh@aybabtu.com>
2220
2221 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2222 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2223 Linux image includes no initrd.
2224
2225 2008-06-21 Javier Martín <lordhabbit@gmail.com>
2226
2227 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2228 call to resolve the core image location that effectively appended the
2229 name twice.
2230
2231 2008-06-21 Robert Millan <rmh@aybabtu.com>
2232
2233 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2234 call from here ...
2235
2236 * util/grub.d/10_hurd.in: ... to here ...
2237 * util/grub.d/10_linux.in: ... and here.
2238
2239 2008-06-19 Robert Millan <rmh@aybabtu.com>
2240
2241 * kern/main.c (grub_main): Export `prefix' variable immediately
2242 after it has been set by grub_machine_set_prefix().
2243
2244 2008-06-19 Robert Millan <rmh@aybabtu.com>
2245
2246 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2247 search result when not saving to variable, not the other way around.
2248 When saving to variable, abort iteration as soon as a match is found.
2249
2250 2008-06-19 Robert Millan <rmh@aybabtu.com>
2251
2252 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2253 check for partition that provides /boot/grub. Its logic is flawed,
2254 as it prevents prepare_grub_to_access_device() from being called
2255 multiple times.
2256
2257 2008-06-19 Robert Millan <rmh@aybabtu.com>
2258
2259 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2260 "insmod" command directly when abstraction modules are needed,
2261 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2262 since it had already been processed).
2263
2264 2008-06-19 Pavel Roskin <proski@gnu.org>
2265
2266 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2267 changed. This is needed in case GRUB_LIBDIR changes.
2268 * conf/i386-ieee1275.rmk: Likewise.
2269 * conf/i386-linuxbios.rmk: Likewise.
2270 * conf/i386-pc.rmk: Likewise.
2271 * conf/powerpc-ieee1275.rmk: Likewise.
2272
2273 2008-06-18 Pavel Roskin <proski@gnu.org>
2274
2275 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2276 kernel_elf_symlist.c to symlist.c for consistency with other
2277 architectures. Update all users.
2278 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2279
2280 2008-06-18 Robert Millan <rmh@aybabtu.com>
2281
2282 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2283 it in prefix.
2284
2285 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2286 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2287 a RAID device, run setup() for all members independently on whether
2288 LVM abstraction is being used.
2289 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2290 If grub-mkimage has set `*install_dos_part == -2', don't override this
2291 value.
2292 Perform *install_dos_part adjustments independently on whether
2293 we're embedding or not.
2294 Clarify error message when image is too big for embedding.
2295 Remove duplicate *install_dos_part stanza.
2296
2297 2008-06-17 Robert Millan <rmh@aybabtu.com>
2298
2299 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2300 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2301 variables.
2302 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2303 values in grub_ofconsole_normal_color and
2304 grub_ofconsole_highlight_color (they're not directly related to
2305 background and foreground).
2306 (grub_ofconsole_setcolorstate): Extract background and foreground
2307 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2308
2309 2008-06-17 Robert Millan <rmh@aybabtu.com>
2310
2311 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2312 /boot/grub for the check in last commit, not /boot (they could be
2313 different partitions).
2314
2315 2008-06-16 Robert Millan <rmh@aybabtu.com>
2316
2317 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2318 asked to setup access for the same partition that provides /boot,
2319 don't bother using UUIDs since our root already has the value we
2320 want.
2321
2322 2008-06-16 Robert Millan <rmh@aybabtu.com>
2323
2324 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2325 I2O devices.
2326 Patch from Sven Mueller <sven@debian.org>.
2327
2328 2008-06-16 Robert Millan <rmh@aybabtu.com>
2329
2330 * util/update-grub.in: Check for $EUID instead of $UID.
2331 Reported by Vincent Zweije.
2332
2333 2008-06-16 Bean <bean123ch@gmail.com>
2334
2335 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2336 (grub_ext2_read_block): Likewise.
2337 (grub_ext2_read_inode): Likewise.
2338 (grub_ext2_mount): Likewise.
2339 (grub_ext2_close): Likewise.
2340 (grub_ext3_get_journal): Removed.
2341
2342 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2343 (grub_reiserfs_read_symlink): Likewise.
2344 (grub_reiserfs_mount): Likewise.
2345 (grub_reiserfs_open): Likewise.
2346 (grub_reiserfs_read): Likewise.
2347 (grub_reiserfs_close): Likewise.
2348 (grub_reiserfs_get_journal): Removed.
2349
2350 * fs/fshelp.c (grub_fshelp_read): Removed.
2351 (grub_fshelp_map_block): Likewise.
2352
2353 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2354 (grub_fshelp_journal): Likewise.
2355 (grub_fshelp_read): Likewise.
2356 (grub_fshelp_map_block): Likewise.
2357
2358 2008-06-16 Pavel Roskin <proski@gnu.org>
2359
2360 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2361 floating point anymore.
2362 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2363
2364 2008-06-15 Pavel Roskin <proski@gnu.org>
2365
2366 * commands/ls.c (grub_ls_list_files): Use integer calculations
2367 for human readable format, avoid floating point use.
2368 * kern/misc.c (grub_ftoa): Remove.
2369 (grub_vsprintf): Remove floating point support.
2370
2371 2008-06-15 Robert Millan <rmh@aybabtu.com>
2372
2373 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2374 devices.
2375 Reported by Max Vozeler.
2376
2377 2008-06-15 Robert Millan <rmh@aybabtu.com>
2378
2379 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2380 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2381 skipped later.
2382 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2383 the beginning of the prefix.
2384
2385 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2386 It is assumed that if we have a memdisk, grub-mkimage has set
2387 grub_prefix to include the "(memdisk)" drive in it.
2388
2389 2008-06-15 Robert Millan <rmh@aybabtu.com>
2390
2391 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2392 Initialize keyboard controller after registering the terminal, so that
2393 grub_printf() can be called from grub_keyboard_controller_init().
2394
2395 2008-06-15 Robert Millan <rmh@aybabtu.com>
2396
2397 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2398 extent-btree which is written as big endian on disk.
2399 Reported by Alain Greppin <al@chilibi.org>.
2400
2401 2008-06-14 Robert Millan <rmh@aybabtu.com>
2402
2403 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2404 * util/i386/pc/grub-install.in (modules): Likewise.
2405
2406 2008-06-13 Pavel Roskin <proski@gnu.org>
2407
2408 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2409
2410 2008-06-13 Bean <bean123ch@gmail.com>
2411
2412 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2413
2414 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2415
2416 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2417 to indicate sparse block.
2418
2419 2008-06-12 Pavel Roskin <proski@gnu.org>
2420
2421 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2422 number, grub_fshelp_read() does it for us.
2423
2424 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2425 linear disk read with journal translation.
2426 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2427 * include/grub/fshelp.h: Declare grub_fshelp_read().
2428
2429 2008-06-09 Pavel Roskin <proski@gnu.org>
2430
2431 * fs/minix.c (grub_minix_mount): Handle error reading
2432 superblock.
2433
2434 2008-06-08 Robert Millan <rmh@aybabtu.com>
2435
2436 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2437 don't append the RAID prefix afterwards.
2438 Reported by Clint Adams.
2439
2440 2008-06-08 Robert Millan <rmh@aybabtu.com>
2441
2442 Based on description from Pavel:
2443 * kern/disk.c (grub_disk_check_range): Rename to ...
2444 (grub_disk_adjust_range): ... this. Add a comment explaining the
2445 tasks performed by this function.
2446
2447 2008-06-08 Robert Millan <rmh@aybabtu.com>
2448
2449 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2450 `num_serial' (for consistency with other variables).
2451 (struct grub_ntfs_data): Add `uuid' member.
2452 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2453 (grub_ntfs_uuid): New function.
2454 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2455
2456 2008-06-07 Pavel Roskin <proski@gnu.org>
2457
2458 * util/biosdisk.c (open_device): Revert last change to the
2459 function, it broke installation. The sector needs to be
2460 different dependent on which device is opened.
2461
2462 2008-06-06 Robert Millan <rmh@aybabtu.com>
2463
2464 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2465 rest of GRUB, and breakage doesn't happen if its value were modified.
2466
2467 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2468 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2469 a constant (same value).
2470 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2471 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2472
2473 2008-06-06 Robert Millan <rmh@aybabtu.com>
2474
2475 * util/biosdisk.c (open_device): Do not modify sector offset when
2476 accessing a partition. kern/disk.c already handles this for us.
2477
2478 2008-06-06 Robert Millan <rmh@aybabtu.com>
2479
2480 * util/grub-emu.c (grub_machine_init): Move code in this function from
2481 here ...
2482 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2483 segfault in case grub_printf() is called).
2484
2485 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2486 grub_probe. Update all users not to explicitly add it again.
2487 (grub_device): New variable; contains corresponding device for grubdir.
2488 (fs_module, partmap_module, devabstraction_module): Pass
2489 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2490 every time.
2491
2492 2008-06-05 Robert Millan <rmh@aybabtu.com>
2493
2494 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2495 is found, print it (same layout as with labels).
2496
2497 2008-06-04 Robert Millan <rmh@aybabtu.com>
2498
2499 * util/biosdisk.c (get_drive): Rename to ...
2500 (find_grub_drive): ... this. Update all users.
2501
2502 (get_os_disk): Rename to ...
2503 (convert_system_partition_to_system_disk): ... this. Update all users.
2504
2505 (find_drive): Rename to ...
2506 (find_system_device): ... this. Update all users.
2507
2508 2008-06-04 Robert Millan <rmh@aybabtu.com>
2509
2510 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2511 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2512 (make_device_map): Likewise.
2513
2514 2008-06-01 Robert Millan <rmh@aybabtu.com>
2515
2516 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2517 before dereferencing it.
2518
2519 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2520 union with fat12/fat16-specific ones. Add some new fields, including
2521 `num_serial' for both versions.
2522 (struct grub_fat_data): Add `uuid' member.
2523 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2524 names. Initialize `data->uuid' using `num_serial'.
2525 (grub_fat_uuid): New function.
2526 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2527
2528 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2529 (grub_reiserfs_uuid): New function.
2530 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2531 member.
2532
2533 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2534 (grub_xfs_uuid): New function.
2535 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2536
2537 2008-06-01 Robert Millan <rmh@aybabtu.com>
2538
2539 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2540 code that is backward compatible with pre-uuid search command.
2541
2542 2008-05-31 Robert Millan <rmh@aybabtu.com>
2543
2544 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2545 floppies after everything else, to ensure floppy drive isn't accessed
2546 unnecessarily (patch from Bean).
2547
2548 2008-05-31 Robert Millan <rmh@aybabtu.com>
2549
2550 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2551 not print device names when we were asked to set a variable.
2552
2553 2008-05-31 Robert Millan <rmh@aybabtu.com>
2554
2555 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2556 using "cursor-on" and "cursor-off" commands (understood at least by
2557 the Open Firmware flavour on OLPC).
2558
2559 2008-05-31 Michael Gorven <michael@gorven.za.net>
2560
2561 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2562 on and off sequences.
2563
2564 2008-05-31 Robert Millan <rmh@aybabtu.com>
2565
2566 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2567 * util/update-grub.in: Likewise.
2568
2569 2008-05-30 Pavel Roskin <proski@gnu.org>
2570
2571 * util/biosdisk.c (linux_find_partition): Simplify logic and
2572 make the code more universal. Keep special processing for
2573 devfs, but use a simple rule for all other devices. If the
2574 device ends with a number, append 'p' and the partition number.
2575 Otherwise, append only the partition number.
2576
2577 2008-05-30 Robert Millan <rmh@aybabtu.com>
2578
2579 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2580 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2581 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2582 the `root' parameter to Linux.
2583
2584 2008-05-30 Robert Millan <rmh@aybabtu.com>
2585
2586 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2587 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2588 --fs_uuid with --fs-uuid.
2589 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2590 all filesystems support them).
2591
2592 2008-05-30 Robert Millan <rmh@aybabtu.com>
2593
2594 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2595 grub_printf() flags, since we're printing in units of 2 bytes.
2596
2597 2008-05-30 Robert Millan <rmh@aybabtu.com>
2598
2599 * util/grub.d/00_header.in: Remove obsolete comment referencing
2600 convert_system_path_to_grub_path().
2601 * util/update-grub.in: Likewise.
2602 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2603 (convert_system_path_to_grub_path): Add a warning message explaining
2604 that this function is deprecated. Rely on is_path_readable_by_grub()
2605 for the readability checks.
2606 (font_path): Use is_path_readable_by_grub() for the readability
2607 check rather than convert_system_path_to_grub_path().
2608
2609 2008-05-30 Robert Millan <rmh@aybabtu.com>
2610
2611 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2612 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2613 converting it first.
2614 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2615 grub.cfg for access to font file, and afterwards call it again to set
2616 the root device.
2617
2618 2008-05-30 Robert Millan <rmh@aybabtu.com>
2619
2620 * commands/search.c (options): Add --fs_uuid option.
2621 (search_fs_uuid): New function.
2622 (grub_cmd_search): Fix --set argument passing.
2623 Use search_fs_uuid() when requested via --fs_uuid.
2624 (grub_search_init): Update help message.
2625 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2626 and redeclare it as an array of 16-bit words.
2627 (grub_ext2_uuid): New function.
2628 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2629 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2630 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2631 (GRUB_DEVICE_BOOT_UUID): New variables.
2632 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2633 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2634 whenever possible.
2635 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2636 just assume `root' variable has the right value.
2637 * util/grub.d/10_linux.in: Likewise.
2638 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2639 via PRINT_FS_UUID.
2640 (main): Recognise `-t fs_uuid' argument.
2641
2642 2008-05-30 Robert Millan <rmh@aybabtu.com>
2643
2644 * util/biosdisk.c (map): Redefine structure to hold information
2645 about GRUB drive name.
2646 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2647 drive names.
2648 (call_hook): Remove.
2649 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2650 member. Assume drive has partitions.
2651 (grub_util_biosdisk_open): Access device names via `.device' struct
2652 member.
2653 (open_device): Likewise.
2654 (find_drive): Likewise.
2655 (read_device_map): Adjust map[] usage to match the new struct
2656 definition. Don't check for duplicates (still possible, but not cheap
2657 anymore).
2658 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2659 (make_device_name): Remove assumption of BIOS-like drive names.
2660
2661 2008-05-30 Pavel Roskin <proski@gnu.org>
2662
2663 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2664 compiling execute.c doesn't need grub_script.tab.h anymore.
2665 (normal/command.c_DEPENDENCIES): Likewise.
2666 (normal/function.c_DEPENDENCIES): Likewise.
2667 * conf/i386-ieee1275.rmk: Likewise.
2668 * conf/i386-linuxbios.rmk: Likewise.
2669 * conf/i386-pc.rmk: Likewise.
2670 * conf/powerpc-ieee1275.rmk: Likewise.
2671 * conf/sparc64-ieee1275.rmk: Likewise.
2672
2673 2008-05-29 Pavel Roskin <proski@gnu.org>
2674
2675 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2676 when scanning metadata for volume group name.
2677
2678 * include/grub/script.h: Don't include grub_script.tab.h. It's
2679 a generated file, which may only be included from the files with
2680 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2681 use union YYSTYPE, as the later allows forward declaration.
2682 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2683
2684 2008-05-29 Robert Millan <rmh@aybabtu.com>
2685
2686 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2687 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2688 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2689 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2690 scan codes.
2691
2692 2008-05-29 Robert Millan <rmh@aybabtu.com>
2693
2694 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2695 control key combinations.
2696
2697 2008-05-29 Robert Millan <rmh@aybabtu.com>
2698
2699 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2700 * util/ieee1275/grub-install.in: ... to here.
2701 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2702 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2703 (grub_install_SOURCES): Likewise.
2704
2705 2008-05-29 Robert Millan <rmh@aybabtu.com>
2706
2707 * fs/affs.c: Update copyright year.
2708 * fs/ext2.c: Likewise.
2709 * fs/fshelp.c: Likewise.
2710 * fs/hfsplus.c: Likewise.
2711 * fs/ntfs.c: Likewise.
2712 * fs/xfs.c: Likewise.
2713 * include/grub/fshelp.h: Likewise.
2714 * util/grub-mkdevicemap.c: Likewise.
2715
2716 2008-05-28 Robert Millan <rmh@aybabtu.com>
2717
2718 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2719 might need to be fatfs to support some firmware implementations
2720 (e.g. OFW or EFI).
2721
2722 2008-05-28 Robert Millan <rmh@aybabtu.com>
2723
2724 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2725 devices.
2726 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2727 (make_device_map): Likewise.
2728
2729 2008-05-20 Bean <bean123ch@gmail.com>
2730
2731 * fs/fshelp.c (grub_fshelp_map_block): New function.
2732 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2733 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2734
2735 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2736 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2737 (grub_fshelp_journal): New structure.
2738 (grub_fshelp_map_block): New function prototype.
2739 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2740 (grub_fshelp_map_block): Likewise.
2741
2742 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2743 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2744 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2745 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2746 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2747 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2748 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2749 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2750 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2751 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2752 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2753 (grub_ext2_sblock): New members for journal support.
2754 (grub_ext3_journal_header): New structure.
2755 (grub_ext3_journal_revoke_header): Likewise.
2756 (grub_ext3_journal_block_tag): Likewise.
2757 (grub_ext3_journal_sblock): Likewise.
2758 (grub_fshelp_node): New members logfile and journal.
2759 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2760 grub_fshelp_map_block to get real block number.
2761 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2762 number.
2763 (grub_ext2_read_inode): Likewise.
2764 (grub_ext3_get_journal): New function.
2765 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2766 (grub_ext2_close): Release memory used by journal.
2767
2768 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2769 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2770 (grub_reiserfs_transaction_header): Renamed to
2771 grub_reiserfs_description_block, replace field data with real_blocks.
2772 (grub_reiserfs_commit_block): New structure.
2773 (grub_reiserfs_data): New member journal.
2774 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2775 number.
2776 (grub_reiserfs_read_symlink): Likewise.
2777 (grub_reiserfs_iterate_dir): Likewise.
2778 (grub_reiserfs_open): Likewise.
2779 (grub_reiserfs_read): Likewise.
2780 (grub_reiserfs_get_journal): New function.
2781 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2782 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2783 using grub_reiserfs_get_journal.
2784 (grub_reiserfs_close): Release memory used by journal.
2785
2786 * fs/affs.c (grub_affs_read_block): Change block type to
2787 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2788
2789 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2790
2791 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2792
2793 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2794
2795 * fs/udf.c (grub_udf_read_block): Change block type to
2796 grub_disk_addr_t. Use type cast to avoid warning.
2797
2798 * fs/xfs.c (grub_xfs_read_block): Likewise.
2799
2800 2008-05-16 Christian Franke <franke@computer.org>
2801
2802 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2803 to ensure that break with ESC will always work.
2804 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2805 Remove ESC from keyboard queue.
2806
2807 2008-05-16 Christian Franke <franke@computer.org>
2808
2809 * util/biosdisk.c: [__CYGWIN__] Add includes.
2810 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2811 (get_os_disk): Move variable declarations to OS specific
2812 parts to avoid warning.
2813 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2814 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2815 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2816 Cygwin.
2817 * util/getroot.c: [__CYGWIN__] Add includes.
2818 (strip_extra_slashes): Fix "/" case.
2819 [__CYGWIN__] (get_win32_path): New function.
2820 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2821 [__CYGWIN__] (find_root_device): Disable.
2822 [__CYGWIN__] (get_bootsec_serial): New function.
2823 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2824 [__linux__] (grub_guess_root_device): Add early returns to simplify
2825 structure.
2826 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2827 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2828 check for Linux only.
2829
2830 2008-05-15 Bean <bean123ch@gmail.com>
2831
2832 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2833 keyboard hang problem in apple's intel mac.
2834
2835 2008-05-09 Robert Millan <rmh@aybabtu.com>
2836
2837 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2838 devices.
2839 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2840 (make_device_map): Likewise.
2841 Reported by Aurelien Jarno <aurel32@debian.org>
2842
2843 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2844
2845 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2846 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2847 (make_device_map): Output entries for xvd type disks.
2848
2849 2008-05-07 Robert Millan <rmh@aybabtu.com>
2850
2851 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2852 devices.
2853 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2854 (make_device_map): Likewise.
2855 Reported by Roland Dreier <rdreier@cisco.com>
2856
2857 2008-05-07 Robert Millan <rmh@aybabtu.com>
2858
2859 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2860 grub_strstr() call. Correct a few mistakes in failure path handling.
2861
2862 2008-05-06 Robert Millan <rmh@aybabtu.com>
2863
2864 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2865 Do not print a trailing slash (therefore, the root directory is an
2866 empty string).
2867 (convert_system_path_to_grub_path): Do not remove trailing slash
2868 from make_system_path_relative_to_its_root() output.
2869
2870 * util/i386/pc/grub-install.in: Add trailing slash to output from
2871 make_system_path_relative_to_its_root().
2872
2873 2008-05-06 Robert Millan <rmh@aybabtu.com>
2874
2875 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2876 ensures that output lines aren't intermangled with those sent to
2877 stderr (via grub_util_info()).
2878 * util/grub-probe.c (grub_refresh): Likewise.
2879 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2880
2881 2008-05-05 Christian Franke <franke@computer.org>
2882
2883 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2884 Add Cygwin device names.
2885 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2886 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2887 (check_device): Return error instead of success on empty name.
2888 (make_device_map): Move label inside linux specific code to
2889 prevent compiler warning.
2890
2891 2008-04-30 Robert Millan <rmh@aybabtu.com>
2892
2893 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2894 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2895 first boot option.
2896 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2897
2898 2008-04-29 Robert Millan <rmh@aybabtu.com>
2899
2900 * docs/grub.cfg: New file (example GRUB configuration).
2901
2902 2008-04-26 Robert Millan <rmh@aybabtu.com>
2903
2904 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2905 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2906 and `disk/ieee1275/nand.c'.
2907
2908 2008-04-25 Bean <bean123ch@gmail.com>
2909
2910 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2911 i386-linuxbios.
2912
2913 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2914 change the buffer size to 4096 for cdrom device.
2915
2916 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2917 and nand.mod.
2918 (_linux_mod_SOURCES): New variable.
2919 (_linux_mod_CFLAGS): Likewise.
2920 (_linux_mod_LDFLAGS): Likewise.
2921 (linux_mod_SOURCES): Likewise.
2922 (linux_mod_CFLAGS): Likewise.
2923 (linux_mod_LDFLAGS): Likewise.
2924 (nand_mod_SOURCES): Likewise.
2925 (nand_mod_CFLAGS): Likewise.
2926 (nand_mod_LDFLAGS): Likewise.
2927
2928 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2929 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2930 type property. (nand device in olpc don't have this property)
2931
2932 * include/grub/disk.h (grub_disk_dev_id): New macro
2933 GRUB_DISK_DEVICE_NAND_ID.
2934
2935 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2936 function prototype.
2937 (grub_rescue_cmd_initrd): Likewise.
2938
2939 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2940 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2941 ofw_cif_handler and ofw_idt, adjust padding number.
2942
2943 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2944 GRUB_MACHINE_IEEE1275 is defined.
2945
2946 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2947 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2948
2949 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2950 on nested function heap_init.
2951 (grub_upper_mem): New variable for i386-ieee1275.
2952 (grub_get_extended_memory): New function for i386-ieee1275.
2953 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2954
2955 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2956 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2957 property.
2958
2959 * loader/i386/ieee1275/linux.c: New file.
2960
2961 * loader/i386/ieee1275/linux_normal.c: New file.
2962
2963 * disk/ieee1275/nand.c: New file.
2964
2965 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2966
2967 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2968 value.
2969 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2970
2971 2008-04-18 Robert Millan <rmh@aybabtu.com>
2972
2973 Restructures early code path on ieee1275 to unify grub_main() as
2974 the first C function that is executed in every platform.
2975
2976 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2977 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2978 cmain().
2979 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2980 * kern/ieee1275/cmain.c (cmain): Rename to ...
2981 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2982 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2983 at the beginning.
2984
2985 2008-04-18 Robert Millan <rmh@aybabtu.com>
2986
2987 * util/update-grub.in: Fix syntax error when setting
2988 `GRUB_PRELOAD_MODULES'.
2989 Reported by Stephane Chazelas <stephane@artesyncp.com>
2990
2991 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2992
2993 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2994 section into account, newer toolchains generate unique build ids
2995 * configure.ac: remove the test for --build-id=none acceptance,
2996 we want build ids to be preserved
2997 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2998 far from other sections don't cause the raw binary images grow
2999 size
3000
3001 2008-04-15 Robert Millan <rmh@aybabtu.com>
3002
3003 * disk/lvm.c: Update copyright year.
3004 * kern/misc.c: Likewise.
3005
3006 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3007
3008 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3009 there is no memory left for physical volume name.
3010
3011 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3012
3013 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3014 volume name mapping to support bigger than 9 character names properly.
3015
3016 2008-04-13 Robert Millan <rmh@aybabtu.com>
3017
3018 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3019 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3020
3021 2008-04-13 Christian Franke <franke@computer.org>
3022
3023 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3024 to create a floppy emulation boot CD when non emulation mode
3025 does not work.
3026 Enable Joliet CD filesystem extension.
3027
3028 2008-04-13 Robert Millan <rmh@aybabtu.com>
3029
3030 * kern/misc.c (grub_strncat): Fix off-by-one error.
3031 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3032
3033 * kern/env.c (grub_env_context_close): Clear current context, not
3034 previous one.
3035 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3036
3037 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3038
3039 2008-04-13 Robert Millan <rmh@aybabtu.com>
3040
3041 Improve robustness when handling LVM.
3042
3043 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3044 (and leave `*p' unmodified).
3045 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3046 through it.
3047 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3048 iterating through it.
3049 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3050 through it.
3051 (grub_lvm_scan_device): Check the return value (and fail gracefully
3052 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3053 Don't assume `vg->pvs != NULL' when iterating through it.
3054
3055 2008-04-13 Robert Millan <rmh@aybabtu.com>
3056
3057 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3058 * genmk.rb (partmap): New variable.
3059 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3060 (#{partmap}): New target rule.
3061 * genpartmaplist.sh: New file.
3062 * Makefile.in (pkglib_DATA): Add partmap.lst.
3063 (partmap.lst): New target rule.
3064 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3065 modules (including all partition maps), instead of preloading them.
3066
3067 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3068
3069 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3070 `linux-boot-prober' (if installed) to detect other operating
3071 systems which are installed on the computer and add them to
3072 the boot menu.
3073 * conf/common.rmk: Build and install 30_os-prober.
3074
3075 2008-04-12 Robert Millan <rmh@aybabtu.com>
3076
3077 * kern/powerpc/ieee1275/init.c: Move from here ...
3078 * kern/ieee1275/init.c: ... to here. Update all users.
3079
3080 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3081 * kern/ieee1275/cmain.c: ... to here. Update all users.
3082
3083 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3084 * kern/ieee1275/openfw.c: ... to here. Update all users.
3085
3086 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3087 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3088
3089 2008-04-10 Pavel Roskin <proski@gnu.org>
3090
3091 * configure.ac: Always use "_cv_" in cache variables for
3092 compatibility with Autoconf 2.62.
3093
3094 2008-04-07 Robert Millan <rmh@aybabtu.com>
3095
3096 Revert grub/machine/init.h addition by Pavel (since it breaks on
3097 i386-ieee1275 and others):
3098 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3099 * util/powerpc/ieee1275/misc.c: Likewise.
3100
3101 2008-04-07 Robert Millan <rmh@aybabtu.com>
3102
3103 * util/grub-probe.c (probe): Improve error message.
3104
3105 2008-04-07 Robert Millan <rmh@aybabtu.com>
3106
3107 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3108 (this prevents the presence of a bogus entry from ruining the whole
3109 thing).
3110
3111 2008-04-06 Pavel Roskin <proski@gnu.org>
3112
3113 * util/biosdisk.c: Include grub/util/biosdisk.h.
3114 * util/grub-fstest.c (execute_command): Make static.
3115 * util/grub-mkdevicemap.c (check_device): Likewise.
3116 * util/i386/pc/misc.c: Include grub/machine/init.h.
3117 * util/powerpc/ieee1275/misc.c: Likewise.
3118 * util/lvm.c: Include grub/util/lvm.h.
3119 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3120 grub/cache.h.
3121 * util/raid.c: Include grub/util/raid.h.
3122 (grub_util_getdiskname): Make static.
3123
3124 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3125 grub_hostfs_fini(), as they are called from grub_init_all() and
3126 grub_fini_all() respectively. This fixes an infinite loop in
3127 grub-fstest due to double registration of hostfs.
3128 Reported by Christian Franke <Christian.Franke@t-online.de>
3129
3130 2008-04-05 Pavel Roskin <proski@gnu.org>
3131
3132 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3133 all 8 functions. Otherwise, probe function 0 only.
3134
3135 2008-04-04 Pavel Roskin <proski@gnu.org>
3136
3137 * commands/lspci.c (grub_lspci_iter): Print the bus number
3138 correctly.
3139
3140 * commands/lspci.c (grub_pci_classes): Fix typos.
3141 (grub_lspci_iter): Don't print func twice. Print vendor ID
3142 before device ID, as it's normally done.
3143
3144 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3145 Fix signedness warnings.
3146 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3147 Likewise.
3148 * util/ieee1275/get_disk_name.c: Include config.h so that
3149 _GNU_SOURCE is defined and getline() is declared. Mark an
3150 unused argument as such. Fix a signedness warning.
3151
3152 2008-04-02 Pavel Roskin <proski@gnu.org>
3153
3154 * genkernsyms.sh.in: Use more robust assignments for CC and
3155 srcdir. Quote srcdir.
3156 * gensymlist.sh.in: Likewise. Assert at the compile time that
3157 the symbol table is not empty.
3158
3159 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3160 * fs/cpio.c (grub_cpio_read): Likewise.
3161
3162 2008-04-01 Pavel Roskin <proski@gnu.org>
3163
3164 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3165 * disk/host.c (grub_host_open): Likewise.
3166 * disk/loopback.c (grub_loopback_open): Likewise.
3167 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3168 disk->id as in disk/host.c, not a multi-character constant.
3169
3170 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3171 later is obsolete, potentially dangerous and sets a bad example.
3172 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3173 * util/misc.c (grub_util_get_image_size): Likewise.
3174
3175 * disk/loopback.c (options): Improve help for "--partitions".
3176
3177 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3178 options to align them with the short options, e.g. "echo -e".
3179
3180 2008-03-31 Bean <bean123ch@gmail.com>
3181
3182 * video/reader/png.c (grub_png_data): New member is_16bit and
3183 image_data.
3184 (grub_png_decode_image_header): Detect 16 bit png image.
3185 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3186 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3187 (grub_video_reader_png): Release memory occupied by image_data.
3188
3189 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3190 4096 bytes.
3191 (grub_nfs_mount): Skip the test for sector per cluster.
3192
3193 * include/grub/ntfs.h (MAX_SPC): Removed.
3194
3195 2008-03-31 Bean <bean123ch@gmail.com>
3196
3197 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3198 (grub_probe_SOURCES): Add fs/afs.c.
3199 (grub_fstest_SOURCES): Likewise.
3200 (afs_mod_SOURCES): New variable.
3201 (afs_mod_CFLAGS): Likewise.
3202 (afs_mod_LDFLAGS): Likewise.
3203
3204 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3205 (grub_emu_SOURCES): Likewise.
3206
3207 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3208
3209 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3210
3211 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3212
3213 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3214
3215 * fs/afs.c: New file.
3216
3217 2008-03-30 Pavel Roskin <proski@gnu.org>
3218
3219 * disk/host.c: Include grub/misc.h to fix a warning.
3220 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3221 warnings about implicit declarations.
3222
3223 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3224 variable.
3225 * include/grub/i386/loader.h: Change declaration of
3226 grub_linux_boot() to match what grub_loader_set() expects.
3227 * util/getroot.c (grub_guess_root_device): Return const char* to
3228 fix a warning.
3229 * util/grub-probe.c (probe): Fix a warning about uninitialized
3230 abstraction_name variable.
3231 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3232 second argument as unused to fix a warning.
3233
3234 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3235 missing grub_error() call.
3236
3237 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3238 2.60 and newer uses it to define datadir.
3239
3240 * commands/sleep.c: Fix warning about implicit declaration.
3241 * disk/memdisk.c: Likewise.
3242 * loader/aout.c: Likewise.
3243 * loader/i386/bsd_normal.c: Likewise.
3244 * util/grub-probe.c: Likewise.
3245
3246 * commands/i386/cpuid.c (has_longmode): Make static.
3247 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3248 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3249
3250 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3251 GDT. This is more robust, as %ds can change.
3252 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3253 calling real_to_prot().
3254 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3255
3256 2008-03-28 Pavel Roskin <proski@gnu.org>
3257
3258 * kern/i386/pc/startup.S: Assert that uncompressed functions
3259 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3260 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3261 code, as they push parts of the code (error handlers) beyond
3262 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3263 code as correctness and size.
3264
3265 2008-03-28 Pavel Roskin <proski@gnu.org>
3266
3267 * kern/i386/pc/startup.S
3268 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3269 data block address to the real mode, keep offset minimal. This
3270 works around a bug in AWARD BIOS on old Athlon systems, which
3271 makes CD detection hang.
3272
3273 2008-03-26 Pavel Roskin <proski@gnu.org>
3274
3275 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3276 const.
3277 * include/grub/normal.h: Add grub_parse_color_name_pair()
3278 declaration.
3279
3280 2008-03-24 Bean <bean123ch@gmail.com>
3281
3282 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3283 (cd_count): Removed.
3284 (cd_drive): New variable.
3285 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3286 (grub_biosdisk_call_hook): Likewise.
3287 (grub_biosdisk_iterate): Change cdrom detection method.
3288 (grub_biosdisk_open): Replace cd_start with cd_drive.
3289 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3290 detect cdrom device.
3291
3292 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3293 Removed.
3294 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3295 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3296 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3297 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3298 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3299 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3300 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3301 (grub_biosdisk_cdrp): New structure.
3302 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3303
3304 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3305
3306 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3307 device.
3308
3309 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3310 New function.
3311
3312 2008-03-20 Robert Millan <rmh@aybabtu.com>
3313
3314 Remove 2 TiB limit in ata.mod.
3315 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3316 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3317 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3318 grub_uint64_t instead of grub_uint32_t.
3319
3320 2008-03-05 Bean <bean123ch@gmail.com>
3321
3322 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3323 (grub_multiboot): Set boot device.
3324
3325 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3326
3327 2008-03-02 Bean <bean123ch@gmail.com>
3328
3329 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3330 symlink_buffer.
3331
3332 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3333
3334 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3335 texinfo.tex.
3336
3337 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3338 modified.
3339
3340 * docs/fdl.texi: New file.
3341
3342 * docs/mdate-sh: New file. Copied from gnulib.
3343 * docs/texinfo.tex: Likewise.
3344
3345 * config.guess: Updated from gnulib.
3346 * install-sh: Likewise.
3347
3348 2008-02-28 Robert Millan <rmh@aybabtu.com>
3349
3350 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3351 (aout_mod_SOURCES): New variable.
3352 (aout_mod_CFLAGS): Likewise.
3353 (aout_mod_LDFLAGS): Likewise.
3354
3355 * conf/i386-ieee1275.rmk: Likewise.
3356
3357 2008-02-28 Robert Millan <rmh@aybabtu.com>
3358
3359 * util/update-grub.in: Reorganise terminal validity check. Accept
3360 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3361 Based on suggestion by Franklin PIAT.
3362
3363 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3364
3365 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3366 function.
3367 * util/getroot.c (grub_util_check_block_device): New function that
3368 returns the given argument if it is a block device and returns NULL else.
3369 * util/grub-probe.c (argument_is_device): New variable.
3370 (probe): Promote device_name from a variable to an argument. Receive
3371 device_name from grub_util_check_block_device() if path is NULL and from
3372 grub_guess_root_device() else. Do not free() device_name anymore.
3373 (options): Introduce new parameter '-d, --device'.
3374 (main): Add description of the new parameter to the help screen.
3375 Rename path variable to argument. Set argument_is_device if the '-d'
3376 option is given. Pass argument to probe() depending on
3377 argument_is_device.
3378
3379 2008-02-24 Bean <bean123ch@gmail.com>
3380
3381 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3382 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3383 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3384 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3385 (GRUB_ISO9660_VOLDESC_END): Likewise.
3386 (grub_iso9660_primary_voldesc): New member escape.
3387 (grub_iso9660_data): New member joliet.
3388 (grub_iso9660_convert_string): New function.
3389 (grub_iso9660_mount): Detect joliet extension.
3390 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3391 (grub_iso9660_iso9660_label): Likewise.
3392
3393 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3394 (grub_setup_SOURCES): Add fs/udf.c.
3395 (grub_fstest_SOURCES): Likewise.
3396 (udf_mod_SOURCES): New variable.
3397 (udf_mod_CFLAGS): Likewise.
3398 (udf_mod_LDFLAGS): Likewise.
3399
3400 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3401 (grub_emu_SOURCES): Likewise.
3402
3403 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3404
3405 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3406
3407 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3408
3409 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3410
3411 * fs/udf.c: New file.
3412
3413 2008-02-24 Robert Millan <rmh@aybabtu.com>
3414
3415 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3416 (normal/lexer.c_DEPENDENCIES): New variables.
3417 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3418 (normal/lexer.c_DEPENDENCIES): Likewise.
3419 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3420 (normal/lexer.c_DEPENDENCIES): Likewise.
3421 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3422 (normal/lexer.c_DEPENDENCIES): Likewise.
3423 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3424 (normal/lexer.c_DEPENDENCIES): Likewise.
3425 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3426 (normal/lexer.c_DEPENDENCIES): Likewise.
3427
3428 2008-02-23 Robert Millan <rmh@aybabtu.com>
3429
3430 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3431 since they were intended to be in hex. This didn't break previously
3432 because of a bug in gpt_partition_map_iterate() (see below).
3433
3434 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3435 when checking the validity of GPT header.
3436 Remove `partno', since it always provides the same information as `i'.
3437
3438 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3439
3440 * include/grub/efi/time.h: Fix a wrong comment.
3441
3442 2008-02-19 Pavel Roskin <proski@gnu.org>
3443
3444 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3445 message.
3446
3447 2008-02-19 Bean <bean123ch@gmail.com>
3448
3449 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3450 (aout_mod_SOURCES): New variable.
3451 (aout_mod_CFLAGS): Likewise.
3452 (aout_mod_LDFLAGS): Likewise.
3453 (_bsd_mod_SOURCES): New variable.
3454 (_bsd_mod_CFLAGS): Likewise.
3455 (_bsd_mod_LDFLAGS): Likewise.
3456 (bsd_mod_SOURCES): New variable.
3457 (bsd_mod_CFLAGS): Likewise.
3458 (bsd_mod_LDFLAGS): Likewise.
3459
3460 * include/grub/aout.h: New file.
3461
3462 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3463
3464 * include/grub/i386/bsd.h: New file.
3465
3466 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3467 to make it public.
3468
3469 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3470 function is called, so that it's possible to change it inside the hook.
3471 (grub_elf64_load): Likewise.
3472 (grub_elf_file): Don't close the file if elf header is not found.
3473 (grub_elf_close): Close the file if grub_elf_file fails (The new
3474 grub_elf_file won't close it).
3475 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3476 (grub_elf64_size): Likewise.
3477
3478 * kern/i386/loader.S (grub_unix_real_boot): New function.
3479
3480 * loader/aout.c: New file.
3481
3482 * loader/i386/bsd.c: New file.
3483
3484 * loader/i386/bsd_normal.c: New file.
3485
3486 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3487
3488 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3489 can test other formats.
3490
3491 2008-02-19 Robert Millan <rmh@aybabtu.com>
3492
3493 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3494 (grub_gpt_partition_type_empty): Redefine with macro from
3495 `<grub/gpt_partition.h>'.
3496 (gpt_partition_map_iterate): Adjust partition type comparison.
3497
3498 Export `entry' as partmap-specific `part.data' struct.
3499 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3500
3501 * include/grub/gpt_partition.h (grub_gpt_header)
3502 (grub_gpt_partentry): ... to here (new file).
3503
3504 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3505
3506 (grub_gpt_partition_type_bios_boot): New const variable, defined
3507 with macro from `<grub/gpt_partition.h>'.
3508
3509 (setup): Replace `first_start' with `embed_region', which keeps
3510 track of the embed region (and is partmap-agnostic).
3511
3512 Replace find_first_partition_start() with find_usable_region(),
3513 which finds a usable region for embedding using partmap-specific
3514 knowledge (supports PC/MSDOS and GPT).
3515
3516 Fix all assumptions that the embed region start at sector 1, using
3517 `embed_region.start' from now on. Similarly, use `embed_region.end'
3518 rather than `first_start' to calculate available size.
3519
3520 In grub_util_info() message, replace "into after the MBR" with an
3521 indication of the specific sector our embed region starts at.
3522
3523 2008-02-19 Robert Millan <rmh@aybabtu.com>
3524
3525 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3526 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3527 `commands/reboot.c'.
3528 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3529 (halt_mod_SOURCES): Likewise.
3530 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3531 (halt_mod_SOURCES): Likewise.
3532
3533 2008-02-17 Christian Franke <franke@computer.org>
3534
3535 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3536
3537 2008-02-17 Robert Millan <rmh@aybabtu.com>
3538
3539 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3540 set `first_start' to 0 for non-PC/MSDOS partition maps.
3541
3542 2008-02-16 Robert Millan <rmh@aybabtu.com>
3543
3544 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3545 do not assume partition map is PC/MSDOS before performing checks that
3546 are specific to that layout.
3547
3548 2008-02-13 Robert Millan <rmh@aybabtu.com>
3549
3550 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3551 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3552 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3553
3554 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3555
3556 * configure.ac: Only a cosmetic change on the handling of
3557 -fno-stack-protector.
3558
3559 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3560
3561 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3562 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3563 reboot.c.
3564 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3565 (halt_mod_SOURCES): New variable.
3566 (halt_mod_CFLAGS): Likewise.
3567 (halt_mod_LDFLAGS): Likewise.
3568 (reboot_mod_SOURCES): Likewise.
3569 (reboot_mod_CFLAGS): Likewise.
3570 (reboot_mod_LDFLAGS): Likewise.
3571
3572 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3573 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3574 reboot.c.
3575 (halt_mod_SOURCES): Likewise.
3576 (reboot_mod_SOURCES): Likewise.
3577
3578 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3579 commands/i386/pc/reboot.c by commands/reboot.c.
3580 (reboot_mod_SOURCES): Likewise.
3581
3582 * commands/i386/pc/reboot.c: merge this file ...
3583
3584 * commands/ieee1275/reboot.c: ... and this file ...
3585
3586 * commands/reboot.c: ... to this file.
3587 Add some precompiler directive to include the correct header for
3588 each machine.
3589
3590 * commands/ieee1275/halt.c: move this file ...
3591
3592 * commands/halt.c: ... to here.
3593 Add some precompiler directive to include the correct header for
3594 each machine.
3595
3596 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3597 (grub_halt): Likewise.
3598
3599 * kern/efi/efi.c (grub_reboot): New function.
3600 (grub_halt): Likewise.
3601
3602 2008-02-12 Robert Millan <rmh@aybabtu.com>
3603
3604 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3605 /dev (like it is done for /dev/mapper). This doesn't provide support
3606 for EVMS, but at least it is now easy to identify the problem when it
3607 arises.
3608
3609 2008-02-11 Robert Millan <rmh@aybabtu.com>
3610
3611 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3612 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3613 comparing it with -1, not 0.
3614
3615 2008-02-10 Robert Millan <rmh@aybabtu.com>
3616
3617 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3618 `disk/lvm.c'.
3619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3620 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3621
3622 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3623 `disk/lvm.c' to the end of the list.
3624 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3625 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3626
3627 2008-02-10 Robert Millan <rmh@aybabtu.com>
3628
3629 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3630 grub_print_error() instead. This will let user know why we're entering
3631 rescue mode.
3632 Based on suggestions from Sam Morris.
3633
3634 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3635
3636 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3637 on remaining N args, instead of "--" arg N times.
3638
3639 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3640
3641 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3642 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3643 pattern for unknown glyphs.
3644
3645 2008-02-09 Robert Millan <rmh@aybabtu.com>
3646
3647 * configure.ac: Probe for `help2man'.
3648 * Makefile.in (builddir): New variable.
3649 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3650 or otherwise add a few flags/options to it.
3651 (install-local): For every executable utility or script that is
3652 installed, invoke $(HELP2MAN) to install a manpage based on --help
3653 output.
3654
3655 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3656 that it doesn't prevent --help from working in build tree.
3657
3658 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3659 with `bug-grub@gnu.org'.
3660 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3661 * util/update-grub.in (usage): New function.
3662 Implement proper argument check, with support for --help and --version
3663 (as well as existing -y).
3664
3665 2008-02-09 Christian Franke <franke@computer.org>
3666
3667 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3668 avoid overwriting previous output.
3669 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3670
3671 2008-02-09 Robert Millan <rmh@aybabtu.com>
3672
3673 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3674 drawing the menu.
3675
3676 2008-02-09 Robert Millan <rmh@aybabtu.com>
3677
3678 * commands/sleep.c: New file.
3679 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3680 (sleep_mod_SOURCES): New variable.
3681 (sleep_mod_CFLAGS): Likewise.
3682 (sleep_mod_LDFLAGS): Likewise.
3683
3684 2008-02-09 Robert Millan <rmh@aybabtu.com>
3685
3686 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3687 situations in which we can deduce the RAID size and the superblock
3688 doesn't match it.
3689
3690 2008-02-09 Robert Millan <rmh@aybabtu.com>
3691
3692 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3693 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3694 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3695
3696 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3697 and return a grub_diskmemberlist_t composed of physical array members.
3698 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3699
3700 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3701 prototype.
3702 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3703 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3704 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3705
3706 * util/grub-probe.c (probe): Move partmap probing code from here ...
3707 (probe_partmap): ... to here.
3708 (probe): Use probe_partmap() once for the disk we're probing, and
3709 additionally, when such disk contains a memberlist() struct member,
3710 once for each disk that is contained in the structure returned by
3711 memberlist().
3712
3713 2008-02-09 Robert Millan <rmh@aybabtu.com>
3714
3715 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3716 environment variable to 'all' in order to obtain debug output from
3717 non-util/ code.
3718 * util/i386/pc/grub-setup.c (main): Likewise.
3719
3720 2008-02-08 Robert Millan <rmh@aybabtu.com>
3721
3722 * disk/raid.c (grub_raid_scan_device): Check for
3723 `array->device[sb.this_disk.number]' rather than for
3724 `array->device[sb.this_disk.number]->name', since the latter is not
3725 guaranteed to be accessible.
3726
3727 2008-02-08 Robert Millan <rmh@aybabtu.com>
3728
3729 * disk/raid.c: Update copyright.
3730 * fs/cpio.c: Likewise.
3731 * include/grub/raid.h: Likewise.
3732 * loader/i386/pc/multiboot.c: Likewise.
3733 * util/hostfs.c: Likewise.
3734
3735 2008-02-08 Robert Millan <rmh@aybabtu.com>
3736
3737 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3738 to a grub_disk_t array.
3739 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3740 `device[x]'.
3741 (grub_raid_scan_device): Replace `device[x].name' accesses with
3742 `device[x]->name'. Simplify initialization of `array->device[x]'.
3743
3744 2008-02-08 Robert Millan <rmh@aybabtu.com>
3745
3746 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3747 grub_dprintf() calls.
3748 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3749 error message.
3750
3751 2008-02-07 Christian Franke <franke@computer.org>
3752
3753 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3754 instead of fseek and ftell to support large files.
3755 (grub_hostfs_read): Likewise.
3756
3757 2008-02-07 Robert Millan <rmh@aybabtu.com>
3758
3759 Patch from Jeroen Dekkers.
3760 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3761 failure, since successfully reading all array members might not be
3762 required.
3763
3764 2008-02-06 Robert Millan <rmh@aybabtu.com>
3765
3766 * util/grub-probe.c (probe): Simplify partmap probing (with the
3767 assumption that the first word up to the underscore equals to
3768 the module name).
3769
3770 2008-02-06 Christian Franke <franke@computer.org>
3771
3772 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3773 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3774 last block of a cpio or tar stream.
3775 Check for "TRAILER!!!" instead of any empty data
3776 block to detect last block of a cpio stream.
3777 (grub_cpio_dir): Fix constness of variable np.
3778 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3779 cpio or tar trailer is detected. This fixes a crash
3780 on open of a non existing file.
3781
3782 2008-02-05 Bean <bean123ch@gmail.com>
3783
3784 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3785 address of entry.
3786 (grub_multiboot_load_elf64): Likewise.
3787 (grub_multiboot): Initialize mbi structure.
3788
3789 * util/grub-fstest.c: Don't include unused header file script.h.
3790
3791 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3792 of file.
3793 (grub_fstest_SOURCES): Likewise.
3794
3795 2008-02-05 Robert Millan <rmh@aybabtu.com>
3796
3797 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3798 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3799 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3800 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3801
3802 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3803 (translation_table): Replace hardcoded values with macros
3804 provided by `<grub/term.h>'.
3805
3806 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3807 (keyboard_map): Correct/add a few values, with macros provided
3808 by `<grub/term.h>'.
3809 (keyboard_map_shift): Zero values that don't differ from their
3810 `keyboard_map' equivalents.
3811 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3812 Discard the second scan code that is always sent by Caps lock.
3813 Only use `keyboard_map_shift' when it provides a non-zero value,
3814 otherwise fallback to `keyboard_map'.
3815
3816 2008-02-04 Bean <bean123ch@gmail.com>
3817
3818 * Makefile.in (enable_grub_fstest): New variable.
3819
3820 * conf/common.rmk (grub_fstest_init.lst): New rule.
3821 (grub_fstest_init.h): Likewise.
3822 (grub_fstest_init.c): Likewise.
3823 (util/grub-fstest.c_DEPENDENCIES): New variable.
3824 (grub_fstest_SOURCES): Likewise.
3825
3826 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3827
3828 * util/grub-fstest.c: New file.
3829
3830 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3831
3832 Make grub-setup handle a separate root device.
3833
3834 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3835 so that the root device can be compared with the destination
3836 device.
3837 When embedding the core image, if the root and destination devices
3838 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3839 0xFF.
3840 When not embedding, set ROOT_DRIVE to 0xFF.
3841
3842 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3843
3844 Add support for having a grub directory in a different drive. This
3845 is still only the data handling part.
3846
3847 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3848 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3849 (grub_root_drive): New variable.
3850
3851 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3852 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3853 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3854 as it was.
3855
3856 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3857
3858 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3859 macro.
3860 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3861
3862 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3863 is bogus, because PXE booting does not specify any drive
3864 correctly.
3865
3866 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3867 am not sure if this is really correct.
3868
3869 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3870 is always identical to the boot drive when booting from a CD.
3871
3872 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3873 longer.
3874 (root_drive): New variable.
3875 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3876 (setup_sectors): Push %dx right after popping it, because %dh will
3877 be modified later.
3878 (copy_buffer): Restore %dx.
3879
3880 2008-02-03 Robert Millan <rmh@aybabtu.com>
3881
3882 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3883 use `cdboot.img' for cdrom images.
3884
3885 2008-02-03 Robert Millan <rmh@aybabtu.com>
3886
3887 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3888 only setup gfxterm when `font' command has succeeded.
3889
3890 2008-02-03 Robert Millan <rmh@aybabtu.com>
3891
3892 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3893 (grub_rescue_cmd_multiboot_loader)
3894 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3895
3896 2008-02-03 Pavel Roskin <proski@gnu.org>
3897
3898 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3899 %edx and %esi from stack only after grub_gate_a20() is called.
3900 grub_gate_a20() clobbers %edx.
3901
3902 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3903
3904 * configure.ac (AC_INIT): Bumped to 1.96.
3905
3906 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3907 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3908 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3909 video/readers/png.c.
3910
3911 2008-02-03 Bean <bean123ch@gmail.com>
3912
3913 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3914 (cdboot_img_SOURCES): New variable.
3915 (cdboot_img_ASFLAGS): New variable.
3916 (cdboot_img_LDFLAGS): New variable.
3917
3918 * boot/i386/pc/cdboot.S: New file.
3919
3920 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3921 (cd_count): Likewise.
3922 (grub_biosdisk_get_drive): Add support for cd device.
3923 (grub_biosdisk_call_hook): Likewise.
3924 (grub_biosdisk_iterate): Likewise.
3925 (grub_biosdisk_open): Likewise.
3926 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3927 (grub_biosdisk_rw): Support reading from cd device.
3928 (GRUB_MOD_INIT): Iterate cd devices.
3929
3930 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3931 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3932 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3933
3934 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3935
3936 2008-02-02 Robert Millan <rmh@aybabtu.com>
3937
3938 * commands/read.c: New file.
3939 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3940 (read_mod_SOURCES): New variable.
3941 (read_mod_CFLAGS): Likewise.
3942 (read_mod_LDFLAGS): Likewise.
3943
3944 2008-02-02 Robert Millan <rmh@aybabtu.com>
3945
3946 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3947 determining whether menu has to be displayed.
3948
3949 2008-02-02 Marco Gerards <marco@gnu.org>
3950
3951 * bus/pci.c: New file.
3952
3953 * include/grub/pci.h: Likewise.
3954
3955 * include/grub/i386/pc/pci.h: Likewise.
3956
3957 * commands/lspci.c: Likewise.
3958
3959 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3960 `lspci.mod'.
3961 (pci_mod_SOURCES): New variable.
3962 (pci_mod_CFLAGS): Likewise.
3963 (pci_mod_LDFLAGS): Likewise.
3964 (lspci_mod_SOURCES): Likewise.
3965 (lspci_mod_CFLAGS): Likewise.
3966 (lspci_mod_LDFLAGS): Likewise.
3967
3968 2008-02-02 Bean <bean123ch@gmail.com>
3969
3970 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3971 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3972
3973 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3974 (grub_xfs_btree_node): New structure.
3975 (grub_xfs_btree_root): New structure.
3976 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3977 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3978 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3979 (GRUB_XFS_EXTENT_SIZE): Likewise.
3980 (grub_xfs_read_block): Support btree format type.
3981 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3982 Use directory block as basic unit.
3983
3984 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3985
3986 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3987 __attribute__ ((__regparm__ (1))).
3988
3989 2008-02-01 Robert Millan <rmh@aybabtu.com>
3990
3991 Correct a mistake in previous commit.
3992
3993 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3994 top.
3995 (normal/command.c_DEPENDENCIES): New variable.
3996
3997 2008-02-01 Robert Millan <rmh@aybabtu.com>
3998
3999 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4000 top.
4001 (normal/command.c_DEPENDENCIES): New variable.
4002 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4003 * conf/i386-ieee1275.rmk: Likewise.
4004 * conf/i386-linuxbios.rmk: Likewise.
4005 * conf/i386-pc.rmk: Likewise.
4006 * conf/sparc64-ieee1275.rmk: Likewise.
4007 * conf/powerpc-ieee1275.rmk: Likewise.
4008 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4009
4010 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4011
4012 2008-02-01 Robert Millan <rmh@aybabtu.com>
4013
4014 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4015 call at beginning of function.
4016
4017 2008-01-31 Pavel Roskin <proski@gnu.org>
4018
4019 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4020 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4021 (grub_mkrescue_SOURCES): Likewise.
4022 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4023
4024 2008-01-30 Robert Millan <rmh@aybabtu.com>
4025
4026 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4027 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4028 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4029 (grub_probe_SOURCES): ... to here.
4030
4031 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4032 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4033 * conf/i386-ieee1275.rmk: Likewise.
4034 * conf/i386-linuxbios.rmk: Likewise.
4035 * conf/powerpc-ieee1275.rmk: Likewise.
4036
4037 2008-01-30 Tristan Gingold <gingold@free.fr>
4038
4039 * kern/rescue.c: Silently accept empty lines.
4040
4041 2008-01-29 Bean <bean123ch@gmail.com>
4042
4043 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4044 (real_code_2): Code cleanup and change comment style.
4045 (move_memory): Avoid using 32-bit address mode.
4046
4047 2008-01-29 Bean <bean123ch@gmail.com>
4048
4049 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4050 (png_mod_SOURCES): New variable.
4051 (png_mod_CFLAGS): Likewise.
4052 (png_mod_LDFLAGS): Likewise.
4053
4054 * video/readers/png.c: New file.
4055
4056 2008-01-28 Robert Millan <rmh@aybabtu.com>
4057
4058 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4059 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4060 `ifndef GRUB_MOD_GAP' hack.
4061 * util/elf/grub-mkimage.c (add_segments): Likewise.
4062
4063 2008-01-27 Robert Millan <rmh@aybabtu.com>
4064
4065 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4066 `GRUB_MOD_GAP' for platforms in which it's not defined.
4067 * util/elf/grub-mkimage.c (add_segments): Likewise.
4068
4069 2008-01-27 Robert Millan <rmh@aybabtu.com>
4070
4071 Get grub-emu to build again (including parallel builds).
4072
4073 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4074 Split into ...
4075 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4076 (normal/execute.c_DEPENDENCIES): ... this, ...
4077 (grub-emu_DEPENDENCIES): ... and this.
4078
4079 * conf/i386-efi.rmk: Likewise.
4080 * conf/i386-linuxbios.rmk: Likewise.
4081 * conf/i386-ieee1275.rmk: Likewise.
4082 * conf/powerpc-ieee1275.rmk: Likewise.
4083 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4084
4085 2008-01-27 Robert Millan <rmh@aybabtu.com>
4086
4087 * NEWS: Add a few items.
4088
4089 2008-01-27 Robert Millan <rmh@aybabtu.com>
4090
4091 Fix parallel builds with grub-emu. Based on earlier commit for
4092 grub-probe and grub-setup.
4093
4094 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4095 (util/grub-emu.c_DEPENDENCIES): ... this.
4096 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4097 (util/grub-emu.c_DEPENDENCIES): ... this.
4098 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4099 (util/grub-emu.c_DEPENDENCIES): ... this.
4100 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4101 (util/grub-emu.c_DEPENDENCIES): ... this.
4102 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4103 (util/grub-emu.c_DEPENDENCIES): ... this.
4104
4105 2008-01-27 Pavel Roskin <proski@gnu.org>
4106
4107 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4108 to create a gap between _end and the modules added to the image
4109 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4110 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4111 * util/elf/grub-mkimage.c (add_segments): Likewise.
4112
4113 2008-01-26 Pavel Roskin <proski@gnu.org>
4114
4115 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4116 just return an error.
4117
4118 2008-01-26 Bean <bean123ch@gmail.com>
4119
4120 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4121 (grub_reiserfs_get_item): Save offset of the next item.
4122 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4123
4124 2008-01-25 Robert Millan <rmh@aybabtu.com>
4125
4126 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4127 make all filesystem sources appear together (possibly fixing omissions
4128 while at it).
4129 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4130 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4131 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4132 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4133
4134 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4135 add `kern/file.c'.
4136 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4137 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4138 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4139 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4140
4141 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4142 (probe): Add a sanity check to make sure of our ability to read
4143 requested files when probing for filesystem type.
4144
4145 * genmk.rb: Update copyright year (2007).
4146
4147 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4148 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4149 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4150 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4151 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4152 : Remove function prototypes.
4153
4154 2008-01-25 Robert Millan <rmh@aybabtu.com>
4155
4156 Revert my previous commits (based on wrong assumption of how grub_errno
4157 works).
4158
4159 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4160 * kern/file.c (grub_file_open): Likewise.
4161
4162 2008-01-24 Pavel Roskin <proski@gnu.org>
4163
4164 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4165 that hang if GRUB tries to setup colors.
4166 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4167 colors for firmwares that don't support it.
4168 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4169 Recognize Open Hack'Ware, set flags to work around its
4170 limitations.
4171
4172 2008-01-24 Robert Millan <rmh@aybabtu.com>
4173
4174 * kern/file.c (grub_file_open): Do not account previous failures of
4175 unrelated functions when grub_errno is checked for.
4176 Reported by Oleg Strikov.
4177
4178 2008-01-24 Bean <bean123ch@gmail.com>
4179
4180 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4181 (grub_ufs_sblock): New member volume name.
4182 (grub_ufs_find_file): Fix string copy bug.
4183 (grub_ufs_label): Implement this function properly.
4184
4185 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4186 (grub_hfs_iterate_records): Use the correct file number for extents
4187 and catalog file. Fix problem in next index calculation.
4188 (grub_hfs_find_node): Replace recursive function call with loop.
4189 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4190
4191 2008-01-23 Robert Millan <rmh@aybabtu.com>
4192
4193 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4194 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4195 (grub_multiboot2_real_boot): New function prototype.
4196
4197 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4198 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4199
4200 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4201 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4202
4203 2008-01-23 Robert Millan <rmh@aybabtu.com>
4204
4205 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4206 #ifdef'ed out grub_printf().
4207
4208 2008-01-23 Robert Millan <rmh@aybabtu.com>
4209
4210 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4211 grub_dprintf calls, since they make "debug=all" mode unusable.
4212 (grub_console_checkkey): Likewise.
4213
4214 2008-01-23 Robert Millan <rmh@aybabtu.com>
4215
4216 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4217 `term/i386/pc/at_keyboard.c'.
4218 (pkglib_MODULES): Add `serial.mod'.
4219 (serial_mod_SOURCES): New variable.
4220 (serial_mod_CFLAGS): Likewise.
4221 (serial_mod_LDFLAGS): Likewise.
4222
4223 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4224 `<grub/powerpc/ieee1275/console.h>'.
4225 (grub_keyboard_controller_init): New function prototype.
4226 (grub_console_checkkey): Likewise.
4227 (grub_console_getkey): Likewise.
4228
4229 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4230 keyboard on i386.
4231
4232 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4233 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4234
4235 2008-01-23 Robert Millan <rmh@aybabtu.com>
4236
4237 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4238 present, "(memdisk)/boot/grub" becomes the default prefix.
4239
4240 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4241 a memdisk tarball with all the modules. Add --overlay=DIR option that
4242 allows users to overlay additional files into the image.
4243
4244 2008-01-23 Robert Millan <rmh@aybabtu.com>
4245
4246 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4247 and `machine/memory.h'.
4248 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4249 (_multiboot_mod_SOURCES): New variable.
4250 (_multiboot_mod_CFLAGS): Likewise.
4251 (_multiboot_mod_LDFLAGS): Likewise.
4252 (multiboot_mod_SOURCES): Likewise.
4253 (multiboot_mod_CFLAGS): Likewise.
4254 (multiboot_mod_LDFLAGS): Likewise.
4255
4256 * include/grub/i386/ieee1275/loader.h: New file.
4257
4258 * include/grub/i386/ieee1275/machine.h: Likewise.
4259
4260 * include/grub/i386/ieee1275/memory.h: Likewise.
4261
4262 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4263 variable declaration.
4264 (grub_os_area_size): Likewise.
4265
4266 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4267 (grub_lower_mem, grub_upper_mem): New variables.
4268 (grub_stop_floppy): New function (just to make
4269 grub_multiboot2_real_boot() happy).
4270
4271 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4272 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4273 (grub_stop): New function.
4274 Include `"../realmode.S"' and `"../loader.S"'.
4275
4276 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4277 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4278
4279 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4280 rely on grub_multiboot2_real_boot() for final boot.
4281
4282 2008-01-22 Robert Millan <rmh@aybabtu.com>
4283
4284 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4285 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4286 device that doesn't look like an SD card.
4287 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4288 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4289 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4290 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4291 found.
4292
4293 2008-01-22 Robert Millan <rmh@aybabtu.com>
4294
4295 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4296 avoid claiming over our own code.
4297
4298 2008-01-22 Bean <bean123ch@gmail.com>
4299
4300 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4301 (jpeg_mod_SOURCES): New variable.
4302 (jpeg_mod_CFLAGS): Likewise.
4303 (jpeg_mod_LDFLAGS): Likewise.
4304
4305 * video/readers/jpeg.c : New file.
4306
4307 2008-01-22 Bean <bean123ch@gmail.com>
4308
4309 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4310 there are no more items.
4311
4312 2008-01-21 Robert Millan <rmh@aybabtu.com>
4313
4314 * kern/mm.c (grub_mm_init_region): Improve debug message.
4315
4316 2008-01-21 Robert Millan <rmh@aybabtu.com>
4317
4318 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4319 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4320 address.
4321 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4322 a C macro.
4323 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4324 Indicates start of upper memory.
4325 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4326 (generate_image): Abort when image size is big enough to corrupt
4327 upper memory.
4328
4329 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4330 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4331 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4332 instead of hardcoding 0xA0000.
4333 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4334 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4335 instead of hardcoding 0xA0000.
4336
4337 2008-01-21 Robert Millan <rmh@aybabtu.com>
4338
4339 * disk/memdisk.c (memdisk_size): New variable.
4340 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4341 `memdisk_size'.
4342 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4343 image to dynamic memory.
4344 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4345 `memdisk_size'. Free memdisk block.
4346
4347 2008-01-21 Robert Millan <rmh@aybabtu.com>
4348
4349 Fix detection of very small filesystems (like tar).
4350
4351 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4352 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4353 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4354 a problem with this disk).
4355
4356 2008-01-21 Robert Millan <rmh@aybabtu.com>
4357
4358 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4359 on grub_biosdisk_rw_standard() error.
4360
4361 2008-01-21 Robert Millan <rmh@aybabtu.com>
4362
4363 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4364 recent changes.
4365 * kern/elf.c: Likewise.
4366 * kern/ieee1275/ieee1275.c: Likewise.
4367 * kern/powerpc/ieee1275/openfw.c: Likewise.
4368 * term/ieee1275/ofconsole.c: Likewise.
4369
4370 2008-01-21 Robert Millan <rmh@aybabtu.com>
4371
4372 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4373
4374 * include/grub/kernel.h (grub_arch_memdisk_addr)
4375 (grub_arch_memdisk_size): Moved from here ...
4376
4377 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4378 (grub_arch_memdisk_size): ... to here.
4379
4380 2008-01-21 Robert Millan <rmh@aybabtu.com>
4381
4382 Mostly based on bugfix from Bean.
4383
4384 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4385 attribute with hook() parameter.
4386 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4387 declaration.
4388 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4389 attribute with hook() parameter.
4390 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4391 declaration.
4392
4393 2008-01-21 Robert Millan <rmh@aybabtu.com>
4394
4395 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4396 (pkglib_MODULES): Add `memdisk.mod'.
4397 (memdisk_mod_SOURCES): New variable.
4398 (memdisk_mod_CFLAGS): Likewise.
4399 (memdisk_mod_LDFLAGS): Likewise.
4400
4401 * disk/memdisk.c: New file.
4402
4403 * include/grub/disk.h (grub_disk_dev_id): Add
4404 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4405
4406 * include/grub/i386/pc/kernel.h
4407 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4408 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4409 (grub_kernel_image_size): New variable declaration.
4410 (grub_total_module_size): Likewise.
4411 (grub_memdisk_image_size): Likewise.
4412
4413 * include/grub/i386/pc/memory.h
4414 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4415
4416 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4417 (grub_arch_memdisk_addr): New variable declaration.
4418 (grub_arch_memdisk_size): Likewise.
4419
4420 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4421 (grub_arch_memdisk_size): Likewise.
4422
4423 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4424 (codestart): Replace hardcoded `0x100000' with
4425 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4426
4427 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4428 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4429 not NULL, append the contents of the file it refers to, at the end of
4430 the compressed kernel image. Initialize `grub_memdisk_image_size'
4431 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4432 (options): Add "memdisk"|'m' option.
4433 (main): Parse --memdisk|-m option, and pass user-provided path as
4434 parameter to generate_image().
4435
4436 2008-01-20 Robert Millan <rmh@aybabtu.com>
4437
4438 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4439 grub_dprintf() calls from here ...
4440 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4441
4442 2008-01-20 Robert Millan <rmh@aybabtu.com>
4443
4444 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4445
4446 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4447 declaration.
4448 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4449 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4450 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4451 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4452 property).
4453 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4454 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4455
4456 2008-01-19 Robert Millan <rmh@aybabtu.com>
4457
4458 Get rid of confusing function (superseded by
4459 `grub_ieee1275_get_integer_property')
4460 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4461 prototype.
4462 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4463 function.
4464 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4465 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4466 in native endianness from grub_ieee1275_get_integer_property().
4467
4468 2008-01-19 Robert Millan <rmh@aybabtu.com>
4469
4470 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4471 command after "shut-down", since implementations differ on which
4472 the command for halt is.
4473
4474 2008-01-19 Robert Millan <rmh@aybabtu.com>
4475
4476 * include/grub/i386/linuxbios/console.h: Add header protection.
4477 (grub_keyboard_controller_init): New function prototype.
4478 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4479 (KEYBOARD_COMMAND_READ): Likewise.
4480 (KEYBOARD_COMMAND_WRITE): Likewise.
4481 (KEYBOARD_SCANCODE_SET1): Likewise.
4482 (grub_keyboard_controller_write): New function.
4483 (grub_keyboard_controller_read): Likewise.
4484 (grub_keyboard_controller_init): Likewise.
4485
4486 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4487 (grub_console_init): On coreboot/LinuxBIOS, call
4488 grub_keyboard_controller_init().
4489
4490 2008-01-19 Robert Millan <rmh@aybabtu.com>
4491
4492 PowerPC changes provided by Pavel Roskin.
4493
4494 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4495 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4496 don't rely on cmain() doing it.
4497 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4498 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4499
4500 2008-01-16 Robert Millan <rmh@aybabtu.com>
4501
4502 * include/grub/i386/linuxbios/memory.h
4503 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4504 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4505 receive `table_header' as argument. Instead, probe for it in the
4506 known memory ranges where it can be present.
4507 (grub_available_iterate): Do not pass a fixed `table_header' address
4508 to grub_linuxbios_table_iterate().
4509
4510 2008-01-15 Robert Millan <rmh@aybabtu.com>
4511
4512 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4513 * conf/i386-ieee1275.rmk: New file.
4514 * include/grub/i386/ieee1275/console.h: Likewise.
4515 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4516 * include/grub/i386/ieee1275/kernel.h: Likewise.
4517 * include/grub/i386/ieee1275/time.h: Likewise.
4518 * kern/i386/ieee1275/init.c: Likewise.
4519 * kern/i386/ieee1275/startup.S: Likewise.
4520
4521 2008-01-15 Robert Millan <rmh@aybabtu.com>
4522
4523 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4524 when pointers are 32-bit (but still do set it to one when they are
4525 64-bit).
4526
4527 2008-01-15 Robert Millan <rmh@aybabtu.com>
4528
4529 * include/grub/ieee1275/ieee1275.h
4530 (grub_ieee1275_get_integer_property): New function prototype.
4531
4532 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4533 (grub_ieee1275_get_integer_property): New function. Wraps around
4534 grub_ieee1275_get_property() to handle endianness.
4535
4536 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4537 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4538 where appropriate.
4539 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4540 (grub_map): Likewise.
4541 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4542
4543 2008-01-15 Bean <bean123ch@gmail.com>
4544
4545 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4546 (grub_script_execute_cmdline): Reset grub_errno.
4547
4548 * normal/main.c (read_config_file): Reset grub_errno.
4549
4550 * normal/parse.y (script_init): New.
4551 (script): Move function and menuentry here.
4552 (delimiter): New.
4553 (command): Add delimiter at the end of command.
4554 (commands): Adjust to match the new command.
4555 (commandblock): Remove grub_script_lexer_record_start.
4556 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4557 (if): Use the new commands.
4558
4559 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4560
4561 2008-01-15 Robert Millan <rmh@aybabtu.com>
4562
4563 * normal/menu.c (run_menu): Move timeout message from here ...
4564 (print_timeout): ... to here.
4565 (run_menu): Use print_timeout() once during initial draw to print
4566 the whole message, and again in every clock tick to update only
4567 the number of seconds.
4568
4569 2008-01-15 Robert Millan <rmh@aybabtu.com>
4570
4571 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4572 actual size of `available' from grub_ieee1275_get_property(), and
4573 restrict parsing to that bound.
4574
4575 2008-01-15 Christian Franke <franke@computer.org>
4576
4577 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4578 (argp_program_version): Remove variable.
4579 (argp_program_bug_address): Likewise.
4580 (options): Convert from struct argp_option to struct option.
4581 (struct arguments): Remove.
4582 (parse_opt): Remove.
4583 (usage): New function.
4584 (main): Replace struct args members by simple variables.
4585 Replace argp_parse() by getopt_long().
4586 Add switch to evaluate options.
4587 Add missing "(...)" around root_dev in prefix string.
4588
4589 2008-01-14 Robert Millan <rmh@aybabtu.com>
4590
4591 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4592 for grub_ieee1275_exit(), in order to improve portability.
4593
4594 2008-01-14 Robert Millan <rmh@aybabtu.com>
4595
4596 * util/grub.d/10_linux.in (prefix): Define.
4597 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4598
4599 2008-01-13 Pavel Roskin <proski@gnu.org>
4600
4601 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4602 grub_errno if no errors have been detected.
4603
4604 2008-01-12 Robert Millan <rmh@aybabtu.com>
4605
4606 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4607 (grub_util_get_dev_abstraction): New function prototype.
4608
4609 * util/getroot.c: Include `<grub/util/getroot.h>'
4610 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4611 (grub_util_get_dev_abstraction): ... here (new function).
4612
4613 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4614 `PRINT_ABSTRACTION'.
4615 (probe): Probe for abstraction type when requested.
4616 (main): Understand `--target=abstraction'.
4617
4618 * util/i386/efi/grub-install.in: Add abstraction module to core
4619 image when it is found to be necessary.
4620 * util/i386/pc/grub-install.in: Likewise.
4621 * util/powerpc/ieee1275/grub-install.in: Likewise.
4622
4623 * util/update-grub_lib.in (font_path): Return system path without
4624 converting to GRUB path.
4625 * util/update-grub.in: Convert system path returned by font_path()
4626 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4627 abstraction module is needed for loading fonts (if any). Export
4628 that as `GRUB_PRELOAD_MODULES'.
4629 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4630 insmod commands).
4631
4632 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4633
4634 Remove some unused code from reiserfs.
4635
4636 * fs/reiserfs.c (struct grub_reiserfs_key)
4637 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4638 (struct grub_reiserfs_node_body): Removed.
4639 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4640 Likewise.
4641 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4642 Likewise.
4643 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4644 Likewise.
4645 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4646 Likewise.
4647 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4648 Likewise.
4649 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4650 Likewise.
4651 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4652 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4653 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4654
4655 2008-01-10 Robert Millan <rmh@aybabtu.com>
4656
4657 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4658 Determines if a file is garbage left by packaging systems, etc.
4659 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4660 for processing /etc/grub.d scripts.
4661 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4662 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4663 as a condition for processing Linux images.
4664
4665 2008-01-10 Pavel Roskin <proski@gnu.org>
4666
4667 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4668 to compile reiserfs.c on PowerPC.
4669
4670 2008-01-10 Robert Millan <rmh@aybabtu.com>
4671
4672 * kern/device.c (grub_device_iterate): Do not abort device iteration
4673 when one of the devices cannot be opened.
4674 * kern/disk.c (grub_disk_open): Do not account previous failures of
4675 unrelated functions when grub_errno is checked for.
4676
4677 2008-01-08 Robert Millan <rmh@aybabtu.com>
4678
4679 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4680 `! grub_linux_is_bzimage', change order of address comparison to make
4681 it more intuitive, and improve "too big zImage" error message.
4682
4683 2008-01-08 Robert Millan <rmh@aybabtu.com>
4684
4685 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4686 `$(update-grub_DATA)'.
4687 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4688 targets.
4689
4690 2008-01-07 Robert Millan <rmh@aybabtu.com>
4691
4692 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4693 which instruction is modified by grub-setup during installation
4694 (since it wasn't obvious by only looking at this file).
4695
4696 2008-01-07 Robert Millan <rmh@aybabtu.com>
4697
4698 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4699 listing actual TODO items.
4700
4701 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4702
4703 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4704 correctly.
4705 (grub_reiserfs_get_key_offset): Likewise.
4706 (grub_reiserfs_set_key_offset): Likewise.
4707 (grub_reiserfs_set_key_type): Likewise.
4708 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4709
4710 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4711 better to remove the bitfield version completely.
4712
4713 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4714
4715 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4716 allocated from the heap, due to the fshelp implementation.
4717 (grub_reiserfs_dir): Free NODE, due to the same reason.
4718
4719 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4720
4721 Mostly from Vincent Pelletier:
4722
4723 * fs/reiserfs.c: New file.
4724
4725 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4726 (reiserfs_mod_SOURCES): New variable.
4727 (reiserfs_mod_CFLAGS): Likewise.
4728 (reiserfs_mod_LDFLAGS): Likewise.
4729
4730 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4731 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4732 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4733 normal/color.c.
4734
4735 2008-01-06 Robert Millan <rmh@aybabtu.com>
4736
4737 * normal/color.c: Remove `<grub/env.h>'.
4738
4739 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4740
4741 * include/grub/normal.h: Include <grub/env.h>.
4742
4743 2008-01-05 Robert Millan <rmh@aybabtu.com>
4744
4745 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4746 usage example with `(hd0,1)'.
4747 Reported by Samuel Thibault.
4748
4749 2008-01-05 Robert Millan <rmh@aybabtu.com>
4750
4751 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4752 (grub_linux_boot_zimage): Rename to ...
4753 (grub_linux_boot): ... this.
4754 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4755 (grub_linux_boot_zimage): Conditionalize zImage copy.
4756
4757 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4758 (grub_linux_boot_bzimage): Remove prototype.
4759 (grub_linux_boot_zimage): Rename to ...
4760 (grub_linux_boot): ... this.
4761
4762 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4763 (grub_linux_boot): Remove function.
4764
4765 2008-01-05 Robert Millan <rmh@aybabtu.com>
4766
4767 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4768 (grub_env_write_color_highlight): Likewise.
4769 (grub_wait_after_message): Likewise.
4770
4771 * normal/color.c: New file.
4772
4773 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4774 (normal_mod_DEPENDENCIES): Likewise.
4775
4776 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4777 (normal_mod_DEPENDENCIES): Likewise.
4778
4779 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4780 (normal_mod_DEPENDENCIES): Likewise.
4781
4782 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4783 (normal_mod_DEPENDENCIES): Likewise.
4784
4785 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4786 for waiting after a message is printed.
4787 * normal/main.c (read_config_file): Likewise.
4788 (grub_normal_init): Register grub_env_write_color_normal() and
4789 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4790 `color_highlight' variables as global.
4791
4792 * normal/menu.c (grub_wait_after_message): New function.
4793 (grub_color_menu_normal): New variable. Replaces ...
4794 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4795 (grub_color_menu_highlight): New variable. Replaces ...
4796 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4797 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4798 `GRUB_TERM_COLOR_STANDARD'.
4799 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4800 `normal_code' and `highlight_code' to `old_color_normal' and
4801 `old_color_highlight', respectively.
4802 (grub_menu_init_page): Update colors when drawing the menu, based on
4803 `menu_color_normal' and `menu_color_highlight' variables.
4804 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4805 a message is printed.
4806
4807 2008-01-05 Robert Millan <rmh@aybabtu.com>
4808
4809 * kern/env.c (grub_env_context_open): Propagate hooks for global
4810 variables to new context.
4811
4812 * kern/main.c (grub_set_root_dev): Export `root' variable.
4813
4814 2008-01-05 Robert Millan <rmh@aybabtu.com>
4815
4816 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4817 discs unconditionally, since udev and others have options to provide
4818 them.
4819
4820 2008-01-05 Robert Millan <rmh@aybabtu.com>
4821
4822 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4823
4824 2008-01-04 Christian Franke <franke@computer.org>
4825
4826 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4827 of eisa_mmap.
4828
4829 2008-01-03 Pavel Roskin <proski@gnu.org>
4830
4831 * kern/i386/linuxbios/init.c: Put "void" to all function
4832 declarations with no arguments.
4833 * kern/powerpc/ieee1275/init.c: Likewise.
4834 * term/i386/pc/at_keyboard.c: Likewise.
4835 * term/i386/pc/vga_text.c: Likewise.
4836 * util/grub-mkdevicemap.c: Likewise.
4837
4838 2008-01-02 Robert Millan <rmh@aybabtu.com>
4839
4840 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4841 message when loaded image is out of bounds.
4842 (grub_multiboot_load_elf64): Likewise.
4843
4844 2008-01-02 Pavel Roskin <proski@gnu.org>
4845
4846 * util/grub.d/10_linux.in: Try version without ".old" when
4847 looking for initrd. It's better to use initrd from the newer
4848 kernel of the same version than no initrd at all.
4849
4850 2008-01-01 Robert Millan <rmh@aybabtu.com>
4851
4852 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4853
4854 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4855
4856 * include/grub/video.h: Added grub_video_unmap_color and
4857 grub_video_get_active_render_target.
4858 (grub_video_adapter): Added unmap_color and get_active_render_target.
4859
4860 * video/video.c: Added grub_video_unmap_color and
4861 grub_video_get_active_render_target.
4862 (grub_video_get_info): Changed method to accept NULL pointer as an
4863 argument to allow detection of active video adapter.
4864
4865 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4866 grub_video_vbe_unmap_color_int.
4867 Added grub_video_vbe_unmap_color and
4868 grub_video_vbe_get_active_render_target.
4869 (grub_video_vbe_adapter): Added unmap_color and
4870 get_active_render_target.
4871
4872 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4873 with grub_video_vbe_unmap_color_int.
4874
4875 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4876 (DEFAULT_NORMAL_COLOR): Likewise.
4877 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4878 (DEFAULT_FG_COLOR): Removed.
4879 (DEFAULT_BG_COLOR): Likewise.
4880 (DEFAULT_CURSOR_COLOR): Changed value.
4881 (grub_virtual_screen): Added standard_color_setting,
4882 normal_color_setting, highlight_color_setting and term_color.
4883 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4884 (bitmap_width): Added.
4885 (bitmap_height): Likewise.
4886 (bitmap): Likewise.
4887 (set_term_color): Likewise.
4888 (grub_virtual_screen_setup): Changed to use new terminal coloring
4889 settings.
4890 (grub_gfxterm_init): Added init for bitmap.
4891 (grub_gfxterm_fini): Added destroy for bitmap.
4892 (redraw_screen_rect): Updated to use background bitmap and new
4893 terminal coloring.
4894 (scroll_up): Added optimization for case when there is no bitmap.
4895 (grub_gfxterm_cls): Fixed to use correct background color.
4896 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4897 coloring.
4898 (grub_virtual_screen_setcolor): Likewise.
4899 (grub_virtual_screen_getcolor): Added.
4900 (grub_gfxterm_background_image_cmd): Likewise.
4901 (grub_video_term): Added setcolor and getcolor.
4902 (MOD_INIT): Added registration of background_image command.
4903 (MOD_TERM): Added unregistration for background_image command.
4904
4905 2007-12-30 Pavel Roskin <proski@gnu.org>
4906
4907 * loader/multiboot_loader.c: Fix multiboot command
4908 unregistration. Fix all typos in the word "multiboot".
4909
4910 2007-12-29 Pavel Roskin <proski@gnu.org>
4911
4912 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4913 support for initrd names used in Fedora.
4914
4915 2007-12-26 Bean <bean123ch@gmail.com>
4916
4917 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4918 (cpio_mod_SOURCES): New variable.
4919 (cpio_mod_CFLAGS): Likewise.
4920 (cpio_mod_LDFLAGS): Likewise.
4921
4922 * fs/cpio.c: New file.
4923
4924 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4925
4926 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4927
4928 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4929
4930 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4931
4932 2007-12-25 Robert Millan <rmh@aybabtu.com>
4933
4934 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4935 (grub_getcolor): New function.
4936
4937 * kern/term.c (grub_getcolor): New function.
4938 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4939 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4940 (print_entry): Set normal and highlight colors to
4941 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4942 respectively, before printing and restore them to old
4943 values afterwards.
4944 (grub_menu_init_page): Likewise. Fill an additional colored space
4945 that would otherwise be left blank.
4946
4947 * term/efi/console.c (grub_console_getcolor): New function.
4948 (struct grub_console_term.getcolor): New variable.
4949 * term/i386/pc/console.c (grub_console_getcolor): New function.
4950 (struct grub_console_term.getcolor): New variable.
4951 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4952 (struct grub_console_term.getcolor): New variable.
4953
4954 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4955 (struct grub_console_term.setcolor): Remove variable.
4956 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4957 (struct grub_console_term.setcolor): Remove variable.
4958 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4959 (struct grub_console_term.setcolor): Remove variable.
4960 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4961 (struct grub_console_term.setcolor): Remove variable.
4962
4963 2007-12-25 Robert Millan <rmh@aybabtu.com>
4964
4965 * configure.ac: Search for possible unifont.hex locations, and
4966 define UNIFONT_HEX if found.
4967
4968 * Makefile.in (UNIFONT_HEX): Define variable.
4969 (DATA): Rename to ...
4970 (PKGLIB): ... this. Update all users.
4971 (PKGDATA): New variable.
4972 (pkgdata_IMAGES): Rename to ...
4973 (pkglib_IMAGES): ... this. Update all users.
4974 (pkgdata_MODULES): Rename to ...
4975 (pkglib_MODULES): ... this. Update all users.
4976 (pkgdata_PROGRAMS): Rename to ...
4977 (pkglib_PROGRAMS): ... this. Update all users.
4978 (pkgdata_DATA): Rename to ...
4979 (pkglib_DATA): ... this. Update all users.
4980 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4981 (unicode.pff, ascii.pff): New rules.
4982 (all-local): Add `$(PKGDATA)' dependency.
4983 (install-local): Process `$(PKGDATA)'.
4984
4985 * util/update-grub_lib.in (font_path): Search for *.pff files in
4986 a few more locations, including `${pkgdata}'.
4987
4988 2007-12-23 Robert Millan <rmh@aybabtu.com>
4989
4990 Patch from Bean <bean123ch@gmail.com>:
4991 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4992 `size'.
4993
4994 2007-12-21 Bean <bean123ch@gmail.com>
4995
4996 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4997 (ntfscomp_mod_SOURCES): New variable.
4998 (ntfscomp_mod_CFLAGS): Likewise.
4999 (ntfscomp_mod_LDFLAGS): Likewise.
5000
5001 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5002 (grub_probe_SOURCES): Likewise.
5003 (grub_emu_SOURCES): Likewise.
5004
5005 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5006 (grub_emu_SOURCES): Likewise.
5007
5008 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5009 (grub_emu_SOURCES): Likewise.
5010
5011 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5012 (grub_emu_SOURCES): Likewise.
5013
5014 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5015 (read_run_list): Renamed to grub_ntfs_read_run_list.
5016 (decomp_nextvcn): Moved to ntfscomp.c.
5017 (decomp_getch): Likewise.
5018 (decomp_get16): Likewise.
5019 (decomp_block): Likewise.
5020 (read_block): Likewise.
5021 (read_data): Partially moved to ntfscomp.c.
5022 (fixup): Change unsigned to grub_uint16_t.
5023 (read_mft): Change unsigned long to grub_uint32_t.
5024 (read_attr): Likewise.
5025 (read_data): Likewise.
5026 (read_run_data): Likewise.
5027 (read_run_list): Likewise.
5028 (read_mft): Likewise.
5029
5030 * fs/ntfscomp.c: New file.
5031
5032 * include/grub/ntfs.h: New file.
5033
5034 2007-12-16 Robert Millan <rmh@aybabtu.com>
5035
5036 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5037 IDE disk check, since Linux is known to support 20 IDE disks.
5038 Reported by Colin Watson.
5039
5040 2007-12-15 Bean <bean123ch@gmail.com>
5041
5042 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5043 (lnxboot_img_SOURCES): New variable.
5044 (lnxboot_img_ASFLAGS): Likewise.
5045 (lnxboot_img_LDFLAGS): Likewise.
5046
5047 * boot/i386/pc/lnxboot.S: New file.
5048
5049 2007-11-24 Pavel Roskin <proski@gnu.org>
5050
5051 * configure.ac: Test if '--build-id=none' is supported by the
5052 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5053 objcopy to generate incorrect binary files (binutils
5054 2.17.50.0.18-1 as shipped by Fedora 8).
5055 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5056 linking, so that build ID doesn't break the test.
5057
5058 2007-11-24 Pavel Roskin <proski@gnu.org>
5059
5060 * include/grub/i386/time.h: use "void" in the argument list
5061 of grub_cpu_idle().
5062 * include/grub/powerpc/time.h: Likewise.
5063 * include/grub/sparc64/time.h: Likewise.
5064
5065 2007-11-18 Christian Franke <franke@computer.org>
5066
5067 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5068 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5069 This fixes the problem that function keys did not work in grub-emu.
5070
5071 2007-11-18 Christian Franke <franke@computer.org>
5072
5073 * disk/host.c (grub_host_open): Remove attribute unused from
5074 name parameter. Add check for "host". This fixes the problem
5075 that grub-emu does not find partitions.
5076
5077 2007-11-18 Christian Franke <franke@computer.org>
5078
5079 * util/hostfs.c (is_dir): New function.
5080 (grub_hostfs_dir): Handle missing dirent.d_type case.
5081 (grub_hostfs_read): Add missing fseek().
5082 (grub_hostfs_label): Clear label pointer. This fixes a crash
5083 of grub-emu on "ls (host)".
5084
5085 2007-11-18 Christian Franke <franke@computer.org>
5086
5087 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5088 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5089 to 64 bit boundary by default.
5090
5091 2007-11-18 Bean <bean123ch@gmail.com>
5092
5093 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5094 (hexdump_mod_SOURCES): New variable.
5095 (hexdump_mod_CFLAGS): Likewise.
5096 (hexdump_mod_LDFLAGS): Likewise.
5097
5098 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5099
5100 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5101
5102 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5103
5104 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5105
5106 * include/grub/hexdump.h: New file.
5107
5108 * commands/hexdump.c: New file.
5109
5110 2007-11-10 Robert Millan <rmh@aybabtu.com>
5111
5112 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5113 in grub_outb() calls.
5114 (beep_on): Likewise.
5115
5116 2007-11-10 Christian Franke <franke@computer.org>
5117
5118 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5119 (grub_menu_run): Likewise.
5120
5121 2007-11-10 Robert Millan <rmh@aybabtu.com>
5122
5123 * include/grub/i386/efi/machine.h: New file.
5124 * include/grub/i386/linuxbios/machine.h: Likewise.
5125 * include/grub/i386/pc/machine.h: Likewise.
5126 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5127 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5128
5129 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5130 (serial_hw_io_addr): New variable.
5131 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5132 instead of `(unsigned short *) 0x400'.
5133
5134 2007-11-10 Bean <bean123ch@gmail.com>
5135
5136 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5137
5138 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5139
5140 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5141 (vga_mod_SOURCES): Added.
5142 (vga_mod_CFLAGS): Likewise.
5143 (vga_mod_LDFLAGS): Likewise.
5144
5145 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5146 grub_outb() calls.
5147 (set_map_mask): Likewise.
5148 (set_read_map): Likewise.
5149 (set_read_address): Likewise.
5150 (vga_font): Removed variable.
5151 (get_vga_glyph): Removed function.
5152 (invalidate_char): Likewise.
5153 (write_char): Changed to use grub_font_get_glyph() for font
5154 information.
5155 (grub_vga_putchar): Likewise.
5156 (grub_vga_getcharwidth): Likewise.
5157
5158 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5159
5160 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5161 flags.
5162 (pxeboot_img_LDFLAGS): Likewise.
5163 (diskboot_img_LDFLAGS): Likewise.
5164 (kernel_img_LDFLAGS): Likewise.
5165
5166 2007-11-06 Robert Millan <rmh@aybabtu.com>
5167
5168 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5169 in grub_outb() calls.
5170 (serial_hw_init): Likewise.
5171
5172 2007-11-05 Robert Millan <rmh@aybabtu.com>
5173
5174 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5175 spaces. Skip non-regular files.
5176
5177 2007-11-05 Robert Millan <rmh@aybabtu.com>
5178
5179 * kern/disk.c (grub_disk_firmware_fini)
5180 (grub_disk_firmware_is_tainted): New variables.
5181
5182 * include/grub/disk.h (grub_disk_firmware_fini)
5183 (grub_disk_firmware_is_tainted): Likewise.
5184
5185 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5186 (grub_disk_biosdisk_fini): ... to here.
5187 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5188 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5189 is set. Register grub_disk_biosdisk_fini() in
5190 `grub_disk_firmware_fini'.
5191
5192 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5193 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5194 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5195 to finish existing firmware disk interface.
5196
5197 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5198 (ata_mod_SOURCES): New variable.
5199 (ata_mod_CFLAGS): Likewise.
5200 (ata_mod_LDFLAGS): Likewise.
5201
5202 2007-11-05 Robert Millan <rmh@aybabtu.com>
5203
5204 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5205 (grub_ata_wait): Reimplement using grub_millisleep().
5206
5207 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5208 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5209
5210 2007-11-03 Marco Gerards <marco@gnu.org>
5211
5212 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5213 (CRTC_ADDR_PORT): New macro.
5214 (CRTC_DATA_PORT): Likewise.
5215 (CRTC_CURSOR): Likewise.
5216 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5217 (CRTC_CURSOR_ADDR_LOW): Likewise.
5218 (update_cursor): New function.
5219 (grub_console_real_putchar): Call `update_cursor'.
5220 (grub_console_gotoxy): Likewise.
5221 (grub_console_cls): Set the default color when clearing the
5222 screen.
5223 (grub_console_setcursor): Implemented.
5224
5225 2007-11-03 Marco Gerards <marco@gnu.org>
5226
5227 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5228 become activate.
5229 (grub_ata_pio_write): Likewise.
5230
5231 (grub_atapi_identify): Wait after issuing an ATA command.
5232 (grub_atapi_packet): Likewise.
5233 (grub_ata_identify): Likewise.
5234 (grub_ata_readwrite): Likewise.
5235
5236 2007-11-03 Marco Gerards <marco@gnu.org>
5237
5238 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5239 (grub_ata_pio_write): Likewise.
5240 (grub_ata_readwrite): Use `grub_error', instead of
5241 returning `grub_errno'.
5242
5243 2007-11-03 Marco Gerards <marco@gnu.org>
5244
5245 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5246 grub_ata_pio_write once for every single sector, instead of for
5247 multiple sectors.
5248
5249 2007-10-31 Robert Millan <rmh@aybabtu.com>
5250
5251 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5252
5253 * conf/i386-linuxbios.rmk: New file.
5254
5255 * kern/i386/pc/hardware.c: Likewise.
5256 * term/i386/pc/at_keyboard.c: Likewise.
5257 * term/i386/pc/vga_text.c: Likewise.
5258
5259 * include/grub/i386/linuxbios/boot.h: Likewise.
5260 * include/grub/i386/linuxbios/console.h: Likewise.
5261 * include/grub/i386/linuxbios/init.h: Likewise.
5262 * include/grub/i386/linuxbios/kernel.h: Likewise.
5263 * include/grub/i386/linuxbios/loader.h: Likewise.
5264 * include/grub/i386/linuxbios/memory.h: Likewise.
5265 * include/grub/i386/linuxbios/serial.h: Likewise.
5266 * include/grub/i386/linuxbios/time.h: Likewise.
5267
5268 * kern/i386/linuxbios/init.c: Likewise.
5269 * kern/i386/linuxbios/startup.S: Likewise.
5270 * kern/i386/linuxbios/table.c: Likewise.
5271
5272 2007-10-31 Marco Gerards <marco@gnu.org>
5273
5274 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5275 (ata_mod_SOURCES): New variable.
5276 (ata_mod_CFLAGS): Likewise.
5277 (ata_mod_LDFLAGS): Likewise.
5278
5279 * disk/ata.c: New file.
5280
5281 * include/grub/disk.h (grub_disk_dev_id): Add
5282 `GRUB_DISK_DEV_ATA_ID'.
5283
5284 2007-10-31 Robert Millan <rmh@aybabtu.com>
5285
5286 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5287 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5288
5289 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5290 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5291
5292 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5293 `<grub/types.h>'.
5294
5295 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5296
5297 2007-10-27 Robert Millan <rmh@aybabtu.com>
5298
5299 * include/grub/types.h (ULONG_MAX): Define macro.
5300
5301 2007-10-22 Robert Millan <rmh@aybabtu.com>
5302
5303 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5304 `"../realmode.S"'.
5305 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5306
5307 2007-10-22 Robert Millan <rmh@aybabtu.com>
5308
5309 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5310 (pkgdata_MODULES): Add `biosdisk.mod'.
5311 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5312 variables.
5313
5314 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5315 (grub_biosdisk_init): Replace with ...
5316 (GRUB_MOD_INIT(biosdisk)): ... this.
5317 (grub_biosdisk_fini): Replace with ...
5318 (GRUB_MOD_FINI(biosdisk)): ... this.
5319
5320 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5321 (grub_machine_init): Remove call to grub_biosdisk_init().
5322 (grub_machine_fini): Remove call to grub_machine_fini().
5323
5324 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5325
5326 2007-10-22 Robert Millan <rmh@aybabtu.com>
5327
5328 * include/grub/time.h: New file.
5329 * include/grub/i386/time.h: Likewise.
5330 * include/grub/powerpc/time.h: Likewise.
5331 * include/grub/sparc64/time.h: Likewise.
5332
5333 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5334 instances to ...
5335 (KERNEL_MACHINE_TIME_HEADER): ... this.
5336 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5337 instances to ...
5338 (KERNEL_MACHINE_TIME_HEADER): ... this.
5339 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5340 instances to ...
5341 (KERNEL_MACHINE_TIME_HEADER): ... this.
5342
5343 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5344 (grub_millisleep): New function.
5345 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5346 (grub_millisleep): New function.
5347 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5348 Remove `grub/machine/time.h' include.
5349 (grub_millisleep): New function.
5350 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5351 Remove `grub/machine/time.h' include.
5352 (grub_millisleep): New function.
5353
5354 * include/grub/misc.h (grub_div_roundup): New function.
5355
5356 * kern/misc.c: Include `<grub/time.h>'.
5357 (grub_millisleep_generic): New function.
5358
5359 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5360 Add `time.h'.
5361 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5362 Add `time.h'.
5363 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5364 `machine/time.h'. Add `time.h'.
5365 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5366
5367 2007-10-21 Robert Millan <rmh@aybabtu.com>
5368
5369 * include/grub/misc.h (grub_max): New function.
5370
5371 2007-10-21 Robert Millan <rmh@aybabtu.com>
5372
5373 * util/misc.c (grub_util_info): Call fflush() before returning.
5374
5375 2007-10-20 Robert Millan <rmh@aybabtu.com>
5376
5377 * genmk.rb (Image): Copy `extra_flags' from here ...
5378 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5379
5380 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5381 to `argc' and `args' arguments.
5382
5383 2007-10-17 Robert Millan <rmh@aybabtu.com>
5384
5385 * kern/i386/loader.S: New file.
5386
5387 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5388 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5389 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5390 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5391 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5392 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5393 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5394 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5395 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5396 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5397 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5398 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5399 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5400 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5401
5402 * kern/i386/realmode.S: New file.
5403
5404 * kern/i386/pc/startup.S (protstack): Moved from here ...
5405 * kern/i386/realmode.S (protstack)... to here.
5406 * kern/i386/pc/startup.S (gdt): Moved from here ...
5407 * kern/i386/realmode.S (gdt)... to here.
5408 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5409 * kern/i386/realmode.S (prot_to_real)... to here.
5410
5411 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5412 `kern/i386/realmode.S'.
5413
5414 2007-10-17 Robert Millan <rmh@aybabtu.com>
5415
5416 * include/grub/i386/loader.h: New file.
5417
5418 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5419 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5420 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5421 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5422 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5423 * include/grub/i386/loader.h (grub_linux_prot_size)
5424 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5425 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5426 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5427 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5428
5429 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5430
5431 2007-10-15 Robert Millan <rmh@aybabtu.com>
5432
5433 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5434 filesystem when dev->disk is unset.
5435 Do probe for filesystem even when dev->disk->has_partitions is set.
5436 In case a filesystem is found, always report it.
5437 In case it isn't, if dev->disk->has_partitions is set, report that
5438 a partition table was found instead of reporting that no filesystem
5439 could be identified.
5440
5441 2007-10-12 Robert Millan <rmh@aybabtu.com>
5442
5443 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5444 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5445
5446 * include/grub/types.h (grub_host_to_target16): New macro.
5447 (grub_host_to_target32): Likewise.
5448 (grub_host_to_target64): Likewise.
5449 (grub_target_to_host16): Likewise.
5450 (grub_target_to_host32): Likewise.
5451 (grub_target_to_host64): Likewise.
5452
5453 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5454 Renamed from to ...
5455 (GRUB_MOD_ALIGN): ...this. Update all users.
5456
5457 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5458 grub_host_to_target32.
5459 Replace grub_be_to_cpu32 with grub_target_to_host32.
5460 (load_modules): Likewise.
5461 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5462 Replace grub_be_to_cpu32 with grub_target_to_host32.
5463 Replace grub_cpu_to_be16 with grub_host_to_target16.
5464 Replace grub_cpu_to_be32 grub_host_to_target32.
5465
5466 2007-10-12 Robert Millan <rmh@aybabtu.com>
5467
5468 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5469 * util/elf/grub-mkimage.c: ... here.
5470
5471 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5472 `util/powerpc/ieee1275/grub-mkimage.c'.
5473
5474 2007-10-07 Robert Millan <rmh@aybabtu.com>
5475
5476 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5477 and make it easier to figure out.
5478 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5479 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5480 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5481 leave us with less than HEAP_MIN_SIZE total heap.
5482 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5483
5484 2007-10-03 Robert Millan <rmh@aybabtu.com>
5485
5486 * include/grub/i386/io.h: New file.
5487 * commands/i386/pc/play.c (inb): Removed.
5488 (outb): Removed.
5489 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5490 with grub_outb().
5491 * term/i386/pc/serial.c (inb): Removed.
5492 (outb): Removed.
5493 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5494 with grub_outb().
5495 * term/i386/pc/vga.c (inb): Removed.
5496 (outb): Removed.
5497 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5498 with grub_outb().
5499
5500 2007-10-02 Robert Millan <rmh@aybabtu.com>
5501
5502 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5504 Reported by Marcin Kurek.
5505
5506 2007-09-07 Robert Millan <rmh@aybabtu.com>
5507
5508 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5509 SmartFirmware version updates (as released by Sven Luther), and avoid
5510 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5511 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5512 known broken.
5513
5514 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5515
5516 From Hitoshi Ozeki:
5517 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5518 when merging two regions.
5519
5520 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5521
5522 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5523 * normal/completion.c (grub_normal_do_completion): Likewise.
5524 Reported by Hitoshi Ozeki.
5525
5526 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5527
5528 Do not use devices at boot in chainloading.
5529
5530 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5531 (boot_part_addr): Likewise.
5532 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5533 with BOOT_DRIVE and BOOT_PART_ADDR.
5534 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5535 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5536
5537 2007-08-29 Robert Millan <rmh@aybabtu.com>
5538
5539 Patch from Simon Peter <dn.tlp@gmx.net>:
5540 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5541 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5542 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5543 util/i386/pc/grub-setup.c_DEPENDENCIES.
5544 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5545 util/grub-probe.c_DEPENDENCIES.
5546 * conf/powerpc-ieee1275.rmk: Likewise.
5547
5548 2007-08-28 Robert Millan <rmh@aybabtu.com>
5549
5550 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5551 to tell grub-mkdevicemap how to name devices.
5552 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5553 feature).
5554
5555 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5556 util/i386/get_disk_name.c.
5557 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5558 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5559 util/ieee1275/get_disk_name.c.
5560
5561 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5562
5563 * DISTLIST: Add util/i386/get_disk_name.c and
5564 util/ieee1275/get_disk_name.c.
5565
5566 * util/grub-mkdevicemap.c: Replace device naming logic with
5567 grub_util_get_disk_name() calls.
5568
5569 2007-08-20 Robert Millan <rmh@aybabtu.com>
5570
5571 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5572 (so that it works for both plural and singular quantities).
5573
5574 2007-08-05 Robert Millan <rmh@aybabtu.com>
5575
5576 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5577 so that [xz] isn't taken into account when determining order.
5578
5579 2007-08-02 Marco Gerards <marco@gnu.org>
5580
5581 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5582 `include/multiboot2.h', `include/grub/elfload.h',
5583 `include/multiboot.h', `include/grub/multiboot.h',
5584 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5585 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5586 `kern/elf.c', `loader/multiboot_loader.c',
5587 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5588 `loader/i386/pc/multiboot2.c',
5589 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5590 `util/i386/pc/grub-mkrescue.in'. Remove
5591 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5592 `include/grub/i386/pc/util/biosdisk.h' and
5593 `include/grub/powerpc/ieee1275/multiboot.h'.
5594
5595 2007-08-02 Bean <bean123ch@gmail.com>
5596
5597 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5598 (ntfs_mod_SOURCES): New variable.
5599 (ntfs_mod_CFLAGS): Likewise.
5600 (ntfs_mod_LDFLAGS): Likewise.
5601
5602 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5603 (grub_probe_SOURCES): Likewise.
5604 (grub_emu_SOURCES): Likewise.
5605
5606 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5607 (grub_emu_SOURCES): Likewise.
5608
5609 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5610 (grub_emu_SOURCES): Likewise.
5611
5612 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5613
5614 * fs/ntfs.c: New file.
5615
5616 2007-08-02 Bean <bean123ch@gmail.com>
5617
5618 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5619
5620 * file.h (grub_file): Likewise.
5621
5622 * fshelp.h (grub_fshelp_read_file): Likewise.
5623
5624 * util/i386/pc/grub-setup.c (setup): Likewise.
5625 (save_first_sector): Likewise.
5626 (save_blocklists): Likewise.
5627
5628 * fs/affs.c (grub_affs_read_file): Likewise.
5629
5630 * fs/ext2.c (grub_ext2_read_file): Likewise.
5631
5632 * fs/fat.c (grub_fat_read_data): Likewise.
5633
5634 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5635
5636 * fs/hfs.c (grub_hfs_read_file): Likewise.
5637
5638 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5639
5640 * fs/jfs.c (grub_jfs_read_file): Likewise.
5641
5642 * fs/minix.c (grub_minix_read_file): Likewise.
5643
5644 * fs/sfs.c (grub_sfs_read_file): Likewise.
5645
5646 * fs/ufs.c (grub_ufs_read_file): Likewise.
5647
5648 * fs/xfs.c (grub_xfs_read_file): Likewise.
5649
5650 * command/blocklist.c (read_blocklist): Likewise.
5651 (print_blocklist): Likewise.
5652
5653 2007-08-02 Marco Gerards <marco@gnu.org>
5654
5655 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5656 `util/hostfs.c'.
5657
5658 * disk/host.c: New file.
5659
5660 * util/hostfs.c: Likewise.
5661
5662 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5663 return `GRUB_ERR_BAD_FS'.
5664 * fs/sfs.c (grub_sfs_mount): Likewise.
5665 * fs/xfs.c (grub_xfs_mount): Likewise.
5666
5667 * include/grub/disk.h (enum grub_disk_dev_id): Add
5668 `GRUB_DISK_DEVICE_HOST_ID'.
5669
5670 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5671
5672 2007-07-24 Jerone Young <jerone@gmail.com>
5673
5674 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5675 modules for compilation.
5676 * conf/powerpc-ieee1275.rmk: Likewise.
5677
5678 * include/multiboot.h: Move multiboot definitions to one file. Rename
5679 many definitions to not get grub specific.
5680 * include/multiboot2.h: Create header with multiboot 2 definitions.
5681 * include/grub/multiboot.h: Header for grub specific function
5682 prototypes and definitions.
5683 * include/grub/multiboot2.h: Likewise.
5684 * include/grub/multiboot_loader.h: Likewise.
5685 * include/grub/i386/pc/multiboot.h: Removed.
5686 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5687
5688 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5689 and 2 to allow for one multiboot and module commands.
5690 * loader/multiboot2.c: Add multiboot2 functionality.
5691 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5692 and definition names.
5693 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5694 2 functions.
5695 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5696 ieee1275 specific multiboot2 code.
5697
5698 * kern/i386/pc/startup.S: Change headers and definition names for
5699 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5700
5701 2007-07-22 Robert Millan <rmh@aybabtu.com>
5702
5703 * geninitheader.sh: Process file specified in first parameter rather
5704 than hardcoding grub_modules_init.lst.
5705 * geninit.sh: Likewise. Also, construct header name dynamically rather
5706 than hardcoding grub_modules_init.h.
5707
5708 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5709 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5710 grub_probe_init.[ch] and grub_setup_init.[ch].
5711
5712 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5713 grub_modules_init.h with grub_emu_init.h.
5714 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5715 grub_probe_init.[ch] files.
5716 * conf/i386-efi.rmk: Likewise.
5717 * conf/i386-pc.rmk: Likewise.
5718 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5719 grub_setup_init.[ch] files.
5720
5721 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5722 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5723 to initialize modules rather than a list of hardcoded functions.
5724 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5725 grub_init_all() to initialize modules rather than a list of hardcoded
5726 functions.
5727
5728 2007-07-22 Robert Millan <rmh@aybabtu.com>
5729
5730 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5731 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5732
5733 2007-07-22 Robert Millan <rmh@aybabtu.com>
5734
5735 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5736 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5737 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5738 flag when running on SmartFirmware.
5739 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5740 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5741 was set.
5742
5743 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5744 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5745 rather than decreasing it.
5746
5747 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5748 there's not enough space to do it, fail in the same way as when it
5749 can't be done because there are no partitions.
5750
5751 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5752 when nvsetenv failed.
5753
5754 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5755
5756 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5757 because this rule is automatically generated.
5758 (grub-mkrescue): Removed for the same reason as above.
5759
5760 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5761
5762 Migrate to GNU General Public License Version 3.
5763
5764 * COPYING: Replaced with the plain text version of GPLv3.
5765
5766 * config.guess: Updated from gnulib.
5767 * config.sub: Likewise.
5768
5769 * geninit.sh: Output a GPLv3 copyright notice.
5770 * geninitheader.sh: Likewise.
5771 * genmodsrc.sh: Likewise.
5772 * gensymlist.sh.in: Likewise.
5773
5774 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5775 * boot/i386/pc/diskboot.S: Likewise.
5776 * boot/i386/pc/pxeboot.S: Likewise.
5777 * commands/blocklist.c: Likewise.
5778 * commands/boot.c: Likewise.
5779 * commands/cat.c: Likewise.
5780 * commands/cmp.c: Likewise.
5781 * commands/configfile.c: Likewise.
5782 * commands/echo.c: Likewise.
5783 * commands/help.c: Likewise.
5784 * commands/ls.c: Likewise.
5785 * commands/search.c: Likewise.
5786 * commands/terminal.c: Likewise.
5787 * commands/test.c: Likewise.
5788 * commands/videotest.c: Likewise.
5789 * commands/i386/cpuid.c: Likewise.
5790 * commands/i386/pc/halt.c: Likewise.
5791 * commands/i386/pc/play.c: Likewise.
5792 * commands/i386/pc/reboot.c: Likewise.
5793 * commands/i386/pc/vbeinfo.c: Likewise.
5794 * commands/i386/pc/vbetest.c: Likewise.
5795 * commands/ieee1275/halt.c: Likewise.
5796 * commands/ieee1275/reboot.c: Likewise.
5797 * commands/ieee1275/suspend.c: Likewise.
5798 * disk/loopback.c: Likewise.
5799 * disk/lvm.c: Likewise.
5800 * disk/raid.c: Likewise.
5801 * disk/efi/efidisk.c: Likewise.
5802 * disk/i386/pc/biosdisk.c: Likewise.
5803 * disk/ieee1275/ofdisk.c: Likewise.
5804 * font/manager.c: Likewise.
5805 * fs/affs.c: Likewise.
5806 * fs/ext2.c: Likewise.
5807 * fs/fat.c: Likewise.
5808 * fs/fshelp.c: Likewise.
5809 * fs/hfs.c: Likewise.
5810 * fs/hfsplus.c: Likewise.
5811 * fs/iso9660.c: Likewise.
5812 * fs/jfs.c: Likewise.
5813 * fs/minix.c: Likewise.
5814 * fs/sfs.c: Likewise.
5815 * fs/ufs.c: Likewise.
5816 * fs/xfs.c: Likewise.
5817 * hello/hello.c: Likewise.
5818 * include/grub/acorn_filecore.h: Likewise.
5819 * include/grub/arg.h: Likewise.
5820 * include/grub/bitmap.h: Likewise.
5821 * include/grub/boot.h: Likewise.
5822 * include/grub/cache.h: Likewise.
5823 * include/grub/device.h: Likewise.
5824 * include/grub/disk.h: Likewise.
5825 * include/grub/dl.h: Likewise.
5826 * include/grub/elfload.h: Likewise.
5827 * include/grub/env.h: Likewise.
5828 * include/grub/err.h: Likewise.
5829 * include/grub/file.h: Likewise.
5830 * include/grub/font.h: Likewise.
5831 * include/grub/fs.h: Likewise.
5832 * include/grub/fshelp.h: Likewise.
5833 * include/grub/gzio.h: Likewise.
5834 * include/grub/hfs.h: Likewise.
5835 * include/grub/kernel.h: Likewise.
5836 * include/grub/loader.h: Likewise.
5837 * include/grub/lvm.h: Likewise.
5838 * include/grub/misc.h: Likewise.
5839 * include/grub/mm.h: Likewise.
5840 * include/grub/net.h: Likewise.
5841 * include/grub/normal.h: Likewise.
5842 * include/grub/parser.h: Likewise.
5843 * include/grub/partition.h: Likewise.
5844 * include/grub/pc_partition.h: Likewise.
5845 * include/grub/raid.h: Likewise.
5846 * include/grub/rescue.h: Likewise.
5847 * include/grub/script.h: Likewise.
5848 * include/grub/setjmp.h: Likewise.
5849 * include/grub/symbol.h: Likewise.
5850 * include/grub/term.h: Likewise.
5851 * include/grub/terminfo.h: Likewise.
5852 * include/grub/tparm.h: Likewise.
5853 * include/grub/types.h: Likewise.
5854 * include/grub/video.h: Likewise.
5855 * include/grub/efi/api.h: Likewise.
5856 * include/grub/efi/chainloader.h: Likewise.
5857 * include/grub/efi/console.h: Likewise.
5858 * include/grub/efi/console_control.h: Likewise.
5859 * include/grub/efi/disk.h: Likewise.
5860 * include/grub/efi/efi.h: Likewise.
5861 * include/grub/efi/pe32.h: Likewise.
5862 * include/grub/efi/time.h: Likewise.
5863 * include/grub/i386/linux.h: Likewise.
5864 * include/grub/i386/setjmp.h: Likewise.
5865 * include/grub/i386/types.h: Likewise.
5866 * include/grub/i386/efi/kernel.h: Likewise.
5867 * include/grub/i386/efi/loader.h: Likewise.
5868 * include/grub/i386/efi/time.h: Likewise.
5869 * include/grub/i386/pc/biosdisk.h: Likewise.
5870 * include/grub/i386/pc/boot.h: Likewise.
5871 * include/grub/i386/pc/chainloader.h: Likewise.
5872 * include/grub/i386/pc/console.h: Likewise.
5873 * include/grub/i386/pc/init.h: Likewise.
5874 * include/grub/i386/pc/kernel.h: Likewise.
5875 * include/grub/i386/pc/loader.h: Likewise.
5876 * include/grub/i386/pc/memory.h: Likewise.
5877 * include/grub/i386/pc/multiboot.h: Likewise.
5878 * include/grub/i386/pc/serial.h: Likewise.
5879 * include/grub/i386/pc/time.h: Likewise.
5880 * include/grub/i386/pc/vbe.h: Likewise.
5881 * include/grub/i386/pc/vbeblit.h: Likewise.
5882 * include/grub/i386/pc/vbefill.h: Likewise.
5883 * include/grub/i386/pc/vbeutil.h: Likewise.
5884 * include/grub/i386/pc/vga.h: Likewise.
5885 * include/grub/ieee1275/ieee1275.h: Likewise.
5886 * include/grub/ieee1275/ofdisk.h: Likewise.
5887 * include/grub/powerpc/libgcc.h: Likewise.
5888 * include/grub/powerpc/setjmp.h: Likewise.
5889 * include/grub/powerpc/types.h: Likewise.
5890 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5891 * include/grub/powerpc/ieee1275/console.h: Likewise.
5892 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5893 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5894 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5895 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5896 * include/grub/powerpc/ieee1275/time.h: Likewise.
5897 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5898 * include/grub/sparc64/libgcc.h: Likewise.
5899 * include/grub/sparc64/setjmp.h: Likewise.
5900 * include/grub/sparc64/types.h: Likewise.
5901 * include/grub/sparc64/ieee1275/console.h: Likewise.
5902 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5903 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5904 * include/grub/sparc64/ieee1275/time.h: Likewise.
5905 * include/grub/util/biosdisk.h: Likewise.
5906 * include/grub/util/getroot.h: Likewise.
5907 * include/grub/util/lvm.h: Likewise.
5908 * include/grub/util/misc.h: Likewise.
5909 * include/grub/util/raid.h: Likewise.
5910 * include/grub/util/resolve.h: Likewise.
5911 * io/gzio.c: Likewise.
5912 * kern/device.c: Likewise.
5913 * kern/disk.c: Likewise.
5914 * kern/dl.c: Likewise.
5915 * kern/elf.c: Likewise.
5916 * kern/env.c: Likewise.
5917 * kern/err.c: Likewise.
5918 * kern/file.c: Likewise.
5919 * kern/fs.c: Likewise.
5920 * kern/loader.c: Likewise.
5921 * kern/main.c: Likewise.
5922 * kern/misc.c: Likewise.
5923 * kern/mm.c: Likewise.
5924 * kern/parser.c: Likewise.
5925 * kern/partition.c: Likewise.
5926 * kern/rescue.c: Likewise.
5927 * kern/term.c: Likewise.
5928 * kern/efi/efi.c: Likewise.
5929 * kern/efi/init.c: Likewise.
5930 * kern/efi/mm.c: Likewise.
5931 * kern/i386/dl.c: Likewise.
5932 * kern/i386/efi/init.c: Likewise.
5933 * kern/i386/efi/startup.S: Likewise.
5934 * kern/i386/pc/init.c: Likewise.
5935 * kern/i386/pc/lzo1x.S: Likewise.
5936 * kern/i386/pc/startup.S: Likewise.
5937 * kern/ieee1275/ieee1275.c: Likewise.
5938 * kern/powerpc/cache.S: Likewise.
5939 * kern/powerpc/dl.c: Likewise.
5940 * kern/powerpc/ieee1275/cmain.c: Likewise.
5941 * kern/powerpc/ieee1275/crt0.S: Likewise.
5942 * kern/powerpc/ieee1275/init.c: Likewise.
5943 * kern/powerpc/ieee1275/openfw.c: Likewise.
5944 * kern/sparc64/cache.S: Likewise.
5945 * kern/sparc64/dl.c: Likewise.
5946 * kern/sparc64/ieee1275/init.c: Likewise.
5947 * kern/sparc64/ieee1275/openfw.c: Likewise.
5948 * loader/efi/chainloader.c: Likewise.
5949 * loader/efi/chainloader_normal.c: Likewise.
5950 * loader/i386/efi/linux.c: Likewise.
5951 * loader/i386/efi/linux_normal.c: Likewise.
5952 * loader/i386/pc/chainloader.c: Likewise.
5953 * loader/i386/pc/chainloader_normal.c: Likewise.
5954 * loader/i386/pc/linux.c: Likewise.
5955 * loader/i386/pc/linux_normal.c: Likewise.
5956 * loader/i386/pc/multiboot.c: Likewise.
5957 * loader/i386/pc/multiboot_normal.c: Likewise.
5958 * loader/powerpc/ieee1275/linux.c: Likewise.
5959 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5960 * normal/arg.c: Likewise.
5961 * normal/cmdline.c: Likewise.
5962 * normal/command.c: Likewise.
5963 * normal/completion.c: Likewise.
5964 * normal/execute.c: Likewise.
5965 * normal/function.c: Likewise.
5966 * normal/lexer.c: Likewise.
5967 * normal/main.c: Likewise.
5968 * normal/menu.c: Likewise.
5969 * normal/menu_entry.c: Likewise.
5970 * normal/misc.c: Likewise.
5971 * normal/parser.y: Likewise.
5972 * normal/script.c: Likewise.
5973 * normal/i386/setjmp.S: Likewise.
5974 * normal/powerpc/setjmp.S: Likewise.
5975 * normal/sparc64/setjmp.S: Likewise.
5976 * partmap/acorn.c: Likewise.
5977 * partmap/amiga.c: Likewise.
5978 * partmap/apple.c: Likewise.
5979 * partmap/gpt.c: Likewise.
5980 * partmap/pc.c: Likewise.
5981 * partmap/sun.c: Likewise.
5982 * term/gfxterm.c: Likewise.
5983 * term/terminfo.c: Likewise.
5984 * term/efi/console.c: Likewise.
5985 * term/i386/pc/console.c: Likewise.
5986 * term/i386/pc/serial.c: Likewise.
5987 * term/i386/pc/vesafb.c: Likewise.
5988 * term/i386/pc/vga.c: Likewise.
5989 * term/ieee1275/ofconsole.c: Likewise.
5990 * util/biosdisk.c: Likewise.
5991 * util/console.c: Likewise.
5992 * util/genmoddep.c: Likewise.
5993 * util/getroot.c: Likewise.
5994 * util/grub-emu.c: Likewise.
5995 * util/grub-mkdevicemap.c: Likewise.
5996 * util/grub-probe.c: Likewise.
5997 * util/lvm.c: Likewise.
5998 * util/misc.c: Likewise.
5999 * util/raid.c: Likewise.
6000 * util/resolve.c: Likewise.
6001 * util/update-grub.in: Likewise.
6002 * util/update-grub_lib.in: Likewise.
6003 * util/grub.d/00_header.in: Likewise.
6004 * util/grub.d/10_hurd.in: Likewise.
6005 * util/grub.d/10_linux.in: Likewise.
6006 * util/i386/efi/grub-install.in: Likewise.
6007 * util/i386/efi/grub-mkimage.c: Likewise.
6008 * util/i386/pc/grub-install.in: Likewise.
6009 * util/i386/pc/grub-mkimage.c: Likewise.
6010 * util/i386/pc/grub-mkrescue.in: Likewise.
6011 * util/i386/pc/grub-setup.c: Likewise.
6012 * util/i386/pc/misc.c: Likewise.
6013 * util/powerpc/ieee1275/grub-install.in: Likewise.
6014 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6015 * util/powerpc/ieee1275/misc.c: Likewise.
6016 * video/bitmap.c: Likewise.
6017 * video/video.c: Likewise.
6018 * video/i386/pc/vbe.c: Likewise.
6019 * video/i386/pc/vbeblit.c: Likewise.
6020 * video/i386/pc/vbefill.c: Likewise.
6021 * video/i386/pc/vbeutil.c: Likewise.
6022 * video/readers/tga.c: Likewise.
6023
6024 2007-07-02 Robert Millan <rmh@aybabtu.com>
6025
6026 * conf/i386-efi.rmk: Replace obsolete reference to
6027 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6028 with util/getroot.c.
6029 * conf/powerpc-ieee1275.rmk: Likewise.
6030 * conf/sparc64-ieee1275.rmk: Likewise.
6031
6032 * util/grub-emu.c (main): Fix unchecked pointer handling.
6033
6034 2007-07-02 Robert Millan <rmh@aybabtu.com>
6035
6036 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6037 invocation to fail, in order to support partition-less media.
6038
6039 * util/i386/pc/grub-install.in: Likewise.
6040
6041 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6042 which fs or partmap modules are needed (akin to its sister scripts).
6043
6044 Also use grub-probe to get rid of unportable /proc/mounts check.
6045
6046 Print the same informational message that the other scripts do, before
6047 exiting.
6048
6049 2007-06-23 Robert Millan <rmh@aybabtu.com>
6050
6051 * util/update-grub_lib.in (font_path): New function. Determine whether
6052 a font file can be found and, if so, echo the GRUB path to it.
6053
6054 * util/update-grub.in: Handle multiple terminals depending on user
6055 input, platform availability and font file presence. Propagate
6056 variables of our findings to /etc/grub.d/ children.
6057
6058 * util/grub.d/00_header.in: Handle multiple terminals, based on
6059 environment setup by update-grub.
6060
6061 2007-06-23 Robert Millan <rmh@aybabtu.com>
6062
6063 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6064
6065 2007-06-21 Robert Millan <rmh@aybabtu.com>
6066
6067 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6068 indicate end of data section in kernel image.
6069 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6070 GRUB_KERNEL_MACHINE_DATA_END.
6071
6072 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6073 space for it.
6074 * kern/i386/efi/startup.S: Likewise.
6075
6076 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6077 during image generation. Implement --prefix option to override this
6078 patch.
6079 * util/i386/efi/grub-mkimage.c: Likewise.
6080
6081 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6082 code to make path relative to its root into a separate function.
6083
6084 * util/i386/pc/grub-install.in: Use newly provided
6085 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6086 pass the result to grub-install --prefix.
6087
6088 2007-06-13 Robert Millan <rmh@aybabtu.com>
6089
6090 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6091 DEFAULT_DEVICE_MAP.
6092 * util/grub-emu.c: Use above definitions from misc.h instead of
6093 defining them.
6094 * util/grub-mkdevicemap.c: Likewise.
6095 * util/i386/pc/grub-setup.c: Likewise.
6096 * util/grub-probe.c: Likewise.
6097 (probe): Abort with grub_util_error() when either
6098 grub_guess_root_device or grub_util_get_grub_dev fails.
6099
6100 2007-06-12 Robert Millan <rmh@aybabtu.com>
6101
6102 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6103 "pager" assignment.
6104 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6105 "pcdata".
6106 * util/grub-probe.c (probe): Likewise for "drive_name".
6107
6108 2007-06-11 Robert Millan <rmh@aybabtu.com>
6109
6110 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6111 not just the cdrom one.
6112
6113 2007-06-11 Robert Millan <rmh@aybabtu.com>
6114
6115 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6116 Add --pkglibdir=DIR option to override pkglibdir.
6117 Mention --image-type=TYPE in help output.
6118 Fix --grub-mkimage (it was a no-op).
6119 Abort gracefully when no parameter is given.
6120
6121 2007-06-11 Robert Millan <rmh@aybabtu.com>
6122
6123 * util/i386/pc/grub-mkrescue.in: New file.
6124 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6125 * Makefile.in: Handle bin_SCRIPTS.
6126
6127 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6128
6129 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6130 list of video modes.
6131
6132 2007-06-06 Robert Millan <rmh@aybabtu.com>
6133
6134 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6135 file doesn't exist, or if it is in a filesystem grub can't read.
6136
6137 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6138 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6139 header comment to fit in 80 columns when the variables are resolved.
6140
6141 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6142 could be identified by update-grub. Remove redundant check for
6143 unifont.pff existence (since convert_system_path_to_grub_path now
6144 handles that).
6145
6146 2007-06-04 Robert Millan <rmh@aybabtu.com>
6147
6148 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6149
6150 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6151
6152 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6153
6154 2007-06-04 Robert Millan <rmh@aybabtu.com>
6155
6156 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6157
6158 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6159 grub_apple_partition_map_fini.
6160
6161 * util/biosdisk.c
6162 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6163 to access >2 TiB disks).
6164
6165 Print disk->total_sectors with %llu instead of %lu, since this
6166 variable is always 64-bit (prevents wrong disk size from being displayed
6167 on either >2 TiB disk or big-endian CPU).
6168
6169 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6170 into a generic case that supports all (sane) partition maps.
6171
6172 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6173 breaks big-endian.
6174
6175 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6176 and grub_apple_partition_map_fini() after that.
6177
6178 2007-06-01 Robert Millan <rmh@aybabtu.com>
6179
6180 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6181
6182 * util/grub.d/00_header.in: Only enable gfxterm when
6183 convert_system_path_to_grub_path() succeeds.
6184
6185 2007-05-20 Robert Millan <rmh@aybabtu.com>
6186
6187 * util/update-grub_lib.in: New file.
6188 * DISTLIST: Add update-grub_lib.in.
6189 * conf/common.rmk: Generate update-grub_lib and install it in
6190 $(lib_DATA).
6191 * Makefile.in: Add install routine for $(lib_DATA).
6192
6193 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6194 function provided by update-grub_lib to support arbitrary paths of
6195 unifont.pff.
6196 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6197 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6198
6199 2007-05-19 Robert Millan <rmh@aybabtu.com>
6200
6201 * commands/i386/cpuid.c: New module.
6202 * DISTLIST: Add it.
6203 * conf/i386-efi.rmk: Enable cpuid.mod.
6204 * conf/i386-pc.rmk: Likewise.
6205
6206 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6207
6208 * kern/disk.c (grub_disk_read): Check return value of
6209 grub_realloc().
6210
6211 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6212
6213 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6214 arrays.
6215 * disk/raid.c (grub_raid_open): Likewise.
6216
6217 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6218
6219 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6220 stack instead of on the heap.
6221
6222 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6223 before doing a read on it.
6224
6225 * configure.ac: Only use -fno-stack-protector for the target
6226 environment.
6227
6228 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6229
6230 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6231 __attribute_ ((unused)) to mode_type argument.
6232
6233 * util/getroot.c (grub_guess_root_device): Fix #endif.
6234
6235 * kern/misc.c (memcmp): Fix prototype.
6236
6237 * include/grub/partition.h [GRUB_UTIL]
6238 (grub_gpt_partition_map_init): Add prototype.
6239 (grub_gpt_partition_map_fini): Likewise.
6240
6241 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6242 at the right place.
6243
6244 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6245 (grub_fat_read_data): Likewise.
6246 (grub_fat_find_dir): Likewise.
6247
6248 * font/manager.c (find_glyph): Make table a const.
6249 (grub_font_get_glyph): Remove bitmap from if statement.
6250
6251 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6252
6253 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6254 code, first search for device in /dev/mapper, then in /dev.
6255 (grub_util_get_grub_dev): New function.
6256 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6257 prototype.
6258 * util/grub-probe.c (probe): Remove check for RAID, call
6259 grub_util_get_grub_dev() instead of
6260 grub_util_biosdisk_get_grub_dev().
6261 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6262 grub_util_biosdisk_get_grub_dev().
6263 * util/i386/pc/grub-setup.c (main): Likewise.
6264
6265 2007-05-16 Robert Millan <rmh@aybabtu.com>
6266
6267 * DISTLIST: Update for the latest changes.
6268 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6269 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6270 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6271 grub/util/biosdisk.h.
6272 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6273 grub/util/biosdisk.h.
6274
6275 2007-05-16 Robert Millan <rmh@aybabtu.com>
6276
6277 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6278
6279 2007-05-16 Robert Millan <rmh@aybabtu.com>
6280
6281 * util/i386/efi/grub-install.in: New.
6282 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6283 newly added grub-install.
6284 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6285 include.
6286 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6287 grub/util/biosdisk.h.
6288 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6289 grub/util/biosdisk.h.
6290
6291 2007-05-16 Robert Millan <rmh@aybabtu.com>
6292
6293 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6294 * include/grub/util/biosdisk.h: ... here.
6295 * util/i386/pc/biosdisk.c: Moved to ...
6296 * util/biosdisk.c: ... here.
6297 * util/i386/pc/getroot.c: Moved to ...
6298 * util/getroot.c: ... here.
6299 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6300 * util/grub-mkdevicemap.c: ... here.
6301 * util/i386/pc/grub-probe.c: Moved to ...
6302 * util/grub-probe.c: ... here.
6303
6304 2007-05-15 Robert Millan <rmh@aybabtu.com>
6305
6306 * util/update-grub.in: Remove duplicated line in grub.cfg header
6307 message.
6308
6309 2007-05-13 Robert Millan <rmh@aybabtu.com>
6310
6311 * util/update-grub.in: Fix a few assumptions about the devices holding
6312 /, /boot and /boot/grub being the same.
6313 * util/grub.d/00_header.in: Likewise.
6314 * util/grub.d/10_hurd.in: Likewise.
6315 * util/grub.d/10_linux.in: Likewise.
6316
6317 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6318 patterns. Use that to define the `.old' suffix as older than `'.
6319
6320 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6321
6322 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6323 the grub.cfg header message.
6324
6325 2007-05-11 Robert Millan <rmh@aybabtu.com>
6326
6327 * util/update-grub.in: Create device.map if it doesn't already exist,
6328 before attempting to run grub-probe.
6329 Check for grub-probe and grub-mkdevicemap with the same code
6330 grub-install is using.
6331 Remove test mode.
6332
6333 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6334
6335 * Makefile.in: Add the datarootdir autoconf variable.
6336
6337 2007-05-09 Robert Millan <rmh@aybabtu.com>
6338
6339 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6340 fail gracefully if dev->disk->partition == NULL.
6341
6342 2007-05-07 Robert Millan <rmh@aybabtu.com>
6343
6344 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6345 determine partition map module.
6346 * util/i386/pc/grub-install.in: Use this feature to decide which
6347 partition module to load, instead of hardcoding pc and gpt.
6348
6349 2007-05-07 Robert Millan <rmh@aybabtu.com>
6350
6351 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6352 source directory differs from build directory.
6353
6354 2007-05-05 Robert Millan <rmh@aybabtu.com>
6355
6356 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6357 initialisation.
6358
6359 2007-05-05 Robert Millan <rmh@aybabtu.com>
6360
6361 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6362
6363 2007-05-05 Robert Millan <rmh@aybabtu.com>
6364
6365 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6366 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6367
6368 2007-05-05 Robert Millan <rmh@aybabtu.com>
6369
6370 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6371 (grub_probe_SOURCES): Likewise.
6372 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6373 GPT and initialize dos_part and bsd_part accordingly.
6374 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6375 install_bsd_part.
6376 (main): Activate gpt module for use during partition identification,
6377 and deactivate it afterwards.
6378 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6379 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6380 partition identification, and deactivate it afterwards.
6381
6382 2007-05-05 Robert Millan <rmh@aybabtu.com>
6383
6384 * term/i386/pc/console.c (grub_console_fini): Call
6385 grub_term_set_current() before grub_term_unregister().
6386
6387 2007-05-04 Robert Millan <rmh@aybabtu.com>
6388
6389 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6390 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6391 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6392 and update-grub_DATA.
6393 * conf/common.rmk: Build and install update-grub components.
6394 * conf/common.mk: Regenerate.
6395 * util/update-grub.in: New. Core of update-grub.
6396 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6397 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6398 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6399 * util/grub.d/README: New. Document grub.d directory layout.
6400
6401 2007-05-01 Robert Millan <rmh@aybabtu.com>
6402
6403 * util/grub-emu.c: Move initialization functions
6404 grub_util_biosdisk_init() and grub_init_all() before
6405 grub_util_biosdisk_get_grub_dev(), which relies on them.
6406
6407 2007-04-19 Robert Millan <rmh@aybabtu.com>
6408
6409 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6410 it is used later.
6411
6412 2007-04-18 Jerone Young <jerone@gmail.com>
6413
6414 * kernel/elf.c: Add missing parenthesis for conditional statement
6415 stanza.
6416
6417 2007-04-10 Jerone Young <jerone@gmail.com>
6418
6419 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6420 continue on and look for device node with real device name.
6421
6422 2007-04-10 Jerone Young <jerone@gmail.com>
6423
6424 * configure.ac: Add argument for autoconf to use transformation
6425 ability.
6426 * Makefile.in: Add autoconf package transformation code.
6427 * util/i386/pc/grub-install.in: Likewise.
6428 * util/powerpc/ieee1275/grub-install.in: Likewise.
6429
6430 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6431
6432 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6433 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6434 (EXT2_REVISION): Likewise.
6435 (EXT2_INODE_SIZE): Likewise.
6436 (struct grub_ext2_block_group): Added a missing member
6437 "used_dirs".
6438 (grub_ext2_read_inode): Divide by the inode size in a superblock
6439 instead of 128 to obtain INODES_PER_BLOCK.
6440 Use the macro EXT2_INODE_SIZE instead of directly using
6441 SBLOCK->INODE_SIZE.
6442
6443 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6444
6445 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6446 superblock instead of the structure size to compute an
6447 offset. This fixes the problem that GRUB could not read a
6448 filesystem when inode size is different from 128-byte.
6449
6450 2007-03-05 Marco Gerards <marco@gnu.org>
6451
6452 * normal/main.c (read_config_file): When "menu" is not set, create
6453 an initial context.
6454
6455 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6456
6457 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6458 (HEAP_LIMIT): New macro.
6459 (grub_claim_heap): Claim memory up to `heaplimit'.
6460
6461 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6462
6463 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6464 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6465 (_start): Likewise.
6466 (grub_arch_modules_addr): Return address after `_end'.
6467 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6468 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6469 (add_segments): Calculate `_end' from phdr size and location.
6470 (ALIGN_UP): Moved to ...
6471 * include/grub/misc.h: here.
6472 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6473 New macro.
6474 (GRUB_IEEE1275_MODULE_BASE): Removed.
6475
6476 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6477
6478 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6479 loop boundary.
6480
6481 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6482
6483 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6484 All users updated.
6485 (grub_elf64_load_hook_t): Likewise.
6486 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6487 debug output.
6488
6489 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6490
6491 * kern/mm.c: Update copyright.
6492 (grub_mm_debug): Correct syntax error.
6493 (grub_mm_dump_free): New function.
6494 (grub_debug_free): Call `grub_free'.
6495 * include/grub/mm.h: Update copyright.
6496 (grub_mm_dump_free): Add declaration.
6497
6498 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6499
6500 * include/grub/ieee1275/ieee1275.h: Update copyright.
6501 * kern/powerpc/ieee1275/init.c: Likewise.
6502 * kern/powerpc/ieee1275/openfw.c: Likewise.
6503
6504 * loader/powerpc/ieee1275/linux.c: Likewise.
6505 * include/grub/elfload.h: Likewise.
6506 * kern/elf.c: Likewise.
6507 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6508 callers.
6509 (grub_elf64_load): Likewise.
6510 (grub_elf32_load_segment): Move to a nested function.
6511 (grub_elf64_load_segment): Likewise.
6512
6513 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6514
6515 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6516 prototype.
6517 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6518 (grub_heap_len): Likewise.
6519 (HEAP_SIZE): New macro.
6520 (grub_claim_heap): New function.
6521 (grub_machine_init): Don't claim heap directly. Call
6522 `grub_claim_heap'.
6523 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6524 (grub_available_iterate): New function.
6525
6526 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6527
6528 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6529 * configure.ac: Use it for testing the HOST and TARGET compilers.
6530
6531 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6532
6533 * Makefile.in (enable_grub_emu): New variable.
6534 * configure.ac (--enable-grub-emu): New option.
6535 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6536 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6537 * conf/i386-pc.rmk: Likewise.
6538 * conf/powerpc-ieee1275.rmk: Likewise.
6539 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6540
6541 2006-12-12 Marco Gerards <marco@gnu.org>
6542
6543 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6544
6545 * kern/env.c (grub_env_unset): Don't free the member `value' when
6546 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6547 pointer.
6548
6549 * normal/main.c (current_menu): Removed.
6550 (free_menu): Unset the `menu' environment variable.
6551 (grub_normal_menu_addentry): Make use of the environment variable
6552 `menu', instead of using the global `current_menu'. Allocate
6553 memory for the sourcecode of this entry.
6554 (read_config_file): New argument `nested', changed all callers.
6555 Only in the case of a new context, initialize a new menu. Set the
6556 `menu' environment variable.
6557 (grub_normal_execute): Don't set and unset the environment
6558 variable `menu' here anymore. Only free the menu when leaving the
6559 context.
6560
6561 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6562 leak.
6563
6564 2006-12-11 Marco Gerards <marco@gnu.org>
6565
6566 * normal/menu_entry.c (run): Fix off by one bug so the last line
6567 is executed. Move the loader check to outside the loop.
6568
6569 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6570
6571 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6572
6573 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6574
6575 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6576 the number of sectors. Reported by Andrey Shuvikov
6577 <mr_hyro@yahoo.com>.
6578
6579 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6580
6581 * kern/disk.c (grub_disk_read): When there is a read error, always
6582 try to read only the necessary data.
6583
6584 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6585 disk/raid.c.
6586 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6587 prototype.
6588 [GRUB_UTIL] (grub_raid_fini): Likewise.
6589 [GRUB_UTIL] (grub_lvm_init): Likewise.
6590 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6591 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6592 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6593 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6594 and grub_raid_fini().
6595
6596 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6597
6598 * include/grub/types.h (__unused): Rename to UNUSED.
6599 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6600 (grub_elf64_size): Likewise.
6601
6602 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6603
6604 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6605 grub_error_push and grub_error_pop in the error-handling path.
6606 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6607 length.
6608
6609 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6610
6611 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6612 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6614 (kernel_elf_SOURCES): Likewise.
6615 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6616 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6617 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6618 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6619 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6620 (elf_mod_SOURCES): New variable.
6621 (elf_mod_CFLAGS): Likewise.
6622 (elf_mod_LDFLAGS): Likewise.
6623 * include/grub/types.h (__unused): New macro.
6624 * include/grub/elfload.h: New file.
6625 * kern/elf.c: Likewise.
6626 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6627 (ELF32_LOADMASK): New macro.
6628 (ELF64_LOADMASK): Likewise.
6629 (vmlinux): Removed.
6630 (grub_linux_load32): New function.
6631 (grub_linux_load64): Likewise.
6632 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6633 Use grub_elf_t instead of grub_file_t.
6634
6635 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6636
6637 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6638 `catch_result' to struct set_color_args.
6639
6640 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6641
6642 * normal/menu.c: Include grub/script.h.
6643 * normal/menu_entry.c: Likewise.
6644 * include/grub/normal.h: Do not include grub/script.h.
6645
6646 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6647
6648 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6649
6650 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6651
6652 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6653 disk.
6654 (grub_disk_close): Print debug messages when closing a disk.
6655 (grub_disk_read): Print debug messages when disk read fails.
6656 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6657 filesystem type.
6658 * kern/partition.c: Include misc.h.
6659 (grub_partition_iterate): Print debug messages when detecting
6660 partition type.
6661
6662 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6663
6664 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6665 is negative.
6666 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6667
6668 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6669
6670 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6671 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6672
6673 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6674
6675 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6676 instead of sizeof(lv). Patch by Michael Guntsche.
6677
6678 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6679
6680 * disk/lvm.c: Rename VGS to VG_LIST.
6681 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6682 (grub_lvm_open): Likewise.
6683 Thanks to Michael Guntsche for finding this bug.
6684
6685 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6686
6687 * configure.ac (AC_INIT): Bumped to 1.95.
6688
6689 2006-10-14 Robert Millan <rmh@aybabtu.com>
6690
6691 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6692 with "/dev/.static/dev/md".
6693
6694 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6695
6696 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6697 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6698 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6699 DRIVE_NAME are always freed.
6700
6701 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6702 DOS_PART, as a DOS partition is counted from one instead of zero
6703 now. Reported by Robert Millan.
6704
6705 2006-10-14 Robert Millan <rmh@aybabtu.com>
6706
6707 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6708 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6709 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6710 string returned by grub_guess_root_device.
6711 * util/i386/pc/grub-setup.c: Likewise.
6712 * util/i386/pc/grub-probefs.c: Likewise.
6713
6714 * util/i386/pc/grub-probefs.c: Rename to ...
6715 * util/i386/pc/grub-probe.c: ... this.
6716 * DISTLIST: Remove grub-probefs, add grub-probe.
6717 * conf/i386-efi.rmk: Likewise.
6718 * conf/i386-pc.rmk: Likewise.
6719 * util/i386/pc/grub-install.in: Likewise.
6720
6721 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6722 choose which information we want to print.
6723
6724 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6725
6726 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6727 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6728 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6729 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6730 video/readers/tga.c and video/i386/pc/vbeutil.c.
6731
6732 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6733
6734 Added support for RAID and LVM.
6735
6736 * disk/lvm.c: New file.
6737 * disk/raid.c: Likewise.
6738 * include/grub/lvm.h: Likewise.
6739 * include/grub/raid.h: Likewise.
6740 * include/grub/util/lvm.h: Likewise.
6741 * include/grub/util/raid.h: Likewise.
6742 * util/lvm.c: Likewise.
6743 * util/raid.c: Likewise.
6744
6745 * include/grub/disk.h (grub_disk_dev_id): Add
6746 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6747 (grub_disk_get_size): New prototype.
6748 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6749 returns a partition.
6750 (grub_disk_get_size): New function.
6751
6752 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6753 verbatim if grub_install_dos_part is -2.
6754
6755 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6756 and LVM devices.
6757
6758 * util/i386/pc/grub-setup.c (setup): New argument
6759 MUST_EMBED. Force embedding of GRUB when the argument is
6760 true. Close FILE before returning.
6761 (main): Add support for RAID and LVM.
6762
6763 * conf/common.rmk: Add RAID and LVM modules.
6764 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6765 util/lvm.c.
6766 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6767
6768 * kern/misc.c (grub_strstr): New function.
6769 * include/grub/misc.h (grub_strstr): New prototype.
6770
6771 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6772
6773 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6774
6775 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6776
6777 * kern/misc.c (grub_strtoull): Guess the base only if not
6778 specified.
6779
6780 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6781
6782 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6783 PowerMac support.
6784
6785 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6786
6787 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6788
6789 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6790 Remove `flags' argument. All callers changed.
6791 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6792 (IEEE1275_IHANDLE_INVALID): New variable.
6793 (IEEE1275_CELL_INVALID): New variable.
6794 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6795 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6796 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6797 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6798 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6799 codes from Open Firmware. All callers updated.
6800 (grub_ieee1275_next_property): Directly return Open Firmware return
6801 code.
6802 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6803 Standardize error checking from `grub_ieee1275_get_property'.
6804 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6805 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6806
6807 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6808
6809 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6810 `instance_to_package_args' to `instance_to_path_args'.
6811
6812 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6813 `grub_ieee1275_chosen'.
6814
6815 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6816 `grub_ieee1275_interpret'.
6817
6818 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6819
6820 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6821
6822 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6823
6824 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6825 (__cmpdi): Likewise.
6826
6827 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6828 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6829 `grub_ssize_t'.
6830
6831 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6832
6833 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6834 to type `grub_ssize_t'.
6835 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6836
6837 2006-09-22 Marco Gerards <marco@gnu.org>
6838
6839 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6840 newlines.
6841
6842 2006-09-22 Marco Gerards <marco@gnu.org>
6843
6844 * commands/echo.c: New file.
6845
6846 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6847
6848 * conf/common.rmk (echo_mod_SOURCES): New variable.
6849 (echo_mod_CFLAGS): Likewise.
6850 (echo_mod_LDFLAGS): Likewise.
6851
6852 2006-09-22 Marco Gerards <marco@gnu.org>
6853
6854 * normal/main.c (get_line): Malloc memory instead of using
6855 preallocated memory. Removed the arguments `cmdline' and
6856 `max_len'. Updated all callers.
6857
6858 2006-09-22 Marco Gerards <marco@gnu.org>
6859
6860 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6861 (normal_mod_DEPENDENCIES): Likewise.
6862
6863 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6864 (normal_mod_DEPENDENCIES): Likewise.
6865
6866 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6867
6868 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6869
6870 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6871 programs.
6872 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6873 (normal_mod_DEPENDENCIES): Likewise.
6874 * conf/i386-pc.mk: Regenerate.
6875 * conf/i386-efi.mk: Likewise
6876 * conf/common.mk: Likewise.
6877 * conf/powerpc-ieee1275.mk: Likewise.
6878 * conf/sparc64-ieee1275.mk: Likewise.
6879
6880 2006-09-22 Robert Millan <rmh@aybabtu.com>
6881
6882 Sync with i386 version.
6883 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6884 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6885
6886 2006-09-21 Robert Millan <rmh@aybabtu.com>
6887
6888 Import from GRUB Legacy (lib/device.c):
6889 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6890 (init_device_map) [__linux__]: Add support for I2O devices.
6891
6892 2006-09-14 Marco Gerards <marco@gnu.org>
6893
6894 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6895 `-melf_i386'.
6896
6897 2006-09-14 Robert Millan <rmh@aybabtu.com>
6898
6899 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6900 /boot/grub/*.lst.
6901
6902 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6903
6904 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6905 before adding it to device.map.
6906
6907 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6908
6909 * genmk.rb: Let GCC generate dependencies the first time it
6910 compiles a file; using the -MD option.
6911 * conf/common.mk: Regenerate.
6912 * conf/i386-pc.mk: Likewise.
6913 * conf/i386-efi.mk: Likewise.
6914 * conf/powerpc-ieee1275.mk: Likewise.
6915 * conf/sparc64-ieee1275.mk: Likewise.
6916
6917 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6918
6919 Move the prototypes of grub_setjmp and grub_longjmp to
6920 cpu/setjmp.h, so that each architecture may specify different
6921 attributes.
6922
6923 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6924 (grub_longjmp): Likewise.
6925 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6926 (grub_longjmp): Likewise.
6927 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6928 (grub_longjmp): Likewise.
6929
6930 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6931 [!GRUB_UTIL] (grub_longjmp): Removed.
6932
6933 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6934
6935 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6936 "color!" method does not return any value.
6937
6938 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6939
6940 * include/grub/bitmap.h: New file.
6941
6942 * include/grub/i386/pc/vbeutil.h: Likewise.
6943
6944 * video/bitmap.c: Likewise.
6945
6946 * video/readers/tga.c: Likewise.
6947
6948 * video/i386/pc/vbeutil.c: Likewise.
6949
6950 * commands/videotest.c: Code cleanup and updated to reflect to new
6951 video API.
6952
6953 * term/gfxterm.c: Likewise.
6954
6955 * video/video.c: Likewise.
6956
6957 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6958 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6959 (bitmap_mod_SOURCES): New entry.
6960 (bitmap_mod_CFLAGS): Likewise.
6961 (bitmap_mod_LDFLAGS): Likewise.
6962 (tga_mod_SOURCES): Likewise.
6963 (tga_mod_CFLAGS): Likewise.
6964 (tga_mod_LDFLAGS): Likewise.
6965
6966 * include/grub/video.h (grub_video_blit_operators): New enum type.
6967 (grub_video_render_target): Changed as forward declaration and moved
6968 actual definition to be video driver specific.
6969 (grub_video_adapter.blit_bitmap): Added blitting operator.
6970 (grub_video_adapter.blit_render_target): Likewise.
6971 (grub_video_blit_bitmap): Likewise.
6972 (grub_video_blit_render_target): Likewise.
6973
6974 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6975 driver specific render target definition.
6976 (grub_video_vbe_map_rgba): Added driver internal helper.
6977 (grub_video_vbe_unmap_color): Updated to use
6978 grub_video_i386_vbeblit_info.
6979 (grub_video_vbe_get_video_ptr): Likewise.
6980
6981 * include/grub/i386/pc/vbeblit.h
6982 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6983 grub_video_i386_vbeblit_info.
6984 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6985 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6986 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6987 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6988 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6989 (grub_video_i386_vbeblit_index_index): Likewise.
6990 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6991 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6992 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6993 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6994 operator.
6995 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6996 operator.
6997
6998 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6999 include/grub/i386/pc/vbeblit.h.
7000
7001 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7002 Updated to use grub_video_i386_vbeblit_info.
7003 (grub_video_i386_vbefill_R8G8B8): Likewise.
7004 (grub_video_i386_vbefill_index): Likewise.
7005 (grub_video_i386_vbefill): Added generic filler.
7006
7007 * video/i386/pc/vbefill.c: Updated to reflect changes on
7008 include/grub/i386/pc/vbefill.h.
7009
7010 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7011 grub_video_i386_vbeblit_info.
7012 (grub_video_vbe_unmap_color): Likewise.
7013 (grub_video_vbe_blit_glyph): Likewise.
7014 (grub_video_vbe_scroll): Likewise.
7015 (grub_video_vbe_draw_pixel): Removed function.
7016 (grub_video_vbe_get_pixel): Likewise.
7017 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7018 updated code to use it.
7019 (common_blitter): Added common blitter for render target and bitmap.
7020 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7021 (grub_video_vbe_blit_render_target): Likewise.
7022
7023 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7024
7025 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7026 is in text mode if there is no console control protocol instance
7027 available.
7028
7029 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7030
7031 * include/grub/video.h: Code cleanup.
7032
7033 * include/grub/i386/pc/vbe.h: Likewise.
7034
7035 * video/i386/pc/vbe.c: Likewise.
7036
7037 * video/i386/pc/vbeblit.c: Likewise.
7038
7039 * video/i386/pc/vbefill.c: Likewise.
7040
7041 * video/video.c: Likewise. Also added more comments.
7042
7043 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7044
7045 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7046 (struct grub_biosdisk_dap): Likewise.
7047
7048 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7049 linkage settings for all functions.
7050
7051 2006-07-12 Marco Gerards <marco@gnu.org>
7052
7053 * configure.ac (--enable-mm-debug): Fix typo.
7054
7055 * genkernsyms.sh.in: Use proper quoting for `CC'.
7056
7057 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7058
7059 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7060 (normal_mod_ASFLAGS): Remove "-m32".
7061
7062 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7063
7064 * util/misc.c: Include config.h.
7065 [!HAVE_MEMALIGN]: Do not include malloc.h.
7066 (grub_memalign): Use posix_memalign, if present. Then, use
7067 memalign, if present. Otherwise, emit an error.
7068
7069 * util/grub-emu.c: Do not include malloc.h.
7070
7071 * include/grub/util/misc.h: Include unistd.h. This is required for
7072 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7073 D. Eades III <hde@foobar-qux.org>.
7074
7075 * configure.ac (AC_GNU_SOURCE): Added.
7076 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7077 type.
7078
7079 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7080
7081 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7082 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7083
7084 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7085
7086 * include/grub/types.h (grub_host_addr_t): Rename to
7087 grub_target_addr_t.
7088 (grub_host_off_t): Rename to grub_target_off_t.
7089 (grub_host_size_t): Rename to grub_target_size_t.
7090 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7091 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7092
7093 * include/grub/kernel.h (struct grub_module_header): Change type
7094 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7095 (grub_module_info): Likewise.
7096
7097 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7098
7099 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7100 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7101 Velazquez <jesus.velazquez@gmail.com>.
7102
7103 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7104
7105 Count partitions from 1 instead of 0 in the string representation
7106 of partitions. Still use 0-based internally.
7107
7108 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7109 (sun_partition_map_iterate): Use grub_partition_t instead of
7110 struct grub_partition *. Cast DESC->START_CYLINDER to
7111 grub_uint64_t after converting the endian.
7112 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7113 (sun_partition_map_get_name): Add 1 to P->INDEX.
7114
7115 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7116 PCDATA->DOS_PART.
7117 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7118
7119 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7120 zero instead of one.
7121 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7122 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7123
7124 * partmap/apple.c (apple_partition_map_iterate): Change the type
7125 of POS to unsigned.
7126 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7127 (apple_partition_map_get_name): Add 1 into P->INDEX.
7128
7129 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7130 of POS to unsigned.
7131 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7132 calculate the offset of a partition.
7133 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7134 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7135
7136 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7137 SECTOR to grub_disk_addr_t.
7138 (acorn_partition_map_iterate): Likewise.
7139 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7140 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7141 top.
7142 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7143
7144 * kern/i386/pc/init.c (make_install_device): Add 1 into
7145 GRUB_INSTALL_DOS_PART.
7146
7147 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7148 conditional.
7149
7150 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7151
7152 Clean up the code to support 64-bit addressing in disks and
7153 files. This change is not enough for filesystems yet.
7154
7155 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7156 type of "start" to grub_uint64_t.
7157 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7158 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7159 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7160 convert addresses.
7161
7162 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7163 to grub_disk_addr_t.
7164
7165 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7166 string.
7167
7168 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7169
7170 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7171 to char *.
7172
7173 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7174
7175 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7176
7177 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7178
7179 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7180 to grub_off_t, to detect an error from grub_file_seek.
7181 (grub_multiboot_load_elf32): Likewise.
7182
7183 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7184 maximum unsigned long value when an overflow is detected.
7185 (grub_strtoull): New function.
7186 (grub_divmod64): Likewise.
7187 (grub_lltoa): use grub_divmod64.
7188
7189 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7190 grub_disk_addr_t.
7191 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7192 the pointer to next character. Use grub_strtoull instead of
7193 grub_strtoul.
7194 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7195 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7196 respectively.
7197
7198 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7199 return value is signed.
7200 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7201 test if OFFSET is less than zero, as OFFSET is unsigned now.
7202
7203 * kern/disk.c (struct grub_disk_cache): Change the type of
7204 "sector" to grub_disk_addr_t.
7205 (grub_disk_cache_get_index): Change the type of SECTOR to
7206 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7207 unsigned after shifting.
7208 (grub_disk_cache_invalidate): Change the type of SECTOR to
7209 grub_disk_addr_t.
7210 (grub_disk_cache_unlock): Likewise.
7211 (grub_disk_cache_store): Likewise.
7212 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7213 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7214 grub_disk_addr_t and grub_uint64_t, respectively.
7215 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7216 body, as the value of OFFSET is tweaked by
7217 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7218 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7219 respectively.
7220 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7221 body, as the value of OFFSET is tweaked by
7222 grub_disk_check_range. Change the types of LEN and N to
7223 grub_size_t.
7224
7225 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7226 and "saved_offset" to grub_off_t.
7227 (test_header): Cast BUF to char *.
7228 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7229 to char *.
7230 (grub_gzio_read): Change the types of OFFSET and SIZE to
7231 grub_off_t and grub_size_t, respectively.
7232
7233 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7234 Removed.
7235 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7236 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7237 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7238 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7239 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7240
7241 * include/grub/types.h (grub_off_t): Unconditionally set to
7242 grub_uint64_t.
7243 (grub_disk_addr_t): Changed to grub_uint64_t.
7244
7245 * include/grub/partition.h (struct grub_partition): Change the
7246 types of "start", "len" and "offset" to grub_disk_addr_t,
7247 grub_uint64_t and grub_disk_addr_t, respectively.
7248 (grub_partition_get_start): Return grub_disk_addr_t.
7249 (grub_partition_get_len): Return grub_uint64_t.
7250
7251 * include/grub/misc.h (grub_strtoull): New prototype.
7252 (grub_divmod64): Likewise.
7253
7254 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7255 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7256 grub_off_t, respectively.
7257 All callers and references changed.
7258
7259 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7260 grub_size_t in "read".
7261 All callers and references changed.
7262
7263 * include/grub/file.h (struct grub_file): Change the types of
7264 "offset" and "size" to grub_off_t and grub_off_t,
7265 respectively. Change the type of SECTOR to grub_disk_addr_t in
7266 "read_hook".
7267 (grub_file_read): Change the type of LEN to grub_size_t.
7268 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7269 grub_off_t.
7270 (grub_file_size): Return grub_off_t.
7271 (grub_file_tell): Likewise.
7272 All callers and references changed.
7273
7274 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7275 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7276 "write".
7277 (struct grub_disk): Change the type of "total_sectors" to
7278 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7279 "read_hook".
7280 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7281 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7282 (grub_disk_write): Likewise.
7283 All callers and references changed.
7284
7285 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7286 char * for grub_strncmp to silence gcc.
7287 (grub_iso9660_mount): Likewise.
7288 (grub_iso9660_mount): Likewise.
7289 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7290 return statement.
7291 (grub_iso9660_iterate_dir): Likewise.
7292 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7293
7294 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7295 LEN to grub_disk_addr_t and grub_size_t, respectively.
7296
7297 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7298
7299 * fs/jfs.c (grub_jfs_read_file): Likewise.
7300
7301 * fs/minix.c (grub_jfs_read_file): Likewise.
7302
7303 * fs/sfs.c (grub_jfs_read_file): Likewise.
7304
7305 * fs/ufs.c (grub_jfs_read_file): Likewise.
7306
7307 * fs/xfs.c (grub_jfs_read_file): Likewise.
7308
7309 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7310 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7311 respectively.
7312
7313 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7314 BLKNR to -1 instead of returning GRUB_ERRNO.
7315 (grub_ext2_read_file): Change the types of SECTOR and
7316 LEN to grub_disk_addr_t and grub_size_t, respectively.
7317
7318 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7319 LEN to grub_disk_addr_t and grub_size_t, respectively.
7320
7321 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7322 grub_file_read.
7323
7324 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7325 string. Do not cast SECTOR explicitly.
7326
7327 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7328 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7329 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7330 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7331 over 2TB and LBA mode is not supported, raise an error.
7332 (get_safe_sectors): New function.
7333 (grub_biosdisk_read): Use get_safe_sectors.
7334 (grub_biosdisk_write): Likewise.
7335
7336 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7337 (grub_efidisk_write): Likewise.
7338
7339 * disk/loopback.c (delete_loopback): Cosmetic changes.
7340 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7341 correctly.
7342 (grub_loopback_open): Likewise.
7343 (grub_loopback_read): Likewise. Also, change the type of POS to
7344 grub_off_t, and fix the usage of grub_memset.
7345
7346 * commands/i386/pc/play.c: Include grub/machine/time.h.
7347
7348 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7349 print FILE->SIZE.
7350
7351 * commands/configfile.c: Include grub/env.h.
7352
7353 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7354 GRUB_ERRNO directly instead. Change the type of POS to
7355 grub_off_t. Follow the coding standard.
7356
7357 * commands/blocklist.c: Include grub/partition.h.
7358 (grub_cmd_blocklist): Return an error if the underlying device is
7359 not a disk. Take the starting sector of a partition into account,
7360 if a partition is used.
7361
7362 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7363 a length field.
7364 (lba_mode): Support 64-bit addresses.
7365 (chs_mode): Likewise.
7366 (copy_buffer): Adapted to the new offsets of a length field and a
7367 segment field.
7368 (blocklist_default_start): Allocate 64-bit space.
7369
7370 * boot/i386/pc/boot.S (force_lba): Removed.
7371 (boot_drive): Moved to under KERNEL_SECTOR.
7372 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7373 space.
7374 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7375 is useless.
7376 (lba_mode): Refactored to support a 64-bit address. More size
7377 optimization.
7378 (setup_sectors): Likewise.
7379
7380 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7381
7382 * DISTLIST: Added include/grub/i386/linux.h. Removed
7383 include/grub/i386/pc/linux.h
7384
7385 * configure.ac (AC_INIT): Bumped to 1.94.
7386
7387 * config.guess: Updated from gnulib.
7388 * config.sub: Likewise.
7389 * install-sh: Likewise.
7390 * mkinstalldirs: Likewise.
7391
7392 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7393
7394 * conf/common.rmk (grub_modules_init.lst): Depended on
7395 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7396 MODSRCFILES.
7397
7398 * genmk.rb (PModule::rule): Reverted the previous change.
7399
7400 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7401
7402 * conf/common.rmk (grub_modules_init.lst): Depends on
7403 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7404 that the target does not exist before producing.
7405 (grub_modules_init.h): Remove the target before generating.
7406 (grub_emu_init.c): Likewise.
7407
7408 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7409
7410 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7411
7412 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7413 for the target-specific tests. Make sure that we also have the
7414 up-to-date target variables for those tests.
7415
7416 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7417
7418 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7419 (PModule::rule): Likewise.
7420
7421 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7422
7423 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7424 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7425 target-specific flags should be prefixed.
7426 (PModule::rule): Likewise.
7427
7428 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7429
7430 * configure.ac (CMP): Check if cmp is available explicitly.
7431
7432 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7433
7434 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7435 (target_cpu): New variable.
7436 (pkglibdir): Use target_cpu instead of host_cpu.
7437
7438 * util/i386/pc/grub-install.in (host_cpu): Removed.
7439 (target_cpu): New variable.
7440 (pkglibdir): Use target_cpu instead of host_cpu.
7441
7442 * util/genmoddep.c: Removed.
7443
7444 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7445 instead of GRUB_HOST_SIZEOF_VOID_P.
7446 * kern/dl.c: Likewise.
7447
7448 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7449 ...
7450 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7451 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7452 (GRUB_TARGET_SIZEOF_LONG): ... this.
7453 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7454 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7455 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7456 to ...
7457 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7458 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7459 (GRUB_TARGET_SIZEOF_LONG): ... this.
7460 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7461 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7462 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7463 to ...
7464 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7465 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7466 (GRUB_TARGET_SIZEOF_LONG): ... this.
7467 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7468 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7469
7470 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7471 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7472 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7473 instead of GRUB_HOST_SIZEOF_LONG.
7474 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7475 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7476 GRUB_CPU_WORDS_BIGENDIAN.
7477 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7478 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7479 grub_host_ssize_t.
7480
7481 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7482 (genmoddep_SOURCES): Likewise.
7483 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7484 (genmoddep_SOURCES): Likewise.
7485 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7486 (genmoddep_SOURCES): Likewise.
7487 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7488 Likewise.
7489 (genmoddep_SOURCES): Likewise.
7490
7491 * genmoddep.awk: New file.
7492
7493 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7494 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7495 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7496 (PModule::rule): Likewise.
7497 (Program::rule): Likewise.
7498 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7499 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7500 respectively.
7501
7502 * configure.ac: Rewritten intensively to use host and target
7503 instead of build and host, respectively.
7504
7505 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7506 (host_cpu): Removed.
7507 (target_cpu): New variable.
7508 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7509 (BUILD_CC): Removed.
7510 (BUILD_CFLAGS): Likewise.
7511 (BUILD_CPPFLAGS): Likewise.
7512 (TARGET_CC): New variable.
7513 (TARGET_CFLAGS): Likewise.
7514 (TARGET_CPPFLAGS): Likewise.
7515 (TARGET_LDFLAGS): Likewise.
7516 (AWK): Likewise.
7517 (include): Use target_cpu instead of host_cpu.
7518 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7519
7520 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7521
7522 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7523
7524 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7525 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7526 field 'false' to 'exec_on_false'.
7527 (grub_script_create_cmdif): Renamed argument names to reflect above
7528 changes.
7529
7530 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7531
7532 * normal/script.c (grub_script_create_cmdif): Likewise.
7533
7534 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7535
7536 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7537 top.
7538 (grub_hfsplus_btree_recptr): Likewise.
7539 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7540 FILEBLOCK both to pass a block number and store next block
7541 number.
7542 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7543 overflow file correctly. Specify errors appropriately, because
7544 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7545 grub_hfsplus_btree_recptr to get the pointer to a found key.
7546 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7547 is found.
7548
7549 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7550 linux.mod.
7551 (_linux_mod_SOURCES): New variable.
7552 (_linux_mod_CFLAGS): Likewise.
7553 (_linux_mod_LDFLAGS): Likewise.
7554 (linux_mod_SOURCES): Likewise.
7555 (linux_mod_CFLAGS): Likewise.
7556 (linux_mod_LDFLAGS): Likewise.
7557
7558 * DISTLIST: Added loader/i386/efi/linux.c,
7559 loader/i386/efi/linux_normal.c and
7560 include/grub/i386/efi/loader.h.
7561
7562 * loader/i386/efi/linux.c: New file.
7563 * loader/i386/efi/linux_normal.c: Likewise.
7564 * include/grub/i386/efi/loader.h: Likewise.
7565
7566 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7567
7568 * commands/blocklist.c: New file.
7569
7570 * DISTLIST: Added commands/blocklist.c.
7571
7572 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7573 color for the background, and a darker color for the foreground.
7574 (grub_console_checkkey): Return READ_KEY.
7575 (grub_console_cls): Set the background to
7576 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7577
7578 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7579
7580 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7581 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7582
7583 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7584 prototype.
7585
7586 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7587 BG. The spec is wrong again.
7588
7589 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7590 prototype.
7591 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7592
7593 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7594 commands/blocklist.c.
7595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7596
7597 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7598 (blocklist_mod_SOURCES): New variable.
7599 (blocklist_mod_CFLAGS): Likewise.
7600 (blocklist_mod_LDFLAGS): Likewise.
7601
7602 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7603
7604 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7605 duplication.
7606 (lba_mode): Use %eax more intensively to reduce the code size.
7607
7608 2006-05-20 Marco Gerards <marco@gnu.org>
7609
7610 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7611
7612 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7613 for `menuentry'.
7614 (script): Accept leading newlines.
7615 (newlines): New rule to describe 0 or more newlines.
7616 (commands): Accept `command' with trailing newline. Fixed the
7617 order in which arguments were passed to `grub_script_add_cmd'.
7618 Accept commands separated by newlines.
7619 (function): Changed to accept newlines.
7620 (menuentry) Rewritten.
7621
7622 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7623 front of the list, instead of to the end.
7624
7625 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7626
7627 * util/i386/pc/grub-install.in (bindir): New variable.
7628 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7629 Shaver <lbgwjl@gmail.com>.
7630
7631 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7632
7633 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7634 grub/machine/linux.h
7635 * loader/i386/pc/linux.c: Likewise.
7636
7637 * include/grub/i386/pc/linux.h: Moved to ...
7638 * include/grub/i386/linux.h: ... here.
7639
7640 * include/grub/i386/linux.h (struct linux_kernel_params): New
7641 struct.
7642
7643 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7644
7645 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7646 checking.
7647 (grub_video_vbe_blit_glyph): Likewise.
7648 (grub_video_vbe_blit_bitmap): Likewise.
7649 (grub_video_vbe_blit_render_target): Likewise.
7650
7651 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7652
7653 * configure.ac (--with-platform): Properly quote the square
7654 brackets.
7655
7656 2006-05-08 Marco Gerards <marco@gnu.org>
7657
7658 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7659 this...
7660 (kernel_elf_HEADERS): ...to this. Updated all users.
7661 (grubof_symlist.c): Renamed from this...
7662 (kernel_elf_symlist.c): ...to this. Updated all users.
7663 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7664 (grubof_SOURCES): Renamed from this...
7665 (kernel_elf_SOURCES): ...to this.
7666 (grubof_HEADERS): Renamed from this...
7667 (kernel_elf_HEADERS): ...to this.
7668 (grubof_CFLAGS): Renamed from this...
7669 (kernel_elf_CFLAGS): ...to this.
7670 (grubof_ASFLAGS): Renamed from this...
7671 (kernel_elf_ASFLAGS): ...to this.
7672 (grubof_LDFLAGS): Renamed from this...
7673 (kernel_elf_LDFLAGS): ...to this.
7674
7675 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7676 this...
7677 (kernel_elf_HEADERS): ...to this. Updated all users.
7678 (grubof_symlist.c): Renamed from this...
7679 (kernel_elf_symlist.c): ...to this. Updated all users.
7680 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7681 (grubof_SOURCES): Renamed from this...
7682 (kernel_elf_SOURCES): ...to this.
7683 (grubof_HEADERS): Renamed from this...
7684 (kernel_elf_HEADERS): ...to this.
7685 (grubof_CFLAGS): Renamed from this...
7686 (kernel_elf_CFLAGS): ...to this.
7687 (grubof_ASFLAGS): Renamed from this...
7688 (kernel_elf_ASFLAGS): ...to this.
7689 (grubof_LDFLAGS): Renamed from this...
7690 (kernel_elf_LDFLAGS): ...to this.
7691
7692 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7693 `kernel.elf' instead of `grubof'.
7694
7695 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7696
7697 Add --with-platform to configure. Use pkglibdir instead of
7698 pkgdatadir. This is reported by Roger Leigh.
7699
7700 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7701 (host_vendor): Likewise.
7702 (host_os): Likewise.
7703 (pkgdatadir): Likewise.
7704 (platform): New variable.
7705 (pkglibdir): Likewise.
7706 Use PKGLIBDIR instead of PKGDATADIR.
7707
7708 * util/i386/pc/grub-install.in (datadir): Removed.
7709 (host_vendor): Likewise.
7710 (host_os): Likewise.
7711 (pkgdatadir): Likewise.
7712 (platform): New variable.
7713 (pkglibdir): Likewise.
7714 Use PKGLIBDIR instead of PKGDATADIR.
7715
7716 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7717 instead of GRUB_DATADIR.
7718 (main): Likewise.
7719 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7720 (main): Likewise.
7721 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7722 (main): Likewise.
7723
7724 * configure.ac (--with-platform): New option.
7725 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7726
7727 * Makefile.in: Include a makefile based on PLATFORM instead of
7728 HOST_VENDOR.
7729 (pkgdatadir): Not appended by the machine type.
7730 (pkglibdir): Appended by the machine type.
7731 (host_vendor): Removed.
7732 (platform): New variable.
7733 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7734 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7735 (uninstall): Likewise.
7736
7737 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7738
7739 Use the environment context in the menu. Remove the commands
7740 "default" and "timeout", and use variables instead.
7741
7742 * normal/menu.c: Include grub/env.h.
7743 (print_entry): Cast TITLE to silence gcc.
7744 (get_timeout): New function.
7745 (set_timeout): Likewise.
7746 (get_entry_number): Likewise.
7747 (run_menu): Use a default entry, a fallback entry and a timeout
7748 in the environment variables "default", "fallback" and
7749 "timeout". Also, tweak the default entry if it is not within the
7750 current menu entries.
7751 (grub_menu_run): Use a fallback entry in the environment variable
7752 "fallback".
7753
7754 * normal/main.c (read_config_file): Do not initialize
7755 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7756 NEWMENU->TIMEOUT.
7757 (grub_normal_execute): Use a data slot to store the menu.
7758
7759 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7760 fallback_entry and timeout.
7761 (struct grub_menu_list): Removed.
7762 (grub_menu_list_t): Likewise.
7763 (struct grub_context): Likewise.
7764 (grub_context_t): Likewise.
7765 (grub_context_get): Likewise.
7766 (grub_context_get_current_menu): Likewise.
7767 (grub_context_push_menu): Likewise.
7768 (grub_context_pop_menu): Likewise.
7769 (grub_default_init): Likewise.
7770 (grub_default_fini): Likewise.
7771 (grub_timeout_init): Likewise.
7772 (grub_timeout_fini): Likewise.
7773
7774 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7775 and timeout.mod.
7776 (normal_mod_SOURCES): Removed normal/context.c.
7777
7778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7779 commands/default.c, commands/timeout.c and normal/context.c.
7780 (normal_mod_SOURCES): Removed normal/context.c.
7781
7782 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7783 commands/timeout.c and normal/context.c.
7784 (normal_mod_SOURCES): Removed normal/context.c.
7785
7786 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7787 commands/default.c, commands/timeout.c and normal/context.c.
7788 (normal_mod_SOURCES): Removed normal/context.c.
7789
7790 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7791 timeout.mod.
7792 (default_mod_SOURCES): Removed.
7793 (default_mod_CFLAGS): Likewise.
7794 (default_mod_LDFLAGS): Likewise.
7795 (timeout_mod_SOURCES): Removed.
7796 (timeout_mod_CFLAGS): Likewise.
7797 (timeout_mod_LDFLAGS): Likewise.
7798
7799 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7800 normal/context.c.
7801
7802 * commands/default.c: Removed.
7803 * commands/timeout.c: Likewise.
7804 * normal/context.c: Likewise.
7805
7806 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7807
7808 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7809
7810 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7811
7812 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7813 "next" to "prev" for readability.
7814 (struct grub_env_sorted_var): New struct.
7815 (grub_env_context): Renamed to ...
7816 (initial_context): ... this.
7817 (grub_env_var_context): Renamed to ...
7818 (current_context): ... this.
7819 (grub_env_find): Look only at CURRENT_CONTEXT.
7820 (grub_env_context_open): Rewritten to copy exported variables from
7821 previous context.
7822 (grub_env_context_close): Rewritten according to the new
7823 scheme. Also, add an assertion to prevent the initial context from
7824 removed.
7825 (grub_env_insert): Removed the code for the sorted list.
7826 (grub_env_remove): Likewise.
7827 (grub_env_export): Simply mark the variable with
7828 GRUB_ENV_VAR_GLOBAL.
7829 (grub_env_set): A cosmetic change for naming consistency.
7830 (grub_env_get): Likewise.
7831 (grub_env_unset): Likewise.
7832 (grub_env_iterate): Rewritten to sort variables within this
7833 function.
7834 (grub_register_variable_hook): Fixed for naming consistency. Call
7835 grub_env_find again, only if NAME is not found at the first time.
7836 (mangle_data_slot_name): New function.
7837 (grub_env_set_data_slot): Likewise.
7838 (grub_env_get_data_slot): Likewise.
7839 (grub_env_unset_data_slot): Likewise.
7840
7841 * include/grub/env.h (grub_env_var_type): New enum.
7842 (GRUB_ENV_VAR_LOCAL): New constant.
7843 (GRUB_ENV_VAR_GLOBAL): Likewise.
7844 (GRUB_ENV_VAR_DATA): Likewise.
7845 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7846 "type".
7847 (grub_env_set): Replace VAR with NAME for consistency.
7848 (grub_register_variable_hook): Likewise.
7849 (grub_env_export): Specify the name of the argument.
7850 (grub_env_set_data_slot): New prototype.
7851 (grub_env_get_data_slot): Likewise.
7852 (grub_env_unset_data_slot): Likewise.
7853
7854 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7855
7856 Extend the loader so that GRUB can accept a loader which comes
7857 back to GRUB when a loaded image exits. Also, this change adds
7858 support for a chainloader on EFI.
7859
7860 * term/efi/console.c: Include grub/misc.h.
7861 (grub_console_checkkey): Display a scan code on the top for
7862 debugging. This will be removed once the EFI port gets stable.
7863 Correct the scan code mapping.
7864
7865 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7866 allocate memory from larger regions, in order to reduce the number
7867 of allocated regions. Otherwise, the MacOSX loader panics.
7868 (filter_memory_map): Avoid less than 1MB for compatibility with
7869 other loaders.
7870 (add_memory_regions): Allocate from the tail of a region, if
7871 possible, to avoid allocating a region near to 1MB, for the MacOSX
7872 loader.
7873
7874 * kern/efi/init.c (grub_efi_set_prefix): Specify
7875 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7876
7877 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7878 argument IMAGE_HANDLE and specify it to get a loaded image.
7879 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7880 grub_efi_get_loaded_image.
7881 (grub_efi_get_filename): Divide the length by the size of
7882 grub_efi_char16_t.
7883 (grub_efi_get_device_path): New function.
7884 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7885 the length by the size of grub_efi_char16_t for a file path device
7886 path node.
7887
7888 * kern/loader.c (grub_loader_noreturn): New variable.
7889 (grub_loader_set): Accept a new argument NORETURN. Set
7890 GRUB_LOADER_NORETURN to NORETURN.
7891 All callers changed.
7892 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7893 grub_machine_fini.
7894
7895 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7896 prototype.
7897 (grub_efi_get_loaded_image): Take an argument to specify an image
7898 handle.
7899
7900 * include/grub/loader.h (grub_loader_set): Added one more argument
7901 NORETURN.
7902
7903 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7904 instead of grub_efi_open_protocol.
7905 (grub_efidisk_get_device_name): Likewise.
7906 (grub_efidisk_close): Print a newline.
7907 (grub_efidisk_get_device_handle): Fixed to use
7908 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7909 GRUB_EFI_DEVICE_PATH_TYPE.
7910
7911 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7912 * kern/efi/efi.c (device_path_guid): ... here.
7913
7914 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7915 chain.mod.
7916 (kernel_mod_HEADERS): Added efi/disk.h.
7917 (_chain_mod_SOURCES): New variable.
7918 (_chain_mod_CFLAGS): Likewise.
7919 (_chain_mod_LDFLAGS): Likewise.
7920 (chain_mod_SOURCES): Likewise.
7921 (chain_mod_CFLAGS): Likewise.
7922 (chain_mod_LDFLAGS): Likewise.
7923
7924 * DISTLIST: Added include/grub/efi/chainloader.h,
7925 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7926
7927 * include/grub/efi/chainloader.h: New file.
7928 * loader/efi/chainloader.c: Likewise.
7929 * loader/efi/chainloader_normal.c: Likewise.
7930
7931 2006-04-30 Marco Gerards <marco@gnu.org>
7932
7933 * commands/configfile.c (grub_cmd_source): New function.
7934 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7935 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7936
7937 2006-04-30 Marco Gerards <marco@gnu.org>
7938
7939 * normal/execute.c (grub_script_execute_cmd): Change the return
7940 type to `grub_err_t'. Correctly return the error.
7941 (grub_script_execute_cmdline): In case a command line is not a
7942 command or a function, try to interpret it as an assignment.
7943
7944 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7945
7946 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7947 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7948 skip a node whose name is obviously invalid as UTF-16,
7949 i.e. contains a NUL character. Stop the iteration when the last
7950 directory entry is found. Instead of using the return value of
7951 grub_hfsplus_btree_iterate_node, store the value in RET and use
7952 it, because the iterator can be stopped by the last directory
7953 entry.
7954
7955 2006-04-30 Marco Gerards <marco@gnu.org>
7956
7957 * include/grub/env.h (grub_env_export): New prototype. Reported
7958 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7959
7960 2006-04-30 Marco Gerards <marco@gnu.org>
7961
7962 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7963 size of the extents in a catalog file record.
7964
7965 2006-04-29 Marco Gerards <marco@gnu.org>
7966
7967 * commands/configfile.c (grub_cmd_configfile): Execute the
7968 configfile within its own context.
7969
7970 * include/grub/env.h (grub_env_context_open): New prototype.
7971 (grub_env_context_close): Likewise.
7972
7973 * kern/env.c (grub_env): Removed.
7974 (grub_env_sorted): Likewise.
7975 (grub_env_context): New variable.
7976 (grub_env_var_context): Likewise.
7977 (grub_env_find): Search both the active context and the global
7978 context.
7979 (grub_env_context_open): New function.
7980 (grub_env_context_close): Likewise.
7981 (grub_env_insert): Likewise.
7982 (grub_env_remove): Likewise.
7983 (grub_env_export): Likewise.
7984 (grub_env_set): Changed to use helper functions to avoid code
7985 duplication.
7986 (grub_env_iterate): Rewritten so both the current context and the
7987 global context are being used.
7988
7989 * normal/command.c (export_command): New function.
7990 (grub_command_init): Register the `export' function.
7991
7992 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7993
7994 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7995 explicitly to suppress gcc's warnings.
7996 * fs/fat.c (grub_fat_find_dir): Likewise.
7997 (grub_fat_label): Likewise.
7998 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7999 (grub_xfs_mount): Likewise.
8000 (grub_xfs_label): Likewise.
8001 * fs/affs.c (grub_affs_mount): Likewise.
8002 (grub_affs_label): Likewise.
8003 (grub_affs_iterate_dir): Likewise.
8004 * fs/sfs.c (grub_sfs_mount): Likewise.
8005 (grub_sfs_iterate_dir): Likewise.
8006 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8007 * fs/hfs.c (grub_hfs_mount): Likewise.
8008 (grub_hfs_cmp_catkeys): Likewise.
8009 (grub_hfs_find_dir): Likewise.
8010 (grub_hfs_dir): Likewise.
8011 (grub_hfs_label): Likewise.
8012 * fs/jfs.c (grub_jfs_mount): Likewise.
8013 (grub_jfs_opendir): Likewise.
8014 (grub_jfs_getent): Likewise.
8015 (grub_jfs_lookup_symlink): Likewise.
8016 (grub_jfs_label): Likewise.
8017 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8018 (grub_hfsplus_iterate_dir): Likewise.
8019 (grub_hfsplus_btree_iterate_node): Made static.
8020
8021 * util/grub-emu.c (prefix): New variable.
8022 (grub_machine_set_prefix): New function.
8023 (main): Do not set the environment variable "prefix" here. Only
8024 set PREFIX, which is used later by grub_machine_set_prefix.
8025
8026 * include/grub/video.h: Do not include grub/symbol.h.
8027 (grub_video_register): Not exported. This symbol is not defined in
8028 the kernel.
8029 (grub_video_unregister): Likewise.
8030 (grub_video_iterate): Likewise.
8031 (grub_video_setup): Likewise.
8032 (grub_video_restore): Likewise.
8033 (grub_video_get_info): Likewise.
8034 (grub_video_get_blit_format): Likewise.
8035 (grub_video_set_palette): Likewise.
8036 (grub_video_get_palette): Likewise.
8037 (grub_video_set_viewport): Likewise.
8038 (grub_video_get_viewport): Likewise.
8039 (grub_video_map_color): Likewise.
8040 (grub_video_map_rgb): Likewise.
8041 (grub_video_map_rgba): Likewise.
8042 (grub_video_fill_rect): Likewise.
8043 (grub_video_blit_glyph): Likewise.
8044 (grub_video_blit_bitmap): Likewise.
8045 (grub_video_blit_render_target): Likewise.
8046 (grub_video_scroll): Likewise.
8047 (grub_video_swap_buffers): Likewise.
8048 (grub_video_create_render_target): Likewise.
8049 (grub_video_delete_render_target): Likewise.
8050 (grub_video_set_active_render_target): Likewise.
8051
8052 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8053 Undefined.
8054 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8055
8056 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8057 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8058 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8059 instead of $(srcdir)/genkernsyms.sh.
8060
8061 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8062 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8063 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8064 instead of $(srcdir)/genkernsyms.sh.
8065
8066 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8067 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8068 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8069 instead of $(srcdir)/genkernsyms.sh.
8070
8071 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8072 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8073 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8074 instead of $(srcdir)/genkernsyms.sh.
8075
8076 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8077 genkernsyms.sh.
8078
8079 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8080 genkernsyms.sh.
8081 (gensymlist.sh): New target.
8082 (genkernsyms.sh): Likewise.
8083
8084 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8085 genkernsyms.sh.in and gensymlist.sh.in.
8086
8087 * genkernsyms.sh: Removed.
8088 * gensymlist.sh: Likewise.
8089
8090 * genkernsyms.sh.in: New file.
8091 * gensymlist.sh.in: Likewise.
8092
8093 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8094
8095 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8096 clobber "prefix", since we may have already set it manually.
8097
8098 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8099
8100 * kern/misc.c (abort): New alias for grub_abort.
8101
8102 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8103
8104 A new machine-specific function "grub_machine_set_prefix" is
8105 defined. This is called after loading modules, so that a prefix
8106 initialization can use modules. Also, this change adds an
8107 intensive debugging feature for the memory manager via the
8108 configure option "--enable-mm-debug".
8109
8110 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8111 PART.LEN.
8112
8113 * kern/sparc64/ieee1275/init.c (abort): Removed.
8114 (grub_stop): Likewise.
8115 (grub_exit): New function.
8116 (grub_set_prefix): Renamed to ...
8117 (grub_machine_set_prefix): ... this.
8118 (grub_machine_init): Do not call grub_set_prefix.
8119
8120 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8121 (grub_machine_set_prefix): ... this.
8122 (grub_machine_init): Do not call grub_set_prefix.
8123
8124 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8125 (grub_machine_init): Do not set the prefix here.
8126
8127 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8128
8129 * kern/efi/init.c: Include grub/mm.h.
8130 (grub_efi_set_prefix): New function.
8131
8132 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8133 (grub_efi_get_filename): New function.
8134 (grub_print_device_path): Renamed to ...
8135 (grub_efi_print_device_path): ... this.
8136
8137 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8138 [MM_DEBUG] (grub_realloc): Likewise.
8139 [MM_DEBUG] (grub_free): Likewise.
8140 [MM_DEBUG] (grub_memalign): Likewise.
8141 [MM_DEBUG] (grub_mm_debug): New variable.
8142 [MM_DEBUG] (grub_debug_malloc): New function.
8143 [MM_DEBUG] (grub_debug_free): New function.
8144 [MM_DEBUG] (grub_debug_realloc): New function.
8145 [MM_DEBUG] (grub_debug_memalign): New function.
8146
8147 * kern/misc.c (grub_abort): Print a newline to distinguish
8148 the message.
8149
8150 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8151 grub_set_root_dev after loading modules. This is necessary when
8152 setting a prefix depends on modules.
8153
8154 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8155 (grub_efi_print_device_path): ... this.
8156 (grub_efi_get_filename): New prototype.
8157 (grub_efi_set_prefix): Likewise.
8158
8159 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8160 and grub/disk.h.
8161 (grub_efidisk_get_device_handle): New prototype.
8162 (grub_efidisk_get_device_name): Likewise.
8163
8164 * include/grub/mm.h: Include config.h.
8165 (MM_DEBUG): Removed.
8166 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8167 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8168 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8169 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8170 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8171 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8172 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8173 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8174 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8175
8176 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8177
8178 * disk/efi/efidisk.c: Include grub/partition.h.
8179 (iterate_child_devices): New function.
8180 (add_device): First, compare only last device path nodes, so that
8181 devices are sorted by the types.
8182 (grub_efidisk_get_device_handle): New function.
8183 (grub_efidisk_get_device_name): Likewise.
8184
8185 * configure.ac (--enable-mm-debug): New option to enable the
8186 memory manager debugging feature. This makes the binary much
8187 bigger, so is disabled by default.
8188
8189 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8190
8191 Use grub_abort instead of grub_stop, and grub_exit must be
8192 define in each architecture now. Also, this change adds support
8193 for EFI disks.
8194
8195 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8196 (grub_getkey): New function.
8197 (grub_term_get_current): Likewise.
8198
8199 * util/i386/pc/grub-setup.c: Include grub/term.h.
8200 (grub_getkey): New function.
8201 (grub_term_get_current): Likewise.
8202
8203 * util/misc.c (grub_stop): Renamed to ...
8204 (grub_exit): ... this.
8205
8206 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8207 (grub_exit): ... this.
8208 (grub_machine_init): Use grub_abort instead of abort.
8209 (grub_stop): Removed.
8210
8211 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8212 abort.
8213
8214 * kern/i386/pc/startup.S (grub_exit): New function.
8215 (cold_reboot): New label.
8216
8217 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8218 (grub_efi_init): Call grub_efidisk_init.
8219 (grub_efi_fini): Call grub_efidisk_fini.
8220
8221 * kern/efi/efi.c: Include grub/mm.h.
8222 (grub_efi_console_control_guid): Renamed to ...
8223 (console_control_guid): ... this.
8224 (grub_efi_loaded_image_guid): Renamed to ...
8225 (loaded_image_guid): ... this.
8226 (grub_efi_locate_handle): New function.
8227 (grub_efi_open_protocol): Likewise.
8228 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8229 GRUB_EFI_CONSOLE_CONTROL_GUID.
8230 (grub_efi_exit): Removed.
8231 (grub_stop): Likewise.
8232 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8233 (grub_exit): New function.
8234 (grub_print_device_path): Likewise.
8235
8236 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8237 (grub_enter_rescue_mode): Register "exit".
8238
8239 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8240 (grub_abort): New function.
8241
8242 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8243
8244 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8245
8246 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8247
8248 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8249 (grub_print_device_path): New prototype.
8250 (grub_efi_locate_handle): Likewise.
8251 (grub_efi_open_protocol): Likewise.
8252
8253 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8254 * disk/efi/efidisk.c: Likewise.
8255
8256 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8257
8258 * include/grub/efi/console_control.h
8259 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8260
8261 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8262 last 8 bytes as an array.
8263 (GRUB_EFI_DISK_IO_GUID): New macro.
8264 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8265 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8266 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8267 grub_uint8_t.
8268 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8269 (struct grub_efi_device_path): Rename the member "sub_type" to
8270 "subtype".
8271 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8272 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8273 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8274 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8275 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8276 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8277 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8278 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8279 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8280 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8281 (struct grub_efi_pci_device_path): New structure.
8282 (grub_efi_pci_device_path_t): New type.
8283 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8284 (struct grub_efi_pccard_device_path): New structure.
8285 (grub_efi_pccard_device_path_t): New type.
8286 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8287 (struct grub_efi_memory_mapped_device_path): New structure.
8288 (grub_efi_memory_mapped_device_path_t): New type.
8289 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8290 (struct grub_efi_vendor_device_path): New structure.
8291 (grub_efi_vendor_device_path_t): New type.
8292 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8293 (struct grub_efi_controller_device_path): New structure.
8294 (grub_efi_controller_device_path_t): New type.
8295 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8296 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8297 (struct grub_efi_acpi_device_path): New structure.
8298 (grub_efi_acpi_device_path_t): New type.
8299 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8300 (struct grub_efi_expanded_acpi_device_path): New structure.
8301 (grub_efi_expanded_acpi_device_path_t): New type.
8302 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8303 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8304 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8305 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8306 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8307 (struct grub_efi_atapi_device_path): New structure.
8308 (grub_efi_atapi_device_path_t): New type.
8309 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8310 (struct grub_efi_fibre_channel_device_path): New structure.
8311 (grub_efi_fibre_channel_device_path_t): New type.
8312 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8313 (struct grub_efi_1394_device_path): New structure.
8314 (grub_efi_1394_device_path_t): New type.
8315 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8316 (struct grub_efi_usb_device_path): New structure.
8317 (grub_efi_usb_device_path_t): New type.
8318 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8319 (struct grub_efi_usb_class_device_path): New structure.
8320 (grub_efi_usb_class_device_path_t): New type.
8321 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8322 (struct grub_efi_i2o_device_path): New structure.
8323 (grub_efi_i2o_device_path_t): New type.
8324 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8325 (struct grub_efi_mac_address_device_path): New structure.
8326 (grub_efi_mac_address_device_path_t): New type.
8327 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8328 (struct grub_efi_ipv4_device_path): New structure.
8329 (grub_efi_ipv4_device_path_t): New type.
8330 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8331 (struct grub_efi_ipv6_device_path): New structure.
8332 (grub_efi_ipv6_device_path_t): New type.
8333 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8334 (struct grub_efi_infiniband_device_path): New structure.
8335 (grub_efi_infiniband_device_path_t): New type.
8336 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8337 (struct grub_efi_uart_device_path): New structure.
8338 (grub_efi_uart_device_path_t): New type.
8339 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8340 (struct grub_efi_vendor_messaging_device_path): New structure.
8341 (grub_efi_vendor_messaging_device_path_t): New type.
8342 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8343 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8344 (struct grub_efi_hard_drive_device_path): New structure.
8345 (grub_efi_hard_drive_device_path_t): New type.
8346 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8347 (struct grub_efi_cdrom_device_path): New structure.
8348 (grub_efi_cdrom_device_path_t): New type.
8349 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8350 (struct grub_efi_vendor_media_device_path): New structure.
8351 (grub_efi_vendor_media_device_path_t): New type.
8352 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8353 (struct grub_efi_file_path_device_path): New structure.
8354 (grub_efi_file_path_device_path_t): New type.
8355 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8356 (struct grub_efi_protocol_device_path): New structure.
8357 (grub_efi_protocol_device_path_t): New type.
8358 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8359 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8360 (struct grub_efi_bios_device_path): New structure.
8361 (grub_efi_bios_device_path_t): New type.
8362 (struct grub_efi_disk_io): New structure.
8363 (grub_efi_disk_io_t): New type.
8364 (struct grub_efi_block_io_media): New structure.
8365 (grub_efi_block_io_media_t): New type.
8366 (struct grub_efi_block_io): New structure.
8367 (grub_efi_block_io_t): New type.
8368
8369 * include/grub/misc.h (grub_stop): Removed.
8370 (grub_exit): New prototype.
8371 (grub_abort): Likewise.
8372
8373 * include/grub/disk.h (enum grub_disk_dev_id): Added
8374 GRUB_DISK_DEVICE_EFIDISK_ID.
8375
8376 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8377 disk/efi/efidisk.c.
8378 (kernel_syms.lst): Remove the target if an error occurs.
8379
8380 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8381
8382 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8383 as it was simply too buggy.
8384
8385 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8386
8387 * kern/misc.c (grub_lltoa): New function.
8388 (grub_vsprintf): Added support for the long long suffix,
8389 i.e. "ll".
8390
8391 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8392
8393 * Makefile.in (LDFLAGS): Add variable.
8394 (LD): Remove variable.
8395 * configure.ac: Add -m32 to LDFLAGS.
8396 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8397 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8398 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8399 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8400 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8401 variables.
8402 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8403 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8404 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8405
8406 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8407
8408 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8409 length for unknown glyph.
8410
8411 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8412
8413 Add support for pre-loaded modules into the EFI port.
8414
8415 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8416 completely. Accept one more argument DIR. The caller has changed.
8417
8418 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8419
8420 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8421 (grub_efi_loaded_image_guid): New variable.
8422 (grub_efi_get_loaded_image): New function.
8423 (grub_arch_modules_addr): Likewise.
8424
8425 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8426 prototype.
8427
8428 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8429 (struct grub_efi_loaded_image): New structure.
8430 (grub_efi_loaded_image_t): New type.
8431
8432 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8433
8434 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8435 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8436 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8437
8438 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8439
8440 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8441
8442 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8443
8444 * DISTLIST: Added include/grub/efi/console.h,
8445 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8446 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8447
8448 * include/grub/efi/console.h: New file.
8449 * include/grub/efi/time.h: Likewise.
8450 * include/grub/i386/efi/kernel.h: Likewise.
8451 * kern/efi/init.c: Likewise.
8452 * kern/efi/mm.c: Likewise.
8453 * term/efi/console.c: Likewise.
8454
8455 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8456 (grub_stop): Removed.
8457 (grub_get_rtc): Likewise.
8458 (grub_machine_init): Simply call grub_efi_init.
8459 (grub_machine_fini): Call grub_efi_fini.
8460
8461 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8462 (grub_efi_output_string): Removed.
8463 (grub_efi_stall): New function.
8464 (grub_stop): Likewise.
8465 (grub_get_rtc): Likewise.
8466
8467 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8468 (grub_efi_stall): New prototype.
8469 (grub_efi_allocate_pages): Likewise.
8470 (grub_efi_free_pages): Likewise.
8471 (grub_efi_get_memory_map): Likewise.
8472 (grub_efi_mm_init): Likewise.
8473 (grub_efi_mm_fini): Likewise.
8474 (grub_efi_init): Likewise.
8475 (grub_efi_fini): Likewise.
8476
8477 * include/grub/i386/efi/time.h: Do not include
8478 grub/symbol.h. Include grub/efi/time.h.
8479 (GRUB_TICKS_PER_SECOND): Removed.
8480 (grub_get_rtc): Likewise.
8481
8482 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8483 Added padding. The EFI spec is buggy.
8484 (GRUB_EFI_BLACK): New macro.
8485 (GRUB_EFI_BLUE): Likewise.
8486 (GRUB_EFI_GREEN): Likewise.
8487 (GRUB_EFI_CYAN): Likewise.
8488 (GRUB_EFI_RED): Likewise.
8489 (GRUB_EFI_MAGENTA): Likewise.
8490 (GRUB_EFI_BROWN): Likewise.
8491 (GRUB_EFI_LIGHTGRAY): Likewise.
8492 (GRUB_EFI_BRIGHT): Likewise.
8493 (GRUB_EFI_DARKGRAY): Likewise.
8494 (GRUB_EFI_LIGHTBLUE): Likewise.
8495 (GRUB_EFI_LIGHTGREEN): Likewise.
8496 (GRUB_EFI_LIGHTCYAN): Likewise.
8497 (GRUB_EFI_LIGHTRED): Likewise.
8498 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8499 (GRUB_EFI_YELLOW): Likewise.
8500 (GRUB_EFI_WHITE): Likewise.
8501 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8502 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8503 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8504 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8505 (GRUB_EFI_BACKGROUND_RED): Likewise.
8506 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8507 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8508 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8509 (GRUB_EFI_TEXT_ATTR): Likewise.
8510
8511 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8512 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8513 (kernel_mod_HEADERS): Added efi/time.h.
8514
8515 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8516
8517 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8518 include/grub/efi/api.h, include/grub/efi/console_control.h,
8519 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8520 include/grub/i386/efi/time.h, kern/efi/efi.c,
8521 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8522 and util/i386/efi/grub-mkimage.c.
8523
8524 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8525
8526 * genmk.rb (PModule#rule): Do not export symbols if
8527 #{prefix}_EXPORTS is set to "no".
8528
8529 * conf/i386-efi.mk: New file.
8530 * conf/i386-efi.rmk: Likewise.
8531 * include/grub/efi/api.h: Likewise.
8532 * include/grub/efi/console_control.h: Likewise.
8533 * include/grub/efi/efi.h: Likewise.
8534 * include/grub/efi/pe32.h: Likewise.
8535 * include/grub/i386/efi/time.h: Likewise.
8536 * kern/efi/efi.c: Likewise.
8537 * kern/i386/efi/init.c: Likewise.
8538 * kern/i386/efi/startup.S: Likewise.
8539 * util/i386/efi/grub-mkimage.c: Likewise.
8540
8541 2006-04-17 Marco Gerards <marco@gnu.org>
8542
8543 * include/grub/script.h: Include <grub/parser.h> and
8544 "grub_script.tab.h".
8545 (struct grub_lexer_param): New struct.
8546 (struct grub_parser_param): Likewise.
8547 (grub_script_create_arglist): Pass the state in an argument.
8548 (grub_script_add_arglist): Likewise.
8549 (grub_script_create_cmdline): Likewise.
8550 (grub_script_create_cmdblock): Likewise.
8551 (grub_script_create_cmdif): Likewise.
8552 (grub_script_create_cmdmenu): Likewise.
8553 (grub_script_add_cmd): Likewise.
8554 (grub_script_arg_add): Likewise.
8555 (grub_script_lexer_ref): Likewise.
8556 (grub_script_lexer_deref): Likewise.
8557 (grub_script_lexer_record_start): Likewise.
8558 (grub_script_lexer_record_stop): Likewise.
8559 (grub_script_mem_record): Likewise.
8560 (grub_script_mem_record_stop): Likewise.
8561 (grub_script_malloc): Likewise.
8562 (grub_script_yylex): Likewise.
8563 (grub_script_yyparse): Likewise.
8564 (grub_script_yyerror): Likewise.
8565 (grub_script_yylex): Likewise.
8566 (grub_script_lexer_init): Return the state.
8567
8568 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8569 (grub_script_lexer_done): Likewise.
8570 (grub_script_lexer_getline): Likewise.
8571 (grub_script_lexer_refs): Likewise.
8572 (script): Likewise.
8573 (newscript): Likewise.
8574 (record): Likewise.
8575 (recording): Likewise.
8576 (recordpos): Likewise.
8577 (recordlen): Likewise.
8578 (grub_script_lexer_init): Return the state instead of setting
8579 global variables.
8580 (grub_script_lexer_ref): Use the newly added argument for state
8581 instead of globals.
8582 (grub_script_lexer_deref): Likewise.
8583 (grub_script_lexer_record_start): Likewise.
8584 (grub_script_lexer_record_stop): Likewise.
8585 (recordchar): Likewise.
8586 (nextchar): Likewise.
8587 (grub_script_yylex2): Likewise.
8588 (grub_script_yylex): Likewise.
8589 (grub_script_yyerror): Likewise.
8590
8591 * normal/parser.y (func_mem): Removed variable.
8592 (menu_entry): Likewise.
8593 (err): Likewise.
8594 (%lex-param): New parser option.
8595 (%parse-param): Likewise.
8596 (script): Always return the AST.
8597 (argument): Pass the state around.
8598 (arguments): Likewise.
8599 (grubcmd): Likewise.
8600 (commands): Likewise.
8601 (function): Likewise.
8602 (menuentry): Likewise.
8603 (if_statement): Likewise.
8604 (if): Likewise.
8605
8606 * normal/script.c (grub_script_memused): Removed variable.
8607 (grub_script_parsed): Likewise.
8608 (grub_script_malloc): Added a state argument. Use that instead of
8609 global variables.
8610 (grub_script_mem_record): Likewise.
8611 (grub_script_mem_record_stop): Likewise.
8612 (grub_script_arg_add): Likewise.
8613 (grub_script_add_arglist): Likewise.
8614 (grub_script_create_cmdline): Likewise.
8615 (grub_script_create_cmdif): Likewise.
8616 (grub_script_create_cmdmenu): Likewise.
8617 (grub_script_add_cmd): Likewise.
8618 (grub_script_parse): Setup the state before calling the parser.
8619
8620 2006-04-16 Marco Gerards <marco@gnu.org>
8621
8622 * normal/command.c (grub_command_init): Remove the title command.
8623
8624 * normal/lexer.c (grub_script_yylex): Renamed from this...
8625 (grub_script_yylex2): ... to this.
8626 (grub_script_yylex): New function. Temporary
8627 introduced to filter some tokens.
8628 (grub_script_yyerror): Print a newline.
8629
8630 * normal/main.c (read_config_file): Output information about the
8631 lines that contain errors. Wait for a key after all lines have
8632 been processed. Don't return an empty menu.
8633
8634 * normal/parser.y (func_mem): Don't initialize.
8635 (menu_entry): Likewise.
8636 (err): New variable.
8637 (script): Don't return anything when an error was encountered.
8638 (ws, returns): Removed rules.
8639 (argument): Disabled concatenated variable support.
8640 (arguments): Remove explicit separators.
8641 (grubcmd): Likewise.
8642 (function): Likewise.
8643 (menuentry): Likewise.
8644 (if): Likewise.
8645 (commands): Likewise. Add error handling.
8646
8647 * normal/script.c (grub_script_create_cmdline): If
8648 `grub_script_parsed' is 0, assume the parser encountered an error.
8649
8650 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8651
8652 * configure.ac: Add support for EFI. Fix the typo
8653 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8654
8655 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8656
8657 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8658 foreign multibyte characters should be shown correctly.
8659
8660 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8661
8662 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8663 calculation.
8664 (read_config_file): Made it to close file before returning.
8665
8666 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8667
8668 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8669 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8670 video/i386/pc/vbefill.c.
8671
8672 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8673 video/i386/pc/vbefill.c.
8674
8675 * include/grub/video.h (grub_video_blit_format): New enum.
8676 (grub_video_mode_info): Added new member blit_format.
8677 (grub_video_get_blit_format): New function prototype.
8678
8679 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8680 function prototype.
8681 (grub_video_vbe_map_rgb): Likewise.
8682 (grub_video_vbe_unmap_color): Likewise.
8683
8684 * include/grub/i386/pc/vbeblit.h: New file.
8685
8686 * include/grub/i386/pc/vbefill.h: New file.
8687
8688 * video/video.c (grub_video_get_blit_format): New function.
8689 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8690 (grub_video_vbe_map_rgb): Likewise.
8691 (grub_video_vbe_unmap_color): Likewise.
8692
8693 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8694 optimized fills.
8695 (grub_video_vbe_blit_render_target): Changed to use more optimized
8696 blits.
8697 (grub_video_vbe_setup): Added detection for optimized settings.
8698 (grub_video_vbe_create_render_target): Likewise.
8699
8700 * video/i386/pc/vbeblit.c: New file.
8701
8702 * video/i386/pc/vbefill.c: New file.
8703
8704 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8705
8706 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8707 here...
8708
8709 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8710 parsing to support both hex and dec ranges. If filename was missing
8711 show usage information.
8712
8713 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8714
8715 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8716 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8717
8718 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8719 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8720 (video_mod_SOURCES): Added.
8721 (video_mod_CFLAGS): Likewise.
8722 (video_mod_LDFLAGS): Likewise.
8723 (gfxterm_mod_SOURCES): Likewise.
8724 (gfxterm_mod_CFLAGS): Likewise.
8725 (gfxterm_mod_LDFLAGS): Likewise.
8726 (videotest_mod_SOURCES): Likewise.
8727 (videotest_mod_CFLAGS): Likewise.
8728 (videotest_mod_LDFLAGS): Likewise.
8729 (vesafb_mod_SOURCES): Removed.
8730 (vesafb_mod_CFLAGS): Likewise.
8731 (vesafb_mod_LDFLAGS): Likewise.
8732 (vga_mod_SOURCES): Likewise.
8733 (vga_mod_CFLAGS): Likewise.
8734 (vga_mod_LDFLAGS): Likewise.
8735
8736 * commands/videotest.c: New file.
8737
8738 * font/manager.c (fill_with_default_glyph): Modified to use
8739 grub_font_glyph.
8740 (grub_font_get_glyph): Likewise.
8741 (fontmanager): Renamed from this...
8742 (font_manager): ... to this.
8743
8744 * include/grub/font.h (grub_font_glyph): Added new structure.
8745 (grub_font_get_glyph): Modified to use grub_font_glyph.
8746
8747 * include/grub/misc.h (grub_abs): Added as inline function.
8748
8749 * include/grub/video.h: New file.
8750
8751 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8752 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8753 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8754 (grub_vbe_get_controller_info): Renamed from this...
8755 (grub_vbe_bios_get_controller_info): ... to this.
8756 (grub_vbe_get_mode_info): Renamed from this...
8757 (grub_vbe_bios_get_mode_info): ... to this.
8758 (grub_vbe_set_mode): Renamed from this...
8759 (grub_vbe_bios_set_mode): ... to this.
8760 (grub_vbe_get_mode): Renamed from this...
8761 (grub_vbe_bios_get_mode): ... to this.
8762 (grub_vbe_set_memory_window): Renamed from this...
8763 (grub_vbe_bios_set_memory_window): ... to this.
8764 (grub_vbe_get_memory_window): Renamed from this...
8765 (grub_vbe_bios_get_memory_window): ... to this.
8766 (grub_vbe_set_scanline_length): Renamed from this...
8767 (grub_vbe_set_scanline_length): ... to this.
8768 (grub_vbe_get_scanline_length): Renamed from this...
8769 (grub_vbe_bios_get_scanline_length): ... to this.
8770 (grub_vbe_set_display_start): Renamed from this...
8771 (grub_vbe_bios_set_display_start): ... to this.
8772 (grub_vbe_get_display_start): Renamed from this...
8773 (grub_vbe_bios_get_display_start): ... to this.
8774 (grub_vbe_set_palette_data): Renamed from this...
8775 (grub_vbe_bios_set_palette_data): ... to this.
8776 (grub_vbe_set_pixel_rgb): Removed.
8777 (grub_vbe_set_pixel_index): Likewise.
8778
8779 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8780 from this...
8781 (grub_vbe_bios_get_controller_info): ... to this.
8782 (grub_vbe_get_mode_info): Renamed from this...
8783 (grub_vbe_bios_get_mode_info): ... to this.
8784 (grub_vbe_set_mode): Renamed from this...
8785 (grub_vbe_bios_set_mode): ... to this.
8786 (grub_vbe_get_mode): Renamed from this...
8787 (grub_vbe_bios_get_mode): ... to this.
8788 (grub_vbe_set_memory_window): Renamed from this...
8789 (grub_vbe_bios_set_memory_window): ... to this.
8790 (grub_vbe_get_memory_window): Renamed from this...
8791 (grub_vbe_bios_get_memory_window): ... to this.
8792 (grub_vbe_set_scanline_length): Renamed from this...
8793 (grub_vbe_set_scanline_length): ... to this.
8794 (grub_vbe_get_scanline_length): Renamed from this...
8795 (grub_vbe_bios_get_scanline_length): ... to this.
8796 (grub_vbe_set_display_start): Renamed from this...
8797 (grub_vbe_bios_set_display_start): ... to this.
8798 (grub_vbe_get_display_start): Renamed from this...
8799 (grub_vbe_bios_get_display_start): ... to this.
8800 (grub_vbe_set_palette_data): Renamed from this...
8801 (grub_vbe_bios_set_palette_data): ... to this.
8802 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8803 getting corrupted after calling it. Added more pushes and pops.
8804 (grub_vbe_bios_set_mode): Likewise.
8805 (grub_vbe_bios_get_mode): Likewise.
8806 (grub_vbe_bios_get_memory_window): Likewise.
8807 (grub_vbe_bios_set_scanline_length): Likewise.
8808 (grub_vbe_bios_get_scanline_length): Likewise.
8809 (grub_vbe_bios_get_display_start): Likewise.
8810 (grub_vbe_bios_set_palette_data): Likewise.
8811
8812 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8813 (cl_insert): Likewise.
8814 (cl_delete): Likewise.
8815
8816 * term/gfxterm.c: New file.
8817
8818 * term/i386/pc/vesafb.c: Removed file.
8819
8820 * video/video.c: New file.
8821
8822 * video/i386/pc/vbe.c (real2pm): Added new function.
8823 (grub_video_vbe_draw_pixel): Likewise.
8824 (grub_video_vbe_get_video_ptr): Likewise.
8825 (grub_video_vbe_get_pixel): Likewise
8826 (grub_video_vbe_init): Likewise.
8827 (grub_video_vbe_fini): Likewise.
8828 (grub_video_vbe_setup): Likewise.
8829 (grub_video_vbe_get_info): Likewise.
8830 (grub_video_vbe_set_palette): Likewise.
8831 (grub_video_vbe_get_palette): Likewise.
8832 (grub_video_vbe_set_viewport): Likewise.
8833 (grub_video_vbe_get_viewport): Likewise.
8834 (grub_video_vbe_map_color): Likewise.
8835 (grub_video_vbe_map_rgb): Likewise.
8836 (grub_video_vbe_map_rgba): Likewise.
8837 (grub_video_vbe_unmap_color): Likewise.
8838 (grub_video_vbe_fill_rect): Likewise.
8839 (grub_video_vbe_blit_glyph): Likewise.
8840 (grub_video_vbe_blit_bitmap): Likewise.
8841 (grub_video_vbe_blit_render_target): Likewise.
8842 (grub_video_vbe_scroll): Likewise.
8843 (grub_video_vbe_swap_buffers): Likewise.
8844 (grub_video_vbe_create_render_target): Likewise.
8845 (grub_video_vbe_delete_render_target): Likewise.
8846 (grub_video_vbe_set_active_render_target): Likewise.
8847 (grub_vbe_set_pixel_rgb): Remove function.
8848 (grub_vbe_set_pixel_index): Likewise.
8849 (index_color_mode): Remove static variable.
8850 (active_mode): Likewise.
8851 (framebuffer): Likewise.
8852 (bytes_per_scan_line): Likewise.
8853 (grub_video_vbe_adapter): Added new static variable.
8854 (framebuffer): Likewise.
8855 (render_target): Likewise.
8856 (initial_mode): Likewise.
8857 (mode_in_use): Likewise.
8858 (mode_list): Likewise.
8859
8860 2006-03-10 Marco Gerards <marco@gnu.org>
8861
8862 * configure.ac (AC_INIT): Bumped to 1.93.
8863
8864 * DISTLIST: Added `include/grub/hfs.h'.
8865
8866 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8867
8868 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8869 18H, which might help the BIOS falling back to next boot media.
8870
8871 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8872
8873 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8874 Poe Chen <poe.poechen@gmail.com>.
8875
8876 2006-01-17 Marco Gerards <marco@gnu.org>
8877
8878 * include/grub/normal.h: Include <grub/script.h>.
8879 (grub_command_list): Removed struct.
8880 (grub_command_list_t): Removed type.
8881 (grub_menu_entry): Remove members `num' and `command_list'. Add
8882 members `commands' and `sourcecode'.
8883 * include/grub/script.h: Add inclusion guards.
8884 (grub_script_cmd_menuentry): New struct.
8885 (grub_script_execute_menuentry): New prototype.
8886 (grub_script_lexer_record_start): Likewise.
8887 (grub_script_lexer_record_stop): Likewise.
8888 * normal/execute.c (grub_script_execute_menuentry): New function.
8889 * normal/lexer.c (record, recording, recordpos, recordlen): New
8890 variables.
8891 (grub_script_lexer_record_start): New function.
8892 (grub_script_lexer_record_stop): Likewise.
8893 (recordchar): Likewise.
8894 (nextchar): Likewise.
8895 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8896 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8897 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8898 (current_menu): New variable.
8899 (free_menu): Mainly rewritten.
8900 (grub_normal_menu_addentry): New function.
8901 (read_config_file): Rewritten.
8902 * normal/menu.c (run_menu_entry): Mainly rewritten.
8903 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8904 the menu entry.
8905 (run): Mainly rewritten.
8906 * normal/parser.y (menu_entry): New variable.
8907 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8908 (menuentry): New rule.
8909 (command): Add `menuentry'.
8910 (if_statement): Allow additional returns before `fi'.
8911 * normal/script.c (grub_script_create_cmdmenu): New function.
8912
8913 2006-01-03 Marco Gerards <marco@gnu.org>
8914
8915 * INSTALL: GNU Bison is required.
8916 * configure.ac: Rewritten the test to detect Bison.
8917 * Makefile.in (YACC): New variable. Reported by Xun Sun
8918 <xun.sun.cn@gmail.com>.
8919
8920 2006-01-03 Marco Gerards <marco@gnu.org>
8921
8922 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8923 the HFS+ filesystem to filesystem blocks.
8924 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8925 GCC warning is silenced.
8926
8927 2006-01-03 Marco Gerards <marco@gnu.org>
8928
8929 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8930 read from disk from big endian to host byte order.
8931
8932 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8933
8934 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8935 documentation.
8936 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8937 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8938 embedded HFS+ filesystem.
8939 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8940 (grub_hfs_sblock): Move from here...
8941 * include/grub/hfs.h: To here... New file.
8942 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8943 documentation.
8944 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8945 New macros.
8946 (grub_hfsplus_volheader): Change type of member `magic' to
8947 `grub_uint16_t'.
8948 (grub_hfsplus_data): Add new member `embedded_offset'.
8949 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8950 returned block.
8951 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8952 Calculate the offset.
8953
8954 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8955
8956 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8957 Removed.
8958 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8959
8960 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8961
8962 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8963 ENV->NAME is NULL after allocating ENV->VALUE.
8964
8965 2005-12-25 Marco Gerards <marco@gnu.org>
8966
8967 * kern/env.c (grub_env_set): Rewritten the error handling code.
8968
8969 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8970
8971 * geninit.sh: Made more robust, and more portable.
8972
8973 2005-12-25 Marco Gerards <marco@gnu.org>
8974
8975 Add support for Apple HFS+ filesystems.
8976
8977 * fs/hfsplus.c: New file.
8978
8979 * DISTLIST: Added `fs/hfsplus.c'.
8980
8981 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8982 (hfsplus_mod_SOURCES): New variable.
8983 (hfsplus_mod_CFLAGS): Likewise.
8984 (hfsplus_mod_LDFLAGS): Likewise.
8985 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8986 (grub_setup_SOURCES): Likewise.
8987 (grub_mkdevicemap_SOURCES): Likewise.
8988 (grub_emu_SOURCES): Likewise.
8989 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8990
8991 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8992
8993 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8994
8995 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8996
8997 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8998 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8999 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9000 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9001 normal/lexer.c, normal/parser.y, normal/script.c, and
9002 partmap/gpt.c.
9003 Removed kern/sparc64/cache.c.
9004
9005 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9006 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9007 grub_emu_init.c.
9008
9009 * configure.ac (AC_INIT): Bumped to 1.92.
9010
9011 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9012
9013 * kern/err.c (grub_error_push): Added new function to support error
9014 stacks.
9015 (grub_error_pop): Likewise.
9016 (grub_error_stack_items): New local variable to support error stacks.
9017 (grub_error_stack_pos): Likewise.
9018 (grub_error_stack_assert): Likewise.
9019 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9020 stack depth.
9021 (grub_print_error): Added support to print errors from error stack.
9022
9023 * include/grub/err.h (grub_error_push): Added function prototype.
9024 (grub_error_pop): Likewise.
9025
9026 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9027
9028 * configure.ac: Accept `powerpc64' as host_cpu.
9029 (amd64): Rename to `biarch32'.
9030
9031 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9032 non-cacheline-aligned addresses.
9033
9034 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9035 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9036 if `size' is non-zero.
9037
9038 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9039
9040 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9041 and `cd' to make sure the filename is not prefixed with a
9042 directory name.
9043 (pkgdata_MODULES): Add `gpt.mod'.
9044 (gpt_mod_SOURCES): New variable.
9045 (gpt_mod_CFLAGS): Likewise.
9046 (gpt_mod_LDFLAGS): Likewise.
9047
9048 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9049
9050 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9051 New macro.
9052
9053 * partmap/gpt.c: New file.
9054
9055 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9056 GPT partition map is detected.
9057
9058 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9059
9060 * commands/i386/pc/play.c: New file.
9061 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9062 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9063 macros.
9064
9065 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9066
9067 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9068 ((unused))' to silence gcc warning.
9069
9070 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9071
9072 * configure.ac: Correct `AC_PROG_YACC' test.
9073
9074 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9075
9076 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9077 check before installing files.
9078
9079 2005-11-22 Mike Small <smallm@panix.com>
9080
9081 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9082 number regex so multidigit numbers are recognized correctly.
9083
9084 2005-11-22 Mike Small <smallm@panix.com>
9085
9086 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9087 debugging message before attempting to claim memory.
9088 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9089 multiple addresses in case of failure.
9090
9091 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9092
9093 * term/tparm.c (get_space): Remove empty `if' statement.
9094
9095 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9096
9097 * kern/parser.c (check_varstate): Rename `state' to 's'.
9098
9099 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9100
9101 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9102 variable definitions to the beginning of each function. Sort stack
9103 variables by size.
9104 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9105 `buf' argument to `char *'.
9106
9107 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9108
9109 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9110 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9111 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9112 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9113 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9114 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9115 configfile.mod, search.mod, gzio.mod and test.mod.
9116 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9117 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9118 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9119 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9120 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9121 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9122 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9123 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9124 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9125 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9126 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9127 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9128 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9129 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9130 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9131 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9132 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9133 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9134 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9135 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9136 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9137 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9138 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9139
9140 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9141 `grep --include'.
9142 (pkgdata_MODULES): Add test.mod.
9143
9144 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9145
9146 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9147 appending to variables with "+=".
9148 (PModule): Use full pathname to generate *.lst filenames.
9149
9150 * Makefile.in: Fixed list rules moved from genmk.rb.
9151 (.DELETE_ON_ERROR): New special target.
9152 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9153
9154 * conf/i386-pc.rmk: Include conf/common.mk.
9155 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9156 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9157 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9158 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9159 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9160 configfile.mod, search.mod, gzio.mod and test.mod.
9161 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9162 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9163 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9164 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9165 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9166 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9167 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9168 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9169 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9170 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9171 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9172 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9173 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9174 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9175 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9176 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9177 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9178 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9179 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9180 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9181 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9182 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9183 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9184 here...
9185 * conf/common.rmk: ... to here. New file.
9186
9187 * conf/common.mk: New file.
9188
9189 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9190
9191 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9192 (grub_script.tab.c): ... here.
9193
9194 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9195 (grub_script.tab.c): ... here.
9196
9197 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9198 (grub_script.tab.c): ... here.
9199
9200 * normal/command.c (grub_command_find): Fixed a memory leak of
9201 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9202
9203 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9204
9205 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9206 "@" which marks the start of a comment on ARM.
9207 (VARIABLE): Likewise.
9208
9209 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9210
9211 Add support for Linux/ADFS partition tables.
9212
9213 * partmap/acorn.c: New file.
9214
9215 * include/grub/acorn_filecore.h: Likewise.
9216
9217 * DISTLIST: Added `partmap/acorn.c' and
9218 `include/grub/acorn_filecore.h'.
9219
9220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9221 `partmap/acorn.c'.
9222 (pkgdata_MODULES): Add `acorn.mod'.
9223 (acorn_mod_SOURCES): New variable.
9224 (acorn_mod_CFLAGS): Likewise.
9225
9226 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9227 `partmap/acorn.c'.
9228 (pkgdata_MODULES): Add `acorn.mod'.
9229 (acorn_mod_SOURCES): New variable.
9230 (acorn_mod_CFLAGS): Likewise.
9231
9232 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9233 (pkgdata_MODULES): Add `acorn.mod'.
9234 (acorn_mod_SOURCES): New variable.
9235 (acorn_mod_CFLAGS): Likewise.
9236 (acorn_mod_LDFLAGS): Likewise.
9237
9238 * include/types.h (grub_disk_addr_t): New typedef.
9239
9240 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9241
9242 * geninit.sh: New file.
9243
9244 * geninitheader.sh: Likewise.
9245
9246 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9247 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9248 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9249 * commands/configfile.c (grub_configfile_init)
9250 (grub_configfile_fini): Likewise.
9251 * commands/default.c (grub_default_init, grub_default_fini):
9252 Likewise.
9253 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9254 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9255 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9256 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9257 Likewise.
9258 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9259 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9260 Likewise.
9261 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9262 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9263 Likewise.
9264 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9265 Likewise.
9266 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9267 Likewise.
9268 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9269 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9270 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9271 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9272 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9273 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9274 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9275 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9276 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9277 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9278 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9279 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9280 * partmap/amiga.c (grub_amiga_partition_map_init)
9281 (grub_amiga_partition_map_fini): Likewise.
9282 * partmap/apple.c (grub_apple_partition_map_init)
9283 (grub_apple_partition_map_fini): Likewise.
9284 * partmap/pc.c (grub_pc_partition_map_init)
9285 (grub_pc_partition_map_fini): Likewise.
9286 * partmap/sun.c (grub_sun_partition_map_init,
9287 grub_sun_partition_map_fini): Likewise.
9288 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9289 Likewise.
9290
9291 * util/grub-emu.c: Include <grub_modules_init.h>.
9292 (main): Don't initialize and de-initialize any modules directly,
9293 use `grub_init_all' and `grub_fini_all' instead.
9294
9295 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9296 `grub_vesafb_mod_init'.
9297 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9298 all users.
9299 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9300 `grub_vga_mod_init'. Updated all users.
9301 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9302
9303 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9304 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9305 rules.
9306
9307 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9308 Generate a function to initialize the module in utilities.
9309 Updated all callers.
9310 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9311 initialize the module in utilities. Updated all callers.
9312
9313 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9314
9315 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9316 escape sequence and a literal ^L to clear the screen.
9317
9318 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9319 when returning from Open Firmware.
9320
9321 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9322
9323 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9324 (grub_ofconsole_height): Likewise.
9325 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9326 manually insert a '\n'.
9327 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9328 `grub_ofconsole_height'. Return early if these are already set.
9329
9330 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9331
9332 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9333 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9334 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9335 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9336 and `normal/script.c'.
9337 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9338 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9339 (test_mod_SOURCES): New variable.
9340 (test_mod_CFLAGS): Likewise.
9341 (test_mod_LDFLAGS): Likewise.
9342 (pkgdata_MODULES): Add `test.mod'.
9343 (grub_script.tab.c): New rule.
9344 (grub_script.tab.h): Likewise.
9345
9346 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9347
9348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9349 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9350 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9351 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9352 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9353 (test_mod_SOURCES): New variable.
9354 (test_mod_CFLAGS): Likewise.
9355 (pkgdata_MODULES): Add `test.mod'.
9356 (grub_script.tab.c): New rule.
9357 (grub_script.tab.h): Likewise.
9358
9359 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9360
9361 Add initial scripting support.
9362
9363 * commands/test.c: New file.
9364 * include/grub/script.h: Likewise.
9365 * normal/execute.c: Likewise.
9366 * normal/function.c: Likewise.
9367 * normal/lexer.c: Likewise.
9368 * normal/parser.y: Likewise.
9369 * normal/script.c: Likewise.
9370
9371 * configure.ac: Add `AC_PROG_YACC' test.
9372
9373 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9374 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9375 `normal/function.c' and `normal/script.c'.
9376 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9377 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9378 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9379 variables.
9380 (pkgdata_MODULES): Add `test.mod'.
9381 (grub_script.tab.c): New rule.
9382 (grub_script.tab.h): Likewise.
9383
9384 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9385
9386 * include/grub/normal.h (grub_test_init): New prototype.
9387 (grub_test_fini): Likewise.
9388
9389 * normal/command.c: Include <grub/script.h>.
9390 (grub_command_execute): Rewritten.
9391
9392 * util/grub-emu.c (main): Call `grub_test_init' and
9393 `grub_test_fini'.
9394
9395 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9396
9397 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9398 to 0.
9399 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9400 there are no pending characters.
9401
9402 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9403
9404 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9405 `grub_strndup' to drop device arguments. Replace unnecessary
9406 `grub_strndup' with `grub_strdup'.
9407
9408 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9409
9410 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9411 `debug' environment variable has been set.
9412
9413 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9414
9415 * Makefile.in (install-local): Use $(DATA).
9416 (uninstall): Likewise.
9417 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9418 (sbin_UTILITIES): ... to here.
9419 (sbin_SCRIPTS): New variable.
9420 (grub_install_SOURCES): New variable.
9421 * util/powerpc/ieee1275/grub-install.in: New file.
9422 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9423 variable.
9424 (add_segments): Call `grub_util_get_path'.
9425
9426 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9427
9428 From Timothy Baldwin:
9429 * commands/ls.c (grub_ls_list_files): Close FILE with
9430 grub_file_close.
9431 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9432
9433 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9434
9435 * include/grub/parser.h: New file.
9436
9437 * kern/parser.c: Likewise.
9438
9439 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9440 (grub_setup_SOURCES): Likewise.
9441 (grub_probefs_SOURCES): Likewise.
9442 (grub_emu_SOURCES): Likewise.
9443 (kernel_img_HEADERS): Add `parser.h'.
9444
9445 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9446 (grub_emu_SOURCES): Add `kern/parser.c'.
9447 (grubof_SOURCES): Likewise.
9448
9449 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9450 (grubof_SOURCES): Add `kern/parser.c'.
9451
9452 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9453
9454 * kern/misc.c (grub_split_cmdline): Removed function.
9455
9456 * kern/rescue.c: Include <grub/parser.h>.
9457 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9458 of `grub_split_cmdline'.
9459
9460 * normal/command.c: Include <grub/parser.h>.
9461 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9462 of `grub_split_cmdline'.
9463
9464 * normal/completion.c: Include <grub/parser.h>.
9465 (cmdline_state): New variable.
9466 (iterate_dir): End the filename with a quote depending on the
9467 command line state.
9468 (get_state): new function.
9469 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9470 split the arguments and determine the current argument. When the
9471 argument string is not quoted, escape all spaces.
9472
9473 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9474
9475 * normal/sparc64/setjmp.S: New file.
9476
9477 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9478
9479 * include/grub/sparc64/libgcc.h: New file.
9480 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9481 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9482 normal/sparc64/setjmp.c.
9483
9484 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9485
9486 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9487 * kern/sparc64/cache.S: New file.
9488 * kern/sparc64/cache.c: Removed.
9489 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9490 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9491 -mtune=ultrasparc.
9492 (COMMON_LDFLAGS): Add -melf64_sparc.
9493 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9494 (grubof_SOURCES): Use cache.S instead of cache.c.
9495 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9496 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9497 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9498 commented though.
9499 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9500 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9501 (linux_mod_CFLAGS): Commented out.
9502 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9503 out because module isn't built.
9504 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9505 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9506 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9507 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9508 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9509 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9510 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9511 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9512 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9513 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9514 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9515 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9516 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9517 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9518
9519 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9520
9521 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9522 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9523 longer, because HFS should not be used on PC.
9524
9525 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9526
9527 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9528 consistently within the loop.
9529
9530 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9531
9532 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9533 directory can not be read.
9534
9535 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9536
9537 * configure.ac (AC_INIT): Increase the version number to 1.91.
9538
9539 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9540 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9541 term/i386/pc/serial.c.
9542
9543 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9544
9545 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9546 file size must be permitted.
9547
9548 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9549 between %ah and %al.
9550
9551 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9552
9553 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9554 grub_uint64_t.
9555 Call the hook with a NUL-terminated filename.
9556 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9557 grub_cpu_to_be32.
9558
9559 * kern/term.c (cursor_state): New variable.
9560 (grub_term_set_current): Reset the cursor state on a new
9561 terminal.
9562 (grub_setcursor): Rewritten to use CURSOR_STATE.
9563 (grub_getcursor): New function.
9564
9565 * include/grub/term.h (grub_getcursor): New prototype.
9566
9567 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9568 integers on ARM. Reported by Timothy Baldwin
9569 <T.E.Baldwin99@members.leeds.ac.uk>.
9570
9571 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9572
9573 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9574 allocated.
9575 (grub_sfs_dir): Likewise.
9576
9577 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9578
9579 Add support for the SFS filesystem.
9580
9581 * fs/sfs.c: New file.
9582
9583 * DISTLIST: Added `fs/sfs.c'.
9584
9585 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9586 (grub_probefs_SOURCES): Likewise.
9587 (grub_emu_SOURCES): Likewise.
9588 (pkgdata_MODULES): Add `sfs.mod'.
9589 (sfs_mod_SOURCES): New variable.
9590 (sfs_mod_CFLAGS): Likewise.
9591 (sfs_mod_LDFLAGS): Likewise.
9592
9593 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9594 (pkgdata_MODULES): Add `sfs.mod'.
9595 (sfs_mod_SOURCES): New variable.
9596 (sfs_mod_CFLAGS): Likewise.
9597
9598 * util/grub-emu.c (main): Call `grub_sfs_init' and
9599 `grub_sfs_fini'.
9600
9601 * include/grub/fs.h (grub_sfs_init): New prototype.
9602 (grub_sfs_fini): Likewise.
9603
9604 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9605
9606 Add support for the AFFS filesystem.
9607
9608 * fs/affs.c: New file.
9609
9610 * DISTLIST: Added `fs/affs.c'.
9611
9612 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9613 (grub_probefs_SOURCES): Likewise.
9614 (grub_emu_SOURCES): Likewise.
9615 (pkgdata_MODULES): Add `affs.mod'.
9616 (affs_mod_SOURCES): New variable.
9617 (affs_mod_CFLAGS): Likewise.
9618 (affs_mod_LDFLAGS): Likewise.
9619
9620 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9621 (pkgdata_MODULES): Add `affs.mod'.
9622 (affs_mod_SOURCES): New variable.
9623 (affs_mod_CFLAGS): Likewise.
9624
9625 * util/grub-emu.c (main): Call `grub_affs_init' and
9626 `grub_affs_fini'.
9627
9628 * include/grub/fs.h (grub_affs_init): New prototype.
9629 (grub_affs_fini): Likewise.
9630
9631 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9632
9633 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9634
9635 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9636
9637 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9638 `-m32' to CFLAGS.
9639
9640 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9641 linking.
9642
9643 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9644 (COMMON_LDFLAGS): New variable.
9645 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9646 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9647 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9648 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9649 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9650 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9651 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9652 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9653 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9654 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9655 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9656 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9657 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9658 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9659 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9660 variables.
9661 (normal_mod_ASFLAGS): Add `-m32'.
9662
9663 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9664 (grub_host_size_t, grub_host_ssize_t): New types.
9665 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9666 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9667 `GRUB_HOST_SIZEOF_VOID_P'.
9668
9669 * include/grub/kernel.h (struct grub_module_header): Type of
9670 member offset changed to `grub_host_off_t'. Type of member size
9671 changed to `grub_host_size_t'.
9672 (struct grub_module_info): Type of member offset changed to
9673 `grub_host_off_t'. Type of member size changed to
9674 `grub_host_size_t'.
9675
9676 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9677
9678 Make GRUB's kernel compliant to Multiboot Specification.
9679
9680 * kern/i386/pc/startup.S (multiboot_header): New label.
9681 (multiboot_entry): Likewise.
9682 (multiboot_trampoline): Likewise.
9683
9684 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9685 Increased to 0x4A0.
9686
9687 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9688 put parentheses after a question mark.
9689 [!GRUB_UTIL] (my_mod): New variable.
9690
9691 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9692
9693 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9694
9695 Adds support for the XFS filesystem. Btrees are not supported
9696 yet.
9697
9698 * fs/xfs.c: New file.
9699
9700 * DISTLIST: Added `fs/xfs.c'.
9701
9702 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9703 (grub_probefs_SOURCES): Likewise.
9704 (grub_emu_SOURCES): Likewise.
9705 (pkgdata_MODULES): Add `xfs.mod'.
9706 (xfs_mod_SOURCES): New variable.
9707 (xfs_mod_CFLAGS): Likewise.
9708
9709 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9710 (pkgdata_MODULES): Add `xfs.mod'.
9711 (xfs_mod_SOURCES): New variable.
9712 (xfs_mod_CFLAGS): Likewise.
9713
9714 * util/grub-emu.c (main): Call `grub_xfs_init' and
9715 `grub_xfs_fini'.
9716
9717 * include/grub/fs.h (grub_xfs_init): New prototype.
9718 (grub_xfs_fini): Likewise.
9719
9720
9721 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9722
9723 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9724 color modes, allow greater than 16 colors to be configured as
9725 a default palette.
9726
9727 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9728
9729 * normal/completion.c (complete_arguments): Add the qualifier
9730 const into OPTIONS.
9731
9732 From Omniflux <omniflux+lists@omniflux.com>:
9733 * include/grub/terminfo.h: New file.
9734 * include/grub/tparm.h: Likewise.
9735 * include/grub/i386/pc/serial.h: Likewise.
9736 * term/terminfo.c: Likewise.
9737 * term/tparm.c: Likewise.
9738 * term/i386/pc/serial.c: Likewise.
9739 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9740 serial.mod.
9741 (terminfo_mod_SOURCES): New variable.
9742 (terminfo_mod_CFLAGS): Likewise.
9743 (serial_mod_SOURCES): Likewise.
9744 (serial_mod_CFLAGS): Likewise.
9745
9746 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9747
9748 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9749 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9750 and kern/powerpc/ieee1275/cmain.c, respectively.
9751
9752 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9753 * kern/powerpc/ieee1275/crt0.S: ... here.
9754
9755 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9756 * kern/powerpc/ieee1275/cmain.c: ... here.
9757
9758 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9759 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9760 instead of boot/powerpc/ieee1275/crt0.S and
9761 boot/powerpc/ieee1275/cmain.c, respectively.
9762
9763 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9764 sectors. It was not used anyway.
9765
9766 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9767
9768 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9769 `unused parameter' warning.
9770
9771 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9772
9773 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9774 function.
9775 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9776 getcharwidth.
9777
9778 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9779
9780 * include/grub/normal.h (enum grub_completion_type): Added
9781 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9782
9783 * normal/cmdline.c (print_completion): Handle
9784 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9785 * normal/menu_entry.c (store_completion): Likewise.
9786
9787 * normal/completion.c (complete_arguments): New function.
9788 (grub_normal_do_completion): Call `complete_arguments' when the
9789 current words start with a dash.
9790
9791 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9792
9793 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9794 `gzio.mod' instead of `io.mod').
9795
9796 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9797
9798 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9799 (DISTDIRS): Added io and video.
9800 Rewrite the search routine to make an output consistently.
9801
9802 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9803 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9804 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9805 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9806 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9807 util/powerpc/ieee1275/misc.c.
9808
9809 * include/grub/gzio.h: New file.
9810 * io/gzio.c: Likewise.
9811
9812 * kern/file.c (grub_file_close): Call grub_device_close only if
9813 FILE->DEVICE is not NULL.
9814
9815 * include/grub/mm.h [!NULL] (NULL): New macro.
9816
9817 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9818
9819 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9820 (pkgdata_MODULES): Added gzio.mod.
9821 (gzio_mod_SOURCES): New variable.
9822 (gzio_mod_CFLAGS): Likewise.
9823
9824 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9825 (pkgdata_MODULES): Added gzio.mod.
9826 (gzio_mod_SOURCES): New variable.
9827 (gzio_mod_CFLAGS): Likewise.
9828
9829 * commands/cat.c: Include grub/gzio.h.
9830 (grub_cmd_cat): Use grub_gzfile_open instead of
9831 grub_file_open.
9832
9833 * commands/cmp.c: Include grub/gzio.h.
9834 (grub_cmd_cmp): Use grub_gzfile_open instead of
9835 grub_file_open.
9836
9837 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9838 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9839 grub_file_open.
9840 (grub_rescue_cmd_module): Likewise.
9841
9842 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9843
9844 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9845 kern/sparc64/ieee1275/init.c because it contains _start.
9846 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9847
9848 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9849
9850 * configure.ac: Add support for sparc64 host with ieee1275
9851 firmware.
9852 * configure: Generated from configure.ac.
9853 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9854 instead of int.
9855 (grub_ofdisk_read): Likewise.
9856 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9857 pointers as (void *) to remove a warning.
9858 (grub_ofdisk_close): Likewise.
9859 (grub_ofdisk_read): Likewise.
9860 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9861 returns, so make it return void to remove a warning.
9862 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9863 Corresponding prototype change.
9864 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9865 values, and cast the pointers as (void *) to remove a warning.
9866 (grub_mm_dump): Likewise.
9867 * conf/sparc64-ieee1275.mk: New file.
9868 * conf/sparc64-ieee1275.rmk: Likewise.
9869 * include/grub/sparc64/setjmp.h: Likewise.
9870 * include/grub/sparc64/types.h: Likewise.
9871 * include/grub/sparc64/ieee1275/console.h: Likewise.
9872 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9873 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9874 * include/grub/sparc64/ieee1275/time.h: Likewise.
9875 * kern/sparc64/cache.c: Likewise.
9876 * kern/sparc64/dl.c: Likewise.
9877 * kern/sparc64/ieee1275/init.c: Likewise.
9878 * kern/sparc64/ieee1275/openfw.c: Likewise.
9879
9880 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9881
9882 * util/console.c (grub_ncurses_putchar): If C is greater than
9883 0x7f, set C to a question mark.
9884 (grub_ncurses_getcharwidth): New function.
9885 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9886 getcharwidth.
9887
9888 * normal/menu.c (print_entry): Made aware of Unicode. First,
9889 convert TITLE to UCS-4, and predict the cursor position by
9890 grub_getcharwidth.
9891
9892 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9893 const to SRC.
9894 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9895
9896 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9897
9898 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9899 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9900 grub_strcat.
9901
9902 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9903 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9904 grub_strcpy and grub_strlen. Take it into account that a space
9905 character is inserted as a delimiter.
9906
9907 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9908
9909 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9910 invalid magic in the error.
9911
9912 * commands/search.c: New file.
9913
9914 * util/grub-emu.c (main): Call grub_search_init and
9915 grub_search_fini.
9916
9917 * kern/rescue.c (grub_rescue_print_disks): Removed.
9918 (grub_rescue_print_devices): New function.
9919 (grub_rescue_cmd_ls): Use grub_device_iterate with
9920 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9921 grub_rescue_print_disks.
9922
9923 * kern/partition.c (grub_partition_iterate): Return the result of
9924 PARTMAP->ITERATE instead of GRUB_ERRNO.
9925
9926 * kern/device.c: Include grub/partition.h.
9927 (grub_device_iterate): New function.
9928
9929 * include/grub/partition.h (grub_partition_iterate): Return int
9930 instead of grub_err_t.
9931
9932 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9933 prototype.
9934 [GRUB_UTIL] (grub_search_fini): Likewise.
9935
9936 * include/grub/device.h (grub_device_iterate): New prototype.
9937
9938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9939 commands/search.c.
9940 (pkgdata_MODULES): Added search.mod.
9941 (search_mod_SOURCES): New variable.
9942 (search_mod_CFLAGS): Likewise.
9943
9944 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9945 (pkgdata_MODULES): Added search.mod.
9946 (search_mod_SOURCES): New variable.
9947 (search_mod_CFLAGS): Likewise.
9948
9949 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9950 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9951 All callers changed.
9952
9953 * DISTLIST: Added commands/search.c.
9954
9955 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9956
9957 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9958 conversion.
9959 (grub_getcharwidth): New function.
9960
9961 * kern/misc.c (grub_utf8_to_ucs4): New function.
9962
9963 * include/grub/term.h (struct grub_term): Added a new member
9964 "getcharwidth".
9965 (grub_getcharwidth): New prototype.
9966
9967 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9968
9969 * term/i386/pc/console.c (map_char): New function. Segregated from
9970 grub_console_putchar.
9971 (grub_console_putchar): Use map_char.
9972 (grub_console_getcharwidth): New function.
9973 (grub_console_term): Specified grub_console_getcharwidth as
9974 getcharwidth.
9975
9976 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9977 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9978
9979 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9980 GRUB_ERRNO.
9981 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9982 on grub_strtoul completely.
9983 (write_char): Declare local variables in the beginning of the
9984 function.
9985 (grub_vesafb_getcharwidth): New function.
9986 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9987 getcharwidth.
9988
9989 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9990
9991 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9992 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9993 commands/i386/pc/vbetest.c.
9994
9995 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9996 call grub_vbe_get_controller_info again, because the returned
9997 information is volatile.
9998 (grub_vbe_set_video_mode): Mostly rewritten.
9999 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10000 grub_vbe_status_t correctly.
10001 (grub_vbe_get_video_mode_info): Likewise.
10002 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10003 several if statements.
10004
10005 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10006 * commands/i386/pc/vbeinfo.c: ... this.
10007
10008 * commands/i386/pc/vbe_test.c: Renamed to ...
10009 * commands/i386/pc/vbetest.c: ... this.
10010
10011 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10012 ...
10013 (grub_cmd_vbeinfo): ... this. Save video modes before
10014 iterating. Skip a video mode, if it is not available, not enough
10015 information is given or it is monochrome. Show the memory
10016 model. Leave the interpretation of MODEVAR to grub_strtoul
10017 completely.
10018 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10019 (GRUB_MOD_FINI): Likewise.
10020
10021 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10022 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10023 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10024 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10025 grub_strtoul completely.
10026 (real2pm): Removed.
10027 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10028 (GRUB_MOD_FINI): Likewise.
10029
10030 * normal/misc.c: Include grub/mm.h.
10031
10032 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10033 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10034 (vbe_list_modes_mod_SOURCES): Removed.
10035 (vbe_list_modes_mod_CFLAGS): Likewise.
10036 (vbe_test_mod_SOURCES): Likewise.
10037 (vbe_test_mod_CFLAGS): Likewise.
10038 (vbeinfo_mod_SOURCES): New variable.
10039 (vbeinfo_mod_CFLAGS): Likewise.
10040 (vbetest_mod_SOURCES): Likewise.
10041 (vbetest_mod_CFLAGS): Likewise.
10042
10043 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10044
10045 * normal/misc.c: New file.
10046
10047 * DISTLIST: Added normal/misc.c.
10048
10049 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10050 DISK to HOOK. Call HOOK with DISK.
10051 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10052 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10053 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10054
10055 * normal/menu_entry.c (struct screen): Added a new member
10056 "completion_shown".
10057 (completion_buffer): New global variable.
10058 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10059 (store_completion): New function.
10060 (complete): Likewise.
10061 (clear_completions): Likewise.
10062 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10063 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10064 a tab, call complete.
10065
10066 * normal/completion.c (disk_dev): Removed.
10067 (print_simple_completion): Likewise.
10068 (print_partition_completion): Likewise.
10069 (print_func): New global variable.
10070 (add_completion): Do not take the arguments WHAT or PRINT any
10071 longer. Added a new argument TYPE. Instead of printing directly,
10072 call PRINT_FUNC if not NULL.
10073 All callers changed.
10074 (complete_device): Use a local variable DEV instead of
10075 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10076 (grub_normal_do_completion): Take a new argument HOOK. Do not
10077 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10078 empty string, return NULL instead.
10079 All callers changed.
10080
10081 * normal/cmdline.c (print_completion): New function.
10082
10083 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10084 to HOOK.
10085 All callers changed.
10086
10087 * kern/disk.c (grub_print_partinfo): Removed.
10088
10089 * include/grub/partition.h (struct grub_partition_map): Add a new
10090 argument DISK into HOOK of ITERATE.
10091 (grub_partition_iterate): Add a new argument DISK to HOOK.
10092
10093 * include/grub/normal.h (enum grub_completion_type): New enum.
10094 (grub_completion_type_t): New type.
10095 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10096 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10097 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10098 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10099 (grub_normal_do_completion): Added a new argument HOOK.
10100 (grub_normal_print_device_info): New prototype.
10101
10102 * include/grub/disk.h (grub_print_partinfo): Removed.
10103
10104 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10105 (normal_mod_SOURCES): Likewise.
10106 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10107 (normal_mod_SOURCES): Likewise.
10108
10109 * commands/ls.c (grub_ls_list_disks): Use
10110 grub_normal_print_device_info instead of grub_print_partinfo. Free
10111 PNAME.
10112 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10113 duplicating the code.
10114
10115 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10116
10117 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10118 follow GCS more precisely.
10119 * commands/i386/pc/vbe_test.c: Likewise.
10120 * include/grub/i386/pc/vbe.h: Likewise.
10121 * term/i386/pc/vesafb.c: Likewise.
10122 * video/i386/pc/vbe.c: Likewise.
10123
10124 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10125
10126 * DISTLIST: Added term/i386/pc/vesafb.c
10127 DISTLIST: Added video/i386/pc/vbe.c
10128 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10129 DISTLIST: Added commands/i386/pc/vbe_test.c.
10130 * commands/i386/pc/vbe_list_modes.c: New file.
10131 * commands/i386/pc/vbe_test.c: Likewise.
10132 * term/i386/pc/vesafb.c: Likewise.
10133 * video/i386/pc/vbe.c: Likewise.
10134 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10135 (grub_vbe_probe) Added prototype.
10136 (grub_vbe_set_video_mode) Likewise.
10137 (grub_vbe_get_video_mode) Likewise.
10138 (grub_vbe_get_video_mode_info) Likewise.
10139 (grub_vbe_set_pixel_rgb) Likewise.
10140 (grub_vbe_set_pixel_index) Likewise.
10141 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10142 (pkgdata_MODULES): Added vesafb.mod.
10143 (pkgdata_MODULES): Added vbe_list_modes.mod.
10144 (pkgdata_MODULES): Added vbe_test.mod.
10145 (vbe_mod_SOURCES): Added.
10146 (vbe_mod_CFLAGS): Likewise.
10147 (vesafb_mod_SOURCES): Likewise.
10148 (vesafb_mod_CFLAGS): Likewise.
10149 (vbe_list_modes_mod_SOURCES): Likewise.
10150 (vbe_list_modes_mod_CFLAGS): Likewise.
10151 (vbe_test_mod_SOURCES): Likewise.
10152 (vbe_test_mod_CFLAGS): Likewise.
10153
10154 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10155
10156 * normal/command.c (grub_command_execute): If INTERACTIVE is
10157 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10158 CMDLINE. Disable the pager if INTERACTIVE is true.
10159 All callers are changed.
10160
10161 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10162 before reading a config file.
10163 * normal/main.c (read_config_file): Even if a command is not
10164 found, register it if it is within an entry.
10165
10166 * util/grub-emu.c: Include sys/types.h and unistd.h.
10167 (options): Added --hold.
10168 (struct arguments): Added a new member "hold".
10169 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10170 missing.
10171 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10172 cleared by a debugger, if it is not zero.
10173
10174 * include/grub/normal.h (grub_command_execute): Add an argument
10175 INTERACTIVE.
10176
10177 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10178
10179 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10180
10181 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10182
10183 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10184 program with another one, because the old one didn't detect a bug
10185 in gcc-3.4. Always use regparm 2, because the new test is still
10186 not enough for gcc-4.0. Someone must investigate a simple test
10187 case which detects a bug in gcc-4.0.
10188
10189 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10190
10191 * DISTLIST: Added normal/completion.c.
10192
10193 * normal/completion.c: New file.
10194
10195 * term/i386/pc/console.c (grub_console_getwh): New function.
10196 (grub_console_term): Assign grub_console_getwh to getwh.
10197
10198 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10199 function is defined in normal/completion.c as
10200 grub_normal_do_completion.
10201 (grub_cmdline_get): Use grub_normal_do_completion instead of
10202 grub_tab_complete.
10203
10204 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10205 returns non-zero, otherwise return 0.
10206 (grub_partition_iterate): First, probe the partition map. Then,
10207 call ITERATE only for this partition map.
10208
10209 * kern/misc.c (grub_strncmp): Rewritten.
10210
10211 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10212 returns non-zero. Otherwise return 0.
10213
10214 * include/grub/partition.h (grub_partition_map_iterate): Return
10215 int instead of void.
10216
10217 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10218
10219 * include/grub/misc.h (grub_strncmp): Change the type of N to
10220 grub_size_t.
10221
10222 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10223 of void.
10224
10225 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10226 unsigned explicitly before comparing it with I.
10227
10228 * kern/main.c (grub_env_write_root): Add the attribute unused into
10229 VAR.
10230
10231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10232 normal/completion.c.
10233 (normal_mod_SOURCES): Likewise.
10234 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10235 (normal_mod_SOURCES): Likewise.
10236
10237 * normal/command.c (grub_iterate_commands): If ITERATE returns
10238 non-zero, return one immediately.
10239
10240 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10241
10242 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10243 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10244 descriptions.
10245 (grub_vbe_get_controller_info): New function.
10246 (grub_vbe_get_mode_info): Likewise.
10247 (grub_vbe_set_mode): Likewise.
10248 (grub_vbe_get_mode): Likewise.
10249 (grub_vbe_set_memory_window): Likewise.
10250 (grub_vbe_get_memory_window): Likewise.
10251 (grub_vbe_set_scanline_length): Likewise.
10252 (grub_vbe_get_scanline_length): Likewise.
10253 (grub_vbe_set_display_start): Likewise.
10254 (grub_vbe_get_display_start): Likewise.
10255 (grub_vbe_set_palette_data): Likewise.
10256 * include/grub/i386/pc/vbe.h: New file.
10257
10258 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10259
10260 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10261 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10262 * DISTLIST: Likewise.
10263 * kern/ieee1275/of.c: Moved to ...
10264 * kern/ieee1275/ieee1275.c: ... here.
10265
10266 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10267
10268 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10269 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10270 Pass 0 as `end' parameter to grub_strtoul().
10271
10272 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10273
10274 * include/grub/powerpc/ieee1275/console.h: Do not include
10275 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10276 ifdef.
10277 (grub_console_cur_color): Remove i386-specific prototype.
10278 (grub_console_real_putchar): Likewise.
10279 (grub_console_checkkey): Likewise.
10280 (grub_console_getkey): Likewise.
10281 (grub_console_getxy): Likewise.
10282 (grub_console_gotoxy): Likewise.
10283 (grub_console_cls): Likewise.
10284 (grub_console_setcursor): Likewise.
10285 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10286 Include <grub/machine/console.h>.
10287 * term/ieee1275/ofconsole.c: Likewise.
10288
10289 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10290
10291 * Makefile.in (LIBLZO): New variable.
10292
10293 * configure.ac: Check for LZO version 2.
10294
10295 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10296 lzo/lzo1x.h instead of lzo1x.h.
10297
10298 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10299 of -llzo.
10300
10301 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10302 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10303
10304 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10305 copying the data from PARTITION to P.
10306
10307 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10308
10309 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10310 negative, unload the module.
10311
10312 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10313 map is "pc_partition_map" but not "pc".
10314 (usage): Fix the description. The options are --boot-image and
10315 --core-image but not --boot-file or --core-file.
10316 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10317 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10318 DEFAULT_DIRECTORY.
10319
10320 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10321 --core-file. Specify INSTALL_DEVICE as an argument.
10322
10323 * util/console.c: Include config.h.
10324 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10325 [HAVE_NCURSES_H]: Include ncurses.h.
10326 [HAVE_CURSES_H]: Include curses.h.
10327 [!A_NORMAL] (A_NORMAL): Defined as zero.
10328 [!A_STANDOUT] (A_STANDOUT): Likewise.
10329
10330 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10331 -lncurses.
10332 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10333
10334 * configure.ac: Check for curses libraries and headers.
10335
10336 * Makefile.in (LIBCURSES): New variable.
10337
10338 * genmk.rb (Script::rule): Set the executable bits.
10339
10340 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10341 name of the PC partition map is "pc_partition_map" but not "pc".
10342
10343 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10344
10345 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10346 (modules): Likewise.
10347 (usage): Added descriptions for --modules and --grub-probefs.
10348 Handle --modules and --grub-probefs. Save the arguments in MODULES
10349 and GRUB_PROBEFS, respectively.
10350 Auto-detect a filesystem module against GRUBDIR. If the result is
10351 empty and modules are not specified explicitly, abort the
10352 installation. Add the result to MODULES.
10353
10354 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10355 disk/powerpc/ieee1275/ofdisk.c,
10356 include/grub/powerpc/ieee1275/init.h and
10357 term/powerpc/ieee1275/ofconsole.c.
10358 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10359 term/ieee1275/ofconsole.c.
10360
10361 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10362
10363 * COPYING: Upgraded to the latest version. Only the address of the
10364 FSF office has changed.
10365
10366 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10367
10368 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10369 kern/ieee1275.c with kern/ieee1275/of.c.
10370
10371 * kern/ieee1275.c: Moved to ...
10372 * kern/ieee1275/of.c: ... here.
10373
10374 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10375
10376 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10377 readability.
10378
10379 * config.guess: Updated to the latest version from gnulib.
10380 * config.sub: Likewise.
10381 * install.sh: Likewise.
10382 * mkinstalldirs: Likewise.
10383
10384 * include/grub/console.h: Removed. This file is arch-specific. Do
10385 not put this in include/grub.
10386
10387 * include/grub/i386/pc/console.h: Resurrected.
10388
10389 * util/console.c: Include grub/machine/console.h instead of
10390 grub/console.h.
10391 * util/grub-emu.c: Likewise.
10392
10393 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10394
10395 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10396 hardcoded value.
10397
10398 From Vincent Pelletier <subdino2004@yahoo.fr>
10399 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10400 Redefined to use grub_getwh.
10401 (grub_term): New member named getwh.
10402 (grub_getwh): New prototype.
10403 * kern/term.c (grub_getwh): New function.
10404 * term/i386/pc/console.c (grub_console_getwh): New function.
10405 (grub_console_term): New member `getwh'.
10406 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10407 (grub_vga_term): New member `getwh'.
10408 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10409 grub_ssize_t.
10410 (grub_ofconsole_getw): New function.
10411 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10412 (grub_ofconsole_term): New field named getwh and new initial
10413 value.
10414
10415 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10416
10417 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10418 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10419 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10420 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10421 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10422 of <grub/machine/ieee1275.h>.
10423 * commands/ieee1275/reboot.c: Likewise.
10424 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10425 * kern/ieee1275.c: ... to here. All users updated. Change all
10426 parameter structs to use new type `grub_ieee1275_cell_t'.
10427 * term/powerpc/ieee1275/ofconsole.c: Move ...
10428 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10429 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10430 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10431 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10432 to return int.
10433 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10434 Remove unused prototypes. All users updated.
10435 * include/grub/powerpc/ieee1275/console.h: Removed.
10436 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10437 `grub_ieee1275_cell_t'.
10438 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10439 Cast comparisons with -1 to the correct type.
10440 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10441 type to match `grub_ieee1275_entry_fn'.
10442
10443 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10444
10445 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10446
10447 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10448 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10449 partmap/sun.c.
10450 (grub_probefs_SOURCES): New variable.
10451
10452 * util/i386/pc/grub-probefs.c: New file.
10453
10454 * util/i386/pc/grub-setup.c (main): Call
10455 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10456 grub_hfs_init and grub_jfs_init to initialize the system. Call
10457 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10458 grub_pc_partition_map_fini to finish the system.
10459
10460 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10461
10462 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10463 function.
10464 (grub_multiboot_load_elf32): Likewise.
10465 (grub_multiboot_is_elf64): Likewise.
10466 (grub_multiboot_load_elf64): Likewise.
10467 (grub_multiboot_load_elf): Likewise.
10468 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10469 an ELF32 or ELF64 file.
10470 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10471
10472 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10473 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10474 NULL before calling FS->LABEL.
10475 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10476 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10477 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10478 before calling FS->LABEL.
10479
10480 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10481
10482 * util/i386/pc/grub-install.in (datadir): New variable.
10483 (libdir): Removed.
10484 (pkgdatadir): New variable.
10485 (pkglibdir): Removed.
10486
10487 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10488
10489 * DISTLIST: Added util/i386/pc/grub-install.in.
10490
10491 * util/i386/pc/grub-install.in: New file.
10492
10493 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10494 (grub_install_SOURCES): Likewise.
10495
10496 * genmk.rb: Added support for scripts.
10497 (Script): New class.
10498 (scripts): New variable.
10499
10500 * Makefile.in (install-local): Install sbin_SCRIPTS by
10501 INSTALL_SCRIPT.
10502 (uninstall): Remove sbin_SCRIPTS.
10503
10504 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10505 device, try to get a GRUB device by
10506 grub_util_biosdisk_get_grub_dev.
10507 Free DEST_DEV.
10508
10509 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10510 description for --device-map.
10511
10512 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10513
10514 Change the semantics of variable hooks. They now return strings
10515 instead of error values.
10516
10517 * util/i386/pc/grub-setup.c: Include grub/env.h.
10518 (setup): Use grub_device_set_root instead of grub_env_set.
10519
10520 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10521 grub_env_get instead of grub_device_set_root and
10522 grub_device_get_root, respectively.
10523
10524 * kern/main.c (grub_env_write_root): New function.
10525 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10526 grub_env_set instead of grub_device_set_root.
10527
10528 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10529 many variables.
10530 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10531 rather than calling ENV->WRITE_HOOK afterwards.
10532 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10533 passing a pointer of a pointer.
10534 (grub_register_variable_hook): Change the types of "read_hook" and
10535 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10536 respectively.
10537 Allocate the default empty string on the heap, because this string
10538 may be freed later.
10539
10540 * kern/device.c: Include grub/env.h.
10541 (grub_device_set_root): Removed.
10542 (grub_device_get_root): Likewise.
10543 (grub_device_open): Use grub_env_get instead of
10544 grub_device_get_root.
10545
10546 * include/grub/env.h (grub_env_read_hook_t): New type.
10547 (grub_env_write_hook_t): Likewise.
10548 (grub_env_var): Change the types of "read_hook" and "write_hook"
10549 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10550 (grub_register_variable_hook): Likewise.
10551
10552 * include/grub/device.h (grub_device_set_root): Removed.
10553 (grub_device_set_root): Likewise.
10554
10555 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10556 make sure that DIRNAME terminates with '/', so that
10557 grub_fat_find_dir will fail if PATH is not a directory.
10558
10559 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10560 from DIRNAME.
10561 Use the qualifier auto for print_files and print_files_long.
10562 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10563 as a regular file.
10564 Put a newline only if there is no error.
10565 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10566 used.
10567
10568 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10569
10570 * kern/partition.c (grub_partition_probe): Initialize PART to
10571 NULL. Otherwise, when no partition map is registered, this returns
10572 a garbage.
10573
10574 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10575
10576 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10577 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10578 valid.
10579
10580 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10581
10582 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10583 information on each device, if it does not have partitions. Print
10584 "Device" instead of "Disk", because this function is not specific
10585 to disk devices.
10586
10587 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10588 static to ensure that it is put on the memory rather than a
10589 register.
10590
10591 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10592
10593 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10594 (grub_cat_init): Likewise.
10595 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10596 (options): Likewise.
10597 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10598 (grub_configfile_init): Likewise.
10599 * font/manager.c (GRUB_MOD_INIT): Likewise.
10600 * commands/help.c (GRUB_MOD_INIT): Likewise.
10601 (grub_help_init): Likewise.
10602 * normal/command.c (grub_command_init): Likewise.
10603 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10604 * disk/loopback.c (grub_loop_init): Likewise.
10605 (GRUB_MOD_INIT): Likewise.
10606 * commands/ls.c (grub_ls_init): Likewise.
10607 (GRUB_MOD_INIT): Likewise.
10608 (options): Likewise.
10609 * commands/boot.c (grub_boot_init): Likewise.
10610 (GRUB_MOD_INIT): Likewise.
10611 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10612 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10613 (GRUB_MOD_INIT): Likewise.
10614 * commands/cmp.c (grub_cmp_init): Likewise.
10615 (GRUB_MOD_INIT): Likewise.
10616
10617 * normal/arg.c: Use <> instead of "" to include header files.
10618 (SHORT_ARG_HELP): New macro.
10619 (SHORT_ARG_USAGE): Likewise.
10620 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10621 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10622 descriptions.
10623 (find_short): Check if C is 'h' or 'u' explicitly.
10624 (grub_arg_show_help): Use space characters instead of tabs. Treat
10625 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10626 are shown with --help and --usage only if they are not used for
10627 the command itself.
10628 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10629 'h' and 'u'.
10630
10631 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10632 const into "longarg". Change the type of "shortarg" to int.
10633
10634 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10635
10636 * boot/i386/pc/boot.S (boot_drive_check): New label.
10637
10638 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10639 macro.
10640
10641 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10642 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10643
10644 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10645
10646 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10647 When turning off Gate A20, skip the check and return immediately,
10648 because this is not fatal usually.
10649
10650 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10651
10652 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10653 be 0x7C00 instead of 0x8000.
10654
10655 * boot/i386/pc/pxeboot.S: Rewritten.
10656
10657 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10658 EXT_C.
10659 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10660 result.
10661
10662 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10663
10664 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10665 robustness. This routine now supports a BIOS call and System
10666 Control Port A to modify the gate A20.
10667
10668 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10669 Increased to 0x440.
10670
10671 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10672
10673 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10674 device path and resulting ihandle.
10675 (grub_ofdisk_close): dprintf the ihandle being closed.
10676 (grub_ofdisk_read): dprintf function parameters.
10677 * kern/mm.c (grub_mm_init_region): Likewise.
10678 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10679 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10680 size, and boot arguments.
10681 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10682 before loading into memory.
10683 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10684 before loading into memory.
10685
10686 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10687
10688 * kern/mm.c: Added much documentation.
10689 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10690 8, set to 5 instead of 8.
10691
10692 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10693
10694 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10695
10696 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10697 (grub_mkdevicemap_SOURCES): New variable.
10698
10699 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10700 lib/device.c of GRUB Legacy.
10701
10702 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10703
10704 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10705 instead of PATH is NULL.
10706
10707 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10708
10709 * commands/cmp.c (BUFFER_SIZE): New macro.
10710 (grub_cmd_cmp): Close the right file at the right time. Compare
10711 only data just read. Don't report files of different size as
10712 identical. Dynamically allocate buffers. Move variable
10713 declarations at the beginning of function.
10714
10715 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10716
10717 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10718 reverse.
10719
10720 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10721
10722 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10723 when backspace is pressed at beginning of line.
10724
10725 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10726
10727 * DISTLIST: Added genfslist.sh.
10728
10729 * normal/main.c (fs_module_list): New variable.
10730 (autoload_fs_module): New function.
10731 (read_fs_list): Likewise.
10732 (grub_normal_execute): Call read_fs_list.
10733
10734 * kern/fs.c (grub_fs_autoload_hook): New variable.
10735 (grub_fs_probe): Added support for auto-loading.
10736
10737 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10738 (grub_fs_module_list_t): New type.
10739
10740 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10741 (grub_fs_autoload_hook): New prototype.
10742
10743 * genfslist.sh: New file.
10744
10745 * genmk.rb: Added a rule to generate a filesystem list.
10746
10747 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10748
10749 * configure.ac: Fix the test for cross-compiling.
10750
10751 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10752 define GRUB_UTIL anymore.
10753
10754 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10755 so this function works on other systems than just big endian.
10756 (load_modules): Likewise.
10757 (add_segments): Likewise.
10758
10759 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10760
10761 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10762 contains `l' modifier, get a long from va_arg().
10763
10764 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10765
10766 * kern/mm.c (grub_free): If the next free block which is being
10767 merged is the first free block, set the first block to the block
10768 being freed.
10769 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10770
10771 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10772
10773 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10774 `grub_ieee1275_chosen'.
10775
10776 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10777
10778 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10779 (grub_ieee1275_chosen): New variable.
10780 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10781 `chosen'.
10782 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10783 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10784 Rename first argument to `phandle' for consistency.
10785 (grub_ieee1275_get_property_length): Likewise.
10786 (grub_ieee1275_next_property): Likewise. Change type of first argument
10787 to grub_ieee1275_phandle_t.
10788 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10789 Move export next to declaration.
10790 (grub_ieee1275_chosen): New variable.
10791 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10792 Correct cosmetic typo.
10793 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10794 `grub_ieee1275_chosen'.
10795 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10796 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10797 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10798 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10799 `grub_ieee1275_chosen'.
10800
10801 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10802
10803 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10804 /chosen/bootargs.
10805 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10806 /chosen/bootargs as "variable=value" pairs.
10807
10808 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10809
10810 * include/grub/misc.h (grub_dprintf): New macro.
10811 (grub_real_dprintf): New prototype.
10812 (grub_strword): Likewise.
10813 (grub_iswordseparator): Likewise.
10814 * kern/misc.c (grub_real_dprintf): New function.
10815 (grub_strword): Likewise.
10816 (grub_iswordseparator): Likewise.
10817
10818 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10819
10820 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10821 (roundup): Remove macro.
10822 (grub_ieee1275_flags): Make static.
10823 (grub_ieee1275_realmode): Remove.
10824 (grub_ieee1275_test_flag): New function.
10825 (grub_ieee1275_set_flag): Likewise.
10826 (find_options): Rename to `grub_ieee1275_find_options'; update
10827 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10828 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10829 (cmain): New prototype.
10830 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10831 `grub_ieee1275_flags' directly.
10832 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10833 machine/biosdisk.h.
10834 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10835 Don't include grub/machine/init.h.
10836 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10837 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10838 Remove prototype.
10839 (grub_ieee1275_realmode): Likewise.
10840 (grub_ieee1275_flag): New enum.
10841 (grub_ieee1275_test_flag): New prototype.
10842 (grub_ieee1275_set_flag): New prototype.
10843 * include/grub/powerpc/ieee1275/init.h: Remove file.
10844 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10845 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10846 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10847 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10848 comment.
10849 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10850 `grub_ieee1275_test_flag'.
10851 (grub_ieee1275_encode_devname): Likewise.
10852
10853 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10854
10855 * include/grub/powerpc/ieee1275/ieee1275.h
10856 (grub_ieee1275_encode_devname): New prototype.
10857 (grub_ieee1275_get_filename): Likewise.
10858 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10859 function.
10860 (grub_set_prefix): Likewise.
10861 (grub_machine_init): Call grub_set_prefix.
10862 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10863 (grub_parse_type): New enum.
10864 (grub_ieee1275_get_devargs): New function.
10865 (grub_ieee1275_get_devname): Likewise.
10866 (grub_ieee1275_parse_args): Likewise.
10867 (grub_ieee1275_get_filename): Likewise.
10868 (grub_ieee1275_encode_devname): Likewise.
10869
10870 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10871
10872 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10873 `grub_loader_unset'.
10874
10875 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10876
10877 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10878 instead of grub_ieee1275_interpret.
10879 (grub_halt_init): New function.
10880 (grub_halt_fini): Likewise.
10881 (GRUB_MOD_INIT): Correct message grammar.
10882 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10883 instead of grub_ieee1275_interpret.
10884 (grub_reboot_init): New function.
10885 (grub_reboot_fini): Likewise.
10886 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10887 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10888 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10889 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10890 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10891 function.
10892 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10893 Add prototype.
10894 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10895 prototype.
10896 (grub_halt): Likewise.
10897 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10898 (cmain): Remove __attribute__((unused)).
10899 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10900 (grub_heap_len): Likewise.
10901 (grub_machine_fini): New function.
10902 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10903 (grub_halt): Likewise.
10904 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10905 function.
10906 * util/powerpc/ieee1275/misc.c: New file.
10907
10908 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10909
10910 * DISTLIST: New file.
10911 * gendistlist.sh: Likewise.
10912
10913 * Makefile.in (COMMON_DISTFILES): Removed.
10914 (BOOT_DISTFILES): Likewise.
10915 (CONF_DISTFILES): Likewise.
10916 (DISK_DISTFILES): Likewise.
10917 (FS_DISTFILES): Likewise.
10918 (INCLUDE_DISTFILES): Likewise.
10919 (KERN_DISTFILES): Likewise.
10920 (LOADER_DISTFILES): Likewise.
10921 (TERM_DISTFILES): Likewise.
10922 (UTIL_DISTFILES): Likewise.
10923 (DISTFILES): Likewise.
10924 (uninstall): Uninstall files in $(pkgdata_DATA).
10925 (DISTLIST): New target.
10926 (distdir): Use the contents of the file DISTLIST to get a list of
10927 distributed files.
10928
10929 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10930
10931 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10932 descriptor. This is ported from GRUB Legacy.
10933
10934 * gencmdlist.sh: Added an extra semicolon to make it work with
10935 old sed versions. Reported by Robert Bihlmeyer
10936 <robbe@orcus.priv.at>.
10937
10938 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10939
10940 Automatic loading of commands is supported.
10941
10942 * normal/main.c (read_command_list): New function.
10943 (grub_normal_execute): Call read_command_list.
10944
10945 * normal/command.c (grub_register_command): Return zero or CMD.
10946 Allocate CMD->NAME from the heap.
10947 Initialize CMD->MODULE_NAME to zero.
10948 Find the same name as well. If the same command is found and it is
10949 a dummy command, overwrite members. If it is not a dummy command,
10950 return zero.
10951 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10952 (grub_command_find): If a dummy command is found, load a module
10953 and retry to find a command only once.
10954
10955 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10956 make sure that each command is loaded.
10957
10958 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10959 macro.
10960 (struct grub_command): Remove const from the member `name'.
10961 Add a new member `module_name'.
10962 (grub_register_command): Return grub_command_t.
10963
10964 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10965 sure that each command is loaded.
10966
10967 * genmk.rb (PModule::rule): Specify a module name without the
10968 suffix ".mod" to gencmdlist.sh.
10969
10970 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10971
10972 * gencmdlist.sh: New file.
10973
10974 * genmk.rb (PModule::rule): Generate a rule for a command list.
10975 Clean command.lst.
10976 Generate command.lst from $(COMMANDFILES).
10977
10978 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10979 (DATA): Added $(pkgdata_DATA).
10980 (install-local): Install files in $(pkgdata_DATA).
10981
10982 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10983
10984 * term/i386/pc/vga.c (debug_command): Removed.
10985 (GRUB_MOD_INIT): Do not register the command "debug".
10986
10987 From Hollis Blanchard:
10988 * commands/configfile.c: New file.
10989 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10990 commands/configfile.c.
10991 (pkgdata_MODULES): Added configfile.mod.
10992 (configfile_mod_SOURCES): New variable.
10993 (configfile_mod_CFLAGS): Likewise.
10994 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10995 commands/configfile.c.
10996 (pkgdata_MODULES): Added configfile.mod.
10997 (configfile_mod_SOURCES): New variable.
10998 (configfile_mod_CFLAGS): Likewise.
10999 * util/grub-emu.c (main): Call grub_configfile_init and
11000 grub_configfile_fini.
11001 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11002 prototype.
11003 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11004
11005 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11006
11007 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11008 address.
11009
11010 * commands/help.c (grub_cmd_help): Do not print newlines after
11011 the last command in print_command_help.
11012
11013 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11014
11015 * commands/default.h: New file.
11016 * commands/timeout.h: Likewise.
11017 * normal/context.c: Likewise.
11018
11019 * util/misc.c: Do not include sys/times.h.
11020 Include sys/time.h and grub/machine/time.h.
11021 (grub_get_rtc): Rewritten with gettimeofday.
11022
11023 * util/grub-emu.c (main): Call grub_default_init and
11024 grub_timeout_init before grub_normal_init, and call
11025 grub_timeout_fini and grub_default_fini after grub_main.
11026
11027 * util/console.c (grub_ncurses_checkkey): Return the read
11028 character or -1.
11029
11030 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11031 timeouts.
11032
11033 * normal/main.c (read_config_file): Push MENU. If this fails,
11034 print an error and wait for a user input.
11035 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11036 If a menu is empty or an error occurs, pop MENU.
11037 (grub_normal_execute): Pop and free MENU after grub_menu_run
11038 returns.
11039
11040 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11041
11042 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11043 include time.h.
11044 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11045 without GRUB_UTIL.
11046 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11047 time.h.
11048 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11049 without GRUB_UTIL.
11050
11051 * include/grub/normal.h (struct grub_menu_list): New struct.
11052 (grub_menu_list_t): New type.
11053 (struct grub_context): New struct.
11054 (grub_context_t): New type.
11055 (grub_register_command): Got rid of EXPORT_FUNC.
11056 (grub_unregister_command): Likewise.
11057 (grub_context_get): New prototype.
11058 (grub_context_get_current_menu): Likewise.
11059 (grub_context_push_menu): Likewise.
11060 (grub_context_pop_menu): Likewise.
11061 [GRUB_UTIL] (grub_default_init): Likewise.
11062 [GRUB_UTIL] (grub_default_fini): Likewise.
11063 [GRUB_UTIL] (grub_timeout_init): Likewise.
11064 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11065
11066 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11067 commands/timeout.c and normal/context.c.
11068 (pkgdata_MODULES): Added default.mod and timeout.mod.
11069 (normal_mod_SOURCES): Added normal/context.c.
11070 (default_mod_SOURCES): New variable.
11071 (default_mod_CFLAGS): Likewise.
11072 (timeout_mod_SOURCES): Likewise.
11073 (timeout_mod_CFLAGS): Likewise.
11074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11075 conf/i386-pc.rmk.
11076 (pkgdata_MODULES): Added default.mod and timeout.mod.
11077 (normal_mod_SOURCES): Added normal/context.c.
11078 (default_mod_SOURCES): New variable.
11079 (default_mod_CFLAGS): Likewise.
11080 (timeout_mod_SOURCES): Likewise.
11081 (timeout_mod_CFLAGS): Likewise.
11082
11083 * Makefile.in (all-local): Added $(MKFILES).
11084
11085 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11086
11087 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11088 (grub_emu_SOURCES): Likewise.
11089 (pkgdata_MODULES): Add `sun.mod'.
11090 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11091 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11092 `partmap/sun.c'.
11093 (pkgdata_MODULES): Add `sun.mod'.
11094 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11095 * include/grub/partition.h (grub_sun_partition_map_init): New
11096 prototype.
11097 (grub_sun_partition_map_fini): Likewise.
11098 * partmap/sun.c: New file.
11099 * util/grub-emu.c (main): Initialize and de-initialize the sun
11100 partitionmap support.
11101
11102 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11103
11104 This implements an Emacs-like menu entry editor.
11105
11106 * normal/menu_entry.c: New file.
11107
11108 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11109 characters to ASCII.
11110 (saved_char): New variable.
11111 (grub_ncurses_checkkey): Rewritten completely.
11112 (grub_ncurses_getkey): Likewise.
11113 (grub_ncurses_init): Call raw instead of cbreak.
11114
11115 * normal/menu.c (print_entry): Do not put a space.
11116 (init_page): Renamed to ...
11117 (grub_menu_init_page): ... this. All callers changed.
11118 (edit_menu_entry): Removed.
11119 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11120
11121 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11122
11123 * kern/misc.c (grub_vprintf): Call grub_refresh.
11124
11125 * normal/menu.c (DISP_LEFT): Renamed to ...
11126 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11127 * normal/menu.c (DISP_UP): Renamed to ...
11128 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11129 * normal/menu.c (DISP_RIGHT): Renamed to ...
11130 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11131 * normal/menu.c (DISP_DOWN): Renamed to ...
11132 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11133 * normal/menu.c (DISP_HLINE): Renamed to ...
11134 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11135 * normal/menu.c (DISP_VLINE): Renamed to ...
11136 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11137 * normal/menu.c (DISP_UL): Renamed to ...
11138 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11139 * normal/menu.c (DISP_UR): Renamed to ...
11140 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11141 * normal/menu.c (DISP_LL): Renamed to ...
11142 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11143 * normal/menu.c (DISP_LR): Renamed to ...
11144 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11145 * normal/menu.c (TERM_WIDTH): Renamed to ...
11146 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11147 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11148 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11149 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11150 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11151 * normal/menu.c (TERM_MARGIN): Renamed to ...
11152 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11153 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11154 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11155 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11156 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11157 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11158 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11159 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11160 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11161 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11162 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11163 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11164 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11165 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11166 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11167 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11168 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11169 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11170 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11171 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11172 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11173 All callers changed.
11174
11175 * include/grub/normal.h: New prototype.
11176
11177 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11178 normal/menu_entry.c.
11179 (normal_mod_SOURCES): Likewise.
11180 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11181 (normal_mod_SOURCES): Likewise.
11182
11183 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11184
11185 * include/grub/normal.h (grub_halt_init): New prototype.
11186 (grub_halt_fini): Likewise.
11187 (grub_reboot_init): Likewise.
11188 (grub_reboot_fini): Likewise.
11189
11190 * util/grub-emu.c: Include signal.h.
11191 (main_env): New global variable.
11192 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11193 catch C-c.
11194 (grub_machine_fini): New function.
11195 (main): Call grub_halt_init and grub_reboot_init before
11196 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11197 Call setjmp with MAIN_ENV to go back afterwards.
11198 Call grub_machine_fini right before return.
11199
11200 * include/grub/util/misc.h: Include setjmp.h.
11201 (main_env): New prototype.
11202
11203 * include/grub/kernel.h (grub_machine_fini): New prototype.
11204 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11205 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11206
11207 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11208 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11209 * term/i386/pc/console.c (grub_console_fini): Likewise.
11210
11211 * util/i386/pc/misc.c: New file.
11212
11213 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11214 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11215 commands/i386/pc/reboot.c.
11216
11217 2005-02-14 Guillem Jover <guillem@hadrons.org>
11218
11219 * include/grub/dl.h (grub_dl_check_header): New prototype.
11220 (grub_arch_dl_check_header): Change return type to grub_err_t,
11221 remove size parameter and export function. Update all callers.
11222 * kern/dl.c (grub_dl_check_header): New function.
11223 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11224 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11225 are inside the core.
11226 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11227 independent ELF header checks.
11228 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11229 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11230 `grub_dl_check_header' instead of explicit checks. Check for the
11231 ELF type.
11232 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11233 `grub_dl_check_header' instead of explicit checks. Remove arch
11234 specific ELF header checks.
11235
11236 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11237 argument SIZE.
11238
11239 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11240
11241 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11242 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11243
11244 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11245
11246 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11247 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11248 (part_map_iterate): Clear `grub_errno' and return 0 if
11249 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11250 * partmap/amiga.c (amiga_partition_map_iterate): Return
11251 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11252 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11253
11254 2005-02-01 Guillem Jover <guillem@hadrons.org>
11255
11256 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11257 help info.
11258
11259 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11260
11261 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11262 Removed prototype.
11263 (grub_rescue_cmd_linux): New prototype.
11264 (grub_rescue_cmd_initrd): Likewise.
11265 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11266 `bi_rec'.
11267 (grub_linux_release_mem): Release the memory for the initrd.
11268 (grub_load_linux): Renamed from this...
11269 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11270 Changed `entry' not to be static. Loop over memory regions to
11271 find another one when the default fails.
11272 (grub_rescue_cmd_initrd): New function.
11273 (grub_linux_init): Remove function.
11274 (grub_linux_fini): Likewise.
11275 (GRUB_MOD_INIT): Register `initrd'.
11276 (GRUB_MOD_FINI): Unregister `initrd'.
11277 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11278 Function removed.
11279 (grub_linux_normal_fini): Likewise.
11280 (GRUB_MOD_INIT): Register `initrd'.
11281 (GRUB_MOD_FINI): Unregister `initrd'.
11282
11283 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11284
11285 * commands/help.c: New file.
11286 * normal/arg.c (show_help): Renamed to...
11287 (grub_arg_show_help): ... this.
11288 * commands/i386/pc/halt.c: New file.
11289 * commands/i386/pc/reboot.c: Likewise.
11290 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11291 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11292 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11293 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11294 variables.
11295 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11296 `commands/help.c'.
11297 (pkgdata_MODULES): Add `help.mod'.
11298 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11299 * grub/i386/pc/init.h (grub_reboot): New prototype.
11300 (grub_halt): Likewise.
11301 * include/grub/normal.h (grub_arg_show_help): New prototype.
11302 (grub_help_init): Likewise.
11303 (grub_help_fini): Likewise.
11304 * util/grub-emu.c (main): Initialize and deinitialize the help
11305 command.
11306
11307 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11308
11309 * normal/command.c (grub_command_init): Fixed the description of
11310 the `set' and `unset' commands.
11311
11312 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11313
11314 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11315 function.
11316 * commands/ieee1275/halt.c: New file.
11317 * commands/ieee1275/reboot.c: Likewise.
11318 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11319 `__attribute__ ((unused))'. Some GCS related fixed.
11320 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11321 (grub_suspend_fini): Likewise.
11322 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11323 and `halt.mod'.
11324 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11325 (halt_mod_CFLAGS): New variables.
11326 * include/grub/powerpc/ieee1275/ieee1275.h
11327 (grub_ieee1275_interpret): New prototype.
11328
11329 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11330
11331 * include/grub/misc.h (memmove): New prototype.
11332 (memcpy): Likewise.
11333
11334 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11335
11336 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11337 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11338
11339 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11340
11341 * kern/misc.c (grub_strndup): Function rewritten.
11342
11343 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11344
11345 * normal/menu.c (TERM_WIDTH): Macro redefined.
11346 (TERM_TOP_BORDER_Y): Likewise.
11347 (draw_border): Replaced while-loop by a for-loop. Make the number
11348 of lines consistent with the number of lines displayed in
11349 print_entries. Added a margin below the rectangle.
11350 (print_entry): Make the entry fit in the rectangle.
11351 (print_entries): Display the scroll arrows next to the right
11352 border.
11353
11354 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11355
11356 * fs/minix.c (grub_minix_find_file): Reserve more space for
11357 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11358 `grub_strncpy' to copy `path' into it.
11359
11360 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11361
11362 Add the loopback device, a device via which files can be accessed
11363 as devices.
11364
11365 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11366 (pkgdata_MODULES): Add loopback.mod.
11367 (loopback_mod_SOURCES): New variable.
11368 (loopback_mod_CFLAGS): Likewise.
11369 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11370 `disk/loopback.c'.
11371 (pkgdata_MODULES): Add loopback.mod.
11372 (loopback_mod_SOURCES): New variable.
11373 (loopback_mod_CFLAGS): Likewise.
11374 * disk/loopback.c: new file.
11375 * include/grub/normal.h (grub_loop_init): New prototype.
11376 (grub_loop_fini): New prototype.
11377 * util/grub-emu.c (main): Initialize and de-initialize loopback
11378 support.
11379 * include/grub/disk.h (grub_disk_dev_id): Add
11380 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11381
11382 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11383
11384 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11385 function.
11386 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11387 (suspend_mod_SOURCES): New variable.
11388 (suspend_mod_CFLAGS): Likewise.
11389 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11390 New prototype.
11391 * commands/ieee1275/suspend.c: New file.
11392
11393 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11394
11395 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11396 ((unused))' to `__attribute__ ((used))'.
11397 (GRUB_MOD_FINI): Likewise.
11398 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11399 * genmk.rb (PModule): Assign space to common symbols when linking
11400 modules.
11401
11402 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11403
11404 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11405 `unsigned' arguments to `grub_size_t'.
11406 (grub_malloc): Likewise.
11407 (grub_realloc): Likewise.
11408 (grub_memalign): Likewise.
11409 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11410 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11411 * util/misc.c (grub_malloc): Likewise.
11412 (grub_realloc): Likewise.
11413 * kern/mm.c (get_header_from_pointer): Change the casts to
11414 `unsigned' into a cast to `grub_size_t'.
11415
11416 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11417 point to `currnode' when `currnode' is changed.
11418
11419 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11420 Schottelius <nico-linux@schottelius.org>.
11421
11422 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11423
11424 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11425 (note_path): Remove variable.
11426 (GRUB_IEEE1275_NOTE_NAME): New macro.
11427 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11428 (grub_ieee1275_note_hdr): New structure.
11429 (grub_ieee1275_note_desc): Likewise.
11430 (grub_ieee1275_note): Likewise.
11431 (load_note): Remove `dir' argument. All callers updated. Remove
11432 `note_img' and `path'. Do not load a file from `note_path'.
11433 Initialize a struct grub_ieee1275_note and write that to `out'.
11434 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11435
11436 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11437
11438 * util/misc.c (grub_util_read_image): Revert last change. It
11439 called `grub_util_read_at', which seeks from the beginning of the
11440 file.
11441
11442 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11443
11444 * TODO: Add note about endianness in grub-mkimage.
11445 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11446 section.
11447 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11448 (grub_mkimage_SOURCES): New target.
11449 * include/grub/kernel.h (grub_start_addr): Remove variable.
11450 (grub_end_addr): Likewise.
11451 (grub_total_module_size): Likewise.
11452 (grub_kernel_image_size): Likewise.
11453 (GRUB_MODULE_MAGIC): New constant.
11454 (grub_module_info): New structure.
11455 (grub_arch_modules_addr): New prototype.
11456 (grub_get_end_addr): Remove prototype.
11457 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11458 * include/grub/powerpc/ieee1275/kernel.h: New file.
11459 * include/grub/util/misc.h (grub_util_get_fp_size): New
11460 prototype.
11461 (grub_util_read_at): Likewise.
11462 (grub_util_write_image_at): Likewise.
11463 * kern/main.c (grub_get_end_addr): Remove function.
11464 (grub_load_modules): Call grub_arch_modules_addr instead of using
11465 grub_end_addr. Look for a grub_module_info struct in memory. Use
11466 the grub_module_info fields instead of calling grub_get_end_addr
11467 as loop conditions. Move grub_add_unused_region code here.
11468 (grub_add_unused_region): Remove function.
11469 * kern/i386/pc/init.c: Include grub/cache.h.
11470 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11471 one call to add_mem_region.
11472 (grub_arch_modules_addr): New function.
11473 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11474 (grub_total_module_size): Likewise.
11475 Include grub/machine/kernel.h.
11476 (grub_arch_modules_addr): New function.
11477 * util/grub-emu.c (grub_end_addr): Remove variable.
11478 (grub_total_module_size): Likewise.
11479 (grub_arch_modules_addr): New function.
11480 * util/misc.c: Include unistd.h.
11481 (grub_util_get_fp_size): New function.
11482 (grub_util_read_at): Likewise.
11483 (grub_util_write_image_at): Likewise.
11484 (grub_util_read_image): Call grub_util_read_at.
11485 (grub_util_write_image): Call grub_util_write_image_at.
11486 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11487 additional memory in kernel_img for a struct grub_module_info.
11488 Fill in that grub_module_info.
11489 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11490
11491 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11492
11493 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11494 New function.
11495 * include/grub/powerpc/ieee1275/ieee1275.h
11496 (grub_ieee1275_milliseconds): New prototype.
11497 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11498 Change to 1000.
11499 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11500 grub_ieee1275_milliseconds.
11501
11502 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11503
11504 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11505 variable.
11506 (find_options): New function.
11507 (cmain): Call find_options.
11508 * include/grub/powerpc/ieee1275/ieee1275.h
11509 (grub_ieee1275_realmode): New extern variable.
11510 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11511 grub_map if grub_ieee1275_realmode is false.
11512
11513 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11514
11515 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11516 lines are inserted and make it work like readline. Reported by
11517 Vincent Pelletier <subdino2004@yahoo.fr>.
11518
11519 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11520
11521 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11522
11523 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11524 `kern/powerpc/cache.S'.
11525
11526 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11527
11528 * genmk.rb: Handle the `Program' class in the main loop. Written
11529 by Johan Rydberg <jrydberg@gnu.org>.
11530 (Program): New class.
11531 (programs): New variable.
11532 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11533 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11534 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11535 (help_arch): Function removed.
11536 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11537 `powerpc/libgcc.h' and `loader.h'.
11538 (pkgdata_PROGRAMS): New variable.
11539 (sbin_UTILITIES): Variable removed.
11540 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11541 (grubof_SOURCES): Variable re-defined so it only includes the
11542 core functionality.
11543 (grubof_CFLAGS): Remove `-DGRUBOF'.
11544 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11545 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11546 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11547 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11548 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11549 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11550 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11551 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11552 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11553 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11554 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11555 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11556 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11557 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11558 (pc_mod_CFLAGS): New variables.
11559 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11560 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11561 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11562 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11563 Moved from here...
11564 * include/grub/i386/pc/init.h (grub_os_area_addr)
11565 (rub_os_area_size): ... to here.
11566 * include/grub/powerpc/ieee1275/ieee1275.h
11567 (grub_ieee1275_entry_fn): Export symbol.
11568 * include/grub/powerpc/ieee1275/init.h: New file.
11569 * include/grub/powerpc/libgcc.h: Likewise.
11570 * include/grub/cache.h: Likewise.
11571 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11572 <hollis@penguinppc.org>.
11573 * kern/dl.c: Include <grub/cache.h>.
11574 (grub_dl_flush_cache): New function.
11575 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11576 for this module.
11577 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11578 (grub_console_init): Removed prototypes.
11579 (grub_machine_init): Don't initialize the modules anymore.
11580 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11581 static.
11582 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11583 Macro undef removed.
11584 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11585 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11586 relocation `R_PPC_REL32'. Return an error when the relocation is
11587 unknown.
11588 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11589 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11590 * util/misc.c (grub_arch_sync_caches): Likewise.
11591
11592 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11593
11594 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11595 `symlist.c', add `grubof_symlist.c'.
11596 (symlist.c): Variable removed.
11597 (grubof_HEADERS): Variable added.
11598 (grubof_symlist.c): New target.
11599 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11600 `kernel_img_HEADERS'.
11601 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11602 * kern/powerpc/dl.c: New file.
11603 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11604 Function removed.
11605 (grub_arch_dl_relocate_symbols): Likewise.
11606 (grub_register_exported_symbols): Likewise.
11607
11608 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11609
11610 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11611 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11612 to fail instead. Reported by Vincent Pelletier
11613 <subdino2004@yahoo.fr>.
11614
11615 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11616 it is not allocated. Reported by Vincent Pelletier
11617 <subdino2004@yahoo.fr>.
11618
11619 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11620 output so the output looks better.
11621
11622 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11623
11624 Modulize the partition map support and add support for the amiga
11625 partition map.
11626
11627 * commands/ls.c: Include <grub/partition.h> instead of
11628 <grub/machine/partition.h>.
11629 * kern/disk.c: Likewise.
11630 * kern/rescue.c: Likewise.
11631 * loader/i386/pc/chainloader.c: Likewise.
11632 * normal/cmdline.c: Likewise.
11633 * kern/powerpc/ieee1275/init.c: Likewise.
11634 (grub_machine_init): Call `grub_pc_partition_map_init',
11635 `grub_amiga_partition_map_init' and
11636 `grub_apple_partition_map_init'.
11637 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11638 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11639 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11640 `partition.h' and `pc_partition.h'.
11641 (grub_setup_SOURCES): Remove
11642 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11643 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11644 (grub_emu_SOURCES): Likewise.
11645 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11646 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11647 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11648 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11649 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11650 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11651 (grubof_SOURCES): Likewise.
11652 * disk/i386/pc/partition.c: File removed.
11653 * disk/powerpc/ieee1275/partition.c: Likewise.
11654 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11655 * include/grub/i386/pc/partition.h: Likewise.
11656 * kern/partition.c: New file.
11657 * partmap/amiga.c: Likewise.
11658 * partmap/apple.c: Likewise.
11659 * partmap/pc.c: Likewise.
11660 * include/grub/partition.h: Likewise..
11661 * include/grub/pc_partition.h: Likewise.
11662 * util/grub-emu.c: Include <grub/partition.h> instead of
11663 <grub/machine/partition.h>.
11664 (main): Call `grub_pc_partition_map_init',
11665 `grub_amiga_partition_map_init' and
11666 `grub_apple_partition_map_init' and deinitialize afterwards.
11667 * util/i386/pc/biosdisk.c: Include `#include
11668 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11669 `<grub/machine/partition.h>'.
11670 * util/i386/pc/grub-setup.c: Likewise.
11671 * util/i386/pc/biosdisk.c: Likewise.
11672 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11673 partition information in case of a PC partition.
11674 * util/i386/pc/grub-setup.c: Include `#include
11675 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11676 `<grub/machine/partition.h>'.
11677 (setup): Only access the PC specific partition information in case
11678 of a PC partition.
11679
11680 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11681
11682 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11683 (grub_longjmp): Likewise.
11684 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11685 20.
11686 * normal/powerpc/setjmp.S: New file.
11687 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11688 `normal/powerpc/setjmp.S'.
11689 (grubof_CFLAGS): Add `-DGRUBOF'.
11690 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11691 [GRUB_UTIL && !GRUBOF].
11692
11693 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11694
11695 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11696 property named `name'. Correctly handle the error returned by
11697 `grub_ieee1275_finddevice' if a device can not be opened.
11698
11699 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11700
11701 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11702 `actual' for negativity.
11703 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11704 kern/fshelp.c.
11705
11706 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11707
11708 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11709 (PAGE_OFFSET): New macro.
11710 (CRTC_ADDR_PORT): Likewise.
11711 (CRTC_DATA_PORT): Likewise.
11712 (START_ADDR_HIGH_REGISTER): Likewise.
11713 (START_ADDR_LOW_REGISTER): Likewise.
11714 (GRAPHICS_ADDR_PORT): Likewise.
11715 (GRAPHICS_DATA_PORT): Likewise.
11716 (READ_MAP_REGISTER): Likewise.
11717 (INPUT_STATUS1_REGISTER): Likewise.
11718 (INPUT_STATUS1_VERTR_BIT): Likewise.
11719 (page): New variable.
11720 (wait_vretrace): New function.
11721 (set_read_map): Likewise.
11722 (set_start_address): Likewise.
11723 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11724 the right page.
11725 (check_vga_mem): Take the page into account.
11726 (write_char): Likewise.
11727 (write_cursor): Likewise.
11728 (scroll_up): Likewise. Copy the page to the page that is not
11729 shown and switch between both pages.
11730 (grub_vga_putchar): Fix off by one error.
11731 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11732 account.
11733
11734 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11735
11736 Add support for iso9660 (including rockridge).
11737
11738 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11739 (iso9660_mod_SOURCES): New variable.
11740 (iso9660_mod_CFLAGS): Likewise.
11741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11742 * include/grub/fs.h (grub_iso9660_init): New prototype.
11743 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11744 * fs/iso9660.c: New file.
11745
11746 * include/grub/misc.h (grub_strncat): New prototype.
11747 * kern/misc.c (grub_strncat): New function.
11748
11749 * fs/hfs.c (grub_hfs_mount): Translate the error
11750 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11751 * fs/jfs.c (grub_jfs_mount): Likewise.
11752 * fs/ufs.c (grub_ufs_mount): Likewise.
11753
11754 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11755
11756 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11757 which initialized BAT registers.
11758 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11759 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11760 Move from here...
11761 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11762 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11763 ... to here.
11764 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11765 (grub_mapclaim): Likewise.
11766 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11767 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11768 hand.
11769
11770 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11771
11772 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11773 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11774 -ffreestanding and -msoft-float.
11775
11776 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11777
11778 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11779 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11780 set in grub_ieee1275_flags.
11781
11782 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11783
11784 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11785 prototype.
11786 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11787 grub_console_init first.
11788 Change the memory range used for grub_ieee1275_claim and
11789 grub_mm_init_region.
11790 Print an error message if the claim fails.
11791 Include <grub/misc.h>.
11792
11793 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11794
11795 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11796 Call grub_children_iterate for device nodes of type `scsi',
11797 `ide', or `ata'.
11798 (grub_ofdisk_open): Remove manual device alias resolution.
11799 Fix memory leak when device cannot be opened.
11800 * include/grub/powerpc/ieee1275/ieee1275.h
11801 (grub_children_iterate): New prototype.
11802 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11803 New function.
11804 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11805 Return -1 if args.size was -1.
11806
11807 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11808
11809 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11810 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11811 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11812 Open Firmware's memory for it; claim memory from _start to _end.
11813 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11814 (_end): New extern.
11815 (_start): Zero BSS from __bss_start to _end.
11816 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11817 New extern.
11818 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11819
11820 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11821
11822 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11823 -1 if args.base was -1.
11824
11825 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11826
11827 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11828 escape sequence instead of a literal ^L. Also call
11829 grub_ofconsole_gotoxy.
11830
11831 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11832
11833 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11834 void * arguments to grub_addr_t. All callers updated. Also make
11835 the `result' argument optional.
11836 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11837 All callers updated.
11838
11839 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11840
11841 * commands/ls.c (grub_ls_list_files): Use the string following the
11842 initial ')', if present, as the filesystem path.
11843 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11844
11845 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11846
11847 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11848
11849 Make the source code of the menu interface more readable.
11850
11851 * normal/menu.c: Include grub/mm.h.
11852 (TERM_WIDTH): New macro.
11853 (TERM_HEIGHT): Likewise.
11854 (TERM_INFO_HEIGHT): Likewise.
11855 (TERM_MARGIN): Likewise.
11856 (TERM_SCROLL_WIDTH): Likewise.
11857 (TERM_TOP_BORDER_Y): Likewise.
11858 (TERM_LEFT_BORDER_X): Likewise.
11859 (TERM_BORDER_WIDTH): Likewise.
11860 (TERM_MESSAGE_HEIGHT): Likewise.
11861 (TERM_BORDER_HEIGHT): Likewise.
11862 (TERM_NUM_ENTRIES): Likewise.
11863 (TERM_FIRST_ENTRY_Y): Likewise.
11864 (TERM_ENTRY_WIDTH): Likewise.
11865 (TERM_CURSOR_X): Likewise.
11866 (draw_border): Use macros instead of magic numbers.
11867 (print_entry): Likewise.
11868 (print_entries): Likewise.
11869 (run_menu): Likewise. Also, handle the key 'e'.
11870 (run_menu_entry): Ignore empty command lines.
11871 (print_message): Added a new argument EDIT. If EDIT is true,
11872 print a different message.
11873 (init_page): Likewise.
11874 (edit_menu_entry): New function. Not implemented yet.
11875
11876 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11877
11878 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11879 can be loaded from normal mode.
11880
11881 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11882 `multiboot.mod'.
11883 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11884 (multiboot_mod_CFLAGS): New variables.
11885 * loader/i386/pc/linux_normal.c: New file.
11886 * loader/i386/pc/multiboot_normal.c: Likewise.
11887
11888 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11889 attribute `unused'.
11890
11891 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11892 `fdiro' to read the mode information from instead of `diro'.
11893
11894 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11895 looking up a symlink.
11896
11897 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11898 macro.
11899 * normal/command.c (grub_command_execute): Don't parse the
11900 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11901 flags of the command.
11902
11903 * normal/menu.c (grub_menu_run): Fix typo.
11904
11905 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11906
11907 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11908
11909 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11910 `y + 1' instead of `y - 1'.
11911
11912 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11913
11914 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11915
11916 From Hollis Blanchard <hollis@penguinppc.org>:
11917 * kern/misc.c (memmove): New alias for grub_memmove.
11918 (memcmp): New alias for grub_memcmp.
11919 (memset): New alias for grub_memset.
11920 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11921 Change "int handle" to "grub_ieee1275_phandle_t handle".
11922 * include/grub/powerpc/ieee1275/ieee1275.h
11923 (grub_ieee1275_get_property): Likewise.
11924
11925 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11926
11927 Added normal mode command `chainloader' as module chain.mod, which
11928 depends on normal.mod and _chain.mod.
11929
11930 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11931 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11932 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11933 Deleted prototype.
11934 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11935 but arguments parsing moved to ...
11936 (grub_chainloader_cmd): ... here. New function.
11937 * include/grub/i386/pc/chainloader.h: New file.
11938 * loader/i386/pc/chainloader_normal.c: Likewise.
11939
11940 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11941
11942 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11943 (grub_mkimage_LDFLAGS): Likewise.
11944 (grub_emu_SOURCES): Likewise.
11945 (kernel_img_HEADERS): Added fshelp.h.
11946 * fs/ext2.c: Include <grub/fshelp.h>.
11947 (FILETYPE_REG): New macro.
11948 (FILETYPE_INO_REG): Likewise.
11949 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11950 Changed all users.
11951 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11952 all users.
11953 (grub_fshelp_node): New struct.
11954 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11955 to a pointer.
11956 (grub_ext2_get_file_block): Removed function.
11957 (grub_ext2_read_block): New function.
11958 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11959 This function was written.
11960 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11961 (grub_ext2_find_file): Removed function.
11962 (grub_ext2_read_symlink): New function.
11963 (grub_ext2_iterate_dir): Likewise.
11964 (grub_ext2_open): Rewritten.
11965 (grub_ext2_dir): Rewritten.
11966 * include/grub/fshelp.h: New file.
11967 * fs/fshelp.c: Likewise.
11968
11969 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11970
11971 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11972 (print_message): Add a missing newline.
11973 (run_menu): Added timeout support.
11974 (run_menu_entry): New local function.
11975 (grub_menu_run): Added support for booting.
11976
11977 * kern/loader.c (grub_loader_is_loaded): New function.
11978
11979 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11980 (grub_get_rtc): Exported.
11981
11982 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11983 (grub_get_rtc): Exported.
11984
11985 * include/grub/normal.h (struct grub_command_list): Remove
11986 constant from the member `command'.
11987
11988 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11989
11990 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11991
11992 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11993
11994 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11995
11996 Add support for the JFS filesystem.
11997
11998 * fs/jfs.c: New file.
11999 * include/grub/fs.h (grub_jfs_init): New prototype.
12000 (grub_jfs_fini): New prototype.
12001 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12002 (grub_emu_SOURCES): Likewise.
12003 (pkgdata_MODULES): Add jfs.mod.
12004 (jfs_mod_SOURCES): New variable.
12005 (jfs_mod_CFLAGS): Likewise.
12006 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12007 (grubof_SOURCES): Likewise.
12008 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12009
12010 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12011 endian to the host endian.
12012 (grub_fat_utf16_to_utf8): Move function from there...
12013 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12014 the endianness of the source string anymore.
12015 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12016
12017 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12018
12019 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12020 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12021 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12022 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12023
12024 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12025 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12026 for `node_found' and `it_dir'.
12027 (grub_hfs_dir): Add prototype for `dir_hook'.
12028
12029 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12030 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12031 and `indir32' to silence a gcc warning.
12032
12033 * include/grub/fs.h (grub_hfs_init): New prototype.
12034 (grub_hfs_fini): Likewise.
12035
12036
12037 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12038
12039 Each disk device has its own id now. This is useful to make use
12040 of multiple disk devices.
12041
12042 * include/grub/disk.h (grub_disk_dev_id): New enum.
12043 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12044 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12045
12046 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12047 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12048
12049 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12050 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12051
12052 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12053 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12054
12055 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12056 "id" which is used by the cache manager.
12057
12058 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12059 of just "GRUB".
12060
12061 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12062
12063 * fs/hfs.c: New file.
12064 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12065 (grub_emu_SOURCES): Likewise.
12066 (pkgdata_MODULES): Add hfs.mod.
12067 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12068 (grubof_SOURCES): Likewise.
12069 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12070
12071 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12072 * kern/misc.c (grub_strncasecmp): Add function.
12073
12074 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12075
12076 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12077 with parentheses.
12078
12079 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12080 (grub_ext2_dir): In case the directory entry type is unknown, read
12081 it from the inode.
12082
12083 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12084
12085 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12086 grub_load_linux instead of grub_rescue_cmd_linux as second
12087 argument of grub_rescue_register_command.
12088
12089 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12090
12091 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12092
12093 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12094 function.
12095 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12096 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12097 `loader/powerpc/ieee1275/linux.c',
12098 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12099 * include/grub/powerpc/ieee1275/ieee1275.h
12100 (grub_ieee1275_release): New prototype.
12101 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12102 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12103 normal, boot, linux and linux_normal.
12104 * loader/powerpc/ieee1275/linux.c: New file.
12105 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12106
12107 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12108
12109 * normal/arg.c (grub_arg_parse): Correct error handling after
12110 reallocating the argumentlist (check if `argl' is not null instead
12111 of checking if `args' is not null).
12112 * kern/mm.c (grub_realloc): Return the same pointer when using the
12113 same region, instead of returning the header address.
12114
12115 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12116
12117 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12118 one block instead of two when looking for the initial partition.
12119 (grub_partition_probe): Initialize the local variable `p' with 0.
12120 Use base 10 for the grub_strtoul call.
12121 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12122 need for one local variable.
12123 (grub_strtoul): Don't add the new value to `num', instead of that
12124 just assign it.
12125
12126 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12127
12128 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12129 (pxeboot_img_SOURCES): New variable.
12130 (pxeboot_img_ASFLAGS): Likewise.
12131 (pxeboot_img_LDFLAGS): Likewise.
12132 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12133 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12134 <lode_leroy@hotmail.com>.
12135
12136 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12137
12138 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12139 there was no input.
12140
12141 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12142
12143 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12144 the history buffer logic.
12145
12146 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12147
12148 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12149 (FILETYPE_INO_SYMLINK): New macros.
12150 (grub_ext2_find_file): Check if the node is a directory using the
12151 inode stat information instead of using the filetype in the
12152 dirent. Exclude the first character of an absolute symlink.
12153 (grub_ext2_dir): Mask out the filetype part of the mode member of
12154 the inode.
12155
12156 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12157
12158 Add support for UFS version 1 and 2. Add support for the minix
12159 filesystem version 1 and 2, both the variants with 14 and 30 long
12160 filenames.
12161
12162 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12163 fs/minix.c.
12164 (grub_emu_SOURCES): Likewise.
12165 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12166 (ufs_mod_SOURCES): New variable.
12167 (ufs_mod_CFLAGS): Likewise.
12168 (minix_mod_SOURCES): Likewise.
12169 (minix_mod_CFLAGS): Likewise.
12170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12171 fs/minix.c.
12172 (grubof_SOURCES): Likewise.
12173 * fs/ufs.c: New file.
12174 * fs/minix.c: New file.
12175 * include/grub/fs.h (grub_ufs_init): New prototype.
12176 (grub_ufs_fini): Likewise.
12177 (grub_minix_init): Likewise.
12178 (grub_minix_fini): Likewise.
12179 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12180 minix fs.
12181
12182 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12183
12184 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12185 commands/ls.c, commands/terminal.c, commands/boot.c,
12186 commands/cmp.c and commands/cat.c.
12187 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12188
12189 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12190 "env.h"
12191
12192 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12193
12194 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12195 and grub_, respectively. Because the conversion is trivial and
12196 mechanical, I omit the details here. Please refer to the CVS
12197 if you need more information.
12198
12199 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12200
12201 * include/pupa: Renamed to ...
12202 * include/grub: ... this.
12203 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12204 * util/i386/pc/grub-mkimage.c: ... this.
12205 * util/i386/pc/pupa-setup.c: Renamed to ...
12206 * util/i386/pc/grub-setup.c: ... this.
12207 * util/pupa-emu.c: Renamed to ...
12208 * util/grub-emu.c: ... this.
12209
12210 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12211
12212 Add support for the newworld apple macintosh (PPC). This has been
12213 tested on the powerbook 2000 only. It only adds support for
12214 generic ieee1275 functions, console and disk support. This should
12215 be easy to port to other architectures with support for Open
12216 Firmware.
12217
12218 * configure.ac: Accept the powerpc as host_cpu. In the case of
12219 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12220 specific tests are only executed while building for the i386.
12221 Inverse test for crosscompile.
12222 * genmk.rb (Utility): Allow assembler files.
12223 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12224 * conf/powerpc-ieee1275.rmk: New file.
12225 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12226 * disk/powerpc/ieee1275/partition.c: Likewise.
12227 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12228 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12229 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12230 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12231 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12232 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12233 * include/pupa/powerpc/ieee1275/loader.h
12234 * include/pupa/powerpc/setjmp.h: Likewise.
12235 * include/pupa/powerpc/types.h: Likewise.
12236 * kern/powerpc/ieee1275/init.c: Likewise.
12237 * kern/powerpc/ieee1275/openfw.c: Likewise.
12238 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12239
12240 These files were written by Johan Rydberg
12241 (jrydberg@night.trouble.net) and I only modified them slightly.
12242
12243 * boot/powerpc/ieee1275/cmain.c: New file.
12244 * boot/powerpc/ieee1275/crt0.S: Likewise.
12245 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12246 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12247
12248 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12249
12250 * Makefile.in: Update copyright.
12251 * genmodsrc.sh: Likewise.
12252 * gensymlist.sh: Likewise.
12253 * term/i386/pc/vga.c: Indent correctly.
12254
12255 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12256 bugreporting address.
12257 * util/i386/pc/pupa-setup.c (usage): Likewise,
12258 (main): Call pupa_ext2_init and pupa_ext2_fini.
12259
12260 * fs/fat.c (log2): Renamed to ...
12261 (fat_log2): ... this.
12262 All callers changed.
12263 * kern/misc.c (memcpy): Alias to pupa_memmove.
12264 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12265 lvalue cast.
12266 * util/console.c (pupa_ncurses_fini): Return 0.
12267
12268 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12269 Move fail label here.
12270 [__GNU__]: Don't warn when using stat.
12271 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12272 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12273 long int. Use strtol instead of strtoul.
12274
12275 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12276
12277 * commands/boot.c: New file.
12278 * commands/cat.c: Likewise.
12279 * commands/cmp.c: Likewise.
12280 * commands/ls.c: Likewise.
12281 * commands/terminal.c: Likewise.
12282 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12283 (pupa_register_command): Changed interface to match the new
12284 argument parser.
12285 (pupa_command_execute): Changed (almost rewritten) so it uses
12286 pupa_split_command. Added support for setting variables using the
12287 syntax `foo=bar'.
12288 (rescue_command): Changed to work with the new argument parser.
12289 (terminal_command): Moved from here to commands/terminal.c.
12290 (set_command): New function.
12291 (unset_command): New function.
12292 (insmod_command): New function.
12293 (rmmod_command): New function.
12294 (lsmod_command): New function.
12295 (pupa_command_init): Don't initialize the command terminal
12296 anymore. Initialize the commands set, unset, insmod, rmmod and
12297 lsmod.
12298 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12299 (kernel_img_HEADERS): Add arg.h and env.h.
12300 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12301 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12302 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12303 normal/arg.c.
12304 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12305 terminal.mod.
12306 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12307 (boot_mod_SOURCES): New variable.
12308 (terminal_mod_SOURCES): Likewise.
12309 (ls_mod_SOURCES): Likewise.
12310 (cmp_mod_SOURCES): Likewise.
12311 (cat_mod_SOURCES): Likewise.
12312
12313 * normal/arg.c: New file.
12314 * kern/env.c: Likewise.
12315 * include/pupa/arg.h: Likewise.
12316 * include/pupa/env.h: Likewise.
12317 * font/manager.c (font_command): Changed to match argument parsing
12318 interface changes.
12319 (PUPA_MOD_INIT): Likewise.
12320 * hello/hello.c (pupa_cmd_hello): Likewise.
12321 (PUPA_MOD_INIT): Likewise.
12322 * include/pupa/disk.h: Include <pupa/device.h>.
12323 (pupa_print_partinfo): New prototype.
12324 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12325 (pupa_dl_get_prefix): Likewise.
12326 * include/pupa/misc.h: Include <pupa/err.h>.
12327 (pupa_isgraph): New prototype.
12328 (pupa_isdigit): Likewise.
12329 (pupa_split_cmdline): Likewise.
12330 * include/pupa/normal.h: Include <pupa/arg.h>.
12331 (pupa_command): Changed the prototype of the member `func' to
12332 match the argument parsing interface. Added member `options'.
12333 (pupa_register_command): Updated to match function.
12334 (pupa_arg_parse): New prototype.
12335 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12336 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12337 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12338 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12339 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12340 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12341 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12342 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12343 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12344 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12345 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12346 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12347 * kern/disk.c: Include <pupa/file.h>.
12348 (pupa_print_partinfo): New function.
12349 * kern/dl.c: Include <pupa/env.h>.
12350 (pupa_dl_dir): Variable removed.
12351 (pupa_dl_load): Use the environment variable `prefix' instead of
12352 the variable pupa_dl_dir.
12353 (pupa_dl_set_prefix): Function removed.
12354 (pupa_dl_get_prefix): Likewise.
12355 * kern/i386/pc/init.c: Include <pupa/env.h>.
12356 (pupa_machine_init): Use the environment variable `prefix' instead of
12357 using pupa_dl_set_prefix to set the prefix.
12358 * kern/main.c: Include <pupa/env.h>.
12359 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12360 using pupa_dl_get_prefix to get the prefix.
12361 * kern/misc.c: Include <pupa/env.h>.
12362 (pupa_isdigit): New function.
12363 (pupa_isgraph): Likewise.
12364 (pupa_ftoa): Likewise.
12365 (pupa_vsprintf): Added support for printing values of the type
12366 `double'. Make it possible to format variable output when using
12367 formatting like `%1.2%f'.
12368 (pupa_split_cmdline): New function.
12369 * kern/rescue.c: Include <pupa/env.h>.
12370 (next_word): Removed function.
12371 (pupa_rescue_cmd_prefix): Likewise.
12372 (pupa_rescue_cmd_set): New function.
12373 (pupa_rescue_cmd_unset): New function.
12374 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12375 split the command line instead of splitting it here. Added
12376 support for setting variables using the syntax `foo=bar'. Don't
12377 initialize the prefix command anymore. Initialized the set and
12378 unset commands.
12379 * normal/cmdline.c: Include <pupa/env.h>.
12380 (pupa_tab_complete): Added prototypes for print_simple_completion,
12381 print_partition_completion, add_completion, iterate_commands,
12382 iterate_dev, iterate_part and iterate_dir. Moved code to print
12383 partition information from here to kern/disk.c.
12384 (pupa_cmdline_run): Don't check if the function exists anymore.
12385 * normal/main.c: Include <pupa/env.h>.
12386 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12387 instead of using pupa_dl_get_prefix to get the prefix.
12388 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12389 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12390 warning.
12391 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12392 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12393 ((unused))' to silence a gcc warning.
12394 (pupa_vga_setcolor): Likewise.
12395 (debug_command): Changed to match argument parsing
12396 interface changes.
12397 * util/pupa-emu.c: Include <pupa/env.h>.
12398 (options): Added 0's for unused fields to silence a gcc warning.
12399 (argp): Likewise.
12400 (main): Use the environment variable `prefix' instead of using
12401 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12402 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12403 and terminal.
12404
12405 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12406 * util/misc.c: Include <malloc.h>.
12407 (pupa_malloc): Rewritten so errors are correctly reported.
12408 (pupa_realloc): Likewise.
12409 (pupa_memalign): Likewise.
12410 (pupa_mm_init_region): Declare unused variables with
12411 `__attribute__ ((unused))' to silence a gcc warning.
12412 * normal/i386/setjmp.S: Remove tab at the end of the file to
12413 silence a gcc warning.
12414 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12415 variables with `__attribute__ ((unused))' to silence a gcc
12416 warning.
12417 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12418 local variable i unsigned to silence a gcc warning.
12419
12420 * kern/term.c: Include <pupa/misc.h>.
12421 (pupa_more_lines): New variable.
12422 (pupa_more): Likewise.
12423 (pupa_putcode): When the pager is active pause at the end of every
12424 screen.
12425 (pupa_set_more): New function.
12426 * include/pupa/term.h (pupa_set_more): New prototype.
12427
12428
12429 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12430
12431 Now this project is GRUB 2 rather than PUPA. The location of
12432 the CVS repository was moved to GRUB's.
12433
12434 * configure.ac: Use bug-grub as the reporting address.
12435 Use GRUB instead of PUPA.
12436 Change the version number to 1.90.
12437
12438 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12439
12440 * genkernsyms.sh: Updated copyright information.
12441 * genmk.rb: Likewise.
12442 * genmodsrc.sh: Likewise.
12443 * gensymlist.sh: Likewise.
12444 * boot/i386/pc/boot.S: Likewise.
12445 * boot/i386/pc/diskboot.S: Likewise.
12446 * disk/i386/pc/biosdisk.c: Likewise.
12447 * disk/i386/pc/partition.c: Likewise.
12448 * font/manager.c: Likewise.
12449 * fs/ext2.c: Likewise.
12450 * fs/fat.c: Likewise.
12451 * include/pupa/boot.h: Likewise.
12452 * include/pupa/device.h: Likewise.
12453 * include/pupa/disk.h: Likewise.
12454 * include/pupa/dl.h: Likewise.
12455 * include/pupa/elf.h: Likewise.
12456 * include/pupa/err.h: Likewise.
12457 * include/pupa/file.h: Likewise.
12458 * include/pupa/font.h: Likewise.
12459 * include/pupa/fs.h: Likewise.
12460 * include/pupa/kernel.h: Likewise.
12461 * include/pupa/loader.h: Likewise.
12462 * include/pupa/misc.h: Likewise.
12463 * include/pupa/mm.h: Likewise.
12464 * include/pupa/net.h: Likewise.
12465 * include/pupa/normal.h: Likewise.
12466 * include/pupa/rescue.h: Likewise.
12467 * include/pupa/setjmp.h: Likewise.
12468 * include/pupa/symbol.h: Likewise.
12469 * include/pupa/term.h: Likewise.
12470 * include/pupa/types.h: Likewise.
12471 * include/pupa/i386/setjmp.h: Likewise.
12472 * include/pupa/i386/types.h: Likewise.
12473 * include/pupa/i386/pc/biosdisk.h: Likewise.
12474 * include/pupa/i386/pc/boot.h: Likewise.
12475 * include/pupa/i386/pc/console.h: Likewise.
12476 * include/pupa/i386/pc/init.h: Likewise.
12477 * include/pupa/i386/pc/kernel.h: Likewise.
12478 * include/pupa/i386/pc/linux.h: Likewise.
12479 * include/pupa/i386/pc/loader.h: Likewise.
12480 * include/pupa/i386/pc/memory.h: Likewise.
12481 * include/pupa/i386/pc/multiboot.h: Likewise.
12482 * include/pupa/i386/pc/partition.h: Likewise.
12483 * include/pupa/i386/pc/time.h: Likewise.
12484 * include/pupa/i386/pc/vga.h: Likewise.
12485 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12486 * include/pupa/util/getroot.h: Likewise.
12487 * include/pupa/util/misc.h: Likewise.
12488 * include/pupa/util/resolve.h: Likewise.
12489 * kern/device.c: Likewise.
12490 * kern/disk.c: Likewise.
12491 * kern/dl.c: Likewise.
12492 * kern/err.c: Likewise.
12493 * kern/file.c: Likewise.
12494 * kern/fs.c: Likewise.
12495 * kern/loader.c: Likewise.
12496 * kern/main.c: Likewise.
12497 * kern/misc.c: Likewise.
12498 * kern/mm.c: Likewise.
12499 * kern/rescue.c: Likewise.
12500 * kern/term.c: Likewise.
12501 * kern/i386/dl.c: Likewise.
12502 * kern/i386/pc/init.c: Likewise.
12503 * kern/i386/pc/lzo1x.S: Likewise.
12504 * kern/i386/pc/startup.S: Likewise.
12505 * loader/i386/pc/chainloader.c: Likewise.
12506 * loader/i386/pc/linux.c: Likewise.
12507 * loader/i386/pc/multiboot.c: Likewise.
12508 * normal/cmdline.c: Likewise.
12509 * normal/command.c: Likewise.
12510 * normal/main.c: Likewise.
12511 * normal/menu.c: Likewise.
12512 * normal/i386/setjmp.S: Likewise.
12513 * term/i386/pc/console.c: Likewise.
12514 * term/i386/pc/vga.c: Likewise.
12515 * util/console.c: Likewise.
12516 * util/genmoddep.c: Likewise.
12517 * util/misc.c: Likewise.
12518 * util/pupa-emu.c: Likewise.
12519 * util/resolve.c: Likewise.
12520 * util/unifont2pff.rb: Likewise.
12521 * util/i386/pc/biosdisk.c: Likewise.
12522 * util/i386/pc/getroot.c: Likewise.
12523 * util/i386/pc/pupa-mkimage.c: Likewise.
12524 * util/i386/pc/pupa-setup.c: Likewise.
12525
12526 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12527
12528 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12529 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12530 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12531 reading and reset it after reading.
12532 (pupa_ext2_close): Return PUPA_ERR_NONE.
12533
12534 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12535 Correct value.
12536 (struct linux_kernel_header): Add kernel_version and
12537 initrd_addr_max.
12538 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12539 pupa_file_read succeeds.
12540 (pupa_rescue_cmd_initrd): Implement.
12541
12542 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12543
12544 * fs/ext2.c (pupa_ext2_label): New function.
12545 (pupa_ext2_fs): Added label.
12546 * fs/fat.c (pupa_fat_label): New function.
12547 (pupa_fat_fs): Added label.
12548 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12549
12550 * kern/misc.c (pupa_strndup): New function.
12551 * include/pupa/misc.h (pupa_strndup): New prototype.
12552
12553 * include/pupa/normal.h: Include <pupa/err.h>.
12554 (pupa_set_history): New prototype.
12555 (pupa_iterate_commands): New prototype.
12556 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12557 <pupa/disk.h>, <pupa/file.h>.
12558 (hist_size): New variable.
12559 (hist_lines): Likewise.
12560 (hist_end): Likewise.
12561 (hist_used): Likewise.
12562 (pupa_set_history): New function.
12563 (pupa_history_get): Likewise.
12564 (pupa_history_add): Likewise.
12565 (pupa_history_replace): Likewise.
12566 (pupa_tab_complete): Likewise.
12567 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12568 completion shows partitionnames while completing partitions, this
12569 feature was suggested by Jeff Bailey.
12570 * normal/command.c (pupa_iterate_commands): New function.
12571 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12572 (pupa_normal_init): Initialize history buffer.
12573 (PUPA_MOD_INIT): Likewise.
12574 (pupa_normal_fini): Free the history buffer.
12575 (PUPA_MOD_FINI): Likewise.
12576
12577 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12578 key.
12579
12580 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12581 * configure.ac [i386]: Check for regparam bug.
12582 (NESTED_FUNC_ATTR) [! i386]: Defined.
12583
12584 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12585
12586 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12587 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12588 (pupa_emu_SOURCES): New variable.
12589 (pupa_emu_LDFLAGS): Likewise.
12590 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12591 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12592 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12593 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12594 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12595 (pupa_jmp_buf): New typedef.
12596 (pupa_setjmp) [PUPA_UTIL]: New macro.
12597 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12598 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12599 (pupa_refresh): New prototype.
12600 * include/pupa/util/getroot.h: New file.
12601 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12602 it.
12603 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12604 (pupa_rescue_cmd_cat): Likewise.
12605 (pupa_rescue_cmd_ls): Likewise.
12606 (pupa_rescue_cmd_testload): Likewise.
12607 (pupa_rescue_cmd_lsmod): Likewise.
12608 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12609 * normal/menu.c (run_menu): Likewise.
12610 * kern/term.c (pupa_cls): Likewise.
12611 (pupa_refresh): New function.
12612 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12613 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12614 * util/console.c: New file.
12615
12616 * util/i386/pc/getroot.c: New file.
12617 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12618 (pupa_putchar): New function.
12619 (pupa_refresh): Likewise.
12620 (xgetcwd): Function moved to ...
12621 (strip_extra_slashes): Likewise.
12622 (get_prefix): Likewise.
12623 * util/i386/pc/getroot.c: ... here.
12624 (find_root_device): Function moved and renamed to...
12625 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12626 Changed all callers.
12627 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12628 and renamed to...
12629 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12630 Changed all callers.
12631 * util/misc.c (pupa_memalign): New function.
12632 (pupa_mm_init_region): Likewise.
12633 (pupa_register_exported_symbols): Likewise.
12634 (pupa_putchar): Function removed.
12635 * util/pupa-emu.c: New file.
12636
12637 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12638
12639 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12640 (_multiboot_mod_SOURCES): New variable.
12641 (_multiboot_mod_CFLAGS): Likewise.
12642 * loader/i386/pc/multiboot.c: New file.
12643 * include/pupa/i386/pc/multiboot.h: Likewise.
12644 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12645 (pupa_multiboot_real_boot): New function.
12646 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12647 (pupa_multiboot_real_boot): New prototype.
12648 (pupa_rescue_cmd_multiboot): Likewise
12649 (pupa_rescue_cmd_module): Likewise.
12650
12651 * kern/loader.c (pupa_loader_set): Continue when
12652 pupa_loader_unload_func() fails.
12653 (pupa_loader_unset): New function.
12654 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12655
12656 * kern/misc.c (pupa_stpcpy): New function.
12657 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12658
12659 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12660
12661 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12662 for available extensions.
12663
12664 * include/pupa/i386/pc/time.h: New file.
12665 * kern/disk.c: Include <pupa/machine/time.h>.
12666 (PUPA_CACHE_TIMEOUT): New macro.
12667 (pupa_last_time): New variable.
12668 (pupa_disk_open): Flush the cache when there was a timeout.
12669 (pupa_disk_close): Reset the timer.
12670 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12671 pupa_currticks.
12672 * util/misc.c: Include <sys/times.h>
12673 (pupa_get_rtc): New function.
12674
12675 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12676
12677 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12678 as blocks.
12679 (pupa_ext2_get_file_block): Use blocks member.
12680
12681 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12682 first block. Return -1 instead of pupa_errno on error.
12683
12684 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12685
12686 * README: In the pupa-mkimage example use _chain instead of chain
12687 and ext2 instead of fat.
12688 * TODO: Replace ext2fs with jfs as an example. Add an item for
12689 adding journal playback for ext2fs.
12690 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12691 (pkgdata_MODULES): Added ext2.mod.
12692 (ext2_mod_SOURCES): New variable.
12693 (ext2_mod_CFLAGS): Likewise.
12694 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12695 * include/pupa/misc.h (pupa_strncpy): New prototype.
12696 (pupa_strcat): Likewise.
12697 (pupa_strncmp): Likewise.
12698 * kern/misc.c (pupa_strcat): Enable function.
12699 (pupa_strncpy): New function.
12700 (pupa_strncmp): Likewise.
12701 * fs/ext2.c: New file.
12702
12703 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12704 when the read failed before retrying.
12705 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12706 (_FILE_OFFSET_BITS): Likewise.
12707 * configure.ac: Added AC_SYS_LARGEFILE.
12708
12709 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12710
12711 * genmk.rb (PModule#rule): Make sure to get only symbol names
12712 from the output of nm.
12713 Reported by Robert Millan <zeratul2@wanadoo.es>.
12714
12715 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12716
12717 I forgot to check in these changes for a long time. This adds
12718 incomplete support for VGA console, and this is still very
12719 buggy. Also, a lot of consideration is required for I18N,
12720 UNICODE, and VGA font issues. Therefore, assume that this is
12721 such that "better than nothing".
12722
12723 * font/manager.c: New file.
12724 * include/pupa/font.h: Likewise.
12725 * include/pupa/i386/pc/vga.h: Likewise.
12726 * term/i386/pc/vga.c: Likewise.
12727 * util/unifont2pff.rb: Likewise.
12728
12729 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12730 (pkgdata_MODULES): Added vga.mod and font.mod.
12731 (vga_mod_SOURCES): New variables.
12732 (vga_mod_CFLAGS): Likewise.
12733 (font_mod_SOURCES): Likewise.
12734 (font_mod_CFLAGS): Likewise.
12735
12736 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12737
12738 * include/pupa/term.h: Include pupa/err.h.
12739 (struct pupa_term): Added init and fini.
12740 Changed the argument of putchar to pupa_uint32_t.
12741
12742 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12743 (pupa_console_real_putchar): New prototype.
12744 (pupa_console_putchar): Removed.
12745 (pupa_console_checkkey): Exported.
12746 (pupa_console_getkey): Likewise.
12747
12748 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12749 characters.
12750
12751 * kern/term.c (pupa_term_set_current): Rewritten.
12752 (pupa_putchar): Likewise.
12753 (pupa_putcode): New function.
12754
12755 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12756 (pupa_console_real_putchar): ... this.
12757 (pupa_vga_set_mode): New function.
12758 (pupa_vga_get_font): Likewise.
12759
12760 * normal/command.c: Include pupa/term.h.
12761 (terminal_command): New function.
12762 (pupa_command_init): Register the command "terminal".
12763
12764 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12765 (DISP_UP): Likewise.
12766 (DISP_RIGHT): Likewise.
12767 (DISP_DOWN): Likewise.
12768 (DISP_HLINE): Likewise.
12769 (DISP_VLINE): Likewise.
12770 (DISP_UL): Likewise.
12771 (DISP_UR): Likewise.
12772 (DISP_LL): Likewise.
12773 (DISP_LR): Likewise.
12774
12775 * term/i386/pc/console.c (pupa_console_putchar): New function.
12776
12777 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12778
12779 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12780 FIX. Reverse the path_list.
12781
12782 * include/pupa/normal.h: Export pupa_register_command and
12783 pupa_unregister_command.
12784
12785 * hello/hello.c (pupa_cmd_hello): New module.
12786 * conf/i386-pc.rmk: Added hello.mod.
12787
12788 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12789
12790 * kern/i386/pc/lzo1x.S: New file.
12791
12792 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12793 (compress_kernel): New variable.
12794 (generate_image): Heavily modified to support compressing a
12795 large part of the core image.
12796
12797 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12798 leak.
12799 (pupa_util_load_image): New function.
12800
12801 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12802 (pupa_compressed_size): New variable.
12803 (codestart): Enable Gate A20 here.
12804 Decompress the compressed part of the core image.
12805 Rearrange the code to put functions and variables which are
12806 required for initialization in the non-compressed part.
12807 Include lzo1x.S.
12808
12809 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12810 here.
12811
12812 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12813
12814 * include/pupa/i386/pc/kernel.h
12815 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12816 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12817 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12818 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12819 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12820
12821 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12822
12823 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12824 (Utility#rule): Likewise.
12825
12826 * configure.ac: Check if LZO is available.
12827
12828 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12829
12830 * include/pupa/normal.h: New file.
12831 * include/pupa/setjmp.h: Likewise.
12832 * include/pupa/i386/setjmp.h: Likewise.
12833 * normal/cmdline.c: Likewise.
12834 * normal/command.c: Likewise.
12835 * normal/main.c: Likewise.
12836 * normal/menu.c: Likewise.
12837 * normal/i386/setjmp.S: Likewise.
12838
12839 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12840 (pupa_rescue_cmd_initrd): Likewise.
12841
12842 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12843 Likewise.
12844
12845 * kern/i386/pc/startup.S (translation_table): New variable.
12846 (translate_keycode): New function.
12847 (pupa_console_getkey): Call translate_keycode.
12848
12849 * kern/rescue.c (attempt_normal_mode): New function.
12850 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12851 it failed, print a message.
12852
12853 * kern/mm.c (pupa_real_malloc): Print more information when a
12854 free magic is broken.
12855 (pupa_free): If the first free header is not free actually, set
12856 it to P.
12857
12858 * kern/main.c (pupa_load_normal_mode): Just load the module
12859 "normal".
12860 (pupa_main): Don't print the message
12861 "Entering into rescue mode..." here.
12862
12863 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12864 Declared.
12865 (pupa_rescue_cmd_initrd): Likewise.
12866 (pupa_rescue_cmd_initrd): Likewise.
12867
12868 * include/pupa/symbol.h (FUNCTION): Specify the type.
12869 (VARIABLE): Likewise.
12870
12871 * include/pupa/err.h (pupa_err_t): Added
12872 PUPA_ERR_UNKNOWN_COMMAND.
12873
12874 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12875 (pupa_dl_get_prefix): Likewise.
12876
12877 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12878 Added _chain.mod and _linux.mod instead of chain.mod and
12879 linux.mod.
12880 (chain_mod_SOURCES): Renamed to ...
12881 (_chain_mod_SOURCES): ... this.
12882 (chain_mod_CFLAGS): Renamed to ...
12883 (_chain_mod_CFLAGS): ... this.
12884 (linux_mod_SOURCES): Renamed to ...
12885 (_linux_mod_SOURCES): ... this.
12886 (linux_mod_CFLAGS): Renamed to ...
12887 (_linux_mod_CFLAGS): ... this.
12888 (normal_mod_SOURCES): New variable.
12889 (normal_mod_CFLAGS): Likewise.
12890 (normal_mod_ASFLAGS): Likewise.
12891
12892 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12893
12894 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12895 possible.
12896
12897 * kern/dl.c (pupa_dl_ref): Refer depending modules
12898 recursively.
12899 (pupa_dl_unref): Unrefer depending modules recursively.
12900 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12901 a module is unloaded before one depending on that module is
12902 unloaded.
12903 (pupa_dl_unload): Unload depending modules explicitly,
12904 if possible.
12905
12906 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12907
12908 * include/pupa/i386/pc/linux.h: New file.
12909 * loader/i386/pc/linux.c: Likewise.
12910
12911 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12912 Removed.
12913 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12914 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12915 of PUPA_CHAINLOADER_BOOT_SECTOR.
12916
12917 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12918 (pupa_linux_prot_size): New variable.
12919 (pupa_linux_tmp_addr): Likewise.
12920 (pupa_linux_real_addr): Likewise.
12921 (pupa_linux_boot_zimage): New function.
12922 (pupa_linux_boot_bzimage): Likewise.
12923
12924 * kern/i386/pc/init.c (struct mem_region): New structure.
12925 (MAX_REGIONS): New macro.
12926 (mem_regions): New variable.
12927 (num_regions): Likewise.
12928 (pupa_os_area_addr): Likewise.
12929 (pupa_os_area_size): Likewise.
12930 (pupa_lower_mem): Likewise.
12931 (pupa_upper_mem): Likewise.
12932 (add_mem_region): New function.
12933 (compact_mem_regions): Likewise.
12934 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12935 the size of the conventional memory and that of so-called upper
12936 memory (before the first memory hole).
12937 Instead of adding each found region to free memory, use
12938 add_mem_region and add them after removing overlaps.
12939 Also, add only 1/4 of the upper memory to free memory. The rest
12940 is used for loading OS images. Maybe this is ad hoc, but this
12941 makes it much easier to relocate OS images when booting.
12942
12943 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12944 (pupa_enter_rescue_mode): Don't register initrd and module.
12945
12946 * kern/mm.c: Include pupa/dl.h.
12947
12948 * kern/main.c: Include pupa/file.h and pupa/device.h.
12949
12950 * kern/loader.c (pupa_loader_load_module_func): Removed.
12951 (pupa_loader_load_module): Likewise.
12952
12953 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12954 ``.o''.
12955
12956 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12957 (pupa_linux_tmp_addr): Likewise.
12958 (pupa_linux_real_addr): Likewise.
12959 (pupa_linux_boot_zimage): Likewise.
12960 (pupa_linux_boot_bzimage): Likewise.
12961
12962 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12963 (pupa_upper_mem): Likewise.
12964 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12965 module is too dangerous.
12966
12967 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12968 (pupa_os_area_size): Likewise.
12969 (pupa_loader_set): Remove the first argument. Loader doesn't
12970 manage modules or initrd any longer.
12971 (pupa_loader_load_module): Removed.
12972
12973 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12974 (linux_mod_SOURCES): New variable.
12975 (linux_mod_CFLAGS): Likewise.
12976
12977 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12978
12979 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12980 the length of a blocklist correctly.
12981
12982 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12983 Use ioctl only if the OS file is a block device.
12984 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12985 not very useful for normal files.
12986
12987 * kern/main.c (pupa_set_root_dev): New function.
12988 (pupa_load_normal_mode): Likewise.
12989 (pupa_main): Call those above.
12990
12991 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12992 pupa_uint16_t.
12993
12994 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12995
12996 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12997
12998 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12999 (setup): Configure the installed partition information and the
13000 dl prefix.
13001
13002 * loader/i386/pc/chainloader.c (my_mod): New variable.
13003 (pupa_chainloader_unload): New function.
13004 (pupa_rescue_cmd_chainloader): Refer itself.
13005 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13006
13007 * kern/i386/pc/startup.S (install_partition): Removed.
13008 (version_string): Likewise.
13009 (config_file): Likewise.
13010 (pupa_install_dos_part): New variable.
13011 (pupa_install_bsd_part): Likewise.
13012 (pupa_prefix): Likewise.
13013 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13014
13015 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13016 and pupa/misc.h.
13017 (make_install_device): New function.
13018 (pupa_machine_init): Set the dl prefix.
13019
13020 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13021 (buf): Renamed to ...
13022 (linebuf): ... this.
13023 (pupa_rescue_cmd_prefix): New function.
13024 (pupa_rescue_cmd_insmod): Likewise.
13025 (pupa_rescue_cmd_rmmod): Likewise.
13026 (pupa_rescue_cmd_lsmod): Likewise.
13027 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13028 rmmod and lsmod.
13029
13030 * kern/mm.c (pupa_memalign): If failed even after invalidating
13031 disk caches, unload unneeded modules and retry.
13032
13033 * kern/misc.c (pupa_memmove): New function.
13034 (pupa_memcpy): Removed.
13035 (pupa_strcpy): New function.
13036 (pupa_itoa): Made static.
13037
13038 * kern/dl.c (pupa_dl_iterate): New function.
13039 (pupa_dl_ref): Likewise.
13040 (pupa_dl_unref): Likewise.
13041 (pupa_dl_unload): Return if succeeded or not.
13042 (pupa_dl_unload_unneeded): New function.
13043 (pupa_dl_unload_all): Likewise.
13044 (pupa_dl_init): Renamed to ...
13045 (pupa_dl_set_prefix): ... this.
13046 (pupa_dl_get_prefix): New function.
13047
13048 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13049 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13050 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13051 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13052 (pupa_install_dos_part): Declared.
13053 (pupa_install_bsd_part): Likewise.
13054 (pupa_prefix): Likewise.
13055 (pupa_boot_drive): Likewise.
13056
13057 * include/pupa/types.h: Fix a typo.
13058
13059 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13060 pupa_memmove.
13061 (pupa_memmove): Declared.
13062 (pupa_strcpy): Likewise.
13063
13064 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13065 pupa_mod_init takes one argument, its own module.
13066 (pupa_dl_unload_unneeded): Declared.
13067 (pupa_dl_unload_all): Likewise.
13068 (pupa_dl_ref): Likewise.
13069 (pupa_dl_unref): Likewise.
13070 (pupa_dl_iterate): Likewise.
13071 (pupa_dl_init): Renamed to ...
13072 (pupa_dl_set_prefix): ... this.
13073 (pupa_dl_get_prefix): Declared.
13074
13075 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13076 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13077 unloaded.
13078 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13079 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13080
13081 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13082 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13083
13084 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13085
13086 * util/i386/pc/pupa-setup.c (setup): Define the internal
13087 function find_first_partition_start at the top level, because GCC
13088 3.0.x cannot compile internal functions in deeper scopes
13089 correctly.
13090 (find_root_device): Use lstat instead of stat.
13091 Don't follow symbolic links.
13092 Fix the path-constructing code.
13093
13094 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13095 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13096 by a BLKGETSIZE ioctl first, because block devices don't fill
13097 the member st_mode of the structure stat on Linux.
13098 [__linux__] (linux_find_partition): Use a temporary buffer
13099 REAL_DEV for the working space. Copy it to DEV before returning.
13100 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13101 buffer cache consistent.
13102 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13103 strncmp. The previous value was merely wrong.
13104 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13105
13106 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13107 FAT size is 12. The previous value was merely wrong.
13108
13109 * kern/main.c (pupa_main): Don't split the starting message from
13110 newlines.
13111
13112 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13113 LF, because BIOS goes crazy about character attributes in this
13114 case.
13115
13116 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13117
13118 * include/i386/pc/util/biosdisk.h: New file.
13119 * util/i386/pc/biosdisk.c: Likewise.
13120 * util/i386/pc/pupa-setup.c: Likewise.
13121
13122 * Makefile.in (INCLUDE_DISTFILES): Added
13123 include/pupa/i386/pc/util/biosdisk.h.
13124 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13125 directory util/i386/pc.
13126 (install-local): Added a rule for sbin_UTILITIES.
13127 (uninstall): Likewise.
13128
13129 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13130
13131 * util/misc.c (xrealloc): New function.
13132 (pupa_malloc): Likewise.
13133 (pupa_free): Likewise.
13134 (pupa_realloc): Likewise.
13135 (pupa_stop): Likewise.
13136 (pupa_putchar): Likewise.
13137
13138 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13139
13140 * include/pupa/util/misc.h (xrealloc): Declared.
13141
13142 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13143 macro.
13144 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13145 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13146
13147 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13148 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13149
13150 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13151 way should be implemented.
13152 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13153
13154 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13155 the size of NAME for safety.
13156 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13157 0x88.
13158
13159 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13160 (pupa_setup_SOURCES): Likewise.
13161
13162 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13163
13164 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13165
13166 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13167 bunch of pushl's from pusha, because this destroys the return
13168 value.
13169
13170 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13171
13172 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13173 This means that any missing prototypes could be fatal. Also, you
13174 must take care when writing assembly code. See the comments at
13175 the beginning of startup.S, for more details.
13176
13177 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13178 compilation mechanism.
13179 (pupa_chainloader_real_boot): Likewise.
13180 (pupa_biosdisk_rw_int13_extensions): Likewise.
13181 (pupa_biosdisk_rw_standard): Likewise.
13182 (pupa_biosdisk_check_int13_extensions): Likewise.
13183 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13184 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13185 (pupa_get_memsize): Likewise.
13186 (pupa_get_mmap_entry): Likewise.
13187 (pupa_console_putchar): Likewise.
13188 (pupa_console_setcursor): Likewise.
13189 (pupa_getrtsecs): Use pushl instead of push.
13190
13191 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13192 memory instead of the stack for a mmap entry, because some
13193 BIOSes may ignore the maximum size and overflow.
13194
13195 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13196
13197 * genmk.rb (PModule#rule): Compile automatically generated
13198 sources with module-specific CFLAGS as well as other sources.
13199
13200 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13201
13202 * configure.ac: Check ld.
13203 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13204 respectively, before checking endianness and sizes.
13205
13206 * Makefile.in (LD): New variable.
13207
13208 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13209
13210 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13211
13212 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13213
13214 * Changelog: New file.
13215