Commit graph

111 commits

Author SHA1 Message Date
Andrei Borzenkov
03d79a878b grub-core/fs/zfs/zfsinfo.c: memory leak in print_vdev_info
CID: 73635
2014-12-01 20:54:12 +03:00
Vladimir Serbinenko
2e238b3708 Make grub_zlib_decompress handle incomplete chunks.
Fixes squash4.
2013-12-18 23:39:49 +01:00
Vladimir Serbinenko
7e47e27bd8 Add gcc_struct to all packed structures when compiling with mingw.
Just "packed" doesn't always pack the way we expect.
2013-12-15 14:14:30 +01:00
Vladimir Serbinenko
81023dbdbd * grub-core/fs/zfs/zfs.c (ZAP_LEAF_NUMCHUNKS): Use unsigned arithmetics. 2013-11-13 09:27:36 +01:00
Vladimir Serbinenko
8b66bb5d8d * grub-core/fs/zfs/zfscrypt.c (grub_ccm_decrypt): Return right error
type.
	(grub_gcm_decrypt): Likewise.
	(algo_decrypt): Likewise.
	(grub_zfs_decrypt_real): Transform error type.
2013-11-07 00:59:44 +01:00
Vladimir Serbinenko
bed78ef4e6 Revert "Attempts at ZFS options"
It was accidently committed to wrong branch

This reverts commit 0ee5cdfe9f.
2013-11-03 16:52:33 +01:00
Vladimir Serbinenko
0ee5cdfe9f Attempts at ZFS options 2013-11-03 16:40:32 +01:00
Vladimir Serbinenko
8fbe5c7df7 * grub-core/fs/zfs/zfs.c (nvpair_name): Use correct type for size.
(check_pool_label): Likewise. Fixes overflow.
	(nvlist_find_value): Fix comparison.
2013-11-01 18:41:52 +01:00
Vladimir Serbinenko
fb56391ee3 * grub-core/fs/zfs/zfs.c (xor_out): Use unsigned modular arithmetics
rather than signed one.
	(recovery): Likewise.
2013-10-25 20:31:04 +02:00
Vladimir 'phcoder' Serbinenko
f3e393411b * grub-core/fs/zfs.c: Remove variable length arrays.
Reduces zfs.mod by 160 bytes (208 compressed).
2013-10-20 18:42:40 +02:00
Vladimir 'phcoder' Serbinenko
7152393503 * grub-core/fs/zfs/zfs.c (check_pool_label): Fix memory leak. 2013-10-20 17:57:28 +02:00
Vladimir 'phcoder' Serbinenko
97dfe7e46b * grub-core/fs/zfs/zfs_lz4.c: Check that __INTEL_COMPILER is
defined before trying to use it.
2013-10-18 16:49:17 +02:00
Vladimir 'phcoder' Serbinenko
c4cf25eef7 * grub-core/fs/zfs/zfs_lz4.c: Switch from ad-hoc endiannes and width
macros to GRUB ones.
2013-10-08 16:55:39 +02:00
Massimo Maggi
890bdabe96 * grub-core/fs/zfs/zfs.c (check_pool_label): Check nvlist. 2013-09-23 18:50:07 +02:00
Vladimir 'phcoder' Serbinenko
bdb5ba47d8 * include/grub/zfs/spa.h (zio_cksum): Add explicit members for mac.
* grub-core/fs/zfs/zfs.c (zio_read): Don't use casts to retrieve mac.
2013-08-22 16:20:32 +02:00
Vladimir 'phcoder' Serbinenko
459b1d9171 * grub-core/fs/zfs/zfs.c (check_feature): Cleanup and remove
inappropriate printf.
2013-08-02 22:45:41 +02:00
Vladimir 'phcoder' Serbinenko
286fe4b379 * grub-core/fs/zfs/zfs.c: Stylistic fixes. 2013-07-14 22:48:23 +02:00
Vladimir 'phcoder' Serbinenko
1bd57aa343 * grub-core/fs/zfs/zfs.c: Run emacs indent on file. 2013-07-14 22:45:51 +02:00
Vladimir 'phcoder' Serbinenko
b2182299a7 * grub-core/fs/zfs/zfs.c: Remove brackets around return value. 2013-07-14 22:33:39 +02:00
Vladimir 'phcoder' Serbinenko
795b3dc094 * grub-core/fs/zfs/zfs_lz4.c: Add missing packed attribute. 2013-07-14 16:29:33 +02:00
Vladimir 'phcoder' Serbinenko
68714c4392 * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Fix improper cast. 2013-07-14 16:24:18 +02:00
Vladimir 'phcoder' Serbinenko
af211babd8 * grub-core/fs/zfs/zfs_lz4.c: Remove restrict keyword. 2013-07-14 16:05:14 +02:00
Massimo Maggi
0036f02d7b * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Error is encode_size
<= 0.
2013-07-14 14:22:02 +02:00
Massimo Maggi
6d0ddff3d9 * grub-core/fs/zfs/zfs.c: Split nvpair iterators into separate
functions.
2013-07-14 14:17:36 +02:00
Massimo Maggi
038016f48a * grub-core/fs/zfs/zfs_lz4.c: New file.
* grub-core/fs/zfs/zfs.c: Tie up lz4 decompression.
2013-07-14 14:12:58 +02:00
Massimo Maggi
776bdce291 * grub-core/fs/zfs/zfs.c: Check for feature compatibility. 2013-07-14 14:10:42 +02:00
Massimo Maggi
c71dbd40a9 * grub-core/fs/zfs/zfs.c (uberblock_verify): Accept version 5000.
(check_pool_label): Likewise.
	* include/grub/zfs/zfs.h: Rewrite SPA_VERSION_* macros.
2013-07-14 14:01:27 +02:00
Massimo Maggi
53618046da * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Fix RAIDZ reporting. 2013-07-14 13:49:01 +02:00
Vladimir 'phcoder' Serbinenko
fb2666b560 Simplify few strings. 2013-05-07 11:44:15 +02:00
Vladimir 'phcoder' Serbinenko
e73ba5e8ca * grub-core/fs/zfs/zfs.c: Fix incorrect handling of special volumes. 2013-03-22 22:18:38 +01:00
Colin Watson
fc524edf65 Remove nested functions from filesystem directory iterators.
* include/grub/fs.h (grub_fs_dir_hook_t): New type.
(struct grub_fs.dir): Add hook_data argument.

Update all implementations and callers.
2013-01-21 01:33:46 +00:00
Colin Watson
25239370fd Remove nested functions from device iterators.
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.

Update all callers.
2013-01-20 15:52:15 +00:00
Vladimir 'phcoder' Serbinenko
f25cecbdb3 * grub-core/fs/zfs/zfs.c (nvlist_find_value): Fix return value. 2012-05-03 09:09:30 +02:00
Vladimir 'phcoder' Serbinenko
5ed554f014 Handle RAIDZ on non-512B sectors.
* grub-core/fs/zfs/zfs.c (grub_zfs_device_desc): New member
	max_children_ashift.
	(fill_vdev_info_real): Fill max_children_ashift.
	(read_device): Use max_children_ashift.
2012-05-01 15:05:26 +02:00
Vladimir 'phcoder' Serbinenko
e0595a73b2 * grub-core/fs/zfs/zfs.c: Disable -Wstrict-aliasing. 2012-04-13 19:26:36 +02:00
Vladimir 'phcoder' Serbinenko
40211ab884 * grub-core/commands/acpihalt.c: Add TRANSLATORS comments.
* grub-core/commands/keystatus.c: Likewise.
	* grub-core/commands/loadenv.c: Likewise.
	* grub-core/commands/probe.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/commands/true.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/ldm.c: Likewise.
	* grub-core/disk/loopback.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	* grub-core/kern/disk.c: Likewise.
	* grub-core/kern/emu/hostdisk.c: Likewise.
2012-03-03 12:59:28 +01:00
Vladimir 'phcoder' Serbinenko
0c7d99c7c2 * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS comment.
* util/grub-install.in: Add missing quote in the comment.
2012-03-02 21:08:38 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Colin Watson
e3c78337c3 * include/grub/partition.h (grub_partition_map): Change prototype of
embed to take a maximum value for nsectors.
	* include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise.
	* include/grub/fs.h (grub_fs): Likewise.
	* grub-core/partmap/msdos.c (embed_signatures): New array.
	(pc_partition_map_embed): Check for and avoid sectors matching any
	of the signatures in embed_signatures, up to max_nsectors.
	* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict
	returned sector map to max_nsectors.
	* grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise.
	* grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise.
	* grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise.
	* util/grub-setup.c (setup): Allow for the embedding area being
	split into multiple blocklists.  Tell dest_partmap->embed the
	maximum number of sectors we care about.
2012-02-27 22:25:39 +01:00
Vladimir 'phcoder' Serbinenko
e1e49678b9 * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:36:58 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed Another round of string clarification and adding TRANSLATORS comments. 2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
4e27343fb0 * conf/Makefile.common (CFLAGS_GNULIB): Add
-Wno-unsafe-loop-optimizations.
	* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
	on tools.
	* grub-core/commands/legacycfg.c: Add pragma to skip
	-Wunsafe-loop-optimizations.
	(check_password_md5_real): Fix loop counter type.
	* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
	reading.
	* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
	* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
	loop condition.
	* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
	* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
	* grub-core/net/net.c (grub_net_route_address): Add safety loop
	condition.
	* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
	* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
	avoid possible infinite loops.
	* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
	and -Wunsafe-loop-optimizations.
	* grub-core/script/yylex.l: Likewise.
	* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
	(print_glyphs): Avoid infinite loops.
	* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
2012-02-24 12:30:32 +01:00
Vladimir 'phcoder' Serbinenko
fe42ce0924 * grub-core/fs/btrfs.c (find_device): Fix typos.
* grub-core/fs/zfs/zfs.c (read_device): Likewise.
	* util/grub-mkrelpath.c (argp_parser): Likewise.
	Reported by: Yuri Chornoivan.
2012-02-23 22:27:25 +01:00
Vladimir 'phcoder' Serbinenko
b4ba8e025b * grub-core/fs/zfs/zfs.c (zfs_fetch_nvlist): Mark unknown member here
as GRUB_ERR_BUG. Don't malloc if no device is available.
2012-02-12 19:19:57 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d Improve string. Gettextize. 2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
2f53a9ed1f * grub-core/fs/zfs/zfscrypt.c: Add link to documentation. 2012-02-01 18:30:51 +01:00
Vladimir 'phcoder' Serbinenko
b3fe42adb7 * grub-core/fs/zfs/zfs.c (get_filesystem_dnode): Support space in
subvolume name (by removing a bogus and useless check).
2012-01-31 22:20:37 +01:00
Vladimir 'phcoder' Serbinenko
28ea58cf69 * grub-core/fs/zfs/zfs.c (nvlist_find_value): Check that we don't go
pastthe end.
2012-01-27 13:50:21 +01:00
Mario Limonciello
d779e9bdac * configure.ac: Add back in test for limits.h. 2012-01-22 16:43:14 +01:00