Commit graph

5712 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
a057797f18 merge mine and abranches' branches. Fix several issues 2011-06-24 21:51:57 +02:00
Vladimir 'phcoder' Serbinenko
8b51fd98b9 bootp support 2011-06-24 20:35:25 +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
005dd67cb6 * grub-core/disk/ahci.c: Add missing license statements.
* grub-core/fs/romfs.c: Likewise.
	* grub-core/lib/ia64/setjmp.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: Likewise.
	* grub-core/loader/ia64/efi/linux.c: Likewise.
	* grub-core/video/colors.c: Likewise.
	* include/grub/dl.h (GRUB_MOD_DEP): New macro.
2011-06-24 00:29:21 +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
Vladimir 'phcoder' Serbinenko
f7db6f4a55 Support non-512B sectors and agglomerate reads.
* Makefile.util.def (libgrubmods.a): Add grub-core/commands/testload.c.
	* grub-core/disk/efi/efidisk.c (grub_efidisk_data): Remove disk_io.
	(disk_io_guid): Removed.
	(make_devices): Locate solely by BlockIO.
	(grub_efidisk_open): Fill log_sector_size and total_sectors.
	(grub_efidisk_read): Use read_blocks.
	(grub_efidisk_write): Use write_blocks.
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Fill
	log_sector_size.
	(get_safe_sectors): Handle non-512B sectors.
	(grub_biosdisk_read): Remove special CDROM handling. Handle non-512B
	sectors.
	(grub_biosdisk_write): Handle non-512B sectors.
	* grub-core/disk/scsi.c (grub_scsi_open): Fill log_sector_size.
	(grub_scsi_read): Remove special non-512B block handling (now handled
	one level up).
	* grub-core/kern/disk.c (grub_disk_open): Fill default log_sector_size
	and do sanity checks.
	(grub_disk_adjust_range): Handle non-512B sectors.
	(transform_sector): New function.
	(grub_disk_read_small): Likewise.
	(grub_disk_read): Rewritten.
	(grub_disk_write): Handle non-512B sectors.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Fill
	log_sector_size.
	(open_device): Use log_sector_size.
	(grub_util_biosdisk_read): Likewise.
	(grub_util_biosdisk_write): Likewise.
	* grub-core/partmap/msdos.c (grub_partition_msdos_iterate): Handle
	non-512B sectors.
	(pc_partition_map_embed): Likewise.
	* include/grub/disk.h (grub_disk): New field log_sector_size.
	(GRUB_DISK_CACHE_SIZE): Redefined from GRUB_DISK_CACHE_BITS.
	(GRUB_DISK_CACHE_BITS): Increased to 6.
	* util/grub-fstest.c (fstest): New command testload.
	(argp_parser): Likewise.
2011-06-23 16:45:52 +02:00
Vladimir 'phcoder' Serbinenko
2df2e89fee Fixed a cache collision bug. Thanks guufy1 for bugreport and test 2011-06-23 09:39:12 +02:00
Vladimir 'phcoder' Serbinenko
77ba5392d0 New testload grub-fstest command 2011-06-23 08:45:12 +02:00
Vladimir 'phcoder' Serbinenko
a5edbcb3a1 merge mainline into 4096 2011-06-23 04:08:37 +02:00
Manoel R. Abranches
d855fbcf37 Add error verification in netbuff operations. 2011-06-18 20:20:53 -03:00
Manoel R. Abranches
d6d205568f Close cards before boot. 2011-06-18 20:18:25 -03:00
Robert Millan
881ac815d0 2011-06-16 Robert Millan <rmh@gnu.org>
Detect `ataraid' devices on GNU/kFreeBSD.  Fix for ATA devices using
        `ata' driver on kernel of FreeBSD 9.

        * util/deviceiter.c [__FreeBSD_kernel__] (get_ada_disk_name)
        (get_ataraid_disk_name): New functions.
        [__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for ataraid
        (/dev/ar[0-9]+) and ada (/dev/ada[0-9]+) devices using
        get_ataraid_disk_name() and get_ada_disk_name().
2011-06-16 14:33:11 +02:00
Manoel R. Abranches
e23bc603f8 Prevent crash when detecting fs. 2011-06-15 15:11:26 -03:00
Colin Watson
1e9aef7d96 * docs/man/grub-mklayout.h2m (DESCRIPTION): Add a reference to the
input format.
2011-06-13 17:35:50 +01:00
Manoel Rebelo Abranches
4700d08bb4 Run indent on files. 2011-06-07 21:59:53 -03:00
Manoel Rebelo Abranches
423a1849ef Write ChangeLog. 2011-06-07 11:47:31 -03:00
Manoel R. Abranches
4f24b12e1f Fix compilation in x86 2011-06-02 15:13:33 -03:00
Colin Watson
351c7c8a15 * docs/grub.texi (Obtaining and Building GRUB): Substitute
`ftp.gnu.org' for `alpha.gnu.org'.
2011-05-29 22:15:08 +01:00
Colin Watson
6b4e643081 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle
partitions under /dev/disk/by-id/.
2011-05-27 13:57:22 +01:00
Colin Watson
c64db050f7 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Give up
after ten consecutive open failures.  Scanning all the way up to
10000 is excessive and can cause serious performance problems in
some configurations.
Fixes Ubuntu bug #787461.
2011-05-27 13:52:21 +01:00
Manoel R. Abranches
85fd555441 Merge Mainline. 2011-05-27 00:23:33 -03:00
Manoel R. Abranches
7dd64f1236 Use a net fs struct to handle open, reand and close in file. 2011-05-27 00:22:35 -03:00
Manoel Rebelo Abranches
f42313bdb0 Remove unused structs and functions. 2011-05-25 11:10:48 -03:00
Vladimir 'phcoder' Serbinenko
245f4aba48 * grub-core/disk/arc/arcdisk.c (reopen): Close old handle before
opening new one.
2011-05-21 07:05:46 +02:00
Vladimir Serbinenko
f767c929f2 Don't stat devices unless we have to.
* grub-core/kern/emu/getroot.c (grub_find_device): Recognize
	dir == /dev/mapper.
	(grub_guess_root_device): Use already known os_dev if possible.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Scan only in /dev/mapper
	if device is known to be a dm one.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-21 07:03:55 +02:00
Colin Watson
f35fa3a664 * util/grub-mkconfig.in: Export GRUB_CMDLINE_LINUX_XEN_REPLACE and
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT.
Reported by: Pawel Tecza.
2011-05-20 11:21:36 +01:00
Vladimir 'phcoder' Serbinenko
eea841440d fix several bugs 2011-05-19 15:39:34 +02:00
Vladimir 'phcoder' Serbinenko
9a79fcf2c9 * grub-core/Makefile.core.def (lsacpi): Fix ia64 mismerge.
(lsefisystab): Likewise.
	(lssal): Likewise.
	(lsefimmap): Likewise.
	(hdparm): Enable on qemu-mips.
	(setjmp): Add ia64 nodist.
	(serial): Simplify tags.
2011-05-19 12:13:18 +02:00
Colin Watson
63e3eea967 * Makefile.util.def (grub-ofpathname): Install manual page. 2011-05-18 17:31:50 +01:00
Colin Watson
e806ce60ee merge trunk 2011-05-18 16:53:36 +01:00
Colin Watson
09728256a8 * grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-05-18 17:16:59 +02:00
Colin Watson
8b63a14297 * .bzrignore: Add grub-core/modinfo.sh and a number of test files. 2011-05-18 16:10:52 +01:00