Vladimir 'phcoder' Serbinenko
496bd07446
Unify and improve RAID and crypto xor.
...
* grub-core/disk/raid.c (grub_raid_block_xor): Removed. All users
changed to grub_crypto_xor
* grub-core/lib/crypto.c (grub_crypto_xor): Moved from here ...
* include/grub/crypto.h (grub_crypto_xor): ... here. Inlined.
Use bigger types when possible.
2011-12-13 01:26:53 +01:00
Vladimir 'phcoder' Serbinenko
ef6e433586
* grub-core/disk/raid.c (scan_devices): Fix condition.
2011-12-13 01:19:47 +01:00
Vladimir 'phcoder' Serbinenko
5d048bf210
* grub-core/net/drivers/ieee1275/ofnet.c (bootp_response_properties):
...
Make name a const ptr.
2011-12-13 01:07:06 +01:00
Vladimir 'phcoder' Serbinenko
ee533335f5
* grub-core/kern/ieee1275/ieee1275.c (grub_ieee1275_finddevice): Make
...
first argument a const pointer.
* grub-core/kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_finddevice): Update
proto.
(grub_children_iterate): Likewise.
(grub_machine_mmap_iterate): Remove redundant declaration.
2011-12-13 01:00:34 +01:00
Vladimir 'phcoder' Serbinenko
cc8f366887
* grub-core/commands/acpi.c (grub_acpi_create_ebda) [!x86]: Disable.
...
(grub_cmd_acpi) [!x86]: Disable EBDA.
2011-12-13 00:55:00 +01:00
Vladimir 'phcoder' Serbinenko
c5fc563aff
Enable UTF8 in gnulib regexp.
...
* config.h.in (RE_ENABLE_I18N) [!GRUB_UTIL]: New define.
* grub-core/lib/posix_wrap/ctype.h (islower): Use grub_islower.
(isupper): Use grub_isupper.
(isascii): New inline function.
* grub-core/lib/posix_wrap/wchar.h: Replace dummy with real contents.
* grub-core/lib/posix_wrap/wctype.h: Likewise.
* grub-core/normal/charset.c (grub_utf8_process): New function.
(grub_utf8_to_utf16): Use grub_utf8_process.
(grub_encode_utf8_character): New function.
(grub_ucs4_to_utf8): Use grub_encode_utf8_character.
* include/grub/charset.h (grub_utf8_process): New declaration.
(grub_encode_utf8_character): Likewise.
* include/grub/misc.h (grub_islower): New inline function.
(grub_isupper): Likewise.
(grub_strchrsub): Moved down to fix the definitions.
2011-12-13 00:50:49 +01:00
Vladimir 'phcoder' Serbinenko
0af2346fdb
* grub-core/bus/usb/ohci.c (grub_ohci_check_transfer): Add an unsigned
...
specification.
2011-12-13 00:29:42 +01:00
Vladimir 'phcoder' Serbinenko
74dbd24466
* include/grub/loader.h (grub_loader_register_preboot_hook):
...
Use struct preboot * and not void * for handle. All users updated.
(grub_loader_unregister_preboot_hook): Likewise.
2011-12-13 00:28:14 +01:00
Vladimir 'phcoder' Serbinenko
1bc8f60db7
* include/grub/charset.h (GRUB_MAX_UTF8_PER_UTF16): New const.
...
* grub-core/fs/hfsplus.c (grub_hfsplus_catkey_internal): Change to
UTF-16-BE. All users updated.
(grub_hfsplus_cmp_catkey): Fix unicode handling.
(grub_hfsplus_iterate_dir): Likewise.
(grub_hfsplus_label): Likewise.
2011-12-12 22:40:43 +01:00
Vladimir 'phcoder' Serbinenko
48d6e45653
* grub-core/disk/ahci.c (grub_ahci_pciinit): Fix compat condition.
2011-12-12 22:20:14 +01:00
Vladimir 'phcoder' Serbinenko
bf3a385792
Add missing const qualifiers.
...
* grub-core/commands/i386/pc/sendkey.c (keysym): Add missing const.
* grub-core/commands/lspci.c (grub_pci_classname): Likewise.
* grub-core/commands/menuentry.c (hotkey_aliases): Likewise.
* grub-core/disk/lvm.c (grub_lvm_getvalue): Likewise.
(grub_lvm_check_flag): Likewise.
* grub-core/efiemu/i386/coredetect.c
(grub_efiemu_get_default_core_name): Likewise
* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_catkey_internal): Likewise.
* grub-core/fs/ntfs.c (fixup): Likewise.
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Likewise.
* grub-core/fs/zfs/zfs.c (decomp_entry): Likewise.
(fzap_lookup): Likewise.
(zap_lookup): Likewise.
* grub-core/gnulib/regcomp.c (init_dfa): Likewise.
* grub-core/lib/legacy_parse.c (check_option): Likewise.
* grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Likewise.
* grub-core/loader/i386/bsd.c (grub_bsd_add_meta): Likewise.
(grub_freebsd_add_meta_module): Likewise.
(grub_cmd_freebsd_module): Likewise.
* grub-core/loader/i386/xnu.c (tbl_alias): Likewise.
* grub-core/loader/xnu.c (grub_xnu_register_memory): Likewise.
(grub_xnu_writetree_get_size): Likewise.
(grub_xnu_writetree_toheap_real): Likewise.
(grub_xnu_find_key): Likewise.
(grub_xnu_create_key): Likewise.
(grub_xnu_create_value): Likewise.
(grub_xnu_register_memory): Likewise.
(grub_xnu_check_os_bundle_required): Likewise.
(grub_xnu_scan_dir_for_kexts): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
* grub-core/normal/color.c (color_list): Likewise.
* grub-core/normal/completion.c (current_word): Likewise.
* grub-core/normal/menu_entry.c (insert_string): Likewise.
* grub-core/term/serial.c (grub_serial_find): Likewise.
* grub-core/term/tparm.c (grub_terminfo_tparm): Likewise.
* include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
Likewise.
* include/grub/i386/bsd.h (grub_bsd_add_meta): Likewise.
(grub_freebsd_add_meta_module): Likewise.
* include/grub/lib/arg.h (grub_arg_option): Likewise.
* include/grub/net.h (grub_net_card_driver): Likewise.
(grub_net_card): Likewise.
(grub_net_app_protocol): Likewise.
* include/grub/parttool.h (grub_parttool_argdesc): Likewise.
* include/grub/serial.h (grub_serial_find): Likewise.
* include/grub/tparm.h (grub_terminfo_tparm): Likewise.
* include/grub/xnu.h (grub_xnu_create_key): Likewise.
(grub_xnu_create_value): Likewise.
(grub_xnu_find_key): Likewise.
(grub_xnu_scan_dir_for_kexts): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
* include/grub/zfs/zio_checksum.h (zio_checksum_t): Moved from here ...
* grub-core/fs/zfs/zfs.c (zio_checksum_t): ...here.
* include/grub/zfs/zio_checksum.h (zio_checksum_info):
Moved from here ...
* grub-core/fs/zfs/zfs.c (zio_checksum_info): ... here. Added missing const.
2011-11-30 16:20:13 +01:00
Colin Watson
112b483765
* util/getroot.c (find_root_device_from_libzfs): Use xasprintf.
2011-11-28 01:10:00 +00:00
Vladimir 'phcoder' Serbinenko
49e891ac9c
* grub-core/fs/zfs/zfs.c (recovery): Fix spelling.
...
(read_device): Fix size calculation.
2011-11-27 02:34:22 +01:00
Robert Millan
fd258e5cce
2011-11-25 Robert Millan <rmh@gnu.org>
...
* util/getroot.c [HAVE_LIMITS_H]: Include `<limits.h>'.
(find_root_device_from_libzfs): Add zpool output parser to be used
as fallback when libzfs isn't available.
2011-11-25 23:07:33 +01:00
Seth Goldberg
78845dc270
* po/Makefile.in.in: Add missing escape-continuation.
2011-11-25 14:16:44 +01:00
Vladimir 'phcoder' Serbinenko
adac52113d
* grub-core/fs/cpio.c (grub_cpio_dir): Handle subdirs correctly.
2011-11-25 14:12:05 +01:00
Vladimir 'phcoder' Serbinenko
10b64f1cf4
* grub-core/kern/dl.c (grub_dl_load_segments): Fix alignment handling.
2011-11-16 21:40:50 +01:00
Vladimir 'phcoder' Serbinenko
bb41695449
* grub-core/kern/dl.c (grub_dl_unload): Fix freeing segments.
2011-11-16 21:38:00 +01:00
Vladimir 'phcoder' Serbinenko
bdfe9eeb2c
* grub-core/kern/x86_64/efi/callwrap.S: Fix the comment.
2011-11-16 21:35:40 +01:00
Lubomir Kundrak
66d6a7937b
gdb over serial by Lubomir Kundrak and cleaned-up/updated by me (phcoder)
...
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-11-14 22:58:11 +01:00
Vladimir 'phcoder' Serbinenko
ab4378ae61
merge mainline into backtrace
2011-11-14 14:30:14 +01:00
Vladimir 'phcoder' Serbinenko
c1677cfccf
Fix a mismerge
2011-11-14 14:27:52 +01:00
Vladimir 'phcoder' Serbinenko
581ffa8a24
* grub-core/lib/adler32.c: Add missing license specification.
...
* grub-core/lib/crc64.c: Likewise.
* grub-core/loader/i386/pc/plan9.c: Likewise.
* grub-core/partmap/plan.c: Likewise.
2011-11-14 14:25:09 +01:00
Vladimir 'phcoder' Serbinenko
245f4582f9
merge mainline into backtrace
2011-11-14 10:50:24 +01:00
Vladimir 'phcoder' Serbinenko
9ad7edd055
merge mainline into backtrace
2011-11-14 10:49:13 +01:00
Lubomir Kundrak
2536cf6463
Add facility to debug GRUB with gdb under qemu.
...
* grub-core/gdb_grub.in: New file.
* grub-core/gmodule.pl.in: Likewise.
* grub-core/Makefile.core.def (gmodule.pl): New script.
(gdb_grub): Likewise.
2011-11-13 22:59:46 +01:00
Vladimir 'phcoder' Serbinenko
bc108a4a8a
* util/grub-mount.c (argp_parser): Accept relative pathes.
...
* util/grub-fstest.c (argp_parser): Likewise.
2011-11-13 19:53:12 +01:00
Vladimir 'phcoder' Serbinenko
111c17782a
Plan9 support.
...
* Makefile.util.def (libgrubmods): Add
grub-core/partmap/plan.c.
* docs/grub.texi: Notice Plan9 support.
* grub-core/Makefile.core.def (plan9): New module.
(part_plan): Likewise.
* grub-core/loader/i386/pc/plan9.c: New file.
* grub-core/partmap/plan.c: Likewise.
* include/grub/msdos_partition.h (GRUB_PC_PARTITION_TYPE_PLAN9): New
define.
(GRUB_PC_PARTITION_TYPE_LINUX_SWAP): Likewise.
* include/grub/mm.h (grub_extend_alloc): New inline function.
2011-11-13 19:38:08 +01:00
Vladimir 'phcoder' Serbinenko
c30be3b694
Make Reed-Solomon faster by using power of generator representation of
...
GF(256)*.
* grub-core/lib/reed_solomon.c (grub_uint16_t) [TEST]: Removed.
(gf_double_t): Likewise.
(gf_invert): Removed.
(gf_powx): New array.
(gf_powx_inv): Likewise.
(scratch): Move higher.
(gf_reduce): Removed.
(gf_mul): Use powx.
(gf_invert): Likewise.
(init_inverts): Replaced with ...
(init_powx): ...this. All users updated.
(pol_evaluate): Replace multiplications with additions.
(rs_encode): Likewise.
(gauss_eliminate): Call gf_invert.
(grub_reed_solomon_add_redundancy): Call init_powx.
(grub_reed_solomon_recover): Call init_powx unconditionally.
2011-11-13 14:48:19 +01:00
Vladimir 'phcoder' Serbinenko
383ceaf060
Fix a mismerge
2011-11-13 12:52:21 +01:00
Vladimir 'phcoder' Serbinenko
4e01c8c165
Merge mainline into plan9
2011-11-13 12:48:39 +01:00
Vladimir 'phcoder' Serbinenko
fa5aeffcc2
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Fix spelling.
2011-11-13 00:07:08 +01:00
Vladimir 'phcoder' Serbinenko
a346b81c7d
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restore
...
disk->partiton for safety.
2011-11-13 00:01:06 +01:00
Vladimir 'phcoder' Serbinenko
d89ee4141a
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
...
Fix a memory leak.
(grub_util_biosdisk_get_grub_dev): Add a useful debug info.
2011-11-12 23:46:47 +01:00
Vladimir 'phcoder' Serbinenko
91ee7b6d73
* grub-core/kern/emu/hostdisk.c (find_system_device): Fix a memory leak.
2011-11-12 23:42:49 +01:00
Vladimir 'phcoder' Serbinenko
91e5a33da5
* include/grub/lvm.h (grub_lvm_pv): Correct start type.
2011-11-12 23:35:20 +01:00
Vladimir 'phcoder' Serbinenko
0cddeb0360
Add copyright year.
2011-11-12 23:16:48 +01:00
Vladimir 'phcoder' Serbinenko
9edd7be26a
Fix spaces handling in proc/self/mountinfo.
...
* util/getroot.c (unescape): New function.
(grub_find_root_device_from_mountinfo): Use unescape.
2011-11-12 23:14:51 +01:00
Vladimir 'phcoder' Serbinenko
ba102053ce
Support ZFS embedding.
...
* grub-core/fs/zfs/zfs.c (grub_zfs_embed): New function.
(grub_zfs_fs): Register grub_zfs_embed.
2011-11-12 21:46:52 +01:00
Vladimir 'phcoder' Serbinenko
aa94b87027
Fix MIPS compilation.
...
* grub-core/boot/mips/startup_raw.S: Use GRUB_DECOMPRESSOR_*
* include/grub/offsets.h: Rename decompressor fields from
GRUB_KERNEL_* to GRUB_DECOMPRESSOR_*.
* util/grub-mkimage.c (image_targets): Use new names.
2011-11-12 21:38:04 +01:00
Vladimir 'phcoder' Serbinenko
5fbdac149b
Defer multiboot device parsing until we're in compressed part.
...
* grub-core/boot/i386/pc/lnxboot.S: Remove setting dos_part and
bsd_part. setdevice has fallen into disuse.
* grub-core/boot/i386/pc/startup_raw.S (dos_part): Removed.
(bsd_part): Likewise.
(boot_dev): New variable.
(multiboot_trampoline): Don't parse multiboot device.
Pass multiboot device in %edx.
* grub-core/disk/i386/pc/biosdisk.c (GRUB_MOD_INIT): Parse
grub_boot_device.
* grub-core/kern/i386/pc/init.c (grub_machine_get_bootlocation):
Likewise.
* grub-core/kern/i386/pc/startup.S: Save edx.
(grub_boot_drive): Removed.
(grub_install_dos_part): Likewise.
(grub_install_bsd_part): Likewise.
(grub_boot_device): New variable.
* include/grub/i386/pc/kernel.h (grub_install_dos_part): Removed.
(grub_install_bsd_part): Likewise.
(grub_boot_drive): Likewise.
(grub_boot_device): New variable.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_INSTALL_DOS_PART):
Removed.
(GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise.
(GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Moved lower.
(GRUB_KERNEL_MACHINE_INSTALL_BSD_PART): Removed.
(GRUB_KERNEL_MACHINE_INSTALL_DOS_PART): Likewise.
* util/grub-install.in: Remove redundant condition.
2011-11-12 21:12:52 +01:00
Vladimir 'phcoder' Serbinenko
691cbb5816
Fix bug introduced by previous commit.
...
* grub-core/boot/i386/pc/startup_raw.S: Compute RS start correctly.
2011-11-12 20:53:46 +01:00
Vladimir 'phcoder' Serbinenko
60240b8bc1
Use decompressors framework on i386-pc. It increases core size
...
by 46 bytes but improves compatibility and maintainability.
* grub-core/Makefile.core.def (lzma_decompress): New image.
(kernel): Add i386_pc_ldflags.
* grub-core/kern/i386/pc/startup.S: Move intial part to ..
* grub-core/boot/i386/pc/startup_raw.S: ... here. Pass pointers
to real_to_prot, prot_to_real and device info.
* include/grub/offsets.h: Renamed decompressor offsets.
* util/grub-mkimage.c (grub_compression_t): New cmpression lzma.
(image_target_desc): Remove raw_size and rename decompressor fields.
(compress_kernel): Handle lzma.
(generate_image): Handle decompressors on i386-pc.
2011-11-12 19:53:25 +01:00
Vladimir 'phcoder' Serbinenko
e9d3421c05
* configure.ac: Add -fno-asynchronous-unwind-tables.
2011-11-12 19:18:42 +01:00
Vladimir 'phcoder' Serbinenko
2b23074a0c
Move assembly code to C by using intwrap. It increases core size
...
by 88 bytes but improves compatibility and maintainability.
* grub-core/kern/i386/pc/startup.S (grub_console_putchar): Moved to ...
* grub-core/term/i386/pc/console.c (grub_console_putchar_real):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_console_getkey): Moved to ...
* grub-core/term/i386/pc/console.c (grub_console_getkey):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_console_getxy): Moved to ...
* grub-core/term/i386/pc/console.c (grub_console_getxy):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_console_gotoxy): Moved to ...
* grub-core/term/i386/pc/console.c (grub_console_gotoxy):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_console_cls): Moved to ...
* grub-core/term/i386/pc/console.c (grub_console_cls):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_console_setcursor): Moved to ..
* grub-core/term/i386/pc/console.c (grub_console_setcursor):
... here. Translated to C.
* grub-core/kern/i386/pc/startup.S (grub_get_rtc): Moved to ..
* grub-core/kern/i386/pc/init.c (grub_get_rtc): ... here.
Translated to C.
* grub-core/term/i386/pc/console.c (int10_9): New function.
(grub_console_putchar): Likewise.
* include/grub/i386/pc/console.h: Removed the not anymore shared
functions.
2011-11-12 16:29:04 +01:00
Vladimir 'phcoder' Serbinenko
678f4b6713
Move grub_chainloader_real_boot out of the kernel.
...
* grub-core/Makefile.am: Remove machine/loader.h.
* grub-core/kern/i386/pc/startup.S (grub_chainloader_real_boot):
Removed.
* grub-core/lib/i386/relocator.c (grub_relocator16_esi): New extern
variable.
(grub_relocator16_keep_a20_enabled): Likewise.
(grub_relocator16_boot): Fill new variables.
* grub-core/lib/i386/relocator16.S: Add gate a20 handling.
* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_boot): Use
relocator.
(grub_chainloader_unload): Likewise.
(grub_chainloader_cmd): Likewise.
* include/grub/i386/pc/loader.h: Removed.
* include/grub/i386/relocator.h (grub_relocator16_state): Add a20
and esi. All initialisers updated.
2011-11-12 15:46:50 +01:00
Vladimir 'phcoder' Serbinenko
4626edf6a0
* Makefile.util.def (grub-mount): New util.
...
* .bzrignore: Add grub-mount.
* configure.ac: Check for fuse and enable grub-mount if available.
* docs/man/grub-mount.h2m: New file.
* util/grub-mount.c: Likewise.
2011-11-12 01:23:48 +01:00
Vladimir 'phcoder' Serbinenko
ae60d685fa
fill attr on readdir
2011-11-12 01:20:23 +01:00
Vladimir 'phcoder' Serbinenko
d8e62bbeb9
gettextize
2011-11-12 01:19:06 +01:00
Vladimir 'phcoder' Serbinenko
f1f233ba43
Add crypto support to grub-mount
2011-11-12 00:56:20 +01:00