]> git.proxmox.com Git - grub2.git/log
grub2.git
12 years ago * grub-core/boot/i386/pc/lnxboot.S: Use
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:20:02 +0000 (23:20 +0100)]
* 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.

12 years ago * util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 20:49:44 +0000 (21:49 +0100)]
* 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.

12 years ago * util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 19:52:37 +0000 (20:52 +0100)]
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
Don't add "root" line if no compatibility hont is available.
Suggested by: Seth Goldberg.

12 years ago * include/grub/ata.h (grub_ata): Add a new element maxbuffer.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 18:00:30 +0000 (19:00 +0100)]
* 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.

12 years ago * include/grub/zfs/dnode.h (DN_MIN_INDBLKSHIFT): Removed.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:56:44 +0000 (18:56 +0100)]
* include/grub/zfs/dnode.h (DN_MIN_INDBLKSHIFT): Removed.

12 years ago * util/grub-pe2elf.c (ehdr): Make static.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:53:38 +0000 (18:53 +0100)]
* util/grub-pe2elf.c (ehdr): Make static.
(shdr): Likewise.
(num_sections): Likewise.
(offset): Likewise.

12 years ago Eliminate ofpath limits and possible overflows.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:51:21 +0000 (18:51 +0100)]
Eliminate ofpath limits and possible overflows.

* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
(OF_PATH_MAX): Removed.
(MAX_DISK_CAT): New const.
(find_obppath): Use allocated rather than preallocated buffer.
Return result. Argument of_path removed. All users updated.
Add missing fdstat.
(xrealpath): New function.
(block_device_get_sysfs_path_and_link): Remove sysfs argument.
Allocate rather than use preallocated buffer. All users updated.
(__of_path_common): Use allocated rather than preallocatecd buffer.
Return result. Argument of_path removed. All users updated.
(vendor_is_ATA): Read only needed part form the file.
(check_sas): Allocate depending on contents rather than fixed.
(main) [STANDALONE]: Handle NULL result.

12 years ago * grub-core/normal/completion.c (iterate_dev): Close the disk.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:20:02 +0000 (18:20 +0100)]
* grub-core/normal/completion.c (iterate_dev): Close the disk.

12 years ago Cryptodisk write support.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:16:48 +0000 (18:16 +0100)]
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.

12 years ago * include/grub/list.h (grub_list_remove): Don't crash if element is
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:09:53 +0000 (18:09 +0100)]
* include/grub/list.h (grub_list_remove): Don't crash if element is
removed twice.

12 years ago Rename ofconsole to console.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 16:01:27 +0000 (17:01 +0100)]
Rename ofconsole to console.

* grub-core/commands/terminal.c (handle_command): Handle ofconsole
as sysnonym to console.
* grub-core/term/ieee1275/ofconsole.c: Renamed to ..
* grub-core/term/ieee1275/console.c: ... this. All users updated.
Rename grub_ofconsole_ to grub_console_. All users updated
(grub_console_term_output): Rename "ofconsole" to "console".
* grub-core/term/terminfo.c (grub_cmd_terminfo): Handle "ofconsole"
as "console".

12 years ago * grub-core/loader/i386/pc/plan9.c (grub_cmd_plan9): Remove PXE
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:34:39 +0000 (16:34 +0100)]
* 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.

12 years ago * grub-core/kern/partition.c (grub_partition_get_name): Simplify logic
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:24:07 +0000 (16:24 +0100)]
* grub-core/kern/partition.c (grub_partition_get_name): Simplify logic
and improve performance.

12 years ago * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname): Fix
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:22:23 +0000 (16:22 +0100)]
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname): Fix
missing ieee1275/ prefix on whole disk.

12 years ago * include/grub/powerpc/ieee1275/util/biosdisk.h: Remove.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:20:41 +0000 (16:20 +0100)]
* include/grub/powerpc/ieee1275/util/biosdisk.h: Remove.
* include/grub/powerpc/ieee1275/biosdisk.h: Likewise.

12 years ago * grub-core/fs/cpio.c (handle_symlink): Fix a bug.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 14:36:06 +0000 (15:36 +0100)]
* grub-core/fs/cpio.c (handle_symlink): Fix a bug.

12 years ago Merge common RAID and LVM logic to an abstract diskfilter.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 13:28:01 +0000 (14:28 +0100)]
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.

12 years ago Simplify root device discover and don't fail when trying to open
Vladimir 'phcoder' Serbinenko [Sat, 28 Jan 2012 12:26:20 +0000 (13:26 +0100)]
Simplify root device discover and don't fail when trying to open
incorrect devices.

* grub-core/disk/efi/efidisk.c (get_diskname_from_path_real): New
function.
(get_diskname_from_path): Likewise.
(grub_efidisk_get_device_name): Use get_diskname_from_path instead
of iterating.

12 years ago * grub-core/Makefile.core.def (setpci): Enable on all PCI platforms.
Vladimir 'phcoder' Serbinenko [Fri, 27 Jan 2012 12:52:48 +0000 (13:52 +0100)]
* grub-core/Makefile.core.def (setpci): Enable on all PCI platforms.

12 years ago * grub-core/fs/zfs/zfs.c (nvlist_find_value): Check that we don't go
Vladimir 'phcoder' Serbinenko [Fri, 27 Jan 2012 12:50:21 +0000 (13:50 +0100)]
* grub-core/fs/zfs/zfs.c (nvlist_find_value): Check that we don't go
pastthe end.

12 years ago * util/grub-install.in: Add missing \.
Vladimir 'phcoder' Serbinenko [Fri, 27 Jan 2012 12:12:00 +0000 (13:12 +0100)]
* util/grub-install.in: Add missing \.
Reported by: gentoofan

12 years ago * grub-core/fs/squash4.c (xz_decompress): Fix return value.
Vladimir 'phcoder' Serbinenko [Fri, 27 Jan 2012 12:09:57 +0000 (13:09 +0100)]
* grub-core/fs/squash4.c (xz_decompress): Fix return value.
(direct_read): Use correct compressed size.
(grub_squash_read_data): Likewise.

12 years ago * docs/grub.texi (Platform limitations): New section.
Vladimir 'phcoder' Serbinenko [Thu, 26 Jan 2012 18:40:47 +0000 (19:40 +0100)]
* docs/grub.texi (Platform limitations): New section.
(Platform-specific operations): Likewise.
* docs/grub-dev.texi (Porting): Likewise.

12 years ago IEEE1275 disk write support.
Vladimir 'phcoder' Serbinenko [Wed, 25 Jan 2012 17:32:08 +0000 (18:32 +0100)]
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.

12 years ago ARC disk write support.
Vladimir 'phcoder' Serbinenko [Wed, 25 Jan 2012 15:13:34 +0000 (16:13 +0100)]
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.

12 years ago * grub-core/fs/btrfs.c (grub_btrfs_device): New field size.
Vladimir 'phcoder' Serbinenko [Wed, 25 Jan 2012 14:10:56 +0000 (15:10 +0100)]
* grub-core/fs/btrfs.c (grub_btrfs_device): New field size.
(read_sblock): Don't attempt to read superblocks outside the disk size.

12 years ago * grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Use device size from
Vladimir 'phcoder' Serbinenko [Wed, 25 Jan 2012 14:09:00 +0000 (15:09 +0100)]
* grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Use device size from
first superblock to find the second one when possible.

12 years ago * util/grub-install.in: Fix an ARC bug.
Vladimir 'phcoder' Serbinenko [Wed, 25 Jan 2012 14:06:27 +0000 (15:06 +0100)]
* util/grub-install.in: Fix an ARC bug.
Print a warning if no platform-specific setup is available.

12 years ago Use static allocation rather than scratch pointer in reed_solomon.
Vladimir 'phcoder' Serbinenko [Tue, 24 Jan 2012 13:49:31 +0000 (14:49 +0100)]
Use static allocation rather than scratch pointer in reed_solomon.
It decreases its size significantly and avoids a variable in .text.

* grub-core/lib/reed_solomon.c (scratch): Removed.
(chosenstat): New const or static array.
(sigma): Likewise.
(errpot): Likewise.
(errpos): Likewise.
(sy): Likewise.
(mstat): Likewise.
(errvals): Likewise.
(eqstat): Likewise.
(pol_evaluate): Replace x with log_x argument. All users updated.
(syndroms): Removed.
(gauss_solve): Use statically allocated arrays.
(rs_recover): Likewise.
Calculate syndroms directly.
(decode_block): Use statically allocated arrays.
(grub_reed_solomon_add_redundancy) [TEST]: Fix -DTEST compilation.
(main) [TEST]: Allow -DTEST -DSTANDALONE.

12 years ago Eliminate fixed limit on reed solomon decoder length.
Vladimir 'phcoder' Serbinenko [Tue, 24 Jan 2012 13:39:29 +0000 (14:39 +0100)]
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.

12 years ago * grub-core/commands/wildcard.c (match_files): Handle filenames
Vladimir 'phcoder' Serbinenko [Tue, 24 Jan 2012 12:34:36 +0000 (13:34 +0100)]
* grub-core/commands/wildcard.c (match_files): Handle filenames
without explicit device.
(wildcard_expand): Don't add explicit device if not already present.
* tests/grub_script_echo1.in: Add a new expansion test.

12 years ago Replace single-linked with double-linked lists. It results in more
Vladimir 'phcoder' Serbinenko [Tue, 24 Jan 2012 12:31:12 +0000 (13:31 +0100)]
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.

12 years ago Handle newer autotools. Add some missing quotes while on it.
Vladimir 'phcoder' Serbinenko [Tue, 24 Jan 2012 12:17:36 +0000 (13:17 +0100)]
Handle newer autotools. Add some missing quotes while on it.

* Makefile.am (pkglib_DATA): Remove update-grub_lib.
(pkglib_DATA): Move grub-mkconfig_lib from here ...
(pkgdata_DATA): ... here.
* Makefile.util.def (update-grub_lib): Removed.
* conf/Makefile.common (pkglib_DATA): Removed.
(pkglib_SCRIPTS): Likewise.
(pkgdata_DATA): New variable.
* tests/util/grub-shell-tester.in: Replace pkglib with pkgdata where
needed.
Add missing quotes.
Remove unused variable while on it.
* tests/util/grub-shell.in: Likewise.
* util/grub-install.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_illumos.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
* util/update-grub_lib.in: Removed.

12 years ago * grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Relax checks as
Seth Goldberg [Tue, 24 Jan 2012 02:01:46 +0000 (03:01 +0100)]
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Relax checks as
a workaround for intel problem.

12 years ago * util/grub-install.in: Support dd'in into PreP partition.
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 <>
12 years ago * grub-core/normal/crypto.c (grub_crypto_autoload): Prevent
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.

12 years ago * grub-core/fs/zfs/zfs.c (uberblock_verify): New parameter size.
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>
12 years ago * grub-core/lib/relocator.c (malloc_in_range): Remove couple of
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.

12 years ago * configure.ac: Add back in test for limits.h.
Mario Limonciello [Sun, 22 Jan 2012 15:43:14 +0000 (16:43 +0100)]
* configure.ac: Add back in test for limits.h.

12 years ago Support 4K-sector NTFS.
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.

12 years ago * grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as
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.

12 years ago Support powerpc with GCC that defines __PPC__ but not __powerpc__.
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__.

12 years ago * include/grub/datetime.h (grub_get_datetime_cmos): Don't define in
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.

12 years ago Make XZ compression parameters dependent on target and not host CPU.
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.

12 years ago * grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove
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.

12 years ago * grub-core/fs/reiserfs.c (grub_reiserfs_uuid): Reject 0-uuid as
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.

12 years ago * grub-core/fs/hfs.c (macroman_to_utf8): Convert / to :.
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 :.

12 years ago * configure.ac: Refise build qemu_mips w/o unifont.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 22:32:18 +0000 (23:32 +0100)]
* configure.ac: Refise build qemu_mips w/o unifont.

12 years ago Eliminate grub_min/grub_max prone to overflow usage.
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.

12 years ago * grub-core/fs/ext2.c (grub_ext2_iterate_dir): Ignore entries with
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.

12 years ago * grub-core/lib/posix_wrap/wctype.h (CHARCLASS_NAME_MAX): New define.
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.

12 years ago * include/grub/datetime.h (grub_datetime2unixtime): Fix offset.
Vladimir 'phcoder' Serbinenko [Sat, 14 Jan 2012 10:51:52 +0000 (11:51 +0100)]
* include/grub/datetime.h (grub_datetime2unixtime): Fix offset.

12 years ago * grub-core/lib/posix_wrap/stdlib.h (MB_CUR_MAX): Moved from here ...
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.

12 years ago * grub-core/fs/fshelp.c (grub_fshelp_find_file): Use grub_strcasecmp
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.

12 years ago * grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
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.

12 years ago * grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
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.

12 years ago Remove defines pertaining to arbitrary limits not affecting GRUB
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.

12 years ago * grub-core/fs/zfs/zfs.c (grub_zfs_read): Remove useless alloc and
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.

12 years ago Fix efiemu.
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.

12 years ago * util/grub.d/30_os-prober.in: Fix occurence of grub-probe instead of
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

12 years ago * grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
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.

12 years ago Fix handling of wide characters in gfxterm.
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.

12 years ago * grub-core/normal/charset.c: Move comment to right place.
Vladimir 'phcoder' Serbinenko [Thu, 12 Jan 2012 21:13:20 +0000 (22:13 +0100)]
* grub-core/normal/charset.c: Move comment to right place.

12 years ago * grub-core/fs/affs.c (grub_affs_bblock): Revert flags.
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.

12 years ago * docs/grub.texi (Unicode): Mention several other unsupported features.
Vladimir 'phcoder' Serbinenko [Wed, 11 Jan 2012 11:50:04 +0000 (12:50 +0100)]
* docs/grub.texi (Unicode): Mention several other unsupported features.

12 years ago * grub-core/fs/squash4.c (squash_mount): Mark endian conversion in
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.

12 years ago Various squash4 fixes and LZO and XZ support.
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.

12 years ago Don't override more informative errors.
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.

12 years ago * grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
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.

12 years ago * docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
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.

12 years ago * grub-core/fs/hfs.c (grub_hfs_dir): Cap keylen to actually available
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.

12 years ago * grub-core/fs/affs.c (grub_affs_label): Interpret label as latin1.
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.

12 years ago * grub-core/normal/menu.c (menu_init): Don't stop menu init at gfxterm.
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.

12 years ago * unicode: Import Unicode 6.0 data.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 15:17:25 +0000 (16:17 +0100)]
* unicode: Import Unicode 6.0 data.

12 years ago * grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
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.

12 years ago Avoid cutting in the middle of UTF-8 string.
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.

12 years ago * grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix.
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.

12 years ago * include/grub/unicode.h (grub_unicode_compact_range): Replace end with
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.

12 years ago Make better Unicode-compliant and unify some UTF-8 code pathes.
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.

12 years ago * grub-core/io/bufio.c (grub_bufio_read): Fix handling of corner cases.
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.

12 years ago * docs/grub.texi (Filesystems): Mention AFS.
Vladimir 'phcoder' Serbinenko [Sun, 25 Dec 2011 14:40:43 +0000 (15:40 +0100)]
* docs/grub.texi (Filesystems): Mention AFS.

12 years ago * docs/grub.texi (Filesystems): Clarify restrictions.
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.

12 years ago Make HFS implementation use MacRoman.
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.

12 years ago * docs/grub.texi (Filesystems): Add IEEE1275 full-path example.
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 14:38:53 +0000 (15:38 +0100)]
* docs/grub.texi (Filesystems): Add IEEE1275 full-path example.

12 years ago Integrate hints into autogeneration scripts.
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

12 years agoPut recheck back
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 12:37:28 +0000 (13:37 +0100)]
Put recheck back

12 years ago * grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN):
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.

12 years agoFix IEEE1275 bugs in grub-probe
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:54:28 +0000 (02:54 +0100)]
Fix IEEE1275 bugs in grub-probe

12 years agomerge mainline into hints
Vladimir 'phcoder' Serbinenko [Sat, 24 Dec 2011 01:52:43 +0000 (02:52 +0100)]
merge mainline into hints

12 years ago * util/grub-install.in: Account for possible escaped comma in device
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.

12 years ago * util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
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.

12 years ago * grub-core/kern/ieee1275/openfw.c (grub_devalias_iterate): Fix
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.

12 years ago * grub-core/kern/disk.c (grub_disk_read): Fix hook calling for
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.

12 years ago * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/
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.

12 years agosearch cache
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:14:34 +0000 (21:14 +0100)]
search cache

12 years agoFix *end restoring
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:14:24 +0000 (21:14 +0100)]
Fix *end restoring

12 years agosimplify lib/arg.c and allow purely long options
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 20:13:09 +0000 (21:13 +0100)]
simplify lib/arg.c and allow purely long options

12 years agoFix few bugs and memory leaks
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 18:25:24 +0000 (19:25 +0100)]
Fix few bugs and memory leaks

12 years agomerge mainline into hints
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 17:49:00 +0000 (18:49 +0100)]
merge mainline into hints

12 years agomerge mainline into hints
Vladimir 'phcoder' Serbinenko [Fri, 23 Dec 2011 17:46:06 +0000 (18:46 +0100)]
merge mainline into hints