Commit graph

102 commits

Author SHA1 Message Date
fzielcke
c375ae58f2 2008-08-31 Felix Zielcke <fzielcke@z-51.de>
* fs/iso9660.c (grub_iso9660_date): New structure.
        (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
        (grub_iso9660_uuid): New function.
2008-09-06 11:16:52 +00:00
bean
5926115732 2008-09-05 Bean <bean123ch@gmail.com>
* fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.

	* fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
	insensitive bit for names in Win32 and Win32 & DOS namespace.

	* include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.

	* include/grub/types.h (LONG_MAX): Likewise.
2008-09-05 15:48:37 +00:00
fzielcke
380cfbb458 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
* fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2008-08-21 13:30:32 +00:00
bean
2b99f12345 2008-08-06 Bean <bean123ch@gmail.com>
* fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
	(grub_pxefs_fs_int): Remove dummy definition.
	(grub_pxefs_open): Use data->block_size to store the current block
	size setting.
	(grub_pxefs_read): Use block size stored in data->block_size. As the
	value of grub_pxe_blksize can be changed after the file is opened.
2008-08-06 06:17:14 +00:00
bean
9f0234cb9a 2008-08-06 Bean <bean123ch@gmail.com>
* fs/i386/pc/pxe.c (curr_file): new variable.
	(grub_pxefs_open): Simply the handling of pxe file system. Don't
	require the dummy internal file system anymore.
	(grub_pxefs_read): Removed.
	(grub_pxefs_close): Likewise.
	(grub_pxefs_fs_int): Likewise.
	(grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
	connection when we switch file.
	(grub_pxefs_close_int): Renamed to grub_pxefs_close.
2008-08-06 04:05:12 +00:00
bean
9e7007b310 2008-08-05 Bean <bean123ch@gmail.com>
* boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.

	* conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
	(pkglib_MODULES): Add pxe.mod and pxecmd.mod.
	(pxe_mod_SOURCES): New macro.
	(pxe_mod_CFLAGS): Likewise.
	(pxe_mod_LDFLAGS): Likewise.
	(pxecmd_mod_SOURCES): Likewise.
	(pxecmd_mod_CFLAGS): Likewise.
	(pxecmd_mod_LDFLAGS): Likewise.

	* kern/i386/pc/startup.S (grub_pxe_scan): New function.
	(grub_pxe_call): Likewise.

	* include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.

	* commands/i386/pc/pxecmd.c: New file.

	* disk/i386/pc/pxe.c: Likewise.

	* include/grub/i386/pc/pxe.h: Likewise.
2008-08-05 15:15:59 +00:00
bean
b70a8427ce 2008-07-27 Bean <bean123ch@gmail.com>
* fs/fat.c (GRUB_FAT_MAXFILE): New constant.
	(grub_fat_find_dir): Ignore case when comparing filename.
2008-07-27 14:46:45 +00:00
bean
8f5e379ff3 2008-07-27 Bean <bean123ch@gmail.com>
* fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
	smallino, as it's more descriptive, and i8count can be confused with
	the other field count.
	(grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
	inode type.
2008-07-27 14:20:49 +00:00
proski
ee01cf35f0 2008-07-15 Pavel Roskin <proski@gnu.org>
* fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
	beginning to avoid warnings with some compilers.
2008-07-15 04:12:28 +00:00
bean
4ae821ac9a 2008-07-13 Bean <bean123ch@gmail.com>
* fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
	(grub_ext4_extent_header): New structure.
	(grub_ext4_extent): Likewise.
	(grub_ext4_extent_idx): Likewise.
	(grub_ext4_find_leaf): New function.
	(grub_ext2_read_block): Handle extents.
2008-07-13 01:13:12 +00:00
proski
c9c8e6063f 2008-07-02 Pavel Roskin <proski@gnu.org>
* fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
	for file offsets, use grub_off_t instead.  Fix printf format
	warnings.
2008-07-02 20:02:54 +00:00
proski
ca62e5986f 2008-07-02 Pavel Roskin <proski@gnu.org>
* fs/reiserfs.c: Remove #warning, TODO list items don't belong
	there.  Real unexpected warnings should not drown in the noise
	about known problems.
2008-07-02 19:37:09 +00:00
proski
d4c9b428e1 2008-07-02 Pavel Roskin <proski@gnu.org>
* fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
	those in Linux XFS code.  Provide a way to access 64-bit parent
	inode.
	(grub_xfs_iterate_dir): Use the new names.  Avoid reading past
	the end of struct grub_xfs_dir_header.
2008-07-02 18:40:32 +00:00
proski
29d7e38ad8 2008-07-01 Pavel Roskin <proski@gnu.org>
* fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
	grub_fshelp_read_file() expects.
2008-07-01 23:33:49 +00:00
proski
f341f6692c 2008-07-01 Pavel Roskin <proski@gnu.org>
* fs/fat.c: Fix UUID calculation on big-endian systems.  We
	write uuid as a 32-bit value in CPU byte order, so declare and
	use it as such.
2008-07-01 23:18:25 +00:00
proski
0e9e51ec4f 2008-07-01 Pavel Roskin <proski@gnu.org>
* disk/raid.c: Cast grub_dprintf() arguments to unsigned long
	long if the format specifier expects it.
	* partmap/gpt.c (gpt_partition_map_iterate): Likewise.
	* partmap/pc.c (pc_partition_map_iterate): Likewise.
	* fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
	long to fix a warning.
	* fs/reiserfs.c (grub_reiserfs_read): Change casts in
	grub_dprintf() arguments to fix warnings.
2008-07-01 23:02:16 +00:00
robertmh
5444088da6 2008-06-29 Robert Millan <rmh@aybabtu.com>
* fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
        block to disk block.
        (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
        Patch from Niels B\303\266hm <bitbucket@arcor.de>
2008-06-29 21:33:38 +00:00
bean
d31a32a14c 2008-06-16 Bean <bean123ch@gmail.com>
* fs/ext2.c (grub_ext2_blockgroup): Revert to pre journal state.
	(grub_ext2_read_block): Likewise.
	(grub_ext2_read_inode): Likewise.
	(grub_ext2_mount): Likewise.
	(grub_ext2_close): Likewise.
	(grub_ext3_get_journal): Removed.

	* fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre journal state.
	(grub_reiserfs_read_symlink): Likewise.
	(grub_reiserfs_mount): Likewise.
	(grub_reiserfs_open): Likewise.
	(grub_reiserfs_read): Likewise.
	(grub_reiserfs_close): Likewise.
	(grub_reiserfs_get_journal): Removed.

	* fs/fshelp.c (grub_fshelp_read): Removed.
	(grub_fshelp_map_block): Likewise.

	* include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
	(grub_fshelp_journal): Likewise.
	(grub_fshelp_read): Likewise.
	(grub_fshelp_map_block): Likewise.
2008-06-16 19:02:08 +00:00
robertmh
21cf716ad4 2008-06-15 Robert Millan <rmh@aybabtu.com>
* fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
        extent-btree which is written as big endian on disk.
        Reported by Alain Greppin  <al@chilibi.org>.
2008-06-15 13:31:18 +00:00
bean
dfe9ddd4cb 2008-06-13 Bean <bean123ch@gmail.com>
* commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.

	* fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.

	* fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
	to indicate sparse block.
2008-06-13 06:47:46 +00:00
proski
e6d1a308ed 2008-06-12 Pavel Roskin <proski@gnu.org>
* fs/ext2.c (grub_ext2_read_inode): Don't normalize block
	number, grub_fshelp_read() does it for us.
2008-06-12 16:13:21 +00:00
proski
16ae7781ef 2008-06-12 Pavel Roskin <proski@gnu.org>
* fs/fshelp.c (grub_fshelp_read): New function.  Implement
	linear disk read with journal translation.
	* fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
	* include/grub/fshelp.h: Declare grub_fshelp_read().
2008-06-12 14:48:27 +00:00
proski
40fd3a2b99 2008-06-09 Pavel Roskin <proski@gnu.org>
* fs/minix.c (grub_minix_mount): Handle error reading
	superblock.
2008-06-09 15:32:43 +00:00
robertmh
ad4936a035 2008-06-08 Robert Millan <rmh@aybabtu.com>
* include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
        `num_serial' (for consistency with other variables).
        (struct grub_ntfs_data): Add `uuid' member.
        * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
        (grub_ntfs_uuid): New function.
        (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2008-06-08 19:18:58 +00:00
robertmh
00c108a446 2008-06-01 Robert Millan <rmh@aybabtu.com>
*  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
        before dereferencing it.

        * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
        union with fat12/fat16-specific ones.  Add some new fields, including
        `num_serial' for both versions.
        (struct grub_fat_data): Add `uuid' member.
        (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
        names.  Initialize `data->uuid' using `num_serial'.
        (grub_fat_uuid): New function.
        (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.

        * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
        (grub_reiserfs_uuid): New function.
        (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
        member.

        * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
        (grub_xfs_uuid): New function.
        (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2008-06-01 13:30:00 +00:00
robertmh
811d3878d8 2008-05-30 Robert Millan <rmh@aybabtu.com>
* fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
        grub_printf() flags, since we're printing in units of 2 bytes.
2008-05-30 20:47:43 +00:00
robertmh
6219127445 2008-05-30 Robert Millan <rmh@aybabtu.com>
* commands/search.c (options): Add --fs_uuid option.
        (search_fs_uuid): New function.
        (grub_cmd_search): Fix --set argument passing.
        Use search_fs_uuid() when requested via --fs_uuid.
        (grub_search_init): Update help message.
        * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
        and redeclare it as an array of 16-bit words.
        (grub_ext2_uuid): New function.
        (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
        * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
        * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
        (GRUB_DEVICE_BOOT_UUID): New variables.
        (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
        * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
        whenever possible.
        * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
        just assume `root' variable has the right value.
        * util/grub.d/10_linux.in: Likewise.
        * util/grub-probe.c (probe): Probe for filesystem UUID when requested
        via PRINT_FS_UUID.
        (main): Recognise `-t fs_uuid' argument.
2008-05-30 11:04:08 +00:00
robertmh
da9a6a9463 2008-05-29 Robert Millan <rmh@aybabtu.com>
* fs/affs.c: Update copyright year.
        * fs/ext2.c: Likewise.
        * fs/fshelp.c: Likewise.
        * fs/hfsplus.c: Likewise.
        * fs/ntfs.c: Likewise.
        * fs/xfs.c: Likewise.
        * include/grub/fshelp.h: Likewise.
        * util/grub-mkdevicemap.c: Likewise.
2008-05-29 13:01:43 +00:00
bean
887d2619bf 2008-05-20 Bean <bean123ch@gmail.com>
* fs/fshelp.c (grub_fshelp_map_block): New function.
	(grub_fshelp_find_file): Use 64-bit type for pos and block address.
	Use `>>' and `&' operator to avoid 64-bit divide and modulo.

	* include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
	(GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
	(grub_fshelp_journal): New structure.
	(grub_fshelp_map_block): New function prototype.
	(grub_fshelp_read_file): Use grub_disk_addr_t as block type.
	(grub_fshelp_map_block): Likewise.

	* fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
	(EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
	(EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
	(EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
	(EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
	(EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
	(EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
	(EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
	(EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
	(EXT3_JOURNAL_FLAG_DELETED): Likewise.
	(EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
	(grub_ext2_sblock): New members for journal support.
	(grub_ext3_journal_header): New structure.
	(grub_ext3_journal_revoke_header): Likewise.
	(grub_ext3_journal_block_tag): Likewise.
	(grub_ext3_journal_sblock): Likewise.
	(grub_fshelp_node): New members logfile and journal.
	(grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
	grub_fshelp_map_block to get real block number.
	(grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
	number.
	(grub_ext2_read_inode): Likewise.
	(grub_ext3_get_journal): New function.
	(grub_read_inode): Initialize journal using grub_ext3_get_journal.
	(grub_ext2_close): Release memory used by journal.

	* fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
	(REISERFS_MAGIC_DESC_BLOCK): New macro.
	(grub_reiserfs_transaction_header): Renamed to
	grub_reiserfs_description_block, replace field data with real_blocks.
	(grub_reiserfs_commit_block): New structure.
	(grub_reiserfs_data): New member journal.
	(grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
	number.
	(grub_reiserfs_read_symlink): Likewise.
	(grub_reiserfs_iterate_dir): Likewise.
	(grub_reiserfs_open): Likewise.
	(grub_reiserfs_read): Likewise.
	(grub_reiserfs_get_journal): New function.
	(grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
	three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
	using grub_reiserfs_get_journal.
	(grub_reiserfs_close): Release memory used by journal.

	* fs/affs.c (grub_affs_read_block): Change block type to
	grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.

	* fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.

	* fs/hfsplus.c (grub_hfsplus_read_block): Likewise.

	* fs/ntfs.c (grub_ntfs_read_block): Likewise.

	* fs/udf.c (grub_udf_read_block): Change block type to
	grub_disk_addr_t. Use type cast to avoid warning.

	* fs/xfs.c (grub_xfs_read_block): Likewise.
2008-05-20 05:00:53 +00:00
proski
ba7328dcba 2008-04-02 Pavel Roskin <proski@gnu.org>
* disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
	* fs/cpio.c (grub_cpio_read): Likewise.
2008-04-02 06:10:44 +00:00
bean
a33224e04b 2008-03-31 Bean <bean123ch@gmail.com>
* video/reader/png.c (grub_png_data): New member is_16bit and
	image_data.
	(grub_png_decode_image_header): Detect 16 bit png image.
	(grub_png_convert_image): New function to convert 16 bit image to 8 bit.
	(grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
	(grub_video_reader_png): Release memory occupied by image_data.

	* fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
	4096 bytes.
	(grub_nfs_mount): Skip the test for sector per cluster.

	* include/grub/ntfs.h (MAX_SPC): Removed.
2008-03-31 12:00:48 +00:00
bean
86cb4f54b4 2008-03-31 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add afs.mod.
	(grub_probe_SOURCES): Add fs/afs.c.
	(grub_fstest_SOURCES): Likewise.
	(afs_mod_SOURCES): New variable.
	(afs_mod_CFLAGS): Likewise.
	(afs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/afs.c: New file.
2008-03-31 11:18:00 +00:00
proski
8790bb0466 2008-03-30 Pavel Roskin <proski@gnu.org>
* fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
	variable.
	* include/grub/i386/loader.h: Change declaration of
	grub_linux_boot() to match what grub_loader_set() expects.
	* util/getroot.c (grub_guess_root_device): Return const char* to
	fix a warning.
	* util/grub-probe.c (probe): Fix a warning about uninitialized
	abstraction_name variable.
	* util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
	second argument as unused to fix a warning.
2008-03-30 18:04:40 +00:00
bean
2b89344ec4 2008-03-02 Bean <bean123ch@gmail.com>
* fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
	symlink_buffer.
2008-03-02 08:16:52 +00:00
bean
0d16e571f1 2008-02-24 Bean <bean123ch@gmail.com>
* fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
	(GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
	(GRUB_ISO9660_VOLDESC_SUPP): Likewise.
	(GRUB_ISO9660_VOLDESC_PART): Likewise.
	(GRUB_ISO9660_VOLDESC_END): Likewise.
	(grub_iso9660_primary_voldesc): New member escape.
	(grub_iso9660_data): New member joliet.
	(grub_iso9660_convert_string): New function.
	(grub_iso9660_mount): Detect joliet extension.
	(grub_iso9660_iterate_dir): Convert filename when joliet is detected.
	(grub_iso9660_iso9660_label): Likewise.

	* conf/common.rmk (pkgdata_MODULES): Add udf.mod.
	(grub_setup_SOURCES): Add fs/udf.c.
	(grub_fstest_SOURCES): Likewise.
	(udf_mod_SOURCES): New variable.
	(udf_mod_CFLAGS): Likewise.
	(udf_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/udf.c: New file.
2008-02-24 15:34:15 +00:00
robertmh
b37a922267 2008-02-08 Robert Millan <rmh@aybabtu.com>
* disk/raid.c: Update copyright.
        * fs/cpio.c: Likewise.
        * include/grub/raid.h: Likewise.
        * loader/i386/pc/multiboot.c: Likewise.
        * util/hostfs.c: Likewise.
2008-02-08 21:27:55 +00:00
bean
b0dfd29ab2 2008-02-06 Christian Franke <franke@computer.org>
* fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
	(and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
	last block of a cpio or tar stream.
	Check for "TRAILER!!!" instead of any empty data
	block to detect last block of a cpio stream.
	(grub_cpio_dir): Fix constness of variable np.
	(grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
	cpio or tar trailer is detected.  This fixes a crash
	on open of a non existing file.
2008-02-06 19:57:40 +00:00
bean
c004e1b477 2008-02-02 Bean <bean123ch@gmail.com>
* fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
        (grub_ufs_get_file_block): Fix indirect block calculation problem.

        * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
        (grub_xfs_btree_node): New structure.
        (grub_xfs_btree_root): New structure.
        (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
        (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
        (GRUB_XFS_EXTENT_BLOCK): Likewise.
        (GRUB_XFS_EXTENT_SIZE): Likewise.
        (grub_xfs_read_block): Support btree format type.
        (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
        Use directory block as basic unit.

        * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.

        * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
        __attribute__ ((__regparm__ (1))).
2008-02-02 14:15:31 +00:00
bean
22da1f6f0f 2008-01-26 Bean <bean123ch@gmail.com>
* fs/reiserfs.c (grub_fshelp_node): New member next_offset.
        (grub_reiserfs_get_item): Save offset of the next item.
        (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2008-01-26 13:28:37 +00:00
bean
bac332a11a 2008-01-24 Bean <bean123ch@gmail.com>
* fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
        (grub_ufs_sblock): New member volume name.
        (grub_ufs_find_file): Fix string copy bug.
        (grub_ufs_label): Implement this function properly.

        * fs/hfs.c (grub_hfs_cnid_type): New enum.
        (grub_hfs_iterate_records): Use the correct file number for extents
        and catalog file. Fix problem in next index calculation.
        (grub_hfs_find_node): Replace recursive function call with loop.
        (grub_hfs_iterate_dir): Replace recursive function call with loop.
2008-01-23 20:21:18 +00:00
bean
44023a2816 2008-01-22 Bean <bean123ch@gmail.com>
* fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
	there are no more items.
2008-01-22 12:44:38 +00:00
robertmh
1a8b05264d 2008-01-21 Robert Millan <rmh@aybabtu.com>
Fix detection of very small filesystems (like tar).

        * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
        contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
        GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
        a problem with this disk).
2008-01-21 14:32:49 +00:00
okuji
52bd3de956 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
Remove some unused code from reiserfs.

    * fs/reiserfs.c (struct grub_reiserfs_key)
    [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
    (struct grub_reiserfs_node_body): Removed.
    (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
    Likewise.
    (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
    (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
    (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2008-01-12 00:51:34 +00:00
okuji
868967cfaf 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
* fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
    correctly.
    (grub_reiserfs_get_key_offset): Likewise.
    (grub_reiserfs_set_key_offset): Likewise.
    (grub_reiserfs_set_key_type): Likewise.
    (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.

    (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
    better to remove the bitfield version completely.
2008-01-06 22:57:50 +00:00
okuji
f5db429174 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
* fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
    allocated from the heap, due to the fshelp implementation.
    (grub_reiserfs_dir): Free NODE, due to the same reason.
2008-01-06 15:34:11 +00:00
okuji
492e6d9d4b 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
Mostly from Vincent Pelletier:

    * fs/reiserfs.c: New file.

    * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
    (reiserfs_mod_SOURCES): New variable.
    (reiserfs_mod_CFLAGS): Likewise.
    (reiserfs_mod_LDFLAGS): Likewise.

    * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
    disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
    include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
    normal/color.c.
2008-01-06 14:14:31 +00:00
proski
cc85c3c340 Typo fixes in comments and variable names. 2007-12-30 08:52:06 +00:00
robertmh
fc6e896cc5 2007-12-26 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
	(cpio_mod_SOURCES): New variable.
	(cpio_mod_CFLAGS): Likewise.
	(cpio_mod_LDFLAGS): Likewise.

	* fs/cpio.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2007-12-26 07:51:19 +00:00
robertmh
4bc72aa96f 2007-12-21 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
	(ntfscomp_mod_SOURCES): New variable.
	(ntfscomp_mod_CFLAGS): Likewise.
	(ntfscomp_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* fs/ntfs.c (grub_ntfscomp_func): New variable.
	(read_run_list): Renamed to grub_ntfs_read_run_list.
	(decomp_nextvcn): Moved to ntfscomp.c.
	(decomp_getch): Likewise.
	(decomp_get16): Likewise.
	(decomp_block): Likewise.
	(read_block): Likewise.
	(read_data): Partially moved to ntfscomp.c.
	(fixup): Change unsigned to grub_uint16_t.
	(read_mft): Change unsigned long to grub_uint32_t.
	(read_attr): Likewise.
	(read_data): Likewise.
	(read_run_data): Likewise.
	(read_run_list): Likewise.
	(read_mft): Likewise.

	* fs/ntfscomp.c: New file.

	* include/grub/ntfs.h: New file.
2007-12-21 11:41:23 +00:00
robertmh
270c237dbe 2007-11-10 Bean <bean123ch@gmail.com>
* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2007-11-10 20:08:33 +00:00