mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
ntfsck: Use ntfs_pread instead ops->pread. (Noticed by Christophe GRENIER)
This commit is contained in:
parent
cfda0077b5
commit
8d63e0b1a2
@ -196,7 +196,7 @@ static BOOL verify_boot_sector(struct ntfs_device *dev)
|
||||
|
||||
current_mft_record = 9;
|
||||
|
||||
if (dev->d_ops->pread(dev, buf, sizeof(buf), 0)!=sizeof(buf)) {
|
||||
if (ntfs_pread(dev, 0, sizeof(buf), buf) != sizeof(buf)) {
|
||||
check_failed("Failed to read boot sector.\n");
|
||||
return 1;
|
||||
}
|
||||
@ -258,7 +258,8 @@ static runlist *load_runlist(struct ntfs_device *dev, s64 offset_to_file_record,
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
if (dev->d_ops->pread(dev, buf, size_of_file_record, offset_to_file_record)!=size_of_file_record) {
|
||||
if (ntfs_pread(dev, offset_to_file_record, size_of_file_record, buf) !=
|
||||
size_of_file_record) {
|
||||
check_failed("Failed to read file record at offset %lld (0x%llx).\n", offset_to_file_record, offset_to_file_record);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user