1. 22 Sep, 2014 1 commit
  2. 20 Jan, 2013 1 commit
    • Colin Watson's avatar
      Remove nested functions from device iterators. · 25239370
      Colin Watson authored
      * include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
      (grub_arc_iterate_devs): Add hook_data argument.
      * include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
      (struct grub_ata_dev.iterate): Add hook_data argument.
      * include/grub/device.h (grub_device_iterate_hook_t): New type.
      (grub_device_iterate): Add hook_data argument.
      * include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
      (struct grub_disk_dev.iterate): Add hook_data argument.
      (grub_disk_dev_iterate): Likewise.
      * include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
      Likewise.
      * include/grub/msdos_partition.h (grub_partition_msdos_iterate):
      Likewise.
      * include/grub/partition.h (grub_partition_iterate_hook_t): New
      type.
      (struct grub_partition_map.iterate): Add hook_data argument.
      (grub_partition_iterate): Likewise.
      * include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
      (struct grub_scsi_dev.iterate): Add hook_data argument.
      
      Update all callers.
      25239370
  3. 22 May, 2012 1 commit
  4. 26 Feb, 2012 1 commit
  5. 10 Feb, 2012 1 commit
  6. 08 Feb, 2012 1 commit
  7. 29 Jan, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Merge common RAID and LVM logic to an abstract diskfilter. · 076e7c0f
      Vladimir 'phcoder' Serbinenko authored
      	Add LDM support using the same framework.
      
      	* Makefile.util.def (libgrubkern): Add grub-core/disk/ldm.c,
      	grub-core/disk/diskfilter.c and grub-core/partmap/gpt.c.
      	(libgrubmods): Remove grub-core/disk/raid.c and
      	grub-core/partmap/gpt.c.
      	* grub-core/Makefile.core.def (ldm): New module.
      	(raid): Renamed to diskfilter. All users updated.
      	* grub-core/disk/raid.c: Moved to ...
      	* grub-core/disk/diskfilter.c: ... here.
      	* grub-core/disk/diskfilter.c: Rename grub_raid_ to grub_diskfilter_.
      	(lv_num): New var.
      	(find_array): Renamed to ...
      	(find_lv): ... this. Support multi-LV. Skip nameless LVs
      	(grub_is_array_readable): Renamed to ...
      	(grub_is_lv_readable): ... this. Support multinode hierarchy.
      	(insert_array): New argument id.
      	(is_node_readable): New function.
      	(scan_device): Rename to ...
      	(scan_disk): .. this. Restrict to one disk.
      	(scan_devices): New function.
      	(grub_diskfilter_iterate): Support multi-LV.
      	Skip invisible and nameless LVs.
      	(grub_diskfilter_memberlist): Support multi-LV.
      	(grub_diskfilter_read_node): New function.
      	(grub_raid_read): Most of logic moved to ...
      	(read_segment): ... here
      	(read_lv): New function.
      	(grub_diskfilter_get_vg_by_uuid): New function.
      	(grub_diskfilter_make_raid): Likewise.
      	* grub-core/disk/ldm.c: New file.
      	* grub-core/disk/lvm.c (vg_list): Removed.
      	(lv_count): Likewise.
      	(scan_depth): Likewise.
      	(is_lv_readable): Likewise.
      	(grub_lvm_getvalue): Advance pointer past the number.
      	(find_lv): Removed.
      	(do_lvm_scan): Refactored into ...
      	(grub_lvm_detect): ... this. Support raid.
      	(grub_lvm_iterate): Removed.
      	(grub_lvm_memberlist): Likewise.
      	(grub_lvm_open): Likewise.
      	(grub_lvm_close): Likewise.
      	(read_lv): Likewise.
      	(read_node): Likewise.
      	(is_node_readable): Likewise.
      	(is_lv_readable): Likewise.
      	(grub_lvm_read): Likewise.
      	(grub_lvm_write): Likewise.
      	(grub_lvm_dev): Use diskfilter
      	(GRUB_MOD_INIT): Likewise.
      	(GRUB_MOD_FINI): Likewise.
      	* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Use
      	new interface.
      	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Likewise.
      	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
      	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Use
      	grub_diskfilter_read_node.
      	Fix a bug with xor.
      	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Use
      	grub_diskfilter_read_node.
      	Support GRUB_RAID_LAYOUT_MUL_FROM_POS.
      	* grub-core/kern/disk.c (grub_disk_dev_list): Make global.
      	(grub_disk_dev_iterate): Move from here...
      	* include/grub/disk.h (grub_disk_dev_iterate): ... to here. Inlined.
      	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
      	Make global.
      	(grub_hostdisk_find_partition_start): Likewise.
      	(grub_hostdisk_os_dev_to_grub_drive): New function.
      	(grub_util_biosdisk_get_osdev): Check that disk is biosdisk.
      	* grub-core/kern/emu/hostdisk.c (make_device_name): Move to ...
      	* util/getroot.c (make_device_name): ... here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
      	Move to ...
      	* util/getroot.c (grub_util_get_dm_node_linear_info): ...here.
      	* grub-core/kern/emu/hostdisk.c
      	(convert_system_partition_to_system_disk): Move to ...
      	* util/getroot.c (convert_system_partition_to_system_disk): ...here.
      	* grub-core/kern/emu/hostdisk.c (device_is_wholedisk): Move to ...
      	* util/getroot.c (device_is_wholedisk): ... here.
      	* grub-core/kern/emu/hostdisk.c (find_system_device): Move to ...
      	* util/getroot.c (find_system_device): ... here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_present):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_is_present): ...here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_get_grub_dev): ... here.
      	Handle LDM.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_is_floppy): ... here.
      	* grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Made global.
      	* include/grub/disk.h (grub_disk_dev_id): Replaced RAID and LVM with
      	DISKFILTER.
      	* include/grub/raid.h: Renamed to ...
      	* include/grub/diskfilter.h: ... this.
      	* include/grub/diskfilter.h: Rename grub_raid_* to grub_diskfilter_*
      	(GRUB_RAID_LAYOUT_*): Make into array.
      	(GRUB_RAID_LAYOUT_MUL_FROM_POS): New value.
      	(grub_diskfilter_vg): New struct.
      	(grub_diskfilter_pv_id): Likewise.
      	(grub_raid_member): Removed.
      	(grub_raid_array): Likewise.
      	(grub_diskfilter_pv): New struct.
      	(grub_diskfilter_lv): Likewise.
      	(grub_diskfilter_segment): Likewise.
      	(grub_diskfilter_node): Likewise.
      	(grub_diskfilter_get_vg_by_uuid): New proto.
      	(grub_raid_register): Inline.
      	(grub_diskfilter_unregister): Likewise.
      	(grub_diskfilter_make_raid): New proto.
      	(grub_diskfilter_vg_register): Likewise.
      	(grub_diskfilter_read_node): Likewise.
      	(grub_diskfilter_get_pv_from_disk) [GRUB_UTIL]: Likewise.
      	* include/grub/emu/hostdisk.h (grub_util_get_ldm): New proto.
      	(grub_util_is_ldm): Likewise.
      	(grub_util_ldm_embed) [GRUB_UTIL]: Likewise.
      	(grub_hostdisk_find_partition_start): Likewise.
      	(grub_hostdisk_os_dev_to_grub_drive): Likewise.
      	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_LDM):
      	New definition.
      	(grub_gpt_partition_map_iterate): New proto.
      	* include/grub/lvm.h (grub_lvm_vg): Removed.
      	(grub_lvm_pv): Likewise.
      	(grub_lvm_lv): Likewise.
      	(grub_lvm_segment): Likewise.
      	(grub_lvm_node): Likewise.
      	* util/getroot.c [...]
      	* util/grub-probe.c (probe_raid_level): Handle diskfilter.
      	(probe_abstraction): Likewise.
      	* util/grub-setup.c (setup): Remove must_embed. Support LDM.
      	(main): Remove dead logic.
      076e7c0f
  8. 13 Nov, 2011 2 commits
  9. 12 Apr, 2011 1 commit
  10. 25 Mar, 2011 1 commit
  11. 27 Nov, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Avoid using tricks for initialising endian variables. · 49d3ab46
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot):
      	Make const.
      	(GRUB_MOD_INIT): Don't byte-swap.
      	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
      	Use grub_cpu_to_le16_compile_time and grub_cpu_to_le32_compile_time.
      	* include/grub/types.h (grub_swap_bytes16_compile_time): New macro.
      	(grub_swap_bytes32_compile_time): Likewise.
      	(grub_cpu_to_le32_compile_time): Likewise.
      	(grub_cpu_to_le16_compile_time): Likewise.
      49d3ab46
  12. 23 Nov, 2010 1 commit
  13. 24 Sep, 2010 1 commit
  14. 16 Sep, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Move embedding routines to partmap sources files. · e50fca4a
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot)
      	[GRUB_UTIL]: New variable.
      	(gpt_partition_map_iterate): Set part.parent.
      	(gpt_partition_map_embed) [GRUB_UTIL]: New function.
      	(grub_gpt_partition_map) [GRUB_UTIL]: Set .embed.
      	* grub-core/partmap/msdos.c (pc_partition_map_embed) [GRUB_UTIL]:
      	New function.
      	(grub_msdos_partition_map) [GRUB_UTIL]: Set .embed.
      	* include/grub/partition.h (grub_embed_type_t) [GRUB_UTIL]: New type.
      	(grub_partition_map) [GRUB_UTIL]: New field embed.
      	* util/grub-setup.c (grub_gpt_partition_type_bios_boot): Removed.
      	(setup): Use ->embed.
      e50fca4a
  15. 06 May, 2010 1 commit
  16. 07 Feb, 2010 3 commits
  17. 06 Feb, 2010 1 commit
  18. 20 Jan, 2010 1 commit
  19. 29 Dec, 2009 1 commit
  20. 24 Aug, 2009 1 commit
    • phcoder's avatar
      2009-08-24 Vladimir Serbinenko <phcoder@gmail.com> · 2d21e3e8
      phcoder authored
      	Rename *_partition_map to part_*
      
      	* partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
      	* partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
      	* partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
      	* partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
      	All users updated.
      	* partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
      	All users updated.
      	* partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
      	* util/grub-probe.c (probe_partmap): Don't transform partition name
      	to get module name.
      2d21e3e8
  21. 23 Aug, 2009 1 commit
    • robertmh's avatar
      2009-08-23 Robert Millan <rmh.grub@aybabtu.com> · 71acf5e5
      robertmh authored
              * partmap/pc.c: Rename to ...
              * partmap/msdos.c: ... this.  Update all users.
              (grub_pc_partition_map): Rename to ...
              (grub_msdos_partition_map): ... this.  Update all users.
      
              * parttool/pcpart.c: Rename to ...
              * parttool/msdospart.c: ... this.  Update all users.
      
              * include/grub/pc_partition.h: Rename to ...
              * include/grub/msdos_partition.h: ... this.  Update all users.
              (grub_pc_partition_bsd_entry): Rename to ...
              (grub_msdos_partition_bsd_entry): ... this.  Update all users.
              (grub_pc_partition_disk_label): Rename to ...
              (grub_msdos_partition_disk_label): ... this.  Update all users.
              (grub_pc_partition_entry): Rename to ...
              (grub_msdos_partition_entry): ... this.  Update all users.
              (grub_pc_partition_mbr): Rename to ...
              (grub_msdos_partition_mbr): ... this.  Update all users.
              (grub_pc_partition): Rename to ...
              (grub_msdos_partition): ... this.  Update all users.
              (grub_pc_partition_is_empty): Rename to ...
              (grub_msdos_partition_is_empty): ... this.  Update all users.
              (grub_pc_partition_is_extended): Rename to ...
              (grub_msdos_partition_is_extended): ... this.  Update all users.
              (grub_pc_partition_is_bsd): Rename to ...
              (grub_msdos_partition_is_bsd): ... this.  Update all users.
      
              * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
              (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
              (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
              (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
              (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
              (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
              (gpt_mod_LDFLAGS): Rename to ...
              (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
              (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
              (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
              (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
              (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
              (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
              (part_gpt_mod_LDFLAGS): ... this.
              (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
              `pcpart.mod' to `msdospart.mod'.
              (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
              to ...
              (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
              (msdospart_mod_LDFLAGS): ... this.
      71acf5e5
  22. 11 Jun, 2009 1 commit
  23. 14 May, 2009 1 commit
    • proski's avatar
      2009-05-13 Pavel Roskin <proski@gnu.org> · 238e871f
      proski authored
      	* kernel/disk.c (grub_disk_read): Use void pointer for the
      	buffer.
      	(grub_disk_write): Use const void pointer for the buffer.
      	Adjust all callers.  Remove unnecessary casts.
      238e871f
  24. 05 May, 2009 1 commit
    • proski's avatar
      2009-05-04 Pavel Roskin <proski@gnu.org> · de5fd76e
      proski authored
      	* commands/acpi.c: Remove unused variable my_mod.
      	* partmap/amiga.c: Likewise.
      	* partmap/apple.c: Likewise.
      	* partmap/gpt.c: Likewise.
      	* partmap/pc.c: Likewise.
      	* partmap/sun.c: Likewise.
      	* term/gfxterm.c: Likewise.
      	* term/i386/pc/vesafb.c: Likewise.
      	* term/i386/pc/vga.c: Likewise.
      de5fd76e
  25. 04 Jul, 2008 1 commit
    • robertmh's avatar
      2008-07-04 Robert Millan <rmh@aybabtu.com> · 8516d2a8
      robertmh authored
              This fixes a performance issue when pc & gpt partmap iterators
              didn't abort iteration even after our hook found what it was
              looking for (often causing expensive probes of non-existant drives).
      
              Some callers relied on previous buggy behaviour, since they would
              rise an error when their own hooks caused early abortion of its
              iteration.
      
              * kern/device.c (grub_device_open): Improve error message.
              * disk/lvm.c (grub_lvm_open): Likewise.
              * disk/raid.c (grub_raid_open): Likewise.
      
              * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.
              (pc_partition_map_probe): Do not fail when find_func() caused
              early abortion of pc_partition_map_iterate().
      
              * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.
              (gpt_partition_map_probe): Do not fail when find_func() caused
              early abortion of gpt_partition_map_iterate().
      
              * kern/partition.c (grub_partition_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.  Do not fail when
              part_map_iterate_hook() caused early abortion of p->iterate().
      
              * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
              when grub_partition_iterate() returned with non-zero.
      8516d2a8
  26. 02 Jul, 2008 1 commit
    • proski's avatar
      2008-07-01 Pavel Roskin <proski@gnu.org> · 0e9e51ec
      proski authored
      	* disk/raid.c: Cast grub_dprintf() arguments to unsigned long
      	long if the format specifier expects it.
      	* partmap/gpt.c (gpt_partition_map_iterate): Likewise.
      	* partmap/pc.c (pc_partition_map_iterate): Likewise.
      	* fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
      	long to fix a warning.
      	* fs/reiserfs.c (grub_reiserfs_read): Change casts in
      	grub_dprintf() arguments to fix warnings.
      0e9e51ec
  27. 24 Feb, 2008 1 commit
    • robertmh's avatar
      2008-02-23 Robert Millan <rmh@aybabtu.com> · 2dc33c03
      robertmh authored
              * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
              since they were intended to be in hex.  This didn't break previously
              because of a bug in gpt_partition_map_iterate() (see below).
      
              (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
              when checking the validity of GPT header.
              Remove `partno', since it always provides the same information as `i'.
      2dc33c03
  28. 19 Feb, 2008 1 commit
    • robertmh's avatar
      2008-02-19 Robert Millan <rmh@aybabtu.com> · b93bdb0f
      robertmh authored
              * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
              (grub_gpt_partition_type_empty): Redefine with macro from
              `<grub/gpt_partition.h>'.
              (gpt_partition_map_iterate): Adjust partition type comparison.
      
              Export `entry' as partmap-specific `part.data' struct.
              (grub_gpt_header, grub_gpt_partentry): Move from here ...
      
              * include/grub/gpt_partition.h (grub_gpt_header)
              (grub_gpt_partentry): ... to here (new file).
      
              * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
      
              (grub_gpt_partition_type_bios_boot): New const variable, defined
              with macro from `<grub/gpt_partition.h>'.
      
              (setup): Replace `first_start' with `embed_region', which keeps
              track of the embed region (and is partmap-agnostic).
      
              Replace find_first_partition_start() with find_usable_region(),
              which finds a usable region for embedding using partmap-specific
              knowledge (supports PC/MSDOS and GPT).
      
              Fix all assumptions that the embed region start at sector 1, using
              `embed_region.start' from now on.  Similarly, use `embed_region.end'
              rather than `first_start' to calculate available size.
      
              In grub_util_info() message, replace "into after the MBR" with an
              indication of the specific sector our embed region starts at.
      b93bdb0f
  29. 22 Jul, 2007 1 commit
    • okuji's avatar
      2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> · 5a79f472
      okuji authored
          Migrate to GNU General Public License Version 3.
      
          * COPYING: Replaced with the plain text version of GPLv3.
      
          * config.guess: Updated from gnulib.
          * config.sub: Likewise.
      
          * geninit.sh: Output a GPLv3 copyright notice.
          * geninitheader.sh: Likewise.
          * genmodsrc.sh: Likewise.
          * gensymlist.sh.in: Likewise.
      
          * boot/i386/pc/boot.S: Upgraded to GPLv3.
          * boot/i386/pc/diskboot.S: Likewise.
          * boot/i386/pc/pxeboot.S: Likewise.
          * commands/blocklist.c: Likewise.
          * commands/boot.c: Likewise.
          * commands/cat.c: Likewise.
          * commands/cmp.c: Likewise.
          * commands/configfile.c: Likewise.
          * commands/echo.c: Likewise.
          * commands/help.c: Likewise.
          * commands/ls.c: Likewise.
          * commands/search.c: Likewise.
          * commands/terminal.c: Likewise.
          * commands/test.c: Likewise.
          * commands/videotest.c: Likewise.
          * commands/i386/cpuid.c: Likewise.
          * commands/i386/pc/halt.c: Likewise.
          * commands/i386/pc/play.c: Likewise.
          * commands/i386/pc/reboot.c: Likewise.
          * commands/i386/pc/vbeinfo.c: Likewise.
          * commands/i386/pc/vbetest.c: Likewise.
          * commands/ieee1275/halt.c: Likewise.
          * commands/ieee1275/reboot.c: Likewise.
          * commands/ieee1275/suspend.c: Likewise.
          * disk/loopback.c: Likewise.
          * disk/lvm.c: Likewise.
          * disk/raid.c: Likewise.
          * disk/efi/efidisk.c: Likewise.
          * disk/i386/pc/biosdisk.c: Likewise.
          * disk/ieee1275/ofdisk.c: Likewise.
          * font/manager.c: Likewise.
          * fs/affs.c: Likewise.
          * fs/ext2.c: Likewise.
          * fs/fat.c: Likewise.
          * fs/fshelp.c: Likewise.
          * fs/hfs.c: Likewise.
          * fs/hfsplus.c: Likewise.
          * fs/iso9660.c: Likewise.
          * fs/jfs.c: Likewise.
          * fs/minix.c: Likewise.
          * fs/sfs.c: Likewise.
          * fs/ufs.c: Likewise.
          * fs/xfs.c: Likewise.
          * hello/hello.c: Likewise.
          * include/grub/acorn_filecore.h: Likewise.
          * include/grub/arg.h: Likewise.
          * include/grub/bitmap.h: Likewise.
          * include/grub/boot.h: Likewise.
          * include/grub/cache.h: Likewise.
          * include/grub/device.h: Likewise.
          * include/grub/disk.h: Likewise.
          * include/grub/dl.h: Likewise.
          * include/grub/elfload.h: Likewise.
          * include/grub/env.h: Likewise.
          * include/grub/err.h: Likewise.
          * include/grub/file.h: Likewise.
          * include/grub/font.h: Likewise.
          * include/grub/fs.h: Likewise.
          * include/grub/fshelp.h: Likewise.
          * include/grub/gzio.h: Likewise.
          * include/grub/hfs.h: Likewise.
          * include/grub/kernel.h: Likewise.
          * include/grub/loader.h: Likewise.
          * include/grub/lvm.h: Likewise.
          * include/grub/misc.h: Likewise.
          * include/grub/mm.h: Likewise.
          * include/grub/net.h: Likewise.
          * include/grub/normal.h: Likewise.
          * include/grub/parser.h: Likewise.
          * include/grub/partition.h: Likewise.
          * include/grub/pc_partition.h: Likewise.
          * include/grub/raid.h: Likewise.
          * include/grub/rescue.h: Likewise.
          * include/grub/script.h: Likewise.
          * include/grub/setjmp.h: Likewise.
          * include/grub/symbol.h: Likewise.
          * include/grub/term.h: Likewise.
          * include/grub/terminfo.h: Likewise.
          * include/grub/tparm.h: Likewise.
          * include/grub/types.h: Likewise.
          * include/grub/video.h: Likewise.
          * include/grub/efi/api.h: Likewise.
          * include/grub/efi/chainloader.h: Likewise.
          * include/grub/efi/console.h: Likewise.
          * include/grub/efi/console_control.h: Likewise.
          * include/grub/efi/disk.h: Likewise.
          * include/grub/efi/efi.h: Likewise.
          * include/grub/efi/pe32.h: Likewise.
          * include/grub/efi/time.h: Likewise.
          * include/grub/i386/linux.h: Likewise.
          * include/grub/i386/setjmp.h: Likewise.
          * include/grub/i386/types.h: Likewise.
          * include/grub/i386/efi/kernel.h: Likewise.
          * include/grub/i386/efi/loader.h: Likewise.
          * include/grub/i386/efi/time.h: Likewise.
          * include/grub/i386/pc/biosdisk.h: Likewise.
          * include/grub/i386/pc/boot.h: Likewise.
          * include/grub/i386/pc/chainloader.h: Likewise.
          * include/grub/i386/pc/console.h: Likewise.
          * include/grub/i386/pc/init.h: Likewise.
          * include/grub/i386/pc/kernel.h: Likewise.
          * include/grub/i386/pc/loader.h: Likewise.
          * include/grub/i386/pc/memory.h: Likewise.
          * include/grub/i386/pc/multiboot.h: Likewise.
          * include/grub/i386/pc/serial.h: Likewise.
          * include/grub/i386/pc/time.h: Likewise.
          * include/grub/i386/pc/vbe.h: Likewise.
          * include/grub/i386/pc/vbeblit.h: Likewise.
          * include/grub/i386/pc/vbefill.h: Likewise.
          * include/grub/i386/pc/vbeutil.h: Likewise.
          * include/grub/i386/pc/vga.h: Likewise.
          * include/grub/ieee1275/ieee1275.h: Likewise.
          * include/grub/ieee1275/ofdisk.h: Likewise.
          * include/grub/powerpc/libgcc.h: Likewise.
          * include/grub/powerpc/setjmp.h: Likewise.
          * include/grub/powerpc/types.h: Likewise.
          * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
          * include/grub/powerpc/ieee1275/console.h: Likewise.
          * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
          * include/grub/powerpc/ieee1275/kernel.h: Likewise.
          * include/grub/powerpc/ieee1275/loader.h: Likewise.
          * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
          * include/grub/powerpc/ieee1275/time.h: Likewise.
          * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
          * include/grub/sparc64/libgcc.h: Likewise.
          * include/grub/sparc64/setjmp.h: Likewise.
          * include/grub/sparc64/types.h: Likewise.
          * include/grub/sparc64/ieee1275/console.h: Likewise.
          * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
          * include/grub/sparc64/ieee1275/kernel.h: Likewise.
          * include/grub/sparc64/ieee1275/time.h: Likewise.
          * include/grub/util/biosdisk.h: Likewise.
          * include/grub/util/getroot.h: Likewise.
          * include/grub/util/lvm.h: Likewise.
          * include/grub/util/misc.h: Likewise.
          * include/grub/util/raid.h: Likewise.
          * include/grub/util/resolve.h: Likewise.
          * io/gzio.c: Likewise.
          * kern/device.c: Likewise.
          * kern/disk.c: Likewise.
          * kern/dl.c: Likewise.
          * kern/elf.c: Likewise.
          * kern/env.c: Likewise.
          * kern/err.c: Likewise.
          * kern/file.c: Likewise.
          * kern/fs.c: Likewise.
          * kern/loader.c: Likewise.
          * kern/main.c: Likewise.
          * kern/misc.c: Likewise.
          * kern/mm.c: Likewise.
          * kern/parser.c: Likewise.
          * kern/partition.c: Likewise.
          * kern/rescue.c: Likewise.
          * kern/term.c: Likewise.
          * kern/efi/efi.c: Likewise.
          * kern/efi/init.c: Likewise.
          * kern/efi/mm.c: Likewise.
          * kern/i386/dl.c: Likewise.
          * kern/i386/efi/init.c: Likewise.
          * kern/i386/efi/startup.S: Likewise.
          * kern/i386/pc/init.c: Likewise.
          * kern/i386/pc/lzo1x.S: Likewise.
          * kern/i386/pc/startup.S: Likewise.
          * kern/ieee1275/ieee1275.c: Likewise.
          * kern/powerpc/cache.S: Likewise.
          * kern/powerpc/dl.c: Likewise.
          * kern/powerpc/ieee1275/cmain.c: Likewise.
          * kern/powerpc/ieee1275/crt0.S: Likewise.
          * kern/powerpc/ieee1275/init.c: Likewise.
          * kern/powerpc/ieee1275/openfw.c: Likewise.
          * kern/sparc64/cache.S: Likewise.
          * kern/sparc64/dl.c: Likewise.
          * kern/sparc64/ieee1275/init.c: Likewise.
          * kern/sparc64/ieee1275/openfw.c: Likewise.
          * loader/efi/chainloader.c: Likewise.
          * loader/efi/chainloader_normal.c: Likewise.
          * loader/i386/efi/linux.c: Likewise.
          * loader/i386/efi/linux_normal.c: Likewise.
          * loader/i386/pc/chainloader.c: Likewise.
          * loader/i386/pc/chainloader_normal.c: Likewise.
          * loader/i386/pc/linux.c: Likewise.
          * loader/i386/pc/linux_normal.c: Likewise.
          * loader/i386/pc/multiboot.c: Likewise.
          * loader/i386/pc/multiboot_normal.c: Likewise.
          * loader/powerpc/ieee1275/linux.c: Likewise.
          * loader/powerpc/ieee1275/linux_normal.c: Likewise.
          * normal/arg.c: Likewise.
          * normal/cmdline.c: Likewise.
          * normal/command.c: Likewise.
          * normal/completion.c: Likewise.
          * normal/execute.c: Likewise.
          * normal/function.c: Likewise.
          * normal/lexer.c: Likewise.
          * normal/main.c: Likewise.
          * normal/menu.c: Likewise.
          * normal/menu_entry.c: Likewise.
          * normal/misc.c: Likewise.
          * normal/parser.y: Likewise.
          * normal/script.c: Likewise.
          * normal/i386/setjmp.S: Likewise.
          * normal/powerpc/setjmp.S: Likewise.
          * normal/sparc64/setjmp.S: Likewise.
          * partmap/acorn.c: Likewise.
          * partmap/amiga.c: Likewise.
          * partmap/apple.c: Likewise.
          * partmap/gpt.c: Likewise.
          * partmap/pc.c: Likewise.
          * partmap/sun.c: Likewise.
          * term/gfxterm.c: Likewise.
          * term/terminfo.c: Likewise.
          * term/efi/console.c: Likewise.
          * term/i386/pc/console.c: Likewise.
          * term/i386/pc/serial.c: Likewise.
          * term/i386/pc/vesafb.c: Likewise.
          * term/i386/pc/vga.c: Likewise.
          * term/ieee1275/ofconsole.c: Likewise.
          * util/biosdisk.c: Likewise.
          * util/console.c: Likewise.
          * util/genmoddep.c: Likewise.
          * util/getroot.c: Likewise.
          * util/grub-emu.c: Likewise.
          * util/grub-mkdevicemap.c: Likewise.
          * util/grub-probe.c: Likewise.
          * util/lvm.c: Likewise.
          * util/misc.c: Likewise.
          * util/raid.c: Likewise.
          * util/resolve.c: Likewise.
          * util/update-grub.in: Likewise.
          * util/update-grub_lib.in: Likewise.
          * util/grub.d/00_header.in: Likewise.
          * util/grub.d/10_hurd.in: Likewise.
          * util/grub.d/10_linux.in: Likewise.
          * util/i386/efi/grub-install.in: Likewise.
          * util/i386/efi/grub-mkimage.c: Likewise.
          * util/i386/pc/grub-install.in: Likewise.
          * util/i386/pc/grub-mkimage.c: Likewise.
          * util/i386/pc/grub-mkrescue.in: Likewise.
          * util/i386/pc/grub-setup.c: Likewise.
          * util/i386/pc/misc.c: Likewise.
          * util/powerpc/ieee1275/grub-install.in: Likewise.
          * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
          * util/powerpc/ieee1275/misc.c: Likewise.
          * video/bitmap.c: Likewise.
          * video/video.c: Likewise.
          * video/i386/pc/vbe.c: Likewise.
          * video/i386/pc/vbeblit.c: Likewise.
          * video/i386/pc/vbefill.c: Likewise.
          * video/i386/pc/vbeutil.c: Likewise.
          * video/readers/tga.c: Likewise.
      5a79f472
  30. 05 Jun, 2006 1 commit
    • okuji's avatar
      2006-06-05 Yoshinori K. Okuji <okuji@enbug.org> · deae281b
      okuji authored
              Count partitions from 1 instead of 0 in the string representation
              of partitions. Still use 0-based internally.
      
              * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
              (sun_partition_map_iterate): Use grub_partition_t instead of
              struct grub_partition *. Cast DESC->START_CYLINDER to
              grub_uint64_t after converting the endian.
              (sun_partition_map_probe): Subtract 1 for PARTNUM.
              (sun_partition_map_get_name): Add 1 to P->INDEX.
      
              * partmap/pc.c (grub_partition_parse): Subtract 1 for
              PCDATA->DOS_PART.
              (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
      
              * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
              zero instead of one.
              (gpt_partition_map_probe): Subtract 1 for PARTNUM.
              (gpt_partition_map_get_name): Add 1 into P->INDEX.
      
              * partmap/apple.c (apple_partition_map_iterate): Change the type
              of POS to unsigned.
              (apple_partition_map_probe): Subtract 1 for PARTNUM.
              (apple_partition_map_get_name): Add 1 into P->INDEX.
      
              * partmap/amiga.c (amiga_partition_map_iterate): Change the type
              of POS to unsigned.
              (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
              calculate the offset of a partition.
              (amiga_partition_map_probe): Subtract 1 for PARTNUM.
              (amiga_partition_map_get_name): Add 1 into P->INDEX.
      
              * partmap/acorn.c (acorn_partition_map_find): Change the type of
              SECTOR to grub_disk_addr_t.
              (acorn_partition_map_iterate): Likewise.
              (acorn_partition_map_probe): Subtract 1 for PARTNUM.
              Change the type of SECTOR to grub_disk_addr_t. Declare P on the
              top.
              (acorn_partition_map_get_name): Add 1 into P->INDEX.
      
              * kern/i386/pc/init.c (make_install_device): Add 1 into
              GRUB_INSTALL_DOS_PART.
      
              * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
              conditional.
      deae281b
  31. 04 Jun, 2006 1 commit
    • okuji's avatar
      2006-06-04 Yoshinori K. Okuji <okuji@enbug.org> · 524a1e6a
      okuji authored
              Clean up the code to support 64-bit addressing in disks and
              files. This change is not enough for filesystems yet.
      
              * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
              type of "start" to grub_uint64_t.
              (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
              grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
              save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
              convert addresses.
      
              * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
              to grub_disk_addr_t.
      
              * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
              string.
      
              * partmap/pc.c (pc_partition_map_iterate): Likewise.
      
              * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
              to char *.
      
              * normal/script.c (grub_script_parse): Remove unused MEMFREE.
      
              * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
      
              * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
      
              * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
              to grub_off_t, to detect an error from grub_file_seek.
              (grub_multiboot_load_elf32): Likewise.
      
              * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
              maximum unsigned long value when an overflow is detected.
              (grub_strtoull): New function.
              (grub_divmod64): Likewise.
              (grub_lltoa): use grub_divmod64.
      
              * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
              grub_disk_addr_t.
              (grub_fs_blocklist_open): Increase P if P is not NULL to advance
              the pointer to next character. Use grub_strtoull instead of
              grub_strtoul.
              (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
              SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
              respectively.
      
              * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
              return value is signed.
              (grub_file_seek): Change the type of OLD to grub_off_t. Do not
              test if OFFSET is less than zero, as OFFSET is unsigned now.
      
              * kern/disk.c (struct grub_disk_cache): Change the type of
              "sector" to grub_disk_addr_t.
              (grub_disk_cache_get_index): Change the type of SECTOR to
              grub_disk_addr_t. Calculate the hash with SECTOR casted to
              unsigned after shifting.
              (grub_disk_cache_invalidate): Change the type of SECTOR to
              grub_disk_addr_t.
              (grub_disk_cache_unlock): Likewise.
              (grub_disk_cache_store): Likewise.
              (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
              START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
              grub_disk_addr_t and grub_uint64_t, respectively.
              (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
              body, as the value of OFFSET is tweaked by
              grub_disk_check_range. Change the types of START_SECTOR, LEN and
              POS to grub_disk_addr_t, grub_size_t and grub_size_t,
              respectively.
              (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
              body, as the value of OFFSET is tweaked by
              grub_disk_check_range. Change the types of LEN and N to
              grub_size_t.
      
              * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
              and "saved_offset" to grub_off_t.
              (test_header): Cast BUF to char *.
              (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
              to char *.
              (grub_gzio_read): Change the types of OFFSET and SIZE to
              grub_off_t and grub_size_t, respectively.
      
              * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
              Removed.
              (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
              (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
              (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
              (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
              (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
      
              * include/grub/types.h (grub_off_t): Unconditionally set to
              grub_uint64_t.
              (grub_disk_addr_t): Changed to grub_uint64_t.
      
              * include/grub/partition.h (struct grub_partition): Change the
              types of "start", "len" and "offset" to grub_disk_addr_t,
              grub_uint64_t and grub_disk_addr_t, respectively.
              (grub_partition_get_start): Return grub_disk_addr_t.
              (grub_partition_get_len): Return grub_uint64_t.
      
              * include/grub/misc.h (grub_strtoull): New prototype.
              (grub_divmod64): Likewise.
      
              * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
              of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
              grub_off_t, respectively.
              All callers and references changed.
      
              * include/grub/fs.h (struct grub_fs): Change the type of LEN to
              grub_size_t in "read".
              All callers and references changed.
      
              * include/grub/file.h (struct grub_file): Change the types of
              "offset" and "size" to grub_off_t and grub_off_t,
              respectively. Change the type of SECTOR to grub_disk_addr_t in
              "read_hook".
              (grub_file_read): Change the type of LEN to grub_size_t.
              (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
              grub_off_t.
              (grub_file_size): Return grub_off_t.
              (grub_file_tell): Likewise.
              All callers and references changed.
      
              * include/grub/disk.h (struct grub_disk_dev): Change the types of
              SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
              "write".
              (struct grub_disk): Change the type of "total_sectors" to
              grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
              "read_hook".
              (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
              grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
              (grub_disk_write): Likewise.
              All callers and references changed.
      
              * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
              char * for grub_strncmp to silence gcc.
              (grub_iso9660_mount): Likewise.
              (grub_iso9660_mount): Likewise.
              (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
              return statement.
              (grub_iso9660_iterate_dir): Likewise.
              (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
      
              * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
              LEN to grub_disk_addr_t and grub_size_t, respectively.
      
              * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
      
              * fs/jfs.c (grub_jfs_read_file): Likewise.
      
              * fs/minix.c (grub_jfs_read_file): Likewise.
      
              * fs/sfs.c (grub_jfs_read_file): Likewise.
      
              * fs/ufs.c (grub_jfs_read_file): Likewise.
      
              * fs/xfs.c (grub_jfs_read_file): Likewise.
      
              * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
              and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
              respectively.
      
              * fs/ext2.c (grub_ext2_read_block): When an error happens, set
              BLKNR to -1 instead of returning GRUB_ERRNO.
              (grub_ext2_read_file): Change the types of SECTOR and
              LEN to grub_disk_addr_t and grub_size_t, respectively.
      
              * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
              LEN to grub_disk_addr_t and grub_size_t, respectively.
      
              * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
              grub_file_read.
      
              * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
              string. Do not cast SECTOR explicitly.
      
              * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
              TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
              (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
              grub_disk_addr_t and grub_size_t, respectively. If the sector is
              over 2TB and LBA mode is not supported, raise an error.
              (get_safe_sectors): New function.
              (grub_biosdisk_read): Use get_safe_sectors.
              (grub_biosdisk_write): Likewise.
      
              * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
              (grub_efidisk_write): Likewise.
      
              * disk/loopback.c (delete_loopback): Cosmetic changes.
              (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
              correctly.
              (grub_loopback_open): Likewise.
              (grub_loopback_read): Likewise. Also, change the type of POS to
              grub_off_t, and fix the usage of grub_memset.
      
              * commands/i386/pc/play.c: Include grub/machine/time.h.
      
              * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
              print FILE->SIZE.
      
              * commands/configfile.c: Include grub/env.h.
      
              * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
              GRUB_ERRNO directly instead. Change the type of POS to
              grub_off_t. Follow the coding standard.
      
              * commands/blocklist.c: Include grub/partition.h.
              (grub_cmd_blocklist): Return an error if the underlying device is
              not a disk. Take the starting sector of a partition into account,
              if a partition is used.
      
              * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
              a length field.
              (lba_mode): Support 64-bit addresses.
              (chs_mode): Likewise.
              (copy_buffer): Adapted to the new offsets of a length field and a
              segment field.
              (blocklist_default_start): Allocate 64-bit space.
      
              * boot/i386/pc/boot.S (force_lba): Removed.
              (boot_drive): Moved to under KERNEL_SECTOR.
              (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
              space.
              (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
              is useless.
              (lba_mode): Refactored to support a 64-bit address. More size
              optimization.
              (setup_sectors): Likewise.
      524a1e6a
  32. 26 Apr, 2006 1 commit
    • okuji's avatar
      2006-04-25 Yoshinori K. Okuji <okuji@enbug.org> · 2965c7cc
      okuji authored
              A new machine-specific function "grub_machine_set_prefix" is
              defined. This is called after loading modules, so that a prefix
              initialization can use modules. Also, this change adds an
              intensive debugging feature for the memory manager via the
              configure option "--enable-mm-debug".
      
              * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
              PART.LEN.
      
              * kern/sparc64/ieee1275/init.c (abort): Removed.
              (grub_stop): Likewise.
              (grub_exit): New function.
              (grub_set_prefix): Renamed to ...
              (grub_machine_set_prefix): ... this.
              (grub_machine_init): Do not call grub_set_prefix.
      
              * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
              (grub_machine_set_prefix): ... this.
              (grub_machine_init): Do not call grub_set_prefix.
      
              * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
              (grub_machine_init): Do not set the prefix here.
      
              * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
      
              * kern/efi/init.c: Include grub/mm.h.
              (grub_efi_set_prefix): New function.
      
              * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
              (grub_efi_get_filename): New function.
              (grub_print_device_path): Renamed to ...
              (grub_efi_print_device_path): ... this.
      
              * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
              [MM_DEBUG] (grub_realloc): Likewise.
              [MM_DEBUG] (grub_free): Likewise.
              [MM_DEBUG] (grub_memalign): Likewise.
              [MM_DEBUG] (grub_mm_debug): New variable.
              [MM_DEBUG] (grub_debug_malloc): New function.
              [MM_DEBUG] (grub_debug_free): New function.
              [MM_DEBUG] (grub_debug_realloc): New function.
              [MM_DEBUG] (grub_debug_memalign): New function.
      
              * kern/misc.c (grub_abort): Print a newline to distinguish
              the message.
      
              * kern/main.c (grub_main): Call grub_machine_set_prefix and
              grub_set_root_dev after loading modules. This is necessary when
              setting a prefix depends on modules.
      
              * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
              (grub_efi_print_device_path): ... this.
              (grub_efi_get_filename): New prototype.
              (grub_efi_set_prefix): Likewise.
      
              * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
              and grub/disk.h.
              (grub_efidisk_get_device_handle): New prototype.
              (grub_efidisk_get_device_name): Likewise.
      
              * include/grub/mm.h: Include config.h.
              (MM_DEBUG): Removed.
              [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
              [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
              [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
              [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
              [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
              [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
              [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
              [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
              [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
      
              * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
      
              * disk/efi/efidisk.c: Include grub/partition.h.
              (iterate_child_devices): New function.
              (add_device): First, compare only last device path nodes, so that
              devices are sorted by the types.
              (grub_efidisk_get_device_handle): New function.
              (grub_efidisk_get_device_name): Likewise.
      
              * configure.ac (--enable-mm-debug): New option to enable the
              memory manager debugging feature. This makes the binary much
              bigger, so is disabled by default.
      2965c7cc
  33. 03 Dec, 2005 1 commit
    • marco_g's avatar
      2005-12-03 Marco Gerards <mgerards@xs4all.nl> · b04216ab
      marco_g authored
      	* conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
      	and `cd' to make sure the filename is not prefixed with a
      	directory name.
      	(pkgdata_MODULES): Add `gpt.mod'.
      	(gpt_mod_SOURCES): New variable.
      	(gpt_mod_CFLAGS): Likewise.
      	(gpt_mod_LDFLAGS): Likewise.
      
      	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
      
      	* include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
      	New macro.
      
      	* partmap/gpt.c: New file.
      
      	* partmap/pc.c (pc_partition_map_iterate): Don't continue when a
      	GPT partition map is detected.
      b04216ab