Commit graph

21 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
8a5a3a5b5a Fix several memory leaks.
* grub-core/fs/btrfs.c (grub_btrfs_dir): Fix memory leak.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Likewise.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/fat.c (grub_fat_label): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_label): Likewise.
	* grub-core/fs/romfs.c (grub_romfs_close): Likewise.
	(grub_romfs_label): Likewise.
	* grub-core/fs/squash4.c (squash_mount): Use zalloc for safety.
	(squash_unmount): New function.
	(grub_squash_dir): Fix memory leak.
	(grub_squash_open): Likewise.
	(grub_squash_read): Likewise.
	(grub_squash_mtime): Likewise.
	* grub-core/fs/xfs.c (grub_xfs_open): Likewise.
	* grub-core/fs/zfs/zfs.c (check_pool_label): Likewise.
	* util/grub-fstest.c (fstest): Likewise.
2011-11-09 15:01:58 +01:00
Vladimir 'phcoder' Serbinenko
ed9ba06dd0 Use shifts in squash4.
* grub-core/fs/squash4.c (grub_squash_data): New field log2_blksz.
	(squash_mount): Check block size and take logarithm.
	(direct_read): Use shifts.
2011-10-28 16:05:16 +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
Colin Watson
cff5e5e58d grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-04-21 10:37:45 +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
4aab263130 SquashFS mtime support 2010-12-11 18:20:45 +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