Vladimir 'phcoder' Serbinenko
21b82e176e
Fix minixfs with non-power-of-two blocks since it's supported by minix.
...
* grub-core/fs/minix.c (GRUB_MINIX_ZONESZ): Use block_size.
(grub_minix_data): Replace log_block_size with block_size.
(grub_minix_read_file): Use block_size but avoid 64-bit division.
(grub_minix_mount): Fill block_size.
2012-05-10 00:12:02 +02:00
Vladimir 'phcoder' Serbinenko
f417ed0432
Fix wrapped HFS+ handling.
...
* grub-core/fs/fshelp.c (grub_fshelp_read_file): New argument
blocks_start. All users updated.
* grub-core/fs/hfsplus.c (grub_hfsplus_read_block): Don't add
wrapping offset.
(grub_hfsplus_read_file): Pass embedding offset to fshelp_read_file.
2012-05-09 13:02:59 +02:00
Vladimir 'phcoder' Serbinenko
607d282b29
Fix long symlinks on reiserfs.
...
* grub-core/fs/reiserfs.c (grub_fshelp_node): New field size.
(grub_reiserfs_read_symlink): Use grub_reiserfs_read_real.
(grub_reiserfs_iterate_dir): Save size for non-directories.
(grub_reiserfs_open): Don't reread stat block as we already know the
size.
(grub_reiserfs_read): Split into...
(grub_reiserfs_read_real): ... and ...
(grub_reiserfs_read): ...this.
2012-05-09 12:55:43 +02:00
Vladimir 'phcoder' Serbinenko
ae16024d92
Fix non-indexed JFS.
...
* grub-core/fs/jfs.c (grub_jfs_sblock): New field flags.
(grub_jfs_data): New field namecomponentlen.
(grub_jfs_mount): Fill namecomponentlen.
(grub_jfs_getent): Use namecomponentlen rather than hardcoded 11.
2012-05-09 02:12:16 +02:00
Vladimir 'phcoder' Serbinenko
6ae485aaef
Fix AFFS with non-512B blocks.
...
* grub-core/fs/affs.c (grub_affs_rblock): Make type uint32_t.
(AFFS_MAX_LOG_BLOCK_SIZE): New definition.
(grub_affs_data): Replace blocksize with log_blocksize.
(grub_affs_read_block): Fix non-512B blocks.
(grub_affs_read_symlink): Likewise.
(grub_affs_iterate_dir): Likewise. Fix freeing corruption.
(grub_affs_read): Fix non-512B blocks.
(grub_affs_label): Likewise.
(grub_affs_mtime): Likewise.
(grub_affs_mount): Fix block detection routine.
2012-05-08 04:38:19 +02:00
Vladimir 'phcoder' Serbinenko
d20fab8471
Add filesystem mtime to AFFS.
...
* grub-core/fs/affs.c (grub_affs_file): Make type unsigned.
(aftime2ctime): New function.
(grub_affs_dir): Use aftime2ctime.
(grub_affs_label): Fix return value.
(grub_affs_mtime): New function.
(grub_affs_fs): Add mtime.
2012-05-08 01:51:34 +02:00
Vladimir 'phcoder' Serbinenko
e87b10f5d6
* grub-core/fs/affs.c (grub_affs_read_symlink): Convert latin1 into
...
UTF-8.
2012-05-07 22:00:19 +02:00
Vladimir 'phcoder' Serbinenko
7dceec9b69
* grub-core/fs/sfs.c (grub_sfs_read_symlink): Convert latin1 into
...
UTF-8.
2012-05-07 21:57:51 +02:00
Vladimir 'phcoder' Serbinenko
2f48221f5c
* grub-core/fs/affs.c (grub_affs_iterate_dir): Mark as case insensitive.
2012-05-07 19:09:02 +02:00
Vladimir 'phcoder' Serbinenko
dacd85cfb0
* grub-core/fs/sfs.c (grub_sfs_rblock): New fields createtime and
...
flags.
(FLAGS_CASE_SENSITIVE): New enum value.
(cache_entry): New struct.
(grub_fshelp_node): Add fields cache_off, next_extent, cache_allocated,
cache_size and cache.
(grub_sfs_data): Remove blocksize. All users switched to log_blocksize.
Add log_blocksize and fshelp_flags.
(grub_sfs_read_extent): Handle non-512 blocks.
(grub_sfs_read_block): Add cаche and handle non-512 blocks.
(grub_sfs_read_file): Handle non-512 blocks.
(grub_sfs_mount): Handle non-512 blocks. Fill log_blocksize and
fshelp_flags.
(grub_sfs_read_symlink): Handle non-512 blocks.
(grub_sfs_iterate_dir): Init new fields. Mark as case-insensitive.
(grub_sfs_dir): Free cache.
(grub_sfs_close): Likewise.
2012-05-07 19:07:16 +02:00
Vladimir 'phcoder' Serbinenko
24e9a854b8
* grub-core/fs/bfs.c (read_bfs_file): Fix overflow with over 2TiB
...
filesystems.
2012-05-06 16:20:55 +02:00
Vladimir 'phcoder' Serbinenko
62ace64dd9
* grub-core/fs/affs.c (grub_affs_read_block): Fix theoretical overflow.
2012-05-06 16:18:00 +02:00
Vladimir 'phcoder' Serbinenko
75ccaea346
* grub-core/fs/sfs.c (grub_fshelp_node): Fix types.
...
(grub_sfs_read_extent): Likewise.
(grub_sfs_read_block): Likewise.
(grub_sfs_mount): Likewise.
(grub_sfs_iterate_dir): Likewise.
(grub_sfs_read_symlink): Use strncpy instead of strcpy.
(grub_sfs_read): Remove unnecessarry and wrong temporary variable.
2012-05-06 04:42:28 +02:00
Vladimir 'phcoder' Serbinenko
1b8463f2c4
Fix errors on compressed NTFS with 512B clusters.
...
* include/grub/ntfs.h (grub_ntfscomp_func_t): Use appropriately sized
types.
* grub-core/fs/ntfs.c (grub_ntfs_read): Return correct -1 on error and
not 0.
* grub-core/fs/ntfscomp.c (read_block): Use appropriately-sized types.
Relax check for inline extents.
(ntfscomp): Return correct -1 on error and not 0.
2012-05-04 17:37:17 +02:00
Vladimir 'phcoder' Serbinenko
6f5d5ee865
* grub-core/fs/squash4.c (grub_squash_inode): Fix offset field.
...
(grub_squash_read_data): Fix offset byte-swapping.
2012-05-04 17:13:24 +02:00
Vladimir 'phcoder' Serbinenko
ce41ab7aab
* grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as
...
per common usage and preffered in several parts of code.
(grub_memcmp): Likewise.
(grub_strncmp): Likewise.
* include/grub/misc.h (grub_strcasecmp): Likewise.
(grub_strncasecmp): Likewise.
* Makefile.util.def (cmp_test): New test.
(grub_script_strcmp): Likewise.
* tests/cmp_unit_test.c: New file.
* tests/grub_script_strcmp.in: Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Add a comment.
2012-05-04 12:08:22 +02:00
Vladimir 'phcoder' Serbinenko
0a308f64e9
* grub-core/fs/bfs.c (bfs_strcmp) [MODE_AFS]: Use signed comparison.
2012-05-04 10:52:26 +02:00
Vladimir 'phcoder' Serbinenko
9e8bc27a40
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Fix offset when
...
crossing page boundary.
2012-05-03 22:16:45 +02:00
Vladimir 'phcoder' Serbinenko
aa01499d05
Fix B-tree search in BFS, especially in presence of non-ASCII
...
characters.
* grub-core/fs/bfs.c (bfs_strcmp): New function.
(find_in_b_tree): Use standard bsearch + btree algorithm.
2012-05-03 20:29:10 +02:00
Vladimir 'phcoder' Serbinenko
1516bfb43a
* grub-core/fs/reiserfs.c (grub_reiserfs_iterate_dir): Put a trailing
...
zero after directory block since last entry may be not 0-terminated if
it ends on block boundary. Use continue instead of if spanning whole
loop.
2012-05-03 16:43:05 +02:00
Vladimir 'phcoder' Serbinenko
a3a0eace51
Support 4K sectors UDF inline files.
...
* grub-core/fs/udf.c (grub_udf_file_entry): Don't specify padding size.
(grub_udf_extended_file_entry): Likewise.
(grub_fshelp_node): Name the anonymous union. Put block at the end.
All users updated.
(get_fshelp_size): New function.
(grub_udf_read_icb): Read whole block.
(grub_udf_iterate_dir): Likewise.
(grub_udf_dir): Likewise.
(grub_udf_open): Likewise.
2012-05-03 09:29:20 +02:00
Vladimir 'phcoder' Serbinenko
c82f16c1be
* grub-core/fs/ufs.c (grub_ufs_get_file_block): Support triple indirect.
2012-05-03 09:25:25 +02:00
Vladimir 'phcoder' Serbinenko
59fd2aacd0
* grub-core/fs/ufs.c (grub_ufs_lookup_symlink): Use proper check for
...
inline symlinks in addition to workaround.
2012-05-03 09:21:09 +02:00
Vladimir 'phcoder' Serbinenko
3b4afb4de1
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Handle read_inode errors.
2012-05-03 09:15:29 +02:00
Vladimir 'phcoder' Serbinenko
f45c794ab5
* grub-core/fs/xfs.c (GRUB_XFS_EXTENT_BLOCK): Fix bitmask.
2012-05-03 09:11:32 +02: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
bb9a34e88d
Fix reiserfs big seek times.
...
* grub-core/fs/reiserfs.c (grub_reiserfs_get_item): New argument
exact. All users updated.
(grub_reiserfs_read): Use nearest btree search for seeking.
Fix return value on error.
2012-05-02 10:30:52 +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
ddc583571e
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Fix memory leak.
2012-05-01 15:03:27 +02:00
Vladimir 'phcoder' Serbinenko
5cb5387977
* grub-core/fs/nilfs2.c (grub_nilfs2_palloc_entry_offset_log):
...
Fix argument to grub_nilfs2_palloc_bitmap_block_offset.
2012-04-26 12:49:35 +02:00
Vladimir 'phcoder' Serbinenko
b282dfe5ac
* grub-core/fs/squash4.c (lzo_decompress): Set grub_errno on error.
...
Allocate at lest 8192 for temporary buffer as required for lzo.
2012-04-26 01:16:25 +02:00
Vladimir 'phcoder' Serbinenko
daa59f47f6
* grub-core/fs/fat.c (grub_fat_mount): Don't add logical_sector_bits
...
to cluster_bits, since it's already added in.
(grub_fat_read_data): Likewise.
2012-04-25 16:28:06 +02:00
Vladimir 'phcoder' Serbinenko
986748ce79
* grub-core/fs/ntfs.c (grub_ntfs_mount): Support 256-byte sectors,
...
as long as cluster size is multiple of 512 bytes.
2012-04-25 11:56:24 +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
4ed80652d2
* grub-core/fs/minix.c (grub_minix_data): Fix ino type.
...
(grub_minix_read_file): Likewise.
(grub_minix_read_inode): Likewise.
(grub_minix_find_file): Likewise.
(grub_minix_dir): Likewise.
2012-04-13 17:08:38 +02:00
Vladimir 'phcoder' Serbinenko
491c57a815
* grub-core/commands/usbtest.c (usb_print_str): Silence spurious
...
warning.
2012-04-07 20:03:38 +02:00
Vladimir 'phcoder' Serbinenko
ac66b453df
Handle big-endian minixfs (fixes minixfs tests on bigendian).
...
* grub-core/fs/minix.c: Replace le with minix. Add necessary defines,
modify names. Introduce MODE_BIGENDIAN.
* grub-core/fs/minix_be.c: New file.
* grub-core/fs/minix2_be.c: Likewise
* grub-core/fs/minix3_be.c: Likewise.
* Makefile.util.def (libgrubmods): Add minix_be, minix2_be and
minix3_be.
* grub-core/Makefile.core.def (minix_be): New module.
(minix2_be): Likewise.
(minix3_be): Likewise.
2012-04-01 21:35:18 +02:00
Vladimir 'phcoder' Serbinenko
d73ff15de4
Fix exfat endianness handling.
...
* grub-core/fs/fat.c (grub_fat_data): Make fat_sector 32-bit.
(grub_fat_mount) [MODE_EXFAT]: Fix bpb.num_reserved_sectors byte-swap.
(grub_fat_iterate_dir) [MODE_EXFAT]: Fix attr byte-swap.
Byte-swap utf16 when necessary.
(grub_fat_label) [MODE_EXFAT]: Byte-swap utf16 when necessary.
2012-03-31 19:04:13 +02:00
Anton Blanchard
bbb39a458b
Fix btrfs endianness handling.
...
* grub-core/fs/btrfs.c (key_cmp): Use grub_le_to_cpu for clarity.
(lower_bound): Make root uint64_t. Use root in le.
(grub_btrfs_read_logical): Fix template key init. Fix address byteswap.
(find_path): Fix template key init.
(grub_btrfs_dir): Fix mtime byteswap.
* include/grub/types.h (grub_cpu_to_le64_compile_time): New macro.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-31 18:45:13 +02:00
Vladimir 'phcoder' Serbinenko
354e0af7d3
* grub-core/fs/btrfs.c (grub_btrfs_read_logical): New argument
...
recursion_depth. Break infinite resursions. All users updated.
2012-03-31 18:38:29 +02:00
Anton Blanchard
255818026e
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Do not byteswap
...
8 bit values.
2012-03-31 12:08:50 +02:00
Vladimir 'phcoder' Serbinenko
d2d58d0ab4
* grub-core/fs/jfs.c (grub_jfs_label): Use first label if second one
...
starts with control character.
2012-03-19 11:07:28 +01: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
ed167a8027
* grub-core/fs/hfsplus.c (grub_hfsplus_btree_iterate_node): Add btree
...
loop check using Brent algorithm.
(grub_hfsplus_btree_search): Likewise.
2012-02-24 22:28:45 +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