Commit Graph

27 Commits

Author SHA1 Message Date
Vladimir Serbinenko ad4bfeec5c Change fs functions to add fs_ prefix
This avoid conflict with gnulib

Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-04-09 10:03:29 +10:00
Alexander Bluhm f188a86064 ufs: Fix parameters to grub_memset.
len = 0 made simply no sense. Fix parameters to be in line with read.
2015-10-09 13:35:40 +02:00
Vladimir Serbinenko a4e33a8b18 fs/ufs: Add missing error check.
Found by: Coverity scan.
2015-01-26 09:36:19 +01:00
Vladimir Serbinenko 245e21b2b5 grub_ufs_mount: Check that sblock.ino_per_group is not 0. 2015-01-21 17:42:11 +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 'phcoder' Serbinenko 2a40badf82 * grub-core/fs/ufs.c: Remove variable length arrays. 2013-10-20 23:07:50 +02:00
Vladimir 'phcoder' Serbinenko b726be7653 * grub-core/fs/ufs.c (grub_ufs_get_file_block): Give GRUB_ERR_BAD_FS
for quadruple indirect rather than GRUB_ERR_NOT_IMPLEMENTED_YET as
	it's FS and not GRUB limitation.
2013-10-07 20:07:19 +02:00
Colin Watson 4eb8b75659 Remove nested functions from disk and file read hooks.
* include/grub/disk.h (grub_disk_read_hook_t): New type.
	(struct grub_disk): Add read_hook_data member.
	* include/grub/file.h (struct grub_file): Likewise.
	* include/grub/fshelp.h (grub_fshelp_read_file): Add read_hook_data
	argument.

	Update all callers.
2013-02-27 17:19:15 +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
Vladimir 'phcoder' Serbinenko cc1ce5f9b4 * grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
infinite loop on corrupted FS.
2012-12-10 09:22:40 +01:00
Vladimir 'phcoder' Serbinenko e77a16ca02 Fix big-endian mtime.
* grub-core/fs/ufs.c (grub_ufs_inode): Split improperly attached
	together sec and usec.
	(grub_ufs_dir): Use correct byteswapping for UFS time.
2012-12-08 21:14:08 +01:00
Vladimir 'phcoder' Serbinenko d9c48c7b7c Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
	* grub-core/Makefile.core.def (ufs1_be): New module.
	* grub-core/fs/ufs_be.c: New file.
	* grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
	the file.
2012-12-08 20:56:58 +01:00
Vladimir 'phcoder' Serbinenko 3244fe96e7 * grub-core/fs/ufs.c (grub_ufs_find_file): Fix handling of double slash.
* grub-core/fs/minix.c (grub_minix_find_file): Likewise.
2012-05-10 23:33:44 +02:00
Vladimir 'phcoder' Serbinenko 6d521c5b41 Fix UFS1 big file support.
* grub-core/fs/ufs.c (INODE): Removed.
	(INODE_SIZE): Always use 64-bit byte-swap since size field is always
	64-bit.
	(INODE_MODE): Simplify.
	(grub_ufs_inode): Use uint64_t for size and not int64_t.
	(grub_ufs_lookup_symlink): Don't use INODE.
2012-05-10 00:25:36 +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 e1e49678b9 * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:36:58 +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 9d9b3d2f02 * grub-core/fs/ufs.c (grub_ufs_mtime) [MODE_UFS2]: Check mtime field
as well.
2011-11-03 15:00:45 +01:00
Vladimir 'phcoder' Serbinenko ce109e843c Read label on UFS1.
* grub-core/fs/ufs.c (grub_ufs_label): Remove MODE_UFS2 condition.
	(grub_ufs_fs): Always set .label.
2011-10-31 10:52:39 +01:00
Vladimir 'phcoder' Serbinenko 87661123b2 Use shifts in UFS.
* grub-core/fs/ufs.c (UFS_LOG_BLKSZ): New macro.
	(grub_ufs_data): New field log2_blksz.
	(grub_ufs_read_file): Use shifts.
	(grub_ufs_mount): Check block size and logarithm it.
2011-10-31 10:50:43 +01:00
Vladimir 'phcoder' Serbinenko 46bc1dc244 * grub-core/fs/ufs.c (grub_ufs_lookup_symlink): Fix handling of
long symlinks.
2011-10-31 10:40:30 +01: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
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
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
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
BVK Chaitanya 8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30