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.
This commit is contained in:
parent
4f8e368fc0
commit
1b8463f2c4
4 changed files with 23 additions and 10 deletions
|
@ -1121,7 +1121,7 @@ grub_ntfs_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
mft->attr.save_pos = 1;
|
||||
|
||||
read_attr (&mft->attr, buf, file->offset, len, 1, file->read_hook);
|
||||
return (grub_errno) ? 0 : len;
|
||||
return (grub_errno) ? -1 : (grub_ssize_t) len;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue