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.
+
* fs/reiserfs.c: Remove #warning, TODO list items don't belong
there. Real unexpected warnings should not drown in the noise
about known problems.
grub_uint16_t item_size;
grub_uint32_t *indirect_block_ptr = 0;
grub_uint64_t current_key_offset = 1;
- grub_size_t initial_position, current_position, final_position, length;
+ grub_off_t initial_position, current_position, final_position, length;
grub_disk_addr_t block;
grub_off_t offset;
current_position = 0;
final_position = MIN (len + initial_position, file->size);
grub_dprintf ("reiserfs",
- "Reading from %d to %d (%d instead of requested %d)\n",
- initial_position, final_position,
- final_position - initial_position, len);
+ "Reading from %lld to %lld (%lld instead of requested %ld)\n",
+ (unsigned long long) initial_position,
+ (unsigned long long) final_position,
+ (unsigned long long) (final_position - initial_position),
+ (unsigned long) len);
while (current_position < final_position)
{
grub_reiserfs_set_key_offset (&key, current_key_offset);
current_key_offset = current_position + 1;
}
- grub_dprintf("reiserfs",
- "Have successfully read %d bytes (%d requested)\n",
- current_position - initial_position, len);
+ grub_dprintf ("reiserfs",
+ "Have successfully read %lld bytes (%ld requested)\n",
+ (unsigned long long) (current_position - initial_position),
+ (unsigned long) len);
return current_position - initial_position;
/*
switch (found.type)