vaseboot/include/grub
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
..
arc ARC disk write support. 2012-01-25 16:13:34 +01:00
efi merge mainline into net 2011-12-15 20:51:35 +01:00
efiemu Replace UINT_TO_PTR and PTR_TO_UINT with explicit grub_addr_t casts. 2011-12-15 19:59:49 +01:00
emu Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
i386 Remove defines pertaining to arbitrary limits not affecting GRUB 2012-01-14 11:30:43 +01:00
ia64 Make grub_prefix into module to fix the arbitrary limit and save 2011-10-18 15:21:51 +02:00
ieee1275 IEEE1275 disk write support. 2012-01-25 18:32:08 +01:00
lib Add missing const qualifiers. 2011-11-30 16:20:13 +01:00
mips * grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as 2012-01-20 14:48:26 +01:00
net nslookup implementation 2011-10-14 19:21:59 +02:00
powerpc Reorganise memory map handling 2010-09-04 17:10:10 +02:00
sparc64 Remove redundant grub_kernel_image_size. 2011-10-20 08:13:00 +02:00
util 2011-10-09 Robert Millan <rmh@gnu.org> 2011-10-09 21:13:00 +02:00
x86_64 Fix video on platforms where unaligned access is forbidden. 2011-12-13 20:07:33 +01:00
zfs Remove defines pertaining to arbitrary limits not affecting GRUB 2012-01-14 11:30:43 +01:00
acorn_filecore.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
acpi.h * grub-core/commands/acpihalt.c (skip_ext_op): Skip index field op. 2010-10-16 20:01:30 +02:00
aout.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
at_keyboard.h Handle ACKs, NACKs and restore state on booting 2010-08-23 20:43:44 +02:00
ata.h Support ATA disks with 4K sectors. 2011-07-25 08:14:34 +02:00
auth.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
autoefi.h Reorganise memory map handling 2010-09-04 17:10:10 +02:00
bitmap.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
bitmap_scale.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
bsdlabel.h Make knetbsd pass bootinfo bootdisk and bootwedge. 2011-09-28 23:45:57 +02:00
bufio.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
cache.h Flush caches on DMA memory. 2011-05-13 20:56:50 +02:00
charset.h Avoid cutting in the middle of UTF-8 string. 2011-12-25 16:11:41 +01:00
cmos.h CMOS support on sparc. 2011-07-05 20:24:20 +02:00
command.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
crypto.h Unify and improve RAID and crypto xor. 2011-12-13 01:26:53 +01:00
cryptodisk.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
cs5536.h * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong. 2011-08-19 23:11:09 +02:00
datetime.h * include/grub/datetime.h (grub_get_datetime_cmos): Don't define in 2012-01-18 14:01:11 +01:00
decompressor.h MAke a separate scratch for decompressor 2010-09-21 19:39:51 +02:00
deflate.h Various squash4 fixes and LZO and XZ support. 2011-12-26 13:18:01 +01:00
device.h Hook network protocols 2010-09-02 00:07:55 +02:00
disk.h Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
diskfilter.h Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
dl.h * include/grub/dl.h (GRUB_ARCH_DL_TRAMP_SIZE) [__ia64__]: Add back 2011-11-12 00:26:04 +01:00
elf.h track function symbols 2011-05-08 18:29:37 +02:00
elfload.h 2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com> 2010-11-08 11:14:54 -02:00
env.h Add const keyword to grub_env_get and gettextize week days. 2011-11-11 20:34:37 +01:00
env_private.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
err.h nslookup implementation 2011-10-14 19:21:59 +02:00
extcmd.h Put terminfo into core on ieee1275 and yeeloong (needed for console). 2010-09-30 17:50:01 +02:00
fat.h add missing file 2011-05-18 12:41:22 +02:00
fbblit.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
fbfill.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
fbutil.h Fix video on platforms where unaligned access is forbidden. 2011-12-13 20:07:33 +01:00
file.h * include/grub/file.h (grub_file_filter_id): Set 2011-08-22 09:18:22 +02:00
font.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
fontformat.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
fs.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
fshelp.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
gfxmenu_model.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
gfxmenu_view.h Move gfxmenu color handling to video, so that gfxterm can use it 2010-12-10 16:45:58 +00:00
gfxterm.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
gfxwidgets.h Take into account the decorations the computing menu entry width. 2011-04-19 00:44:53 +02:00
gpt_partition.h Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
gui.h Move gfxmenu color handling to video, so that gfxterm can use it 2010-12-10 16:45:58 +00:00
gui_string_util.h Move gfxmenu color handling to video, so that gfxterm can use it 2010-12-10 16:45:58 +00:00
hfs.h HFS filesystem mtime support 2010-12-11 07:00:31 +01:00
i18n.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
icon_manager.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
kernel.h * include/grub/kernel.h (FOR_MODULES): Make it a bit faster. 2011-12-14 23:59:11 +01:00
keyboard_layouts.h Macroify key constants 2010-08-22 23:56:41 +02:00
legacy_parse.h Support mixed inline and suffix commands 2010-09-12 15:50:52 +02:00
libgcc.h * configure.ac: Check for __ctzdi2 and __ctzsi2. 2011-10-16 15:15:35 +02:00
libpciaccess.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
libusb.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
list.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
loader.h * include/grub/loader.h (grub_loader_register_preboot_hook): 2011-12-13 00:28:14 +01:00
lvm.h Merge common RAID and LVM logic to an abstract diskfilter. 2012-01-29 14:28:01 +01:00
macho.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
machoload.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
memory.h Reorganise memory map handling 2010-09-04 17:10:10 +02:00
menu.h Submenu default support. 2011-01-10 23:27:58 +01:00
menu_viewer.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
misc.h Eliminate grub_min/grub_max prone to overflow usage. 2012-01-14 15:44:34 +01:00
mm.h Merge mainline into plan9 2011-11-13 12:48:39 +01:00
mm_private.h fix grub-emu compilation 2010-08-28 14:52:25 +02:00
msdos_partition.h Generate partmaps for plan9 2010-12-21 00:04:31 +01:00
multiboot.h Fix coreboot compilation. 2010-09-29 23:51:12 +02:00
multiboot_loader.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
net.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
normal.h Remove defines pertaining to arbitrary limits not affecting GRUB 2012-01-14 11:30:43 +01:00
ns8250.h Fix compilation on yeeloong 2010-08-29 13:45:36 +02:00
ntfs.h Support 4K-sector NTFS. 2012-01-20 15:01:35 +01:00
offsets.h Eliminate fixed limit on reed solomon decoder length. 2012-01-24 14:39:29 +01:00
parser.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
partition.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
parttool.h Add missing const qualifiers. 2011-11-30 16:20:13 +01:00
pci.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
pciutils.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
priority_queue.h Use priority queue to reassemble TFTP packets 2011-07-09 01:28:47 +02:00
reader.h Add noreturn attributes and remove unreachable code. 2011-12-13 15:13:51 +01:00
reed_solomon.h C part of Reed-Solomon 2010-09-24 14:05:47 +02:00
relocator.h merge boottest into newreloc 2010-04-27 13:34:07 +02:00
relocator_private.h Fix ppc compilation problems 2010-05-01 13:23:19 +02:00
script_sh.h Add const keyword to grub_env_get and gettextize week days. 2011-11-11 20:34:37 +01:00
scsi.h merge mainline into lazy 2011-07-07 12:21:53 +02:00
scsicmd.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
sdl.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
search.h support subpartition hints 2010-09-13 12:16:22 +02:00
serial.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
setjmp.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
smbus.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
symbol.h Split config.h for util and core. 2010-09-19 22:22:43 +02:00
term.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
terminfo.h some additional key sequences for arc 2011-05-13 16:38:23 +02:00
test.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
time.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
tparm.h Add missing const qualifiers. 2011-11-30 16:20:13 +01:00
trig.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
types.h merge mainline into net 2011-12-15 20:51:35 +01:00
unicode.h * grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix. 2011-12-25 16:07:33 +01:00
usb.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
usbdesc.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
usbserial.h Allow psartial transfers and use them for usbserial 2010-07-19 08:43:01 +02:00
usbtrans.h Add pot powered flag declaration 2010-08-23 23:28:33 +02:00
vga.h VGA text support in qemu-mips 2011-07-05 23:46:15 +02:00
video.h Replace single-linked with double-linked lists. It results in more 2012-01-24 13:31:12 +01:00
video_fb.h working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
xnu.h Add missing const qualifiers. 2011-11-30 16:20:13 +01:00