Commit graph

398 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
e12119495d Support multi-extent iso files.
* grub-core/fs/iso9660.c (grub_iso9660_data): Remove first_sector.
	Add node.
	(grub_fshelp_node): Revamp. All users updated.
	(FLAG_*): New enum.
	(read_node): New function.
	(grub_iso9660_susp_iterate): Use read_node. Receive a node as argument.
	All users updated.
	(grub_iso9660_mount): Don't attempt to read sua when there is none.
	(get_node_size): New function.
	(grub_iso9660_iterate_dir): Use read_node. Agglomerate multi-extent
	entries.
	Fix memory leak on . and ..
	(grub_iso9660_read): Use read_node.
	(grub_iso9660_close): Free node.
2011-10-25 18:18:58 +02:00
Vladimir 'phcoder' Serbinenko
d4888031f2 Fix tar 4G limit and handle paths containing dot.
* grub-core/fs/cpio.c (grub_cpio_data): Use grub_off_t for offsets.
	(canonicalize): New function.
	(grub_cpio_find_file): Use canonicalize. Store offs in
	grub_disk_addr_t.
	(grub_cpio_dir): Use grub_disk_addr_t.
	(grub_cpio_open): Likewise.
2011-10-25 18:12:36 +02:00
Vladimir 'phcoder' Serbinenko
9f12e664cc Fix handling of uncompressed blocks on squashfs and break 4G limit.
* grub-core/fs/squash4.c (grub_squash_super): Add block_size. Remove
	unused flags.
	(grub_squash_inode): Add long_file and block_size.
	(grub_squash_cache_inode): New struct.
	(grub_squash_dirent): Make types into enum.
	(SQUASH_TYPE_LONG_REGULAR): New type.
	(grub_squash_frag_desc): Add field size.
	(SQUASH_BLOCK_FLAGS): New enum.
	(grub_squash_data): Use grub_squash_cache_inode.
	(grub_fshelp_node): Make ino_chunk 64-bit.
	(read_chunk): Minor argument change. All users updated.
	(squash_mount): Use correct le_to_cpu.
	(grub_squash_open): Handle LONG_REGULAR.
	(direct_read): New function.
	(grub_squash_read_data): Handle blocks correctly.
2011-10-25 18:09:00 +02:00
Vladimir 'phcoder' Serbinenko
f4d9b64bba * grub-core/fs/romfs.c (grub_romfs_open): Add missing return. 2011-10-25 17:38:22 +02:00
Vladimir 'phcoder' Serbinenko
5bbd28b8ce Fix 2G limit on ZFS.
* grub-core/fs/zfs/zfs.c (zio_checksum_verify): Use more appropriate
	types.
	(uberblock_verify): Likewise.
	(dmu_read): Likewise.
	(grub_zfs_read): Likewise. Remove invalid cast.
2011-10-24 21:33:35 +02:00
Vladimir 'phcoder' Serbinenko
68c72069d9 * grub-core/fs/jfs.c (grub_jfs_blkno): Use more appropriate types.
(grub_jfs_blkno): Fix incorrect shift.
	(grub_jfs_read_file): Use more appropriate types.
2011-10-24 17:02:02 +02:00
Vladimir 'phcoder' Serbinenko
6e536dc8ad Support triple indirect on minix2 and minix3.
* grub-core/fs/minix.c (grub_minix_inode) [MODE_MINIX2 || MODE_MINIX3]:
	Declare triple_indir_zone.
	(grub_minix_get_file_block) [MODE_MINIX2 || MODE_MINIX3]: Handle triple
	indirect.
2011-10-24 16:16:28 +02:00
Vladimir 'phcoder' Serbinenko
e0864e7ab7 Minix FS fixes.
* grub-core/fs/minix.c (GRUB_MINIX_INODE_SIZE): Size is always 32-bit.
	(grub_minix_inode) [!MODE_MINIX2 && !MODE_MINIX3]: Make size 32-bit.
	Rename ctime to mtime. All users updated.
	(grub_minix_get_file_block): Fix types and double indirect computations.
2011-10-24 10:45:47 +02:00
Vladimir 'phcoder' Serbinenko
89481cabbd * grub-core/fs/fat.c (grub_fat_label) [MODE_EXFAT]: Set *label to 0
if no label is found.
	(grub_fat_iterate_dir): Fix file size type.
	(grub_fat_iterate_dir): Likewise.
2011-10-24 01:31:06 +02:00
Vladimir 'phcoder' Serbinenko
a374751b16 ExFAT support.
* Makefile.util.def (libgrubmods.a): Add grub-core/fs/exfat.c.
	* grub-core/Makefile.core.def (exfat): New module.
	* grub-core/fs/exfat.c: New file.
	* grub-core/fs/fat.c (GRUB_FAT_DIR_ENTRY_SIZE): Removed.
	(GRUB_FAT_ATTR_*): Make into an enum.
	(GRUB_FAT_ATTR_LONG_NAME) [MODE_EXFAT]: Removed.
	(GRUB_FAT_ATTR_VALID) [MODE_EXFAT]: Remove GRUB_FAT_ATTR_VOLUME_ID.
	(GRUB_FAT_ATTR_VOLUME_ID) [MODE_EXFAT]: Removed.
	(GRUB_FAT_MAXFILE): Removed.
	(grub_exfat_bpb) [MODE_EXFAT]: New struct.
	(grub_current_fat_bpb_t): New type.
	(grub_fat_dir_entry) [MODE_EXFAT]: New struct.
	(grub_fat_dir_node) [MODE_EXFAT]: New struct.
	(grub_fat_dir_node_t): New type.
	(grub_fat_data) [MODE_EXFAT]: Remove root_sector and num_root_sectors.
	(fat_log2) [MODE_EXFAT]: Removed.
	(grub_fat_mount): Use grub_current_fat_bpb_t. Add some sanity checks.
	(grub_fat_mount) [MODE_EXFAT]: Handle ExFAT.
	(grub_fat_iterate_dir) [MODE_EXFAT]: New function.
	(grub_fat_find_dir) [MODE_EXFAT]: Handle ExFAT.
	(grub_fat_label) [MODE_EXFAT]: New function.
	(grub_fat_fs) [MODE_EXFAT]: Set name to "exfat" and
	reserved_first_sector to 0.
2011-10-19 20:19:25 +02:00
Vladimir 'phcoder' Serbinenko
366e34fa5a Fix few obvious type discrepancies.
* grub-core/fs/affs.c (grub_affs_read_file): Use grub_off_t for offset.
	* grub-core/fs/afs.c (grub_afs_read_file): Likewise.
	* grub-core/fs/fshelp.c (grub_fshelp_find_file): Remove leftover
	variable.
	* grub-core/fs/hfs.c (grub_hfs_read_file): Use grub_off_t for offset
	and connected types.
	* grub-core/fs/nilfs2.c (grub_nilfs2_read_file): Use grub_off_t for
	offset.
	(grub_nilfs2_iterate_dir): Use grub_off_t for fpos.
	* grub-core/fs/sfs.c (grub_sfs_read_file): Use grub_off_t for offset.
	* grub-core/fs/ufs.c (grub_ufs_read_file): Use grub_off_t for offset
	and connected types.
2011-10-16 11:57:48 +02:00
Vladimir 'phcoder' Serbinenko
3b619ae116 * grub-core/fs/xfs.c (grub_xfs_inode): New field fork_offset.
(GRUB_XFS_INO_AGBITS): Make into inline function.
	(GRUB_XFS_INO_INOINAG): Likewise.
	(GRUB_XFS_INO_AG): Likewise.
	(GRUB_XFS_FSB_TO_BLOCK): Likewise.
	(GRUB_XFS_EXTENT_OFFSET): Likewise.
	(GRUB_XFS_EXTENT_BLOCK): Likewise.
	(GRUB_XFS_EXTENT_SIZE): Likewise.
	(GRUB_XFS_ROUND_TO_DIRENT): Likewise.
	(GRUB_XFS_NEXT_DIRENT): Likewise.
	(grub_xfs_read_block): Rewrite the btree parsing. Fixes invalid BMAP.
	(grub_xfs_read_file): Fix offset type.
2011-10-16 11:48:54 +02:00
Vladimir 'phcoder' Serbinenko
d891955241 Fix overflow with >2GiB file on HFS+. >4GiB wasn't tested.
* grub-core/fs/hfsplus.c (grub_hfsplus_btree): Use more appropriate
	types.
	(grub_hfsplus_btree_recoffset): Likewise.
	(grub_hfsplus_btree_recptr): Likewise.
	(grub_hfsplus_find_block): Likewise.
	(grub_hfsplus_btree_search): Likewise.
	(grub_hfsplus_read_block): Likewise.
	(grub_hfsplus_read_file): Likewise.
	(grub_hfsplus_mount): Likewise.
	(grub_hfsplus_btree_iterate_node): Likewise.
	(grub_hfsplus_btree_search): Likewise.
	(grub_hfsplus_iterate_dir): Likewise.
	(grub_hfsplus_read): A small code simplification.
2011-10-14 22:41:21 +02:00
Szymon Janc
0e2b7e39f2 * grub-core/fs/btrfs.c: Include <minilzo.h> instead of "minilzo.h".
* grub-core/io/lzopio.c: Likewise.
2011-10-03 22:25:06 +02:00
Szymon Janc
139d67a82f * grub-core/fs/btrfs.c: Fix code style regressions. 2011-10-03 21:50:32 +02:00
Szymon Janc
579c12fbb4 * grub-core/fs/btrfs.c: Some minor cleanups. 2011-08-24 11:24:10 +02:00
Szymon Janc
00b98c9b2e * grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Random fixes and some
cleanup.
2011-08-23 19:49:01 +02:00
Szymon Janc
540c000f0d merge trunk 2011-08-20 09:49:15 +02:00
Szymon Janc
4334690fbf More work on LZO for btrfs support. Some fixes and code refactoring. 2011-08-20 02:05:08 +02:00
Vladimir 'phcoder' Serbinenko
43526629e5 * grub-core/fs/jfs.c (grub_jfs_read_file): New parameter ino.
All users updated.
	(grub_jfs_lookup_symlink): Use correct starting inode.
2011-08-16 23:10:38 +02:00
Szymon Janc
095f077e6d Add support for LZO compression in btrfs.
* Makefile.util.def (libgrubmods.a): Add minilzo.c and add required flags
to cflags in cppflags.
* Makefile.core.def (btrfs): Likewise.
* grub-core/fs/btrfs.c: Include minilzo.h.
(grub_btrfs_superblock): Add sectorsize, nodesize, leafsize, stripsize and
dummy5 field.
(GRUB_BTRFS_COMPRESSION_LZO): New define.
(grub_btrfs_extent_read): Add support for LZO compression type.
2011-08-14 11:46:05 +02:00
Szymon Janc
b6085f3236 * grub-core/fs/btrfs.c: Some code style fixes. 2011-08-14 11:42:53 +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
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
98e2f50661 * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and .. 2011-06-24 13:02:49 +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
Manoel R. Abranches
85fd555441 Merge Mainline. 2011-05-27 00:23:33 -03:00
Colin Watson
09728256a8 * grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-05-18 17:16:59 +02:00
Vladimir 'phcoder' Serbinenko
bf947d36e3 Use full 64-bit division.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
	(grub_divmod64): ... this.
	* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
	version.
2011-05-18 15:35:19 +02:00
Vladimir 'phcoder' Serbinenko
1e4b43901a * grub-core/fs/fat.c: Include grub/fat.h.
(grub_fat_bpb): Moved to ...
	* include/grub/fat.h (grub_fat_bpb): ... here. New file.
	* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
	grub/ntfs.h.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
	Moved from here...
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
	here.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
	New function.
	(grub_chainloader_cmd): Patch BPB if --bpb is given.
	(GRUB_MOD_INIT): Show --bpb.
	* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
	* grub-core/normal/main.c (features): New variable.
	(GRUB_MOD_INIT): Set feature_* variables.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
	proto.
	* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
2011-05-18 12:48:14 +02:00
Vladimir 'phcoder' Serbinenko
b756f75f07 Several FS mtime support.
* grub-core/fs/affs.c (grub_affs_time): New struct.
	(grub_affs_file): New field mtime.
	(grub_fshelp_node): Changed 'block' and 'parent' to more appropriate
	type. Removed 'size'. New field 'di'. All users updated.
	(grub_affs_mount): Simplify checsum checking.
	(grub_affs_iterate_dir): New helper grub_affs_create_node.
	(grub_affs_dir): Handle mtime.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'.
	(grub_hfs_filerec): New field mtime.
	(grub_hfs_dir): Handle mtime.
	(grub_hfs_mtime): New function.
	(grub_hfs_fs): Register grub_hfs_mtime.
	* grub-core/fs/iso9660.c (grub_iso9660_date2): New struct.
	(grub_iso9660_dir): New field mtime.
	(grub_fshelp_node): New field dirent.
	(iso9660_to_unixtime): New function.
	(iso9660_to_unixtime2): Likewise.
	(grub_iso9660_read_symlink): Use node->dirent.
	(grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_dir): Set mtime.
	(grub_iso9660_mtime): New function.
	(grub_iso9660_fs): Register grub_iso9660_mtime.
	* grub-core/fs/jfs.c (grub_jfs_time): New struct.
	(grub_jfs_inode): New fields atime, ctime and mtime.
	(grub_jfs_dir): Set mtime.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/ntfs.c (list_file): Set mtime.
	(grub_ntfs_dir): Likewise.
	* grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'.
	(grub_reiserfs_iterate_dir): Set mtime.
	(grub_reiserfs_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_obj): New field mtime.
	(grub_fshelp_node): Likewise.
	(grub_sfs_iterate_dir): Set mtime.
	(grub_sfs_dir): Likewise.
	* grub-core/fs/udf.c (grub_udf_dir): Set mtime.
	* grub-core/fs/xfs.c (grub_xfs_time): New struct.
	(grub_xfs_inode): New fields atime, mtime, ctime.
	(grub_xfs_dir): Set mtime.
	* include/grub/datetime.h (grub_datetime2unixtime): New function.
	* include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime.
	* include/grub/ntfs.h (grub_fshelp_node): New field mtime.

	Support UDF symlinks.

	* grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks.
	(grub_ufs_read_symlink): New function. All users updated.

	Check amiga partmap checksum.

	* grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes.
	(grub_amiga_partition): Likewise.
	(amiga_partition_map_checksum): New function.
	(amiga_partition_map_iterate): Check checksum.
2011-05-15 12:23:54 +02:00
Vladimir 'phcoder' Serbinenko
5470225d58 ROMFS support.
* Makefile.util.def (libgrubmods.a): Add romfs.
	* grub-core/Makefile.core.def (romfs): New module.
	* grub-core/fs/romfs.c: New file.
2011-05-15 12:01:03 +02:00
Vladimir 'phcoder' Serbinenko
d4680a3556 Squashfs v4 support.
* Makefile.util.def (libgrubmods.a): Add squash4.
	* grub-core/Makefile.core.def (squash4): New module.
	* grub-core/fs/squash4.c: New file.
	* grub-core/io/gzio.c (grub_gzio): New members disk_input_off,
	disk_input_start, disk_input.
	(get_byte): Handle disk_input.
	(grub_zlib_disk_read): New function.
	* include/grub/deflate.h (grub_zlib_disk_read): New proto.
2011-05-15 11:58:22 +02:00
Feiran Zheng
bcb18e748f * Makefile.util.def (libgrubmods.a): Add minix3.
* grub-core/Makefile.core.def (minix3): New module.
	* grub-core/fs/minix.c (GRUB_MINIX_MAGIC) [MODE_MINIX3]: New value.
	(GRUB_MINIX_BSIZE): Removed.
	(GRUB_MINIX_INODE_DIR_BLOCKS): New definition. All users updated.
	(grub_minix_ino_t): New type.
	(grub_minix_le_to_cpu_ino): New macro.
	(GRUB_MINIX_ZONE2SECT): New definition. All users updated.
	(grub_minix_sblock) [MODE_MINIX3]: Change for minix3.
	(grub_minix_data): New field block_size.
	(grub_minix_read_file): Handle 64-bit correctly.
	* grub-core/fs/minix3.c: New file.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-05-15 11:53:16 +02:00
Vladimir 'phcoder' Serbinenko
983b414d77 * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Silence spurious
warning. Move variables before code while on it.
2011-05-15 10:23:02 +02:00
Manoel Rebelo Abranches
90eb90e24c Merge mainline. 2011-05-05 12:12:22 -03:00
Colin Watson
bd405bbc55 * grub-core/fs/i386/pc/pxe.c (grub_pxefs_dir): Return
GRUB_ERR_BAD_FS rather than GRUB_ERR_IO if the disk is not a pxe
disk; otherwise grub_fs_probe will not fall back to the next
filesystem.
(grub_pxefs_open): Likewise, for consistency.
Reported and tested by: Ezekiel Grave.
2011-05-03 18:03:05 +01:00
Colin Watson
cff5e5e58d grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-04-21 10:37:45 +01:00
Colin Watson
2e0fbe00d2 merge trunk 2011-04-21 10:36:09 +01:00
Vladimir 'phcoder' Serbinenko
34faa5955a * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Support huge
chunks.
	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_BUG.
2011-04-18 23:10:19 +02:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6 BtrFS support. Written by me (Vladimir) with important bugfixes and
even more important testing by Colin.

	* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
	* grub-core/Makefile.core.def (btrfs): Add crc.c.
	* grub-core/fs/btrfs.c: Stub replaced with real implementation.
	* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
	mem_input_off and mem_input. All users updated to accept in-RAM input.
	(gzio_seek): New function.
	(test_zlib_header): Likewise.
	(grub_gzio_read): Likewise.
	(grub_zlib_decompress): Likewise.
	* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
	Accept partial and non-virtual mounts.
	(grub_guess_root_device): Do rescanning after device_from_mountinfo to
	avoid receiving /dev/dm-X as device.
	* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
	Handle bind and partial mounts.
	* grub-core/lib/crc.c: New file.
	* include/grub/deflate.h: Likewise.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
	proto.
	* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6 Implement automatic module license checking according to new GNU
guidelines.

	* grub-core/kern/dl.c (grub_dl_check_license): New function.
	(grub_dl_load_core): Use grub_dl_check_license.
	* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
	(GRUB_MOD_LICENSE): Likewise.
	(GRUB_MOD_DUAL_LICENSE): Likewise.
	All modules updated.
2011-04-11 23:01:51 +02:00
Vladimir 'phcoder' Serbinenko
b6929f5ef5 Transform exfat printfs into dprintfs 2011-04-11 20:38:08 +02:00
Vladimir 'phcoder' Serbinenko
48fe18dcf2 exfat reader 2011-04-11 18:13:00 +02:00
Colin Watson
2a9bc0169e * grub-core/fs/btrfs.c (grub_btrfs_fs) [GRUB_UTIL]: Set
reserved_first_sector to 1.  btrfs reserves plenty of space for boot
loaders.
Reported by: Gene Cumm.  Fixes Ubuntu bug #757446.
2011-04-11 16:06:37 +01:00
Vladimir 'phcoder' Serbinenko
8fc88523dd Add minix3 to util filesystems 2011-04-11 14:09:02 +02:00
Vladimir 'phcoder' Serbinenko
65f01628e1 unify minix3 and minix2 inode declarations 2011-04-11 08:56:42 +02:00
Vladimir 'phcoder' Serbinenko
58ee1408a8 Fix an error in minix inode declaration 2011-04-11 08:53:28 +02:00
Feiran Zheng
3dd3dd335f minix3fs support 2011-04-11 08:16:13 +02:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e merge mainline into butter 2011-04-11 07:56:31 +02:00
Vladimir 'phcoder' Serbinenko
6a01f54aff use actually filled extent size if available 2011-04-11 07:53:21 +02:00
Vladimir 'phcoder' Serbinenko
565f076311 Take extent offset in account on uncompressed extents 2011-04-11 07:52:39 +02:00
Vladimir 'phcoder' Serbinenko
228f95a250 Fix filename comparison 2011-04-11 07:51:15 +02:00
Vladimir 'phcoder' Serbinenko
ec25b87d29 Add dprintfs to report chunk lookups 2011-04-11 07:50:22 +02:00
Vladimir 'phcoder' Serbinenko
e8980227e8 Remove stale comment about redundancy 2011-04-11 07:49:26 +02:00
Vladimir 'phcoder' Serbinenko
099821e9e4 Fix RAID1/duplicated chunk size calculation 2011-04-09 21:55:50 +02:00
Colin Watson
2c58372857 * docs/grub-dev.texi: Fix spelling of "developer" throughout.
* grub-core/fs/i386/pc/pxe.c (parse_dhcp_vendor): Fix spelling of
"development".
2011-04-08 14:01:51 +01:00
Vladimir 'phcoder' Serbinenko
b38a498394 BPB patching support (untested) 2011-04-05 14:40:15 +02:00
Vladimir 'phcoder' Serbinenko
cfed2ad097 Fix incorrect types in jfs.c. This enables >2TiB disks and fixes some
memory corruptions.

	* grub-core/fs/jfs.c (struct grub_jfs_diropen): Interpret bytes as
	unsigned.
	(grub_jfs_lookup_symlink): Make ino a grub_uint32_t rather than int.
	(grub_jfs_blkno): Use 64-bit quantities for block sectors.
	(grub_jfs_read_inode): Likewise.
	(grub_jfs_opendir): Likewise. Remove now useless casts.
	(grub_jfs_getent): Likewise.
	Make ino a grub_uint32_t rather than int.
	(grub_jfs_mount): Ensure that blksize and log2_blksize are consistent.
	(grub_jfs_read_file): Use 64-bit quantities when necessary. Replace
	division and module with bit operations.
	(grub_jfs_find_file): Make ino a grub_uint32_t.
	(grub_jfs_lookup_symlink): Likewise. Use 64-bit quantities
2011-04-01 15:53:06 +02:00
Manoel Rebelo Abranches
50ee5d686d Merge mainline. 2011-04-01 04:45:37 -03:00
Vladimir 'phcoder' Serbinenko
d2e29d81a9 * grub-core/fs/ext2.c (grub_ext2_read_inode): Fix an overflow.
Reported and tested by: Timothy Nikkel.
2011-03-29 10:56:14 +02:00
Vladimir 'phcoder' Serbinenko
5ee04984d1 * grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label. 2011-03-26 14:14:59 +01:00
Vladimir 'phcoder' Serbinenko
7d4e39d65a * grub-core/bus/usb/usb.c (attach_hooks): Make static.
* grub-core/bus/usb/usbhub.c (hubs): Likewise.
	* grub-core/commands/hashsum.c (aliases): Likewise.
	* grub-core/commands/setpci.c (pci_registers): Likewise.
	* grub-core/disk/usbms.c (attach_hook): Likewise.
	* grub-core/fs/zfs/zfs.c (decomp_table): Likewise.
	(zio_checksum_table): Likewise.
	* grub-core/gettext/gettext.c (grub_gettext_msg_list): Likewise.
	* grub-core/gfxmenu/gfxmenu.c (cached_view): Likewise.
	* grub-core/lib/legacy_parse.c (legacy_commands): Likewise.
	* grub-core/lib/relocator.c (leftovers): Likewise.
	(extra_blocks): Likewise.
	* grub-core/loader/i386/bsd.c (relocator): Likewise.
	* grub-core/loader/i386/multiboot_mbi.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/loader/i386/xnu.c (table_aliases): Likewise.
	(devices): Likewise.
	* grub-core/loader/multiboot_mbi2.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/normal/auth.c (users): Likewise.
	* grub-core/normal/context.c (initial_menu): Likewise.
	(current_menu): Likewise.
	* grub-core/normal/crypto.c (crypto_specs): Likewise.
	* grub-core/term/serial.c (grub_serial_ports): Likewise.
	(grub_serial_terminfo_input_template): Likewise.
	(grub_serial_terminfo_output_template): Likewise.
	(grub_serial_terminfo_input): Likewise.
	(grub_serial_terminfo_output): Likewise.
	(registered): Likewise.
	* grub-core/term/usb_keyboard.c (attach_hook): Likewise.
2011-03-23 12:05:13 +01:00
Szymon Janc
57d75699d6 2011-03-07 Szymon Janc <szymon@janc.net.pl>
* grub-core/fs/zfs/zfs.c (zap_leaf_lookup):
	Set-but-not-used variable removed.
2011-03-07 22:23:06 +01:00
Colin Watson
28f9509eb7 merge trunk 2011-02-17 14:51:11 +00:00
Colin Watson
7e735e4349 * include/grub/file.h (not_easly_seekable): Rename to ...
(not_easily_seekable): ... this.  Update all users.
2011-02-08 13:21:13 +00:00
Colin Watson
5870a4a06f typo 2011-02-04 16:35:07 +00:00
Vladimir 'phcoder' Serbinenko
4fbf185232 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Quote bootpath and
diskdevid.
2011-01-13 22:25:56 +01:00
Colin Watson
6b978c4f04 merge trunk 2011-01-11 10:00:45 -06:00
Vladimir 'phcoder' Serbinenko
4531a206a1 * grub-core/fs/i386/pc/pxe.c (set_mac_env): Export variable.
(set_env_limn_ro): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/hook/datehook.c (GRUB_MOD_INIT): Likewise. Change to
	ARRAY_SIZE while on it.
	(GRUB_MOD_FINI): Change to ARRAY_SIZE.
	* grub-core/normal/context.c (grub_env_export): Move from here ...
	* grub-core/kern/env.c (grub_env_export): ... here.
	* grub-core/normal/context.c (grub_cmd_export): Skip exporting root and
	prefix.
	* grub-core/kern/main.c (grub_main): Export root and prefix.
	* include/grub/env.h (grub_env_export): Export.
	Reported by: Seth Goldberg.
2011-01-11 11:51:05 +01:00
Vladimir 'phcoder' Serbinenko
b3ff6ff056 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Use comma as
separator and pass bootpath/devid even if only one of them is available.
	Reported by: Seth Goldberg.
2011-01-10 23:56:11 +01:00
Vladimir 'phcoder' Serbinenko
b1969b3049 * grub-core/fs/btrfs.c (grub_btrfs_mount): Transform out of range into
badfs.
	Reported by: TiCPU.
2011-01-10 17:35:32 +01:00
Vladimir 'phcoder' Serbinenko
e7121b6932 * grub-core/fs/zfs/zfs.c (dmu_read): Use void * for some pointers to
avoid aliasing.
	(fzap_lookup): Likewise.
	(dnode_get): Likewise.
	(make_mdn): Likewise.
	(zfs_mount): Likewise.
	(fzap_iterate): Use temporary pointer to avoid aliasing.
	(grub_zfs_read): Likewise.
	* grub-core/loader/i386/xnu.c (grub_xnu_boot): Likewise.
	* grub-core/loader/xnu.c (grub_cmd_xnu_kernel): Use void * for some
	pointers to avoid aliasing.
	(grub_cmd_xnu_kernel64): Likewise.
	(grub_xnu_load_driver): Likewise.
2011-01-08 01:56:09 +01:00
Vladimir 'phcoder' Serbinenko
e72d259fe1 * grub-core/fs/xfs.c (grub_xfs_iterate_dir): Take into account that
inopos might be unaligned.
2011-01-07 17:06:42 +01:00
Colin Watson
944404efb8 merge trunk 2011-01-04 15:41:07 +00:00
Dave Vasilevsky
4af0504b72 * grub-core/fs/hfsplus.c: Make parent unsigned.
(grub_hfsplus_cmp_catkey): Don't compare using subtraction, it
	overflows.
	(grub_hfsplus_cmp_extkey): Likewise
2011-01-03 15:30:41 +01:00
Vladimir 'phcoder' Serbinenko
b9cd13659c Simplify the AFFS checksum computation. 2010-12-31 15:22:36 +01:00
Vladimir 'phcoder' Serbinenko
2f70097d3e merge mainline into filesys branch 2010-12-31 15:02:07 +01:00
Colin Watson
b889cfadf9 * grub-core/fs/udf.c (read_string): Pacify GCC warning by
initialising utf16.
2010-12-21 13:00:10 +00:00
Vladimir 'phcoder' Serbinenko
052677ba71 merge mainline into filesys 2010-12-19 00:54:05 +01:00
Vladimir 'phcoder' Serbinenko
6c85b743f5 * grub-core/fs/affs.c (grub_affs_mount): Read data->bblock.rootblock
rather than assuming than rootblock is exactly in the middle.
	(grub_affs_label): Likewise.
2010-12-19 00:52:18 +01:00
Vladimir 'phcoder' Serbinenko
b070525d03 * grub-core/fs/affs.c (grub_affs_mount): Read data->bblock.rootblock
rather than assuming than rootblock is exactly in the middle.
	(grub_affs_label): Likewise.
2010-12-19 00:52:18 +01:00
Vladimir 'phcoder' Serbinenko
a2a08a35bf * grub-core/fs/affs.c (grub_affs_fs) [GRUB_UTIL]: Explicitly set
reserved_first_sector to 0.
	* grub-core/fs/cpio.c (grub_cpio_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/sfs.c (grub_sfs_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/xfs.c (grub_xfs_fs) [GRUB_UTIL]: Likewise.
2010-12-19 00:49:52 +01:00
Vladimir 'phcoder' Serbinenko
b85812b06f * grub-core/fs/affs.c (grub_affs_fs) [GRUB_UTIL]: Explicitly set
reserved_first_sector to 0.
	* grub-core/fs/cpio.c (grub_cpio_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/sfs.c (grub_sfs_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/xfs.c (grub_xfs_fs) [GRUB_UTIL]: Likewise.
2010-12-19 00:49:52 +01:00
Vladimir 'phcoder' Serbinenko
7059d1ec14 Fix handling of UTF-16 UDF labels.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Move string-parsing part
	(read_string): .. here.
	(grub_udf_label): Use read_string.
2010-12-19 00:43:41 +01:00
Vladimir 'phcoder' Serbinenko
e6533ae154 Fix handling of UTF-16 UDF labels.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Move string-parsing part
	(read_string): .. here.
	(grub_udf_label): Use read_string.
2010-12-19 00:43:41 +01:00
Vladimir 'phcoder' Serbinenko
4493254156 Support RomFS label 2010-12-15 22:00:18 +01:00
Vladimir 'phcoder' Serbinenko
20af857581 symlink support on romfs 2010-12-15 20:36:54 +01:00
Vladimir 'phcoder' Serbinenko
921c7932d0 directory and hardlink support on romfs 2010-12-15 20:24:16 +01:00
Vladimir 'phcoder' Serbinenko
29184e9312 romfs support 2010-12-15 19:49:35 +01:00
Vladimir 'phcoder' Serbinenko
0e5507c411 mtime support for ntfs 2010-12-12 01:00:33 +01:00
Vladimir 'phcoder' Serbinenko
7b32d83d78 SFS mtime support 2010-12-11 22:48:29 +01:00
Vladimir 'phcoder' Serbinenko
bd1de4341b explicitly declare SFS as not installable 2010-12-11 22:33:34 +01:00
Vladimir 'phcoder' Serbinenko
790aaa8c9f AFFS mtime support 2010-12-11 22:02:22 +01:00
Vladimir 'phcoder' Serbinenko
e21c356413 restructure AFFS fshelp_node-related code 2010-12-11 21:59:22 +01:00
Vladimir 'phcoder' Serbinenko
9959c6a70b Fix AFFS rootblock detection 2010-12-11 21:15:25 +01:00
Vladimir 'phcoder' Serbinenko
81ecffbfc1 Add missing packed attribute 2010-12-11 18:42:44 +01:00
Vladimir 'phcoder' Serbinenko
5e96cb4452 Extend few other fields 2010-12-11 18:41:42 +01:00
Vladimir 'phcoder' Serbinenko
ea17ec49ae Extend fields in dirent header 2010-12-11 18:32:08 +01:00
Vladimir 'phcoder' Serbinenko
80113a6258 declare AFFS, CPIO, TAR and XFS as non-installable explicitly 2010-12-11 18:21:39 +01:00
Vladimir 'phcoder' Serbinenko
4aab263130 SquashFS mtime support 2010-12-11 18:20:45 +01:00
Vladimir 'phcoder' Serbinenko
f5ff296240 minix mtime support 2010-12-11 17:46:16 +01:00
Vladimir 'phcoder' Serbinenko
ea0df4e953 ZFS mtime support 2010-12-11 15:01:33 +01:00
Vladimir 'phcoder' Serbinenko
eb03b55271 fix ZFS label handling in non-single disk configs 2010-12-11 14:56:02 +01:00
Vladimir 'phcoder' Serbinenko
7ac6c4842d JFS mtime support 2010-12-11 14:26:34 +01:00
Vladimir 'phcoder' Serbinenko
58fa13fc7c HFS mtime support 2010-12-11 07:15:44 +01:00
Vladimir 'phcoder' Serbinenko
ebec6850b9 HFS filesystem mtime support 2010-12-11 07:00:31 +01:00
Vladimir 'phcoder' Serbinenko
88db5b694a file mtime support for reiserfs 2010-12-11 06:23:33 +01:00
Vladimir 'phcoder' Serbinenko
591baceb34 UDF symlink support 2010-12-11 06:04:21 +01:00
Vladimir 'phcoder' Serbinenko
f8e2e451e6 handle UTF16 UDF label 2010-12-10 18:34:46 +01:00
Vladimir 'phcoder' Serbinenko
f22c12e852 mtime for UDF support 2010-12-10 17:37:32 +01:00
Vladimir 'phcoder' Serbinenko
5706da0443 mtime support for xfs 2010-12-10 16:19:24 +01:00
Vladimir 'phcoder' Serbinenko
3b95531920 fix unix range 2010-12-10 15:04:12 +01:00
Vladimir 'phcoder' Serbinenko
d6f07b29fc mtime btrfs support 2010-12-10 14:38:16 +01:00
Vladimir 'phcoder' Serbinenko
c50d99c5e5 file mtime support for iso9660 2010-12-10 11:12:59 +01:00
Vladimir 'phcoder' Serbinenko
a2de6bf6ed filesystem mtime support for iso9660 2010-12-10 10:32:50 +01:00
Vladimir 'phcoder' Serbinenko
db64f5b167 mtime support for cpio and tar 2010-12-10 08:42:40 +01:00
Vladimir 'phcoder' Serbinenko
4a91cd8220 symlink support 2010-12-09 22:29:36 +01:00
Vladimir 'phcoder' Serbinenko
e330e4f383 support file mtime 2010-12-09 21:17:27 +01:00
Vladimir 'phcoder' Serbinenko
627a62fc70 Make type-dependent portion of inode an union 2010-12-09 21:14:42 +01:00
Vladimir 'phcoder' Serbinenko
1fc7203971 Split grub_squash_read_data 2010-12-09 20:48:03 +01:00
Vladimir 'phcoder' Serbinenko
8eef1f8244 Compressed fragments and compressed data support 2010-12-09 20:41:41 +01:00
Vladimir 'phcoder' Serbinenko
e4eaf62555 Small restructuring of squash_read 2010-12-09 19:40:11 +01:00
Vladimir 'phcoder' Serbinenko
76e39dc871 Compressed metadata support 2010-12-09 19:23:35 +01:00
Vladimir 'phcoder' Serbinenko
99f0735fb8 Support multi-header directories 2010-12-09 18:22:38 +01:00
Vladimir 'phcoder' Serbinenko
948ebd7e91 Support fragments and chunks for data 2010-12-09 17:06:49 +01:00
Vladimir 'phcoder' Serbinenko
7ed6c3e85f Honor chunk number for directories 2010-12-09 02:48:59 +01:00
Vladimir 'phcoder' Serbinenko
0a040470e5 determine root inode on squash4fs 2010-12-09 00:04:36 +01:00
Vladimir 'phcoder' Serbinenko
1deadc83f5 extend size to 32-bit and handle file->offset 2010-12-08 23:03:59 +01:00
Vladimir 'phcoder' Serbinenko
332fa36887 some squash4 code. Works only in very easy cases. 2010-12-08 21:22:46 +01:00
Vladimir 'phcoder' Serbinenko
bfff320cdf Apparently functioning raidz. Still mostly a guesswork so may break 2010-12-07 11:45:37 +01:00
Vladimir 'phcoder' Serbinenko
39db1a3f75 First attempt on RAIDZ. Right now works only with right phase of the moon. 2010-12-06 23:46:01 +01:00
Vladimir 'phcoder' Serbinenko
c3b87afcd4 Recognize vdev file 2010-12-06 20:28:02 +01:00
Vladimir 'phcoder' Serbinenko
79282228ec use anopther RAID1(0) copy if main one fails 2010-12-06 20:26:49 +01:00
Vladimir 'phcoder' Serbinenko
925d998e6f Fix a warining 2010-12-06 07:03:58 +01:00
Vladimir 'phcoder' Serbinenko
8ff84951c5 ZFS mirror support 2010-12-06 02:31:22 +01:00
Vladimir 'phcoder' Serbinenko
fdfde32aa4 striped zpool support 2010-12-05 21:17:24 +01:00
Vladimir 'phcoder' Serbinenko
e5c63d9d41 Fix handling of nvlist array 2010-12-05 18:13:32 +01:00
Vladimir 'phcoder' Serbinenko
069142f4c2 Support long symlinks 2010-12-05 16:08:26 +01:00
Vladimir 'phcoder' Serbinenko
47c3603cc8 Add missing endianness conversions in fzap code 2010-12-05 15:41:17 +01:00
Vladimir 'phcoder' Serbinenko
fe79a8ad9d Fix fzap handling 2010-12-05 15:35:08 +01:00
Vladimir 'phcoder' Serbinenko
c5cf9f53a8 Fix short symlinks 2010-12-04 01:59:06 +01:00
Vladimir 'phcoder' Serbinenko
7a6e93788c ZFS zlib compression support 2010-12-04 00:40:44 +01:00
Vladimir 'phcoder' Serbinenko
78ab87f61d merge mainline into ZFS 2010-12-04 00:40:20 +01:00
Vladimir 'phcoder' Serbinenko
3be8e5ea96 BtrFS zlib compression support 2010-12-03 21:42:13 +01:00
Vladimir 'phcoder' Serbinenko
6333f1e9b6 Add RAID10 support 2010-12-03 18:11:10 +01:00
Vladimir 'phcoder' Serbinenko
db51e201fc symlink loop detection. btrfs-raid0 and raid1 support 2010-12-03 16:56:49 +01:00
Vladimir 'phcoder' Serbinenko
0e761d3dbd Rename some btrfs variables for more uniformity 2010-12-03 11:30:24 +01:00
Vladimir 'phcoder' Serbinenko
34018a7d1f symlink support 2010-12-03 10:44:47 +01:00
Vladimir 'phcoder' Serbinenko
a43c4bc55f buffer extent for performance 2010-12-02 15:28:29 +01:00
Vladimir 'phcoder' Serbinenko
8006f6779e Fix in-extent reading 2010-12-02 15:08:46 +01:00
Vladimir 'phcoder' Serbinenko
98042add0c Fix handling of non-leaf next 2010-12-02 13:57:07 +01:00
Vladimir 'phcoder' Serbinenko
eb82b8569a Remove leftover unused attribute 2010-12-02 13:32:24 +01:00
Vladimir 'phcoder' Serbinenko
d9865a25f7 Implicitly skip /default prefix 2010-12-02 13:31:50 +01:00
Vladimir 'phcoder' Serbinenko
93e0c7a7c2 Fix subvolume handling 2010-12-02 13:23:20 +01:00
Vladimir 'phcoder' Serbinenko
9b4cb862f8 handle directories correctly 2010-12-02 00:11:14 +01:00
Vladimir 'phcoder' Serbinenko
1f60e35331 initialise the type of search for root 2010-12-02 00:03:19 +01:00
Vladimir 'phcoder' Serbinenko
ac5dcabe67 Fix incorrect statement from previous commit 2010-12-01 23:16:19 +01:00
Vladimir 'phcoder' Serbinenko
a3d1fcfb10 Fix 2 warnings 2010-12-01 22:59:51 +01:00
Robert Millan
54207d4b6c Update GPL for ZFS code to version 3, move copyright lines for Vladimir and me to FSF (covered by our assignments) 2010-12-01 22:55:26 +01:00
Robert Millan
bf78d5b251 2010-12-01 Robert Millan <rmh@gnu.org>
* grub-core/fs/zfs/zfs.c: New file.
	* grub-core/fs/zfs/zfs_fletcher.c: Likewise.
	* grub-core/fs/zfs/zfs_lzjb.c: Likewise.
	* grub-core/fs/zfs/zfs_sha256.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	
	* include/grub/zfs/dmu.h: Likewise.
	* include/grub/zfs/dmu_objset.h: Likewise.
	* include/grub/zfs/dnode.h: Likewise.
	* include/grub/zfs/dsl_dataset.h: Likewise.
	* include/grub/zfs/dsl_dir.h: Likewise.
	* include/grub/zfs/sa_impl.h: Likewise.
	* include/grub/zfs/spa.h: Likewise.
	* include/grub/zfs/uberblock_impl.h: Likewise.
	* include/grub/zfs/vdev_impl.h: Likewise.
	* include/grub/zfs/zap_impl.h: Likewise.
	* include/grub/zfs/zap_leaf.h: Likewise.
	* include/grub/zfs/zfs.h: Likewise.
	* include/grub/zfs/zfs_acl.h: Likewise.
	* include/grub/zfs/zfs_znode.h: Likewise.
	* include/grub/zfs/zil.h: Likewise.
	* include/grub/zfs/zio.h: Likewise.
	* include/grub/zfs/zio_checksum.h: Likewise.
	
	* Makefile.util.def: Build ZFS into libgrubmods.
	* grub-core/Makefile.core.def: Build zfs.mod.
2010-12-01 22:42:11 +01:00
Vladimir 'phcoder' Serbinenko
d980826df2 Remove \n from error message 2010-12-01 16:45:12 +01:00
Vladimir 'phcoder' Serbinenko
df80cd06fb Check file type 2010-12-01 16:36:05 +01:00
Vladimir 'phcoder' Serbinenko
355b3eed0f support trees 2010-12-01 16:22:51 +01:00
Vladimir 'phcoder' Serbinenko
b18610feb5 partial btrfs support. Now able to list and access files as long as all trees are flat 2010-12-01 01:23:47 +01:00
Robert Millan
9dfe92d07a 2010-11-18 Robert Millan <rmh@gnu.org>
* grub-core/fs/btrfs.c (grub_btrfs_mount): Replace grub_strncmp()
	with grub_memcmp().
2010-11-18 16:52:27 +01:00
Giuseppe Caizzone
69c4feebb1 Add generic logical block size support for UDF.
* grub-core/fs/udf.c (GRUB_UDF_LOG2_BLKSIZE): Removed.
	(GRUB_UDF_BLKSZ): Removed.
	(struct grub_udf_data): New field "lbshift" to hold the logical	block
	size of the file system in log2 format. All users updated.
	(sblocklist): Change type to unsigned.
	(grub_udf_mount): Change type of "sblklist" to unsigned.
	Move AVDP search before VRS recognition, because the latter requires
	knowledge of the logical block size, which is detected during the
	former.
	Detect and validate logical block size during AVDP search, adding
	support for block sizes 512, 1024 and 4096.
	Make VRS recognition independent of block size.
2010-11-14 17:03:49 +01:00
Giuseppe Caizzone
e53609331b Add generic logical block size support for UDF.
* grub-core/fs/udf.c (GRUB_UDF_LOG2_BLKSIZE): Removed.
	(GRUB_UDF_BLKSZ): Removed.
	(struct grub_udf_data): New field "lbshift" to hold the logical	block
	size of the file system in log2 format. All users updated.
	(sblocklist): Change type to unsigned.
	(grub_udf_mount): Change type of "sblklist" to unsigned.
	Move AVDP search before VRS recognition, because the latter requires
	knowledge of the logical block size, which is detected during the
	former.
	Detect and validate logical block size during AVDP search, adding
	support for block sizes 512, 1024 and 4096.
	Make VRS recognition independent of block size.
2010-11-14 16:58:50 +01:00
Giuseppe Caizzone
cb0229c587 Properly handle deleted files on UDF.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries
	whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED
	set.
2010-11-14 16:51:45 +01:00
Giuseppe Caizzone
406858a8a9 Support reading files larger than 2 GiB.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Change type of variable
	"offset" to grub_off_t.
	(grub_udf_read_file): Likewise for parameter "pos".
2010-11-14 16:48:17 +01:00
Vladimir 'phcoder' Serbinenko
58c184be7b Support big ext2 files.
* grub-core/fs/ext2.c (grub_ext2_inode): Rename dir_acl to size_high.
	(grub_ext2_read_block): Support triple indirect blocks.
	(grub_ext2_read_file): Use 64-bit types and read size_high.
	(grub_ext2_open): Read size_high.
	Reported by: Ximin Luo.
	Tested by: Manoel Rebelo Abranches.
2010-11-13 16:11:24 +01:00
Vladimir 'phcoder' Serbinenko
34706ddc06 * grub-core/fs/ntfs.c (grub_ntfs_uuid): Make uppercase. 2010-11-06 21:54:24 +01:00
Vladimir 'phcoder' Serbinenko
dc5aeea5b9 merge mainline into net 2010-10-25 13:19:10 +02:00
Szymon Janc
6bdda8f877 * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
Set-but-not-used variable ifdef'ed.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Likewise.
	* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Set-but-not-used
	variable removed.
	* grub-core/disk/lvm.c (grub_lvm_scan_device): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_find_file): Likewise.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_read_extent): Likewise.
	* grub-core/fs/ufs.c (grub_ufs_dir): Likewise.
	* grub-core/gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
	* grub-core/gfxmenu/view.c (redraw_menu_visit): Likewise.
	* grub-core/gfxmenu/widget-box.c (draw): Likewise.
	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
	* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta): Likewise.
	* grub-core/loader/i386/bsd_pagetable.c (fill_bsd64_pagetable):
	Likewise.
2010-10-16 22:16:52 +02:00
Vladimir 'phcoder' Serbinenko
760a7e5aed Merge mainline into net 2010-09-22 20:13:00 +02:00
Vladimir 'phcoder' Serbinenko
d2ea455141 * grub-core/partmap/sun.c (sun_partition_map_iterate): Don't needlesly
allocate p.
2010-09-14 21:07:39 +02:00
Vladimir 'phcoder' Serbinenko
94564f81a8 * include/grub/disk.h (grub_disk): Remove has_partitions.
All users updated.
	* disk/loopback.c (grub_loopback): Remove has_partitions.
	All users updated.
	(options): Remove partitions. All users updated.
	* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
	* util/i386/pc/grub-setup.c (setup): copy partition table only when
	actual partition table is found.
2010-09-13 23:59:22 +02:00
Robert Millan
4dfbc57428 2010-09-09 Robert Millan <rmh@gnu.org>
Basic Btrfs support (detection and UUID).
	
	* grub-core/fs/btrfs.c: New file.
	* Makefile.util.def (library): Register btrfs.c.
	* grub-core/Makefile.core.def: Likewise.
2010-09-09 01:12:10 +02:00
Vladimir 'phcoder' Serbinenko
b4a0c9154b Split minix.mod into minix.mod and minix2.mod.
* Makefile.util.def (libgrub.a): Add grub-core/fs/minix2.c.
	* grub-core/Makefile.core.def (minix2): New module.
	* grub-core/fs/minix.c: Use definitions instead of runtime version
	checking.
	* grub-core/fs/minix2.c: New file.
2010-09-08 19:13:48 +02:00
Szymon Janc
3759a35f75 * include/grub/file.h (grub_file): New member not_easly_seekable.
(grub_file_seekable): New inline function.
	* grub-core/io/gzio.c (test_header): Don't test end magic if file isn't
	easily seekable.
	(grub_gzio_open): Set not_easly_seekable.
	* grub-core/fs/i386/pc/pxe.c (grub_pxefs_open): Set not_easily_seekable.
	* grub-core/io/bufio.c (grub_bufio_open): Propagate not_easily_seekable.
2010-09-04 18:28:42 +02:00
Ian Turner
ef8e0ec8ed * grub-core/fs/i386/pc/pxe.c (grub_pxefs_read): Keep the blocksize
constant for the same file.
2010-09-02 23:59:27 +02:00
Vladimir 'phcoder' Serbinenko
c042567715 Create directory net and move all net files there 2010-09-02 22:20:48 +02:00
Vladimir 'phcoder' Serbinenko
9daa203944 Reintroduce pxe: syntax 2010-09-02 22:12:37 +02:00
Vladimir 'phcoder' Serbinenko
308fad6dc8 Move DHCP parsing to net module and reintroduce most variables 2010-09-02 22:10:55 +02:00
Vladimir 'phcoder' Serbinenko
0f37e49365 Implement few variables 2010-09-02 20:00:56 +02:00
Vladimir 'phcoder' Serbinenko
e571f2332e Fix regressions by previous commits 2010-09-02 18:15:59 +02:00
Vladimir 'phcoder' Serbinenko
a9deb976dd Merge mainline into net 2010-09-02 17:18:21 +02:00
Vladimir 'phcoder' Serbinenko
03b170647d Restructure pxe 2010-09-02 17:18:02 +02:00
Vladimir 'phcoder' Serbinenko
9a09392057 Fix grub_pxe_scan.
* grub-core/fs/i386/pc/pxe.c (grub_pxe_pxenv): Put correct type bangpxe.
	(grub_pxe_scan): Fix types and pxe_rm_entry computation.
	All users updated.
	* include/grub/i386/pc/pxe.h (grub_pxe_bangpxe): New struct.
	(grub_pxe_pxenv): Correct type.
2010-09-02 15:47:03 +02:00
Vladimir 'phcoder' Serbinenko
069c9c5fda merge mainline into intwrap 2010-08-29 23:21:21 +02:00
Vladimir 'phcoder' Serbinenko
b17540cbd9 * grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Handle grub_disk_read
errors.
2010-08-28 15:25:12 +02:00
Vladimir 'phcoder' Serbinenko
afba9f98ec MErge mainline into intwrap 2010-08-25 23:39:42 +02:00
BVK Chaitanya
16c7cb32c8 merge with mainline 2010-08-19 16:54:00 +05:30
BVK Chaitanya
297f0c2b6e merge with mainline 2010-07-13 00:43:28 +05:30
BVK Chaitanya
a762e3c335 merge with mainline 2010-06-01 17:52:31 +05:30
BVK Chaitanya
8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30