[PATCH] linux.c: linux_check() posix_memalign() needs to align to dev->sector_size

Matt Domsch Matt_Domsch at dell.com
Tue Jan 27 16:03:54 UTC 2009


Signed-off-by: Matt Domsch <Matt_Domsch at dell.com>
---
 libparted/arch/linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 0589ee0..d693f6d 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -1803,7 +1803,7 @@ linux_check (PedDevice* dev, void* buffer, PedSector start, PedSector count)
         if (!_device_seek (dev, start))
                 return 0;
 
-        if (posix_memalign(&diobuf, PED_SECTOR_SIZE_DEFAULT,
+        if (posix_memalign(&diobuf, dev->sector_size,
                            count * PED_SECTOR_SIZE_DEFAULT) != 0)
                 return 0;
 
-- 
1.6.0.5


-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux



More information about the parted-devel mailing list