Fixed getting sector size from a partition image (Windows variant)

On Windows, when processing a partition image, get the sector size
from the boot sector instead of the containing partition.
pull/2/head
Jean-Pierre André 2015-04-17 09:21:58 +02:00
parent 4340df770e
commit 3fb1deb13b
1 changed files with 5 additions and 1 deletions

View File

@ -1881,7 +1881,11 @@ static int ntfs_device_win32_ioctl(struct ntfs_device *dev, int request,
#ifdef BLKSSZGET
case BLKSSZGET:
ntfs_log_debug("BLKSSZGET detected.\n");
return ntfs_win32_blksszget(dev, (int *)argp);
if (fd && !fd->ntdll) {
*(int*)argp = fd->geo_sector_size;
return (0);
} else
return ntfs_win32_blksszget(dev, (int *)argp);
#endif
#ifdef BLKBSZSET
case BLKBSZSET: