Vladimir 'phcoder' Serbinenko
94f064b4c9
Fix interrupt mixup from previous commit.
...
* include/grub/i386/pc/int.h (grub_i386_idt): New struct.
(grub_realidt): New var.
* grub-core/lib/i386/relocator16.S (grub_relocator16_idt): New variable
Load idt.
* grub-core/lib/i386/relocator.c (grub_relocator16_idt):
New declaration.
(grub_relocator16_boot): Set grub_relocator16_idt.
* grub-core/kern/i386/realmode.S (realidt): Renamed to ...
(LOCAL(realidt)): ... this.
* grub-core/boot/i386/pc/startup_raw.S: Pass pointer to realidt in eax.
* grub-core/kern/i386/pc/startup.S: Save pointer to realidt.
(grub_realidt): New variable.
2012-02-26 22:10:13 +01:00
Lubomir Kundrak
ff27c3dd5d
GDB serial and backtrace support.
...
* grub-core/kern/i386/realmode.S (real_to_prot): Reload IDT.
(prot_to_real): Likewise.
* grub-core/kern/i386/int.S (grub_bios_interrupt): Remove IDT reload.
* grub-core/Makefile.core.def (backtrace): New module.
(gdb): Likewise.
* grub-core/gdb/cstub.c: New file.
* grub-core/gdb/gdb.c: Likewise.
* grub-core/gdb/i386/idt.c: Likewise.
* grub-core/gdb/i386/machdep.S: Likewise.
* grub-core/gdb/i386/signal.c: Likewise.
* grub-core/lib/i386/backtrace.c: Likewise.
* include/grub/backtrace.h: Likewise.
* include/grub/gdb.h: Likewise.
* include/grub/i386/gdb.h: Likewise.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-26 19:17:37 +01:00
Vladimir 'phcoder' Serbinenko
1948a3b714
Several cleanups
2012-02-26 19:10:52 +01:00
Vladimir 'phcoder' Serbinenko
7e8fac16ad
$"..." support in scripts.
...
* grub-core/script/execute.c (grub_script_arglist_to_argv): Handle
GRUB_SCRIPT_ARG_TYPE_GETTEXT.
* grub-core/script/yylex.l: Likewise.
* include/grub/script_sh.h (GRUB_SCRIPT_ARG_TYPE_GETTEXT): New enum
value.
2012-02-26 19:02:46 +01:00
Vladimir 'phcoder' Serbinenko
8b282ad222
* grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type
...
to grub_ssize_t.
* grub-core/normal/main.c (grub_normal_init_page): Fix msg_len type.
* include/grub/charset.h (grub_utf8_to_ucs4_alloc): Fix prototype.
2012-02-26 17:20:30 +01:00
Vladimir 'phcoder' Serbinenko
a9c7fd1c6c
Implement serial on IEEE1275 and EFI.
...
* docs/grub.texi (Platform-specific limitations): Fix the columen video
on emu. Mention arc and emu as the only platforms without serial
support.
* grub-core/Makefile.core.def (serial): Enable on all terminfomodule and
ieee1275 platforms.
* grub-core/term/efi/serial.c: New file.
* grub-core/term/ieee1275/serial.c: Likewise.
* grub-core/term/serial.c (grub_serial_find): Disable direct port
specification if no ns8250 driver is available.
(grub_cmd_serial): Likewise.
(GRUB_MOD_INIT) [GRUB_MACHINE_IEEE1275]: Init ofserial.
(GRUB_MOD_INIT) [GRUB_MACHINE_EFI]: Init efiserial.
* include/grub/efi/api.h (GRUB_EFI_SERIAL_IO_GUID): New define.
(grub_efi_parity_type_t): New type.
(grub_efi_stop_bits_t): Likewise.
(grub_efi_serial_io_interface): New struct.
* include/grub/serial.h (grub_serial_port): Make 'broken' field
available for all interfaces.
Add EFI and IEEE1275 fields.
(grub_ofserial_init): New proto.
(grub_efiserial_init): Likeiwse.
* util/grub.d/00_header.in: Don't check for the presence of serial
module.
2012-02-26 17:08:11 +01:00
Vladimir 'phcoder' Serbinenko
463dcadca3
* include/grub/acpi.h (GRUB_ASCII_OPCODE): Add
...
GRUB_ACPI_OPCODE_STRING_CONST, GRUB_ACPI_OPCODE_BUFFER,
GRUB_ACPI_OPCODE_CREATE_WORD_FIELD
and GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD.
* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Replace include of
i18n with gettext no-op.
(skip_data_ref_object): Support GRUB_ACPI_OPCODE_BUFFER and
GRUB_ACPI_OPCODE_STRING_CONST.
(get_sleep_type): Support GRUB_ACPI_OPCODE_CREATE_WORD_FIELD and
GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD. Add handling of unknown opcodes.
2012-02-22 16:02:03 +01:00
Vladimir 'phcoder' Serbinenko
b00d7fb6c5
Make list_push and list_remove functions rather than inline functions
...
to decrease size and avoid aliasing violations.
* include/grub/list.h (grub_list_push): Move to ...
* grub-core/kern/list.c (grub_list_push): ... here. Don't inline.
* include/grub/list.h (grub_list_remove): Move to ...
* grub-core/kern/list.c (grub_list_remove): ... here. Don't inline.
2012-02-22 05:01:20 +01:00
Vladimir 'phcoder' Serbinenko
515e8007fc
merge mainline into gdb
2012-02-18 21:00:13 +01:00
Vladimir 'phcoder' Serbinenko
fc400bfd74
merge backtrace into gdb
2012-02-18 20:59:42 +01:00
Vladimir 'phcoder' Serbinenko
a8f16eab1a
Replace grub_checkkey with grub_getkey_noblock.
...
* grub-core/kern/term.c (grub_checkkey): Replaced with ...
(grub_getkey_noblock): ... this. All users updated.
2012-02-18 19:59:01 +01:00
Vladimir 'phcoder' Serbinenko
e51b56667a
* include/grub/test.h (grub_unit_test_init): Add missing prototype.
...
(grub_unit_test_fini): Likewise.
* tests/lib/unit_test.c (main): Remove extra nested external prototype.
2012-02-12 22:04:55 +01:00
Vladimir 'phcoder' Serbinenko
0331e102c9
Efiemu stylistic fixes and gettext.
...
* grub-core/efiemu/i386/loadcore32.c
(grub_arch_efiemu_relocate_symbols32): Avoid set in if.
* grub-core/efiemu/i386/loadcore64.c
(grub_arch_efiemu_relocate_symbols64): Likewise.
* grub-core/efiemu/i386/pc/cfgtables.c
(grub_machine_efiemu_init_tables): Likewise.
* grub-core/efiemu/loadcore.c (grub_efiemu_resolve_symbols): Likewise.
(grub_efiemu_loadcore_initXX): Add a filename argument.
All users updated.
Improved error message.
* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_init):
Add a filename argument.
All users updated.
* grub-core/efiemu/symbols.c (grub_efiemu_set_virtual_address_map):
Reclassify double relocation as GRUB_ERR_BUG.
2012-02-12 18:43:39 +01:00
Vladimir 'phcoder' Serbinenko
f991dd3c32
* include/grub/misc.h (grub_error_save): Fix cleaning grub_errno.
2012-02-12 17:21:09 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d
Improve string. Gettextize.
2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
4786a90fee
* grub-core/disk/diskfilter.c (grub_diskfilter_print_partmap)
...
[GRUB_UTIL]: New function.
(insert_array) [GRUB_UTIL]: Store partmaps.
* include/grub/diskfilter.h (grub_diskfilter_pv) [GRUB_UTIL]: New member
partmaps.
(grub_diskfilter_print_partmap) [GRUB_UTIL]: New proto.
* util/grub-probe.c (probe_partmap): Call grub_diskfilter_print_partmap.
(probe_abstraction): Print diskfilter and not raid.
Reported by: Lennart Sorensen
2012-02-11 11:57:47 +01:00
Vladimir 'phcoder' Serbinenko
dfdffd0d94
* include/grub/emu/misc.h (grub_util_warn): Add missing format
...
attribute.
(grub_util_info): Likewise.
(grub_util_error): Likewise.
2012-02-10 14:15:14 +01:00
Vladimir 'phcoder' Serbinenko
164ebb480d
* include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
...
(FUNCTION) [GRUB_UTIL]: Likewise.
(VARIABLE) [GRUB_UTIL]: Likewise.
2012-02-10 12:47:42 +01:00
Vladimir 'phcoder' Serbinenko
44318d6168
* include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
...
NEED_REGISTER_FRAME_INFO in GRUB_UTIL.
2012-02-10 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
ccc3b1b898
* grub-core/kern/emu/full.c (grub_emu_post_init): Remove raid reinit.
...
* include/grub/disk.h [GRUB_MACHINE_EMU]: Remove now useless LVM/RAID
declarations.
2012-02-09 23:15:27 +01:00
Vladimir 'phcoder' Serbinenko
b2c0c4a6c6
* include/grub/net.h: Remove double declarations.
2012-02-09 22:44:28 +01:00
Vladimir 'phcoder' Serbinenko
e4e37e8dfa
Fix `help' with unloaded modules.
...
* include/grub/normal.h (grub_dyncmd_get_cmd): New proto.
* grub-core/normal/dyncmd.c (grub_dyncmd_get_cmd): New function.
(grub_dyncmd_dispatcher): Small stylistic fix.
* grub-core/commands/help.c (grub_cmd_help): Load missing modules when
explicit help is requested.
2012-02-09 14:38:34 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6
Improve gettext support. Stylistic fixes and error handling fixes while
...
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
215c90cb82
* grub-core/lib/i386/relocator16.S: Revert moving A20 code into PM
...
part. Instead setup the correct stack in RM.
* grub-core/lib/i386/relocator.c (grub_relocator16_boot): Reserve place
for stack.
* include/grub/i386/relocator_private.h: New file.
2012-02-07 22:31:14 +01:00
Vladimir 'phcoder' Serbinenko
0ae70393ba
Improve and unify messages.
...
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument
name. All users updated.
Print filename in error.
(read_device_map): Print filename in error.
* util/getroot.c (grub_guess_root_devices): Print filename in error.
(grub_util_get_os_disk): Likewise.
(grub_util_biosdisk_get_grub_dev): Likewise.
(grub_util_check_block_device): Likewise.
(grub_util_check_char_device): Likewise.
(grub_make_system_path_relative_to_its_root): Likewise.
* util/grub-editenv.c (create_envblk_file): Likewise.
(open_envblk_file): Likewise.
(write_envblk): Likewise.
* util/grub-fstest.c (cmd_cp): Likewise.
(cmd_cat): Likewise.
(cmd_cmp): Likewise.
* util/grub-menulst2cfg.c (main): Likewise.
* util/grub-mkfont.c (write_font_ascii_bitmap): Likewise.
(write_font_width_spec): Likewise.
(write_font_pf2): Likewise.
* util/grub-mkimage.c (generate_image): New argument outname.
All users updated.
Remove unreacheable message.
(options): Unify messages.
(help_filter): Likewise.
* util/grub-mklayout.c (usage): Removed (unused).
(main): Print filename in error.
* util/grub-mkrescue.in: Fix wrong quoting.
* util/grub-setup.c (setup): Print filename in error.
* util/ieee1275/ofpath.c (vendor_is_ATA): Likewise.
(check_sas): Likewise.
* util/misc.c (grub_util_get_fp_size): Removed.
(grub_util_get_image_size): Print filename in error.
(grub_util_read_at): Removed.
(grub_util_read_image): Print filename in error.
(grub_util_load_image): Likewise.
(grub_util_write_image_at): New argument filename. All users updated.
Print filename in error.
(grub_util_write_image): New argument filename. All users updated.
Print filename in error.
* util/raid.c (grub_util_raid_getmembers): Print filename in error.
* util/resolve.c (grub_util_resolve_dependencies): Likewise.
2012-02-05 11:07:33 +01:00
Vladimir 'phcoder' Serbinenko
0a96117de7
* grub-core/Makefile.core.def (pxechain): New module.
...
* grub-core/loader/i386/pc/pxechainloader.c: New file.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_get_cached): New
function.
(grub_pc_net_config_real): Use grub_pxe_get_cached.
* include/grub/i386/pc/pxe.h (grub_pxe_get_cached): New proto.
2012-02-05 10:33:52 +01:00
Vladimir 'phcoder' Serbinenko
aca002f7e4
* grub-core/kern/err.c (GRUB_MAX_ERRMSG): Move to ...
...
* include/grub/err.h (GRUB_MAX_ERRMSG): ... here.
* include/grub/err.h (grub_error_saved): New struct.
(grub_errmsg): Make array size explicit.
* include/grub/misc.h (grub_error_save): New function.
(grub_error_load): Likewise.
* grub-core/kern/err.c (grub_error_stack_items): Use grub_error_saved.
(grub_error_push): Update `errno' member name.
(grub_error_pop): Likewise
* grub-core/net/tftp.c (tftp_data): New member save_err.
(tftp_receive): Save error.
(tftp_open): Restore error.
2012-02-05 10:24:53 +01:00
Vladimir 'phcoder' Serbinenko
db606889a9
* grub-core/kern/ieee1275/openfw.c (grub_claimmap): Change to
...
grub_error framework. All users updated.
2012-02-04 14:00:23 +01:00
Vladimir 'phcoder' Serbinenko
8be63f2ef6
* Makefile.util.def (grub-mkdevicemap): Removed.
...
* include/grub/emu/hostdisk.h (grub_util_get_os_disk): New proto.
* include/grub/util/deviceiter.h: Removed.
* util/deviceiter.c: Likewise.
* util/getroot.c (grub_util_get_os_disk): New function.
* util/grub-install.in: Remove grub-mkdevicemap. Use -t disk as
replacement for EFI.
* util/grub-mkdevicemap.c: Removed.
* util/grub-probe.c (probe): Handle PRINT_DISK.
(argp_parser): Handle -t disk.
2012-02-03 22:36:51 +01:00
Vladimir 'phcoder' Serbinenko
cf5f7ee788
Support install on multi-device filesystems.
...
* include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ...
(grub_guess_root_devices): ...this. Return char **. All users updated.
* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo):
Removed.
* util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ...
(find_root_devices_from_poolname): ... here.
(grub_find_root_devices_from_mountinfo): Return char **. Make static.
Support zfs-fuse.
(grub_guess_root_device): Rename to ...
(grub_guess_root_devices): ... this. Return char **. All users updated.
* util/grub-install.in: Handle multi-device filesystems.
* util/grub-probe.c (probe). Make device_names a char **. Add delim
argument. All users updated.
Handle multi-device filesystems.
Use 'delim' as separator.
Remove device check to allow filesystems on file.
(main): Support -0 argument. Handle multi-device.
* util/grub-setup.c (setup): Remove root argument. Handle multi-device.
Fix a cross-device check while on it.
(arguments): Remove root_dev.
(argp_parser): Remove -r.
(main): Remove root_dev.
2012-02-03 10:35:28 +01:00
Vladimir 'phcoder' Serbinenko
d68538e928
merge mainline into cbi
2012-02-01 14:30:40 +01:00
Vladimir 'phcoder' Serbinenko
cefa01261b
merge mainline into ehci
2012-02-01 13:19:42 +01:00
Vladimir 'phcoder' Serbinenko
9c08ad8707
* grub-core/disk/scsi.c (grub_scsi_read_capacity): Renamed to ...
...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity16): New function.
(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
0xffffffff.
Fix off-by-one error.
* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
64-bit unsigned.
* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity_data): Rename to ...
(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
(grub_scsi_read_capacity16): New struct.
(grub_scsi_read_capacity16_data): Likewise.
(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
grub_scsi_cmd_read_capacity10.
New command grub_scsi_cmd_read_capacity16.
2012-01-30 18:33:11 +01:00
Vladimir 'phcoder' Serbinenko
bc8d0f45a5
SCSI >2TiB support.
...
* grub-core/disk/scsi.c (grub_scsi_read16): New function.
(grub_scsi_write16): Likewise.
(grub_scsi_read): Use read16 when necessary.
(grub_scsi_write): Likewise.
* include/grub/scsicmd.h (grub_scsi_read16): New struct.
(grub_scsi_write16): Likewise.
(grub_scsi_cmd_t): Add READ16 and WRITE16.
2012-01-30 12:47:26 +01:00
Vladimir 'phcoder' Serbinenko
cc774926f1
SCSI write support (for usbms mainly).
...
* grub-core/disk/scsi.c (grub_scsi_write10): Uncomment. Make buffer
a const pointer.
(grub_scsi_write): Implement.
* include/grub/scsi.h (grub_scsi_dev): Make write buffer a const pointer
2012-01-30 12:26:11 +01:00
Vladimir 'phcoder' Serbinenko
0b3b3b38bd
* grub-core/lib/posix_wrap/limits.h (SHRT_MAX): New define.
...
(INT_MAX): Likewise.
* grub-core/lib/posix_wrap/stdio.h (snprintf): New function.
* grub-core/lib/posix_wrap/stdlib.h (abs): Likewise.
* grub-core/lib/posix_wrap/string.h (memcmp): Likewise.
(strcpy): Likewise.
(strstr): Likewise.
(strchr): Likewise.
(strncpy): Likewise.
(strcat): Likewise.
(strncat): Likewise.
(strcoll): Likewise.
* include/grub/types.h (GRUB_SHRT_MAX): New define.
(GRUB_INT_MAX): Likewise.
2012-01-29 23:27:31 +01:00
Vladimir 'phcoder' Serbinenko
f37c87e1ba
* grub-core/boot/i386/pc/lnxboot.S: Use
...
GRUB_DECOMPRESSOR_MAX_DECOMPRESSOR_SIZE.
* grub-core/boot/i386/pc/startup_raw.S: Ensure about boot_dev
location.
* include/grub/offsets.h (GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE): New
definition.
(GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE): Likewise.
2012-01-29 23:20:02 +01:00
Vladimir 'phcoder' Serbinenko
63fe43f3c3
* util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak.
...
* grub-core/disk/cryptodisk.c (cryptodisk_cleanup): Disable for
now to avoid double free.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_dev): Rename to
hostdisk.
* include/grub/disk.h (grub_disk_dev_id): New id HOSTDISK.
* util/grub-probe.c (escape_of_path): Always return a new copy.
(print_full_name): Escape path.
(probe): Don't call grub_util_devname_to_ofpath on NULL.
Fix hints on abstractions.
2012-01-29 21:49:44 +01:00
Vladimir 'phcoder' Serbinenko
2b5336a24a
* include/grub/ata.h (grub_ata): Add a new element maxbuffer.
...
* grub-core/disk/ata.c (grub_ata_readwrite): Limit to ata->maxbuffer.
* grub-core/disk/pata.c (grub_pata_open): Set ata->maxbuffer.
* grub-core/disk/ahci.c (grub_ahci_open): Likewise.
2012-01-29 19:00:30 +01:00
Vladimir 'phcoder' Serbinenko
74310bd8a7
* include/grub/zfs/dnode.h (DN_MIN_INDBLKSHIFT): Removed.
2012-01-29 18:56:44 +01:00
Vladimir 'phcoder' Serbinenko
9c6e84b838
Cryptodisk write support.
...
* grub-core/disk/cryptodisk.c (grub_crypto_pcbc_encrypt): New function.
(grub_cryptodisk_decrypt): Moved logic to ...
(grub_cryptodisk_endecrypt): ...this. New argument "encrypt".
(grub_cryptodisk_write): Implement.
* grub-core/kern/emu/hostdisk.c (nwrite): Rename to ...
(grub_util_fd_write): ... this. Make global.
* include/grub/emu/hostdisk.h (grub_util_fd_write): New proto.
2012-01-29 18:16:48 +01:00
Vladimir 'phcoder' Serbinenko
87cf97447e
* include/grub/list.h (grub_list_remove): Don't crash if element is
...
removed twice.
2012-01-29 18:09:53 +01:00
Vladimir 'phcoder' Serbinenko
64c8b8f64c
* grub-core/loader/i386/pc/plan9.c (grub_cmd_plan9): Remove PXE
...
handling.
* include/grub/disk.h (grub_disk_dev_id): Remove obsolete
GRUB_DISK_DEVICE_UUID_ID, GRUB_DISK_DEVICE_PXE_ID and
GRUB_DISK_DEVICE_FILE_ID.
2012-01-29 16:34:39 +01:00
Vladimir 'phcoder' Serbinenko
4ed3c26b0d
* include/grub/powerpc/ieee1275/util/biosdisk.h: Remove.
...
* include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2012-01-29 16:20:41 +01:00
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
Vladimir 'phcoder' Serbinenko
7626111087
IEEE1275 disk write support.
...
* grub-core/kern/ieee1275/ieee1275.c (grub_ieee1275_write): Make buffer
const void *.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_write): Likewise.
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_read): Move open
and seek loginc to ...
(grub_ofdisk_prepare): ... here.
(grub_ofdisk_write): Implement.
2012-01-25 18:32:08 +01:00
Vladimir 'phcoder' Serbinenko
fc36d6038b
ARC disk write support.
...
* grub-core/disk/arc/arcdisk.c (handle_writable): New var.
(reopen): New argument writable. All users updated.
Handle required access mode.
(grub_arcdisk_write): Implement.
* include/grub/arc/arc.h (grub_arc_file_access): New enum.
(grub_arc_firmware_vector): Make buffer to write a const buffer.
2012-01-25 16:13:34 +01:00
Vladimir 'phcoder' Serbinenko
2e13ede59e
Eliminate fixed limit on reed solomon decoder length.
...
* grub-core/boot/i386/pc/lnxboot.S: Scan for multiboot signature
rather than hardcoding the address.
* grub-core/boot/i386/pc/startup_raw.S: Add new data field
no_reed_solomon_length.
Move gate_a20 to no-reed-solomon part.
Don't force a particular size of no reed-solomon part.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART):
Removed.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH): New define.
* util/grub-setup.c (setup): Read no_rs_length from the image itself.
2012-01-24 14:39:29 +01:00
Vladimir 'phcoder' Serbinenko
87edb8940a
Replace single-linked with double-linked lists. It results in more
...
compact and more efficient code.
* grub-core/kern/list.c (grub_list_push): Moved from here ...
* include/grub/list.h (grub_list_push): ... to here. Set prev.
(grub_list_remove): Moved from here ...
* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
(grub_prio_list_insert): Set prev.
* include/grub/list.h (grub_list): Add prev. All users updated.
2012-01-24 13:31:12 +01:00
Vladimir 'phcoder' Serbinenko
b508af6989
Support 4K-sector NTFS.
...
* include/grub/ntfs.h (GRUB_NTFS_MAX_MFT): Increase to 8.
(grub_ntfs_data): Remove blocksize.
* grub-core/fs/ntfs.c (fixup): Fix size comparison.
Remove data argument. All users updated.
2012-01-20 15:01:35 +01:00