grub/grub-core/kern
Vladimir 'phcoder' Serbinenko 076e7c0fda Merge common RAID and LVM logic to an abstract diskfilter.
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.
2012-01-29 14:28:01 +01:00
..
efi Move grub_reboot out of the kernel. 2011-10-19 16:53:18 +02:00
emu Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
generic automake commit without merge history 2010-05-06 11:34:04 +05:30
i386 * grub-core/kern/i386/realmode.S: Increase alignment. 2011-12-15 19:17:36 +01:00
ia64 * grub-core/lib/LzmaEnc.c (LzmaEnc_CodeOneBlock): Remove set but not 2011-11-08 19:46:41 +01:00
ieee1275 IEEE1275 disk write support. 2012-01-25 18:32:08 +01:00
mips * grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as 2012-01-20 14:48:26 +01:00
powerpc * grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove 2012-01-18 13:54:59 +01:00
sparc64 * grub-core/kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Support 2011-12-13 19:56:50 +01:00
x86_64 * grub-core/kern/x86_64/efi/callwrap.S: Fix the comment. 2011-11-16 21:35:40 +01:00
command.c Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
corecmd.c Rename jail to extractor 2010-09-20 23:01:34 +02:00
device.c Add backward compatibiulity with old (pxe) syntax. Several cleanups 2011-06-26 17:06:18 +02:00
disk.c Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
dl.c * grub-core/kern/dl.c (grub_dl_load_segments): Fix alignment handling. 2011-11-16 21:40:50 +01:00
elf.c Implement automatic module license checking according to new GNU 2011-04-11 23:01:51 +02:00
env.c Add const keyword to grub_env_get and gettextize week days. 2011-11-11 20:34:37 +01:00
err.c Pause the execution (10s max) if any errors are displayed so the user 2010-09-20 17:46:35 +02:00
file.c Fix broken blksize negotiation, fix broken seek and change a way net device is filled n i386-pc 2011-07-02 17:58:23 +02:00
fs.c Use a net fs struct to handle open, reand and close in file. 2011-05-27 00:22:35 -03:00
list.c Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
main.c Add noreturn attributes and remove unreachable code. 2011-12-13 15:13:51 +01:00
misc.c * grub-core/kern/misc.c (grub_vsnprintf_real): Fix fmt2 parsing. 2011-12-13 19:55:27 +01:00
mm.c Fix the usage of unsupported %zx 2011-07-06 17:41:19 +02:00
parser.c Add const keyword to grub_env_get and gettextize week days. 2011-11-11 20:34:37 +01:00
partition.c * grub-core/commands/acpihalt.c: Gettextized. 2011-11-11 21:44:56 +01:00
rescue_parser.c merge with mainline 2010-07-13 00:43:28 +05:30
rescue_reader.c Add noreturn attributes and remove unreachable code. 2011-12-13 15:13:51 +01:00
term.c poll cards when idle 2011-07-06 13:37:33 +02:00
time.c automake commit without merge history 2010-05-06 11:34:04 +05:30
vga_init.c VGA text support in qemu-mips 2011-07-05 23:46:15 +02:00