Commit graph

3281 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
1c358e5948 * po/POTFILES.in: Regenerate. 2011-07-06 22:15:58 +02:00
Vladimir 'phcoder' Serbinenko
abee94edf9 Unify sparc init with other ieee1275.
* grub-core/Makefile.core.def (kernel): Use kern/ieee1275/init.c
	instead of kern/sparc64/ieee1275/init.c.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options)
	[__sparc__]: Set GRUB_IEEE1275_FLAG_NO_PARTITION_0.
	* grub-core/kern/ieee1275/init.c [__sparc__]: Include
	grub/machine/kernel.h.
	(grub_ieee1275_original_stack) [__sparc__]: New variable.
	(grub_claim_heap) [__sparc__]: Use sparc version.
	(grub_machine_init): Moved args parsing to
	(grub_parse_cmdline): ...this.
	* grub-core/kern/sparc64/ieee1275/init.c: Removed.
	* include/grub/offsets.h (GRUB_KERNEL_SPARC64_IEEE1275_MOD_GAP):
	New definition.
	(GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN): Likewise.

	Move BOOTP to separate file.

	* grub-core/Makefile.core.def (net): Add net/bootp.c.
	* grub-core/net/net.c: Move all BOOTP functions to
	* grub-core/net/bootp.c: ... here.

	Use frame interface on PXE.

	* grub-core/Makefile.core.def (pxecmd): Removed.
	(pxe): Use net/drivers/i386/pc/pxe.c rather than net/i386/pc/pxe.c.
	* grub-core/commands/i386/pc/pxecmd.c: Removed.
	* grub-core/i386/pc/pxe.c: Moved from here ...
	* grub-core/net/i386/pc/pxe.c: ... here. Rewritten.
	* grub-core/net/net.c (grub_net_open_real): Handle old pxe syntax.
	* include/grub/i386/pc/pxe.h (grub_pxe_unload): Removed.

	EFI network support.

	* grub-core/Makefile.core.def (efinet): New module.
	* grub-core/disk/efi/efidisk.c (compare_device_paths): Moved from
	here...
	* grub-core/kern/efi/efi.c (grub_efi_compare_device_paths): ... here.
	All users updated.
	* grub-core/kern/efi/init.c (grub_efi_net_config): New variable.
	(grub_machine_get_bootlocation): Call grub_efi_net_config if needed.
	* grub-core/kern/x86_64/efi/callwrap.S (efi_wrap_7): New function.
	* grub-core/net/drivers/efi/efinet.c: New file.
	* include/grub/efi/efi.h (grub_efi_compare_device_paths): New proto.
	(grub_efi_net_config): New extern var.

	Various cleanups and bugfixes.

	* grub-core/disk/efi/efidisk.c (grub_efidisk_open): Fix off-by-one
	error.
	(grub_efidisk_get_device_name): Unify similar codepaths. Accept whole
	disk declared as partition.
	* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_open): Fix memory
	leak on failure.
	* grub-core/kern/dl.c (grub_dl_load_file): Fix memory leak.
	* grub-core/kern/mm.c (grub_debug_malloc): Don't use unsupported %zx.
	(grub_debug_zalloc): Likewise.
	(grub_debug_realloc): Likewise.
	(grub_debug_memalign): Likewise.
	* grub-core/net/arp.c (grub_net_arp_receive): IPv4 is 4-byte wide.
	Check that target is IPv4.
	* grub-core/net/drivers/ieee1275/ofnet.c (grub_ofnet_findcards): Use
	local-mac-address as fallback.
	* grub-core/net/ethernet.c (grub_net_recv_ethernet_packet): Prevent
	memory leak.
	* grub-core/net/ip.c (ipchksum): Rename to ...
	(grub_net_ip_chksum): ... this. All users updated.
	(grub_net_recv_ip_packets): Special handling for DHCP.
	* util/grub-mkimage.c (generate_image): Zero-out aout header.

	Unify prefix handling

	* grub-core/kern/efi/init.c (grub_efi_set_prefix): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/emu/main.c (grub_machine_set_prefix): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	(grub_prefix): New variable.
	(prefix): Removed.
	(root_dev): New variable.
	(dir): Likewise.
	(main): Use new variables.
	* grub-core/kern/i386/coreboot/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/i386/efi/init.c (grub_machine_set_prefix): Removed.
	* grub-core/kern/i386/pc/init.c (make_install_device): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	(grub_machine_set_prefix): Removed.
	* grub-core/kern/ia64/efi/init.c (grub_machine_set_prefix): Removed.
	* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/main.c (grub_set_root_dev): Revamped into ...
	(grub_set_prefix_and_root): ... this. All users updated.
	* grub-core/kern/mips/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* include/grub/kernel.h (grub_machine_set_prefix): Removed.
	(grub_machine_get_bootlocation): New proto.
	* include/grub/i386/pc/kernel.h (grub_pc_net_config): New var.

	Less intrusive and more reliable seek on network implementation.

	* grub-core/kern/file.c (grub_file_net_seek): Removed.
	(grub_file_seek): Don't call grub_file_net_seek.
	* grub-core/net/net.c (grub_net_fs_read): Renamed to ...
	(grub_net_fs_read_real): .. this.
	(grub_net_seek_real): Use net->offset.
	(grub_net_fs_read): Seek if necessary.

	Unify IEEE1275 netwotk config with the other platforms.

	* grub-core/kern/ieee1275/init.c (grub_ieee1275_net_config):
	New variable.
	(grub_machine_get_bootlocation): Support network.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args):
	Support type and device parsing.
	(grub_ieee1275_get_device_type): New function.
	* grub-core/net/drivers/ieee1275/ofnet.c (grub_getbootp_real): Revamped
	into ...
	(grub_ieee1275_net_config_real): ... this.
	(grub_ofnet_probecards): Removed.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Remove ofnet.h.
	* include/grub/ieee1275/ofnet.h: Removed.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_net_config): NEw
	extern var.
	(grub_ieee1275_get_device_type): New function.

	Unify network device closing across platforms and make more robust.

	* grub-core/kern/ieee1275/init.c (grub_machine_fini): Don't call
	grub_grubnet_fini.
	* grub-core/net/ethernet.c (send_ethernet_packet): Open card if it isn't
	already.
	* grub-core/net/net.c (grub_net_network_level_interface_register):
	Update num_ifaces.
	(grub_net_card_unregister): Close all interfaces.
	(receive_packets): Don't poll if no iterfaces are registered.
	Open if necessary.
	(grub_net_fini_hw): New function.
	(grub_net_restore_hw): Likewise.
	(fini_hnd): New variable.
	(GRUB_MOD_INIT): Register preboot hook.
	(GRUB_MOD_FINI): Run and unregister preboot hook.

	Poll network cards when idle.

	* grub-core/kern/term.c (grub_net_poll_cards_idle): New variable.
	(grub_checkkey): Call grub_net_poll_cards_idle if it's not NULL.
	* grub-core/net/net.c (receive_packets): Save last poll time.
	(grub_net_poll_cards_idle_real): New function.
	(GRUB_MOD_INIT): Register grub_net_poll_cards_idle.
	(GRUB_MOD_FINI): Unregister grub_net_poll_cards_idle.
	* include/grub/kernel.h (grub_poll_cards_idle): New extern variable.

	Rename ofnet interfaces.

	* grub-core/net/drivers/ieee1275/ofnet.c (find_alias): New function.
	(grub_ofnet_findcards): Use ofnet_%s names.

	* util/grub-mknetdir.in: Support for EFI and IEEE1275.

	Cleanup socket opening.

	* grub-core/net/net.c (grub_net_fs_open): Rewritten.
	(grub_net_fs_close): Likewise.
	(grub_net_fs_read_real): Use eof member.
	* include/grub/net/udp.h (+grub_net_udp_open): New proto.
	(+grub_net_udp_close): New inline function.

	* include/grub/net/tftp.h: Moved to the top of ...
	* grub-core/net/tftp.c: ... here.
	* include/grub/net/ip.h: Moved mostly to the top of ...
	* grub-core/net/ip.c: ... here.
	* include/grub/net/ethernet.h: Moved mostly to the top of ...
	* grub-core/net/ethernet.c: ... here.

	* grub-core/kern/device.c (grub_device_close): Free device->net->server.

	* grub-core/commands/probe.c (grub_cmd_probe): Use protocol name for
	FS name.

	* include/grub/net/ip.h (ipv4_ini): Removed.
	(ipv4_fini): Likewise.

	* include/grub/net/ip.h (grub_net_recv_ip_packets): New proto.
	(grub_net_send_ip_packets): Likewise.
2011-07-06 20:05:26 +02:00
Vladimir 'phcoder' Serbinenko
cf1337aa02 * grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_init): Use new
grub_read_cmos prototype.
2011-07-06 02:50:35 +02:00
Vladimir 'phcoder' Serbinenko
93c06ff9c6 VGA text support in qemu-mips
* grub-core/Makefile.core.def (kernel): Add term/i386/pc/vga_text.c,
	term/i386/vga_common.c and kern/vga_init.c on qemu-mips.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init vga
	text.
	* grub-core/kern/i386/qemu/init.c: Renamed to ...
	* grub-core/kern/vga_init.c: ... this.
	* grub-core/kern/vga_init.c (VGA_ADDR) [__mips__]: Adjust.
	(grub_qemu_init_cirrus) [__mips__]: Skip PCI and adjust the I/O base.
	* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN) [__mips__]:
	Adjust.
	* include/grub/vga.h [GRUB_MACHINE_MIPS_QEMU_MIPS]: Declare
	GRUB_MACHINE_PCI_IO_BASE.
2011-07-05 23:46:15 +02:00
Vladimir 'phcoder' Serbinenko
748ccabea1 MIPS qemu flash support.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]: Check
	magic.
	* grub-core/kern/mips/qemu_mips/init.c (probe_mem): New function.
	(grub_machine_init): Probe memory if its size isn't known.
	* util/grub-mkimage.c (image_targets): Add flash targets.
	(generate_image): Handle flash targets.
2011-07-05 21:42:36 +02:00
Vladimir 'phcoder' Serbinenko
d734599439 MIPS qemu at_keyboard support.
* gentpl.py (videoinkernel): Add qemu-mips.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add necessary headers.
	* grub-core/Makefile.core.def (kernel): Add at_keyboard and layout.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init new
	modules.
	* grub-core/term/at_keyboard.c (grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't consider original set.
	* grub-core/term/serial.c (grub_serial_register)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Make com0 explicitly active.
2011-07-05 21:00:01 +02:00
Vladimir 'phcoder' Serbinenko
a07a81b335 CMOS support on sparc.
* gentpl.py (cmos): Add powerpc and sparc.
	* grub-core/Makefile.core.def (datetime): Add lib/ieee1275/cmos.c on
	powerpc and sparc.
	* grub-core/lib/cmos_datetime.c (grub_get_datetime)
	[__powerpc__ || __sparc__]: Rename to grub_get_datetime_cmos.
	(grub_set_datetime) [__powerpc__ || __sparc__]: Likewise to
	grub_set_datetime_cmos.
	* grub-core/lib/ieee1275/cmos.c: New file.
	* grub-core/lib/ieee1275/datetime.c (no_ieee1275_rtc): New vaiable.
	(find_rtc): Set no_ieee1275_rtc on error.
	(grub_get_datetime): Call grub_get_datetime_cmos on error.
	(grub_set_datetime): Call grub_set_datetime_cmos on error.
	* include/grub/cmos.h (grub_cmos_read): Return grub_err_t since it may
	fail. Move value to argument. All users updated
	(grub_cmos_write): Likewise.
	(grub_cmos_read) [__powerpc__ || __sparc__]: Rewritten.
	(grub_cmos_write) [__powerpc__ || __sparc__]: Likewise.
	* include/grub/datetime.h [__powerpc__ || __sparc__]: Declare
	grub_get_datetime_cmos and grub_set_datetime_cmos.
2011-07-05 20:24:20 +02:00
Grégoire Sutre
77546584e1 Use @PACKAGE@ instead of hardcoded name when sourcing grub-mkconfig_lib. 2011-07-02 21:22:19 +02:00
Colin Watson
548947916b * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Use
default_bg_color rather than black.
(grub_gfxterm_fullscreen): Likewise.
(grub_gfxterm_background_color_cmd): Save new background color in
default_bg_color.
2011-06-28 17:05:41 +01:00
Vladimir 'phcoder' Serbinenko
8d5d8444bd * grub-core/Makefile.core.def (chain): Fix coreboot filename. 2011-06-27 19:30:16 +02:00
Vladimir 'phcoder' Serbinenko
5afeb5bdd6 * grub-core/disk/pata.c (grub_pata_initialize) [QEMU_MIPS]: Fix a
mismerge.
2011-06-27 19:26:52 +02:00
Vladimir 'phcoder' Serbinenko
ba7df45ee6 Chainloading on coreboot support.
* grub-core/Makefile.core.def (chain): Add coreboot.
	* grub-core/loader/i386/coreboot/chainloader.c: New file.
2011-06-27 14:14:11 +02:00
Vladimir 'phcoder' Serbinenko
d0b526b277 * grub-core/loader/i386/bsd.c (grub_bsd_load): Handle relocator failure
if it happens.
2011-06-27 13:57:03 +02:00
Vladimir 'phcoder' Serbinenko
5ff1d945ed Implement time command.
* grub-core/Makefile.core.def (time): New module.
	* grub-core/commands/time.c: New file.
	* grub-core/script/parser.y: Remove "time" keyword.
	* grub-core/script/yylex.l: Likewise.
2011-06-27 12:31:37 +02:00
Vladimir 'phcoder' Serbinenko
5ebaad7eec * include/grub/loader.h (grub_loader_unregister_preboot_hook): Export. 2011-06-27 12:28:47 +02:00
Vladimir 'phcoder' Serbinenko
bdea379833 * grub-core/lib/relocator.c (malloc_in_range): Fix a memory corruption
when handling leftovers.
2011-06-27 12:18:44 +02:00
Vladimir 'phcoder' Serbinenko
b28c56559b * util/ieee1275/grub-ofpathname.c (main): Handle --help and --version
so that help2man doesn't fail.
2011-06-27 12:16:00 +02:00
Vladimir 'phcoder' Serbinenko
b6f945dccb * grub-core/net/drivers/ieee1275/ofnet.c (send_card_buffer) Use right
type in pointers on sparc64.
	(get_card_packet): Likewise.
2011-06-27 12:13:21 +02:00
Colin Watson
f9b75e8a67 * grub-core/commands/videoinfo.c (hook): Indicate current video mode
with `*'.
(grub_cmd_videoinfo): Fetch current video mode.
2011-06-27 10:47:02 +01:00
Vladimir 'phcoder' Serbinenko
1e3d9b8612 * grub-core/disk/scsi.c (grub_scsi_read): Limit SCSI reads to 32K
because of underlying system restrictions.
2011-06-27 10:12:35 +02:00
Vladimir 'phcoder' Serbinenko
efff4b1cc3 * util/grub-mkrescue.in: Rename "ata" to "pata" and add ahci when
necessary.
2011-06-27 09:06:15 +02:00
Vladimir 'phcoder' Serbinenko
9fc9ce3795 Coreboot video support.
* grub-core/Makefile.core.def (vga): Extend to coreboot and multiboot.
	(vbe): Likewise.
	* grub-core/kern/i386/coreboot/startup.S: Include int.S.
	* grub-core/kern/i386/pc/startup.S (grub_bios_interrupt): Moved from
	here ...
	* grub-core/kern/i386/int.S: ... here.
	* grub-core/video/i386/pc/vbe.c: Updated includes.
	* grub-core/video/i386/pc/vga.c: Likewise.
	* include/grub/i386/coreboot/memory.h
	(GRUB_MEMORY_MACHINE_SCRATCH_ADDR): New definition.
	(GRUB_MEMORY_MACHINE_SCRATCH_SEG): Likewise.
	(GRUB_MEMORY_MACHINE_SCRATCH_SIZE): Likewise.
	* include/grub/i386/pc/int.h (GRUB_CPU_INT_FLAGS_DEFAULT) [!PCBIOS]:
	Disable interrupts.
	* include/grub/i386/pc/vga.h: Removed. All users updated.
2011-06-27 08:54:55 +02:00
Vladimir 'phcoder' Serbinenko
41bec7fec9 * grub-core/disk/ahci.c (grub_ahci_readwrite_real): Use proper
definitions for dprintf.
	* grub-core/disk/pata.c (grub_pata_readwrite): Likewise.
2011-06-27 08:43:13 +02:00
Vladimir 'phcoder' Serbinenko
ca80309d32 * grub-core/net/drivers/ieee1275/ofnet.c (send_card_buffer): Fix
prototype.
	(get_card_packet): Likewise.
2011-06-27 08:40:17 +02:00
Yves Blusseau
9e322ce8de Display the path of the file when file is not found
* grub-core/fs/fat.c: Display the filename when file is not found.
	* grub-core/fs/fshelp.c: Likewise.
	* grub-core/fs/hfs.c: Likewise.
	* grub-core/fs/jfs.c: Likewise.
	* grub-core/fs/minix.c: Likewise.
	* grub-core/fs/ufs.c: Likewise.
	* grub-core/fs/btrfs.c: Likewise.
	* grub-core/commands/i386/pc/play.c: Likewise.
2011-06-26 21:48:52 +02:00
Szymon Janc
cbf597afb1 * grub-core/commands/cmp.c (grub_cmd_cmp): Remove unnecessary NULL
pointer checks before calling grub_free().
	* grub-core/commands/wildcard.c (match_devices): Likewise.
	* grub-core/commands/wildcard.c (match_files): Likewise.
	* grub-core/fs/cpio.c (grub_cpio_dir): Likewise.
	* grub-core/fs/cpio.c (grub_cpio_open): Likewise.
	* grub-core/fs/udf.c (grub_udf_read_block): Likewise.
	* grub-core/fs/xfs.c (grub_xfs_read_block): Likewise.
	* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Likewise.
	* grub-core/normal/cmdline.c (grub_cmdline_get): Likewise.
	* grub-core/script/yylex.l (grub_lexer_unput): Likewise.
	* grub-core/video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* grub-core/video/readers/png.c (grub_png_output_byte): Likewise.
2011-06-26 17:17:41 +02:00
Patrick
6295b32f79 * grub-core/kern/main.c (grub_load_normal_mode): Correct the comment. 2011-06-25 01:09:32 +02:00
Vladimir 'phcoder' Serbinenko
77c0840ba6 * grub-core/net/i386/pc/pxe.c (grub_pxe_recv): Fix declaration.
(grub_pxe_send): Likewise.
	(GRUB_MOD_INIT): Fix types.
2011-06-25 00:18:36 +02:00
Szymon Janc
40ea05dee4 * grub-core/io/xzio.c: Fix code style issues 2011-06-24 22:37:17 +02:00
Manoel Rebelo Abranches
90162423e9 Network infrastructure.
The ARP protocol was made by Paulo Pinatti <ppinatti@br.ibm.com>

	* include/grub/net/arp.h: New file.
	* include/grub/net/device.h: Likewise.
	* include/grub/net/ethernet.h: Likewise.
	* include/grub/net/ip.h: Likewise.
	* include/grub/net/netbuff.h: Likewise.
	* include/grub/net/tftp.h: Likewise.
	* include/grub/net/udp.h: Likewise.
	* include/grub/ieee1275/ofnet.h: Likewise.
	* include/grub/emu/export.h: Likewise.
	* include/grub/net.h: Likewise.
	* grub-core/net/arp.c: Likewise.
	* grub-core/net/ethernet.c: Likewise.
	* grub-core/net/ip.c: Likewise.
	* grub-core/net/udp.c: Likewise.
	* grub-core/net/tftp.c: Likewise.
	* grub-core/net/netbuff.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/net/drivers/emu/emunet.c: Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c: Likewise.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add net.h, ofnet.h and
	export.h.
	* grub-core/Makefile.core.def (net): New module.
	(tftp): Likewise.
	(ofnet): Likewise.
	(emunet): Likewise.
	* grub-core/commands/ls.c (grub_ls_list_devices) [!GRUB_UTIL]: List
	network protocols.
	* grub-core/kern/device.c (grub_net_open) : New variable.
	(grub_device_open): Handle network device.
	(grub_device_close): Likewise.
	* grub-core/kern/file.c (grub_file_net_seek) : New variable.
	(grub_grubnet_fini): Likewise.
	(grub_file_seek): Seek in network device.
	* grub-core/kern/fs.c (grub_fs_probe): Handle network devices.
	* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix): Handle
	network root.
	(grub_machine_fini): Call grub_grubnet_fini.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Handle
	network.
	(grub_ieee1275_get_aliasdevname): New function.
	* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Add unofficial Solaris network info.
	(grub_multiboot_make_mbi): Likewise.
	* grub-core/fs/i386/pc/pxe.c: Moved from here ...
	* grub-core/net/i386/pc/pxe.c: ...here. Adapted for new design.
	* include/grub/device.h (grub_fs): Removed.
	* include/grub/err.h (grub_err_t): Add network-related values.
	* include/grub/i386/pc/pxe.h: Removed bootp parts.
	* include/grub/ieee1275/ieee1275.h (grub_ofnetcard_data): New struct.
	(grub_ieee1275_get_aliasdevname): New proto.
	* include/grub/net.h: Rewritten.

	Also-By: Paulo Pinatti <ppinatti@br.ibm.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-06-24 22:16:05 +02:00
Vladimir 'phcoder' Serbinenko
031f22a01f * grub-core/disk/raid.c (insert_array): Ensure uniqueness of readable
names.
2011-06-24 18:26:20 +02:00
Vladimir 'phcoder' Serbinenko
4388ca7224 * grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
(wildcard_expand): Don't stop on nonregexp parts after regexp ones since
	it truncates the output.
	Reported by: Ximin Luo.
2011-06-24 13:43:10 +02:00
Vladimir 'phcoder' Serbinenko
98e2f50661 * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and .. 2011-06-24 13:02:49 +02:00
Vladimir 'phcoder' Serbinenko
2a5e94d84a * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
partmap before abstraction.
2011-06-24 12:41:05 +02:00
Alexander Kurtz
535c191059 * util/grub-mkconfig_lib.in: Add missing quotes. 2011-06-24 12:38:24 +02:00
Vladimir 'phcoder' Serbinenko
bc09e1a238 * grub-core/kern/emu/getroot.c (grub_guess_root_device): Revert to
old method if mountinfo would return /dev/root and /dev/root doesn't
	exist.
2011-06-24 04:32:54 +02:00
Vladimir 'phcoder' Serbinenko
290766fb77 ZFS zlib support
* grub-core/fs/zfs/zfs.c (zlib_decompress): New function.
	(decomp_table): Add zlib entries.
	(zio_read): USe 8 bits for compression function rather than 3.
	* include/grub/zfs/zio.h (zio_compress): Add zlib values.
2011-06-24 00:31:29 +02:00
Vladimir 'phcoder' Serbinenko
5ab3f48a92 AHCI support.
* grub-core/Makefile.core.def (ata_pthru): Removed.
	(ahci): New module.
	(pata): Likewise.
	* grub-core/bus/usb/ohci.c (GRUB_MOD_FINI): Unregister preboot hook
	on unload.
	* grub-core/commands/hdparm.c (grub_hdparm_do_ata_cmd): Use ATA
	readwrite.
	(grub_hdparm_do_check_powermode_cmd): Likewise.
	(grub_hdparm_do_smart_cmd): Likewise.
	(grub_hdparm_set_val_cmd): Likewise.
	(grub_cmd_hdparm): Likewise. Check thta we have an ATA device.
	* grub-core/disk/ahci.c: New file.
	* grub-core/disk/ata.c: Factor out the low-level part into ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/ata_pthru.c: Contents moved to ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/scsi.c (grub_scsi_names): New array.
	(grub_scsi_iterate): Use grub_scsi_names.
	(grub_scsi_open): Likewise.
	* grub-core/kern/disk.c (grub_disk_ata_pass_through): Removed.
	* include/grub/ata.h (grub_ata_commands): Add DMA commands.
	(grub_ata_regs_t): New struct.
	(grub_disk_ata_pass_through_parms): Likewise.
	(grub_ata_device): Renamed to ...
	(grub_ata): ... this.
	(grub_ata_dev): New struct.
	Removed all low-level inline functions.
	* include/grub/scsi.h: Add PATA and AHCI subsystems.
	(grub_scsi_dev): Removed 'name' and 'id'. Added 'id' parameter to
	iterate hooks and open. All users updated.
	* util/grub-install.in: Handle AHCI disk module.
2011-06-24 00:07:55 +02:00
Szymon Janc
c31dc5f5e4 Add support for DRI and RSTn markers in JPEG files.
* grub-core/video/readers/jpeg.c (JPEG_MARKER_DRI): New define.
	(JPEG_MARKER_RST0): Likewise.
	(JPEG_MARKER_RST1): Likewise.
	(JPEG_MARKER_RST2): Likewise.
	(JPEG_MARKER_RST3): Likewise.
	(JPEG_MARKER_RST4): Likewise.
	(JPEG_MARKER_RST5): Likewise.
	(JPEG_MARKER_RST6): Likewise.
	(JPEG_MARKER_RST7): Likewise.
	(grub_jpeg_data): New fields dri, r1, bitmap_ptr.
	(grub_jpeg_decode_dri): New function.
	(grub_jpeg_decode_sos): Move image data related part into
	grub_jpeg_decode_data function.
	(grub_jpeg_decode_data): New function.
	(grub_jpeg_reset): New function.
	(grub_jpeg_decode_jpeg): Handle new markers.
2011-06-23 23:13:20 +02:00
Vladimir 'phcoder' Serbinenko
fe12fd5b43 * util/ieee1275/ofpath.c (check_sas): Close fd.
(main): Free of_path.
	Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:18:31 +02:00
Vladimir 'phcoder' Serbinenko
03147f4667 * util/grub-mkpasswd-pbkdf2.c (main): Don't double-close.
Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:11:42 +02:00
Vladimir 'phcoder' Serbinenko
cad3237fb5 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Close
file after stat.
	Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:02:05 +02:00
Vladimir 'phcoder' Serbinenko
13548d26e9 * util/raid.c (grub_util_raid_getmembers): Close fd before returning.
Reported by: David Volgyes <dvolgyes>.
2011-06-23 21:06:50 +02:00
Vladimir 'phcoder' Serbinenko
e061a1b537 * grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:
Prevent memory leak.
2011-06-23 20:58:35 +02:00
Vladimir 'phcoder' Serbinenko
1abe47dc99 * grub-core/lib/reed_solomon.c (rs_recover): Prevent memory leak.
(main): Close file.
2011-06-23 20:55:36 +02:00
Vladimir 'phcoder' Serbinenko
fbc626665f * grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devprop): Don't attempt
to continue if allocation is failed.

	Reported by: David Volgyes <dvolgyes>.
2011-06-23 20:38:19 +02:00
David Volgyes
e98c83e910 * grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
dereference.
2011-06-23 20:28:04 +02:00
Vladimir 'phcoder' Serbinenko
a199a8cd1a Fix spurious warning.
* grub-core/partmap/acorn.c (grub_acorn_boot_block): Make a union.
	(acorn_partition_map_find): Use .bin member.
2011-06-23 20:05:39 +02:00
Vladimir 'phcoder' Serbinenko
e2d1dba0ae * grub-core/kern/emu/getroot.c (grub_guess_root_device): Don't accept
/dev/root as a valid device.
2011-06-23 19:50:41 +02:00
Jim Meyering
8a5d6919e1 Avoid NULL deref in grub_device_open.
* grub-core/kern/device.c (grub_device_open): Don't dereference
	a NULL pointer upon failed grub_env_get.
2011-06-23 18:08:53 +02:00