]>
git.ipfire.org Git - thirdparty/grub.git/log
Paulo de Rezende Pinatti [Mon, 23 Jan 2012 18:33:40 +0000 (19:33 +0100)]
* util/grub-install.in: Support dd'in into PreP partition.
* util/grub-probe.c (probe): Support discovering partition type.
(main): Support -t msdos_parttype.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
Also-By: pfsmorigo <>
Vladimir 'phcoder' Serbinenko [Mon, 23 Jan 2012 02:39:37 +0000 (03:39 +0100)]
* grub-core/normal/crypto.c (grub_crypto_autoload): Prevent
infinite recursion using counter.
* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_init): Defer s->crc32
init to skip it if the magic check fails.
(dec_stream_header): Init s->crc32.
Zachary Bedell [Mon, 23 Jan 2012 02:37:06 +0000 (03:37 +0100)]
* grub-core/fs/zfs/zfs.c (uberblock_verify): New parameter size.
All users updated.
(find_bestub): Determine correct size.
(fill_vdev_info_real): Fill ashift. New argument. All users updated.
(scan_disk): Align the size down.
Call check pool before find_bestub to have ashift.
Note: real text was accidently commited 2 commits ago.
Also-By: Richard Laager <rlaager@wiktel.com>
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
Vladimir 'phcoder' Serbinenko [Mon, 23 Jan 2012 02:31:17 +0000 (03:31 +0100)]
* grub-core/lib/relocator.c (malloc_in_range): Remove couple of
dprintf in no-malloc zone.
Note: actual code was already committed by mistake in last commit.
Mario Limonciello [Sun, 22 Jan 2012 15:43:14 +0000 (16:43 +0100)]
* configure.ac: Add back in test for limits.h.
Vladimir 'phcoder' Serbinenko [Fri, 20 Jan 2012 14:01:35 +0000 (15:01 +0100)]
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.
Vladimir 'phcoder' Serbinenko [Fri, 20 Jan 2012 13:48:26 +0000 (14:48 +0100)]
* grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as
being in .text to avoid dprel references.
* include/grub/mips/loongson/kernel.h (grub_arch_machine): Likewise.
* include/grub/mips/loongson/memory.h (grub_arch_memsize): Likewise.
(grub_arch_highmemsize): Likewise.
* include/grub/mips/loongson/time.h (grub_arch_busclock): Likewise.
* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): Likewise.
* include/grub/mips/time.h (grub_arch_cpuclock): Likewise.
Vladimir 'phcoder' Serbinenko [Wed, 18 Jan 2012 13:04:52 +0000 (14:04 +0100)]
Support powerpc with GCC that defines __PPC__ but not __powerpc__.
* config.h.in (__powerpc__) [__PPC__ && !__powerpc__]: New definition.
* grub-core/lib/setjmp.S: Treat __PPC__ as equivalent to __powerpc__.
Vladimir 'phcoder' Serbinenko [Wed, 18 Jan 2012 13:01:11 +0000 (14:01 +0100)]
* include/grub/datetime.h (grub_get_datetime_cmos): Don't define in
GRUB_UTIL.
(grub_set_datetime_cmos): Likewise.
Vladimir 'phcoder' Serbinenko [Wed, 18 Jan 2012 12:59:03 +0000 (13:59 +0100)]
Make XZ compression parameters dependent on target and not host CPU.
* configure.ac: Define GRUB_TARGET_CPU_XYZ series.
* grub-core/lib/xzembed/xz_config.h: Use GRUB_TARGET_CPU_XYZ.
Vladimir 'phcoder' Serbinenko [Wed, 18 Jan 2012 12:54:59 +0000 (13:54 +0100)]
* grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove
set but not used variable.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 22:36:21 +0000 (23:36 +0100)]
* grub-core/fs/reiserfs.c (grub_reiserfs_uuid): Reject 0-uuid as
created when no uuid support is compiled into mkfs.reiser.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 22:34:33 +0000 (23:34 +0100)]
* grub-core/fs/hfs.c (macroman_to_utf8): Convert / to :.
(utf8_to_macroman): Do the opposite.
* grub-core/fs/hfsplus.c (grub_hfsplus_iterate_dir): Convert / to :.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 22:32:18 +0000 (23:32 +0100)]
* configure.ac: Refise build qemu_mips w/o unifont.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 14:44:34 +0000 (15:44 +0100)]
Eliminate grub_min/grub_max prone to overflow usage.
* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Eliminate grub_min.
(poll_nonroot_hub): Likewise.
* grub-core/fs/affs.c (grub_affs_iterate_dir): Likewise.
(grub_affs_label): Likewise.
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Likewise.
* grub-core/fs/hfs.c (grub_hfs_dir): Likewise.
(grub_hfs_label): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
* grub-core/fs/zfs/zfs.c (MIN): Remove.
(zap_leaf_array_equal): Use grub_size. Remove MIN.
(zap_leaf_array_get): Likewise.
(dnode_get_path): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_read): Eliminate grub_min.
* grub-core/io/xzio.c (grub_xzio_read): Likewise.
* grub-core/script/execute.c (grub_script_break): Likewise.
* grub-core/script/lexer.c (grub_script_lexer_record): Eliminate
grub_max.
* grub-core/script/yylex.l (grub_lexer_yyrealloc): Likewise.
* include/grub/misc.h (grub_min): Removed.
(grub_max): Likewise.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:55:20 +0000 (11:55 +0100)]
* grub-core/fs/ext2.c (grub_ext2_iterate_dir): Ignore entries with
direct.inode = 0.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:53:29 +0000 (11:53 +0100)]
* grub-core/lib/posix_wrap/wctype.h (CHARCLASS_NAME_MAX): New define.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:51:52 +0000 (11:51 +0100)]
* include/grub/datetime.h (grub_datetime2unixtime): Fix offset.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:48:56 +0000 (11:48 +0100)]
* grub-core/lib/posix_wrap/stdlib.h (MB_CUR_MAX): Moved from here ...
* grub-core/lib/posix_wrap/wchar.h (MB_CUR_MAX): ... here. Value fixed.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:46:13 +0000 (11:46 +0100)]
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Use grub_strcasecmp
rather than a hack for grub_strncasemap.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:42:52 +0000 (11:42 +0100)]
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
disks with unknown size.
* grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:37:34 +0000 (11:37 +0100)]
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
disks with unknown size.
* grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:30:43 +0000 (11:30 +0100)]
Remove defines pertaining to arbitrary limits not affecting GRUB
anymore.
* grub-core/fs/ext2.c (EXT2_PATH_MAX): Removed.
(EXT2_MAX_SYMLINKCNT): Likewise.
* grub-core/fs/nilfs2.c (NILFS_BTREE_LEVEL_MAX): Likewise.
* grub-core/net/tftp.c (TFTP_MAX_PACKET): Likewise.
* include/grub/i386/pc/pxe.h (GRUB_PXE_MIN_BLKSIZE): Likewise.
(GRUB_PXE_MAX_BLKSIZE): Likewise.
* include/grub/normal.h (GRUB_MAX_CMDLINE): Likewise.
* include/grub/zfs/dnode.h (DN_MAX_INDBLKSHIFT): Likewise.
(DN_MAX_OBJECT_SHIFT): Likewise.
(DN_MAX_OFFSET_SHIFT): Likewise.
(DN_MAX_OBJECT): Likewise.
(DNODES_PER_LEVEL_SHIFT): Likewise.
* include/grub/zfs/spa.h (SPA_MAXBLOCKSHIFT): Likewise.
(SPA_MAXBLOCKSIZE): Likewise.
(SPA_BLOCKSIZES): Likewise.
* include/grub/zfs/zap_impl.h (MZAP_MAX_BLKSHIFT): Likewise.
(MZAP_MAX_BLKSZ): Likewise.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:23:51 +0000 (11:23 +0100)]
* grub-core/fs/zfs/zfs.c (grub_zfs_read): Remove useless alloc and
handle NULL appropriately.
Remove MIN.
Vladimir 'phcoder' Serbinenko [Fri, 13 Jan 2012 14:12:28 +0000 (15:12 +0100)]
Fix efiemu.
* grub-core/efiemu/runtime/efiemu.c: explicitly include right
cpu/types.h.
(efiemu_set_virtual_address_map): Remove UINT_TO_PTR.
* configure.ac: Fix efiemu check.
Vladimir 'phcoder' Serbinenko [Fri, 13 Jan 2012 12:54:24 +0000 (13:54 +0100)]
* util/grub.d/30_os-prober.in: Fix occurence of grub-probe instead of
grub_probe.
Reported by: adamwill
Seth Goldberg [Thu, 12 Jan 2012 21:20:29 +0000 (22:20 +0100)]
* grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
Vladimir 'phcoder' Serbinenko [Thu, 12 Jan 2012 21:16:07 +0000 (22:16 +0100)]
Fix handling of wide characters in gfxterm.
* grub-core/term/gfxterm.c (grub_colored_char): Remove width and index.
(clear_char): Likewise.
(paint_char): Skip code == NULL chars.
(grub_gfxterm_putchar): Set code = NULL on "shadowed" positions.
Vladimir 'phcoder' Serbinenko [Thu, 12 Jan 2012 21:13:20 +0000 (22:13 +0100)]
* grub-core/normal/charset.c: Move comment to right place.
Vladimir 'phcoder' Serbinenko [Wed, 11 Jan 2012 11:53:38 +0000 (12:53 +0100)]
* grub-core/fs/affs.c (grub_affs_bblock): Revert flags.
(GRUB_AFFS_FLAG_FFS): Put back where it was.
(grub_affs_mount): Revert the correct version checking.
Vladimir 'phcoder' Serbinenko [Wed, 11 Jan 2012 11:50:04 +0000 (12:50 +0100)]
* docs/grub.texi (Unicode): Mention several other unsupported features.
Vladimir 'phcoder' Serbinenko [Wed, 11 Jan 2012 11:46:50 +0000 (12:46 +0100)]
* grub-core/fs/squash4.c (squash_mount): Mark endian conversion in
case statements as compile-time one.
(direct_read): Prevent spurious warnings.
(grub_squash_read_data): Likewise.
Vladimir 'phcoder' Serbinenko [Mon, 26 Dec 2011 12:18:01 +0000 (13:18 +0100)]
Various squash4 fixes and LZO and XZ support.
* Makefile.util.def (libgrubmods.a): Add xzembed directory to cppflags.
Add xzembed source files.
* grub-core/Makefile.core.def (squash4): Add xzembed and minilzo flags.
* grub-core/fs/squash4.c (grub_squash_super): New field compression.
(grub_squash_inode): New subtype long_dir.
(SQUASH_TYPE_LONG_DIR): New inode type.
(COMPRESSION): New enum.
(XZBUFSIZ): New const.
(grub_squash_data): New fields blksz, decompress, xzdec, xzbuf.
(read_chunk): Use data->decompress.
(zlib_decompress): New function.
(lzo_decompress): Likewise.
(xz_decompress): Likewise.
(squash_mount): Set new data fields.
(grub_squash_iterate_dir): Handle long dir.
(squash_unmount): Free xzdec and xzbuf.
(grub_squash_open): Check ino type.
(direct_read): Stylistic fixes. Use data->decompress.
(grub_squash_read_data): Likewise.
* grub-core/io/gzio.c (grub_gzio): Remove disk_input.
(get_byte): Likewise.
(grub_zlib_disk_read): Removed.
* grub-core/lib/posix_wrap/sys/types.h (ssize_t): New type.
(GRUB_POSIX_BOOL_DEFINED): New define.
* grub-core/lib/posix_wrap/unistd.h: Include sys/types.h.
* grub-core/lib/xzembed/xz.h: Addmissing includes.
[!GRUB_POSIX_BOOL_DEFINED]: Define bool.
* include/grub/deflate.h (grub_zlib_disk_read): Removed.
Vladimir 'phcoder' Serbinenko [Mon, 26 Dec 2011 11:58:08 +0000 (12:58 +0100)]
Don't override more informative errors.
* grub-core/commands/acpi.c (grub_cmd_acpi): Don't override errors.
* grub-core/font/font.c (open_section): Likewise.
* grub-core/loader/i386/bsd.c (grub_bsd_load_aout): New argument
filename. Don't override errors.
(grub_cmd_openbsd_ramdisk): Don't override errors.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/ia64/efi/linux.c (grub_load_elf64): Likewise.
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
(grub_cmd_payload): Likewise.
* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/multiboot.c (grub_cmd_multiboot): Likewise.
(grub_cmd_module): Likewise.
* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Likewise.
(grub_cmd_xnu_mkext): Likewise.
(grub_cmd_xnu_ramdisk): Likewise.
(grub_xnu_check_os_bundle_required): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
(grub_cmd_xnu_kextdir): Likewise.
* grub-core/loader/xnu_resume.c (grub_xnu_resume): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 21:44:42 +0000 (22:44 +0100)]
* grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
as 1024 in block size field. Found on one of my test images.
Small optimisation while on it.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 21:39:56 +0000 (22:39 +0100)]
* docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
* grub-core/fs/sfs.c (grub_sfs_mount): Fix a memory leak while on it.
(grub_sfs_iterate_dir): Convert Latin1 to UTF8. Stylistic and
performance fixes while on it.
(grub_sfs_close): Fix memory leak while on it.
(grub_sfs_label): Convert Latin1 to UTF-8.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 21:23:05 +0000 (22:23 +0100)]
* grub-core/fs/hfs.c (grub_hfs_dir): Cap keylen to actually available
space to avoid overflows.
(grub_hfs_label): Convert from macroman to UTF-8.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 21:07:15 +0000 (22:07 +0100)]
* grub-core/fs/affs.c (grub_affs_label): Interpret label as latin1.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 16:41:55 +0000 (17:41 +0100)]
* grub-core/normal/menu.c (menu_init): Don't stop menu init at gfxterm.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:17:25 +0000 (16:17 +0100)]
* unicode: Import Unicode 6.0 data.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:15:01 +0000 (16:15 +0100)]
* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
outside of range.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:11:41 +0000 (16:11 +0100)]
Avoid cutting in the middle of UTF-8 string.
* include/grub/charset.h (grub_getend): New function.
* grub-core/script/function.c (grub_script_function_find): Use
grub_getend.
* grub-core/normal/completion.c (add_completion): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:07:33 +0000 (16:07 +0100)]
* grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix.
(grub_bidi_line_logical_to_visual): Skip tags. They are deprecated.
* include/grub/unicode.h (GRUB_UNICODE_TAG_START): New enum value.
(GRUB_UNICODE_TAG_END): Likewise.
(GRUB_UNICODE_LAST_VALID): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:03:42 +0000 (16:03 +0100)]
* include/grub/unicode.h (grub_unicode_compact_range): Replace end with
len and make it smaller. All users updated.
* util/import_unicode.py: Put length and not end character.
Check length.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 14:57:50 +0000 (15:57 +0100)]
Make better Unicode-compliant and unify some UTF-8 code pathes.
* grub-core/normal/charset.c (grub_utf8_to_utf16): Don't eat possibly
valid character.
(grub_is_valid_utf8): Use grub_utf8_process.
Check resulting code range.
(grub_utf8_to_ucs4): Use grub_utf8_process.
* include/grub/charset.h (grub_utf16_to_utf8): Don't eat up a possibly
valid character.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 14:43:15 +0000 (15:43 +0100)]
* grub-core/io/bufio.c (grub_bufio_read): Fix handling of corner cases.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 14:40:43 +0000 (15:40 +0100)]
* docs/grub.texi (Filesystems): Mention AFS.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 13:46:44 +0000 (14:46 +0100)]
* docs/grub.texi (Filesystems): Clarify restrictions.
(Regexp): Mention non-Unicode regexp behaviour.
(Other): Mention non-Unicode matching behaviour.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 19:20:41 +0000 (20:20 +0100)]
Make HFS implementation use MacRoman.
* grub-core/fs/hfs.c (MAX_UTF8_PER_MAC_ROMAN): New define.
(macroman): New const array.
(macroman_to_utf8): New function.
(utf8_to_macroman): Likewise.
(grub_hfs_find_dir): Use utf8_to_macroman.
(grub_hfs_dir): Use macroman_to_utf8.
Set case_insensitive.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 14:38:53 +0000 (15:38 +0100)]
* docs/grub.texi (Filesystems): Add IEEE1275 full-path example.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 14:09:26 +0000 (15:09 +0100)]
Integrate hints into autogeneration scripts.
* docs/grub.texi (Filesystems): Add a hostdisk example.
* Makefile.util.def (grub-mkdevicemap): Remove ofpath.
(grub-probe): Add ofpath.
* gentpl.py: Remove group nosparc64.
* grub-core/commands/search.c (cache_entry): New struct.
(cache): New var.
(FUNC_NAME): Use and save cache. Fix handling of trailing comma.
* grub-core/commands/search_wrap.c (options): Add platform-specific
hint options.
(grub_cmd_search): Handle platform-specific hints.
(GRUB_MOD_INIT): Declare grub_cmd_search as accept_dash.
* grub-core/kern/emu/hostdisk.c (map): New field device_map.
(grub_util_biosdisk_data): Likewise.
(grub_util_biosdisk_open): Set device_map.
(read_device_map): Handle "" as indication of no map.
Set device_map.
(find_system_device): Add hostdisk/ prefix for autogenerated entries.
(grub_util_biosdisk_get_compatibility_hint): New function.
* grub-core/normal/main.c (features): Add feature_platform_search_hint.
* include/grub/emu/hostdisk.h
(grub_util_biosdisk_get_compatibility_hint): New proto.
* util/grub-install.in: Don't call grub-mkdevicemap.
Add platform-specific hint to load.cfg.
* util/grub-mkconfig.in: Don't call grub-mkdevicemap.
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Add
hints. Set root preliminary to compatibility hint, not to OS name.
* util/grub-probe.c (PRINT_*): Add hints.
(print): Make static.
(escape_of_path): New function.
(guess_bios_drive): Likewise.
(guess_efi_drive): Likewise.
(guess_baremetal_drive): Likewise.
(print_full_name): Likewise.
(probe): Handle hints.
(main): Likewise.
* util/ieee1275/devicemap.c: Removed.
* util/ieee1275/ofpath.c (find_obppath): Allow to fail. All users
updated.
(grub_util_devname_to_ofpath): Return NULL on failure.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Fix
resource leak.
* util/getroot.c (grub_util_pull_device): Fix memory leak.
* po/POTFILES.in: Regenerated.
Allow purely long options
* grub-core/lib/arg.c (SHORT_ARG_HELP): Removed.
(SHORT_ARG_USAGE): Likewise.
(grub_arg_show_help): Compare opt with help_options.
(parse_option): Receive opt as argument. If makes big simplificatons.
All users updated
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 12:37:28 +0000 (13:37 +0100)]
Put recheck back
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 12:12:01 +0000 (13:12 +0100)]
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN):
Restructure to avoid warning.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:54:28 +0000 (02:54 +0100)]
Fix IEEE1275 bugs in grub-probe
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:52:43 +0000 (02:52 +0100)]
merge mainline into hints
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:50:30 +0000 (02:50 +0100)]
* util/grub-install.in: Account for possible escaped comma in device
name.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:46:47 +0000 (02:46 +0100)]
* util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
channel.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:45:17 +0000 (02:45 +0100)]
* grub-core/kern/ieee1275/openfw.c (grub_devalias_iterate): Fix
allocation and zero-setting.
(grub_ieee1275_get_devname): Check that alias is complete.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:43:21 +0000 (02:43 +0100)]
* grub-core/kern/disk.c (grub_disk_read): Fix hook calling for
unaligned segments.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:40:18 +0000 (02:40 +0100)]
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/
prefix.
(grub_ofdisk_open): Check and discard ieee1275 prefix.
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Add ieee1275 prefix.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:14:34 +0000 (21:14 +0100)]
search cache
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:14:24 +0000 (21:14 +0100)]
Fix *end restoring
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:13:09 +0000 (21:13 +0100)]
simplify lib/arg.c and allow purely long options
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 18:25:24 +0000 (19:25 +0100)]
Fix few bugs and memory leaks
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 17:49:00 +0000 (18:49 +0100)]
merge mainline into hints
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 17:46:06 +0000 (18:46 +0100)]
merge mainline into hints
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 17:19:16 +0000 (18:19 +0100)]
Initial integration of hints
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 16:05:36 +0000 (17:05 +0100)]
* docs/grub.texi (Filesystems): Update.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 15:15:18 +0000 (16:15 +0100)]
Support odc, newc and bigendian cpio formats.
* Makefile.util.def (libgrubmods): Add odc.c, newc.c and cpio_be.c.
* grub-core/Makefile.core.def (newc): New module.
(odc): Likewise.
(cpio_be): Likewise.
* grub-core/fs/cpio.c (ALIGN_CPIO): New macro.
(MAGIC): Likewise.
(MAGIC2): Likewise.
(head) [MODE_ODC]: Adapt for the format.
(head) [MODE_NEWC]: Likewise.
(head) [!MODE_*]: Write fields of interest as arrays.
(MAGIC_USTAR): Removed.
(read_number) [MODE_NEWC]: Change to hex.
(read_number) [!MODE_*]: Parse binary arrays.
(grub_cpio_find_file): Factor out the code for better structure and
always use read_number.
(grub_cpio_mount): Use MAGIC and MAGIC2.
(grub_cpio_dir): Exit on first hook non-0 return.
(grub_cpio_fs) [MODE_ODC]: Set name to odc.
(grub_cpio_fs) [MODE_NEWC]: Set name to newc.
(GRUB_MOD_INIT) [MODE_ODC]: Set name to odc.
(GRUB_MOD_INIT) [MODE_NEWC]: Set name to newc.
(GRUB_MOD_FINI) [MODE_ODC]: Set name to odc.
(GRUB_MOD_FINI) [MODE_NEWC]: Set name to newc.
* grub-core/fs/newc.c: New file.
* grub-core/fs/odc.c: Likewise.
* grub-core/fs/cpio_be.c: Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 13:11:31 +0000 (14:11 +0100)]
Fix handling of tar numbers occupying the whole field.
* grub-core/fs/cpio.c (read_number): New function.
(grub_cpio_find_file): Use read_number instead of strtoull.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 12:38:21 +0000 (13:38 +0100)]
* grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names
occupying the whole field size.
Lukas Anzinger [Fri, 23 Dec 2011 11:01:25 +0000 (12:01 +0100)]
* util/grub-mkconfig_lib.in (version_test_gt): Fix variable names.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 10:54:08 +0000 (11:54 +0100)]
* grub-core/net/net.c (grub_cmd_delroute): Add missing out condition.
Seth Goldberg [Fri, 23 Dec 2011 10:39:30 +0000 (11:39 +0100)]
* grub-core/Makefile.core.def (lzma_decompress): Add missing
TARGET_IMG_LDFLAGS.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 10:36:31 +0000 (11:36 +0100)]
* util/getroot.c (ESCAPED_PATH_MAX): New define.
(mountinfo_entry): Increase the field size to take escaping into
account.
(find_root_device_from_libzfs): Add one byte to size of strings for
security.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 09:24:34 +0000 (10:24 +0100)]
Remove empty directories
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 09:24:08 +0000 (10:24 +0100)]
missing ChangeLog
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 09:23:41 +0000 (10:23 +0100)]
* grub-core/lib/reed_solomon.c (grub_reed_solomon_add_redundancy): Add
an assert.
* util/grub-setup.c (setup): Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 09:21:27 +0000 (10:21 +0100)]
* grub-core/boot/i386/pc/startup_raw.S: Add missing argument for
_LzmaDecodeA.
Vladimir 'phcoder' Serbinenko [Thu, 22 Dec 2011 19:55:55 +0000 (20:55 +0100)]
* docs/grub.texi (Internationalisation): New section.
Vladimir 'phcoder' Serbinenko [Thu, 22 Dec 2011 16:43:51 +0000 (17:43 +0100)]
* docs/grub.texi (Loopback booting): New section.
Keshav P R [Thu, 22 Dec 2011 12:05:19 +0000 (13:05 +0100)]
* util/grub-mkstandalone.in: Fix minor typo errors.
Vladimir 'phcoder' Serbinenko [Tue, 20 Dec 2011 17:17:07 +0000 (18:17 +0100)]
IPv6, TCP, HTTP, ICMP and DNS support. Several cleanups and bugfixes.
* grub-core/Makefile.core.def (net): Add net/dns.c, net/tcp.c,
net/icmp.c and net/icmp6.c.
(http): New module.
(priority_queue): Likewise.
* grub-core/io/bufio.c: Rewritten.
* grub-core/lib/legacy_parse.c (legacy_command): New argument type
TYPE_WITH_CONFIGFILE_OPTION.
(legacy_commands): Add bootp and dhcp.
(is_option): Handle TYPE_WITH_CONFIGFILE_OPTION.
(grub_legacy_parse): Likewise.
* grub-core/lib/priority_queue.c: New file.
* grub-core/net/arp.c: Add missing license header.
(arp_find_entry): Removed.
(arp_find_entry): Likewise.
(grub_net_arp_resolve): Rename to ...
(grub_net_arp_send_request): ...this.
(grub_net_arp_receive): New card argument.
* grub-core/net/bootp.c (parse_dhcp_vendor): Clean up.
Set router and DNS server.
(grub_net_configure_by_dhcp_ack): Handle routing information.
(grub_cmd_bootp): Set checksum.
(grub_bootp_init): Remove net_dhcp.
* grub-core/net/dns.c: New file.
* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Wait for
completion.
(get_card_packet): Handle allocation.
(grub_efinet_findcards): Set mtu.
* grub-core/net/drivers/emu/emunet.c: Add missing license header.
(get_card_packet): Handle allocation.
(emucard): Set mtu.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Handle allocation
(GRUB_MOD_INIT): Set mtu.
* grub-core/net/drivers/ieee1275/ofnet.c (grub_ofnetcard_data): Remove
mtu.
(get_card_packet): Handle allocation.
(grub_ofnet_findcards): Set mtu.
* grub-core/net/ethernet.c (send_ethernet_packet): Add compile time
assert.
(grub_net_recv_ethernet_packet): Handle IPv6.
* grub-core/net/http.c: New file.
* grub-core/net/icmp.c: Likewise.
* grub-core/net/icmp6.c: Likewise.
* grub-core/net/ip.c (ip6addr): New type.
(ip6hdr): Likewise.
(reassemble): Likewise.
(cmp): New function.
(reassembles): New variable.
(grub_net_ip_chksum): Handle 0xffff sum and unaligned buffers.
(id): New variable.
(send_fragmented): New function.
(grub_net_send_ip_packet): Rename to ...
(grub_net_send_ip4_packet): ... this. Send fragmented if needed.
Handle non-UDP.
(grub_net_recv_ip_packets): Rename to ...
(handle_dgram): ... this. Check checksum. Handle non-UDP.
(free_rsm): New function.
(free_old_fragments): Likewise.
(grub_net_recv_ip4_packets): New function.
(grub_net_send_ip6_packet): Likewise.
(grub_net_send_ip_packet): Likewise.
(grub_net_recv_ip6_packets): Likewise.
(grub_net_recv_ip_packets): Likewise.
* grub-core/net/net.c (grub_net_link_layer_entry): New struct.
(LINK_LAYER_CACHE_SIZE): New const.
(link_layer_find_entry): New function.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_ipv6_get_slaac): Likewise.
(grub_net_ipv6_get_link_local): Likewise.
(grub_cmd_ipv6_autoconf): Likewise.
(parse_ip): Handle one number representation.
(parse_ip6): New functoion.
(match_net): Handle IPv6.
(grub_net_resolve_address): Handle IPv6 and DNS.
(grub_net_resolve_net_address): Handle IPv6.
(route_cmp): New function.
(grub_net_route_address): Find best route.
(grub_net_addr_to_str): Handle IPv6.
(grub_net_addr_cmp): New function.
(grub_net_add_addr): Register local route.
(print_net_address): Handle net address.
(grub_net_poll_cards): Retransmit TCP.
(grub_net_poll_cards_idle_real): Likewise.
(have_ahead): New function.
(grub_net_seek_real): Use underlying seek.
(GRUB_MOD_INIT): Register net_ipv6_autoconf and init dns.
* grub-core/net/tcp.c: New file.
* grub-core/net/tftp.c (tftp_data): Add priority_queue.
(cmp): New function.
(ack): Likewise.
(tftp_receive): Handle unordered input.
(destroy_pq): New function.
(tftp_close): Close pq.
* grub-core/net/udp.c: Put missing license header.
(grub_net_udp_socket): New function.
(udp_socket_register): Likewise.
(grub_net_udp_close): Likewise.
(grub_net_recv_udp_packet): Check checksum.
* include/grub/efi/api.h (grub_efi_simple_network): Add status.
* include/grub/misc.h (grub_memchr): New function.
* include/grub/net.h (GRUB_NET_*_SIZE): New enum.
(grub_net_card_driver): Return buf in recv.
(grub_net_slaac_mac_list): New struct.
(grub_network_level_protocol_id): Add ipv6.
(grub_net_network_level_addr): Likewise.
(grub_net_network_level_net_addr): Likewise.
(grub_net_app_protocol): Add seek.
(grub_net_socket): Removed.
(grub_net_sockets): Likewise.
(grub_net_socket_register): Likewise.
(grub_net_socket_unregister): Likewise.
(FOR_NET_SOCKETS): Likewise.
(grub_net_add_addr): Add const.
(GRUB_NET_BOOTP_*): New enum.
(grub_net_addr_cmp): New proto.
(GRUB_NET_MAX_STR_ADDR_LEN): Take IPV6 into account.
(GRUB_NET_MAX_STR_HWADDR_LEN): New define.
(grub_net_hwaddr_to_str): NEw proto.
(FOR_NET_NETWORK_LEVEL_INTERFACES): New macro.
(FOR_NET_NETWORK_LEVEL_INTERFACES_SAFE): Handle NULL.
(grub_dns_init): New proto.
(grub_dns_fini): Likewise.
(grub_net_tcp_retransmit): Likewise.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_dns_lookup): Likewise.
(grub_net_add_dns_server): Likewise.
(grub_net_remove_dns_server): Likewise.
(GRUB_NET_TRIES): New const.
(GRUB_NET_INTERVAL): Likewise.
* include/grub/net/arp.h: Mostly rewritten.
* include/grub/net/ethernet.h (grub_net_ethertype_t): New enum.
* include/grub/net/ip.h: Mostly rewritten.
* include/grub/net/netbuff.h: Indent.
* include/grub/net/tcp.h: New file.
* include/grub/net/udp.h: Mostly rewritten.
* include/grub/priority_queue.h: New file.
* include/grub/types.h (PRIdGRUB_SSIZE): New define.
(grub_swap_bytes64_compile_time): Likewise.
(grub_cpu_to_be16_compile_time): Likewise.
(grub_cpu_to_be32_compile_time): Likewise.
(grub_cpu_to_be64_compile_time): Likewise.
(grub_be_to_cpu64_compile_time): Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 17:00:16 +0000 (18:00 +0100)]
merge mainline into net
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 16:46:28 +0000 (17:46 +0100)]
* grub-core/commands/i386/pc/drivemap.c (int13slot): Replace
UINT_TO_PTR with cast.
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 16:37:47 +0000 (17:37 +0100)]
Retrieve DNS names from DHCP/BOOTP
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 16:12:01 +0000 (17:12 +0100)]
Integrate DNS with address parsing
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 14:08:46 +0000 (15:08 +0100)]
DNS cache support
Vladimir 'phcoder' Serbinenko [Fri, 16 Dec 2011 12:43:31 +0000 (13:43 +0100)]
support cname
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:53:29 +0000 (20:53 +0100)]
Remerge net branch
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:51:35 +0000 (20:51 +0100)]
merge mainline into net
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:50:21 +0000 (20:50 +0100)]
Add forgotten file
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:33:32 +0000 (20:33 +0100)]
* util/import_gcry.py: Skip _gcry_rmd160_mixblock and serpent_test. We
don't use them.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:32:02 +0000 (20:32 +0100)]
* util/import_gcry.py: Don't add include camellia.h to camellia.c. It's
already there.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:29:30 +0000 (20:29 +0100)]
* util/grub-mkimage.c (generate_image): Clean multiboot header to avoid
confusing ipxe.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:26:17 +0000 (20:26 +0100)]
* grub-core/lib/libgcrypt/cipher/md4.c (transform) [WORDS_BIGENDIAN]:
Add missing const attribute.
* grub-core/lib/libgcrypt/cipher/md5.c (transform) [WORDS_BIGENDIAN]:
Likewise.
* grub-core/lib/libgcrypt/cipher/rmd160.c (transform) [WORDS_BIGENDIAN]:
Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:20:02 +0000 (20:20 +0100)]
* grub-core/lib/libgcrypt/cipher/serpent.c (serpent_key_prepare): Fix
misaligned access.
(serpent_setkey): Likewise.
(serpent_encrypt_internal): Likewise.
(serpent_decrypt_internal): Likewise.
(serpent_encrypt): Don't put an alignment-increasing cast.
(serpent_decrypt): Likewise.
(serpent_test): Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:05:27 +0000 (20:05 +0100)]
* grub-core/loader/multiboot.c (grub_cmd_module): Fix target address.
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 19:04:21 +0000 (20:04 +0100)]
forgotten file for previous commit
Vladimir 'phcoder' Serbinenko [Thu, 15 Dec 2011 18:59:49 +0000 (19:59 +0100)]
Replace UINT_TO_PTR and PTR_TO_UINT with explicit grub_addr_t casts.
* include/grub/types.h (UINT_TO_PTR): Removed. All users switched to
grub_addr_t casts.
(PTR_TO_UINT64): Likewise.
(PTR_TO_UINT32): Likewise.