From 8d63e0b1a27c707b32058ba9b1b97e45577b6f71 Mon Sep 17 00:00:00 2001 From: Yura Pakhuchiy Date: Fri, 19 Oct 2007 21:22:59 +0300 Subject: [PATCH] ntfsck: Use ntfs_pread instead ops->pread. (Noticed by Christophe GRENIER) --- ntfsprogs/ntfsck.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsck.c b/ntfsprogs/ntfsck.c index 2171a620..3a1047e5 100644 --- a/ntfsprogs/ntfsck.c +++ b/ntfsprogs/ntfsck.c @@ -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; }