bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for libparted/linux.c


From: bold
Subject: patch for libparted/linux.c
Date: Tue, 13 Apr 2004 19:55:24 +0200 (MEST)

to patch in libparted/linux.c 
 
 
@@ -405,7 +405,11 @@ 
 
if (_kernel_has_blkgetsize64()) { 
if (ioctl(arch_specific->fd, BLKGETSIZE64, &bytes) == 0) { 
- return bytes / _device_get_sector_size(dev); 
+ int sect_size=_device_get_sector_size(dev); 
+ if (sect_size) 
+ return bytes / sect_size; 
+ else 
+ return 0; 
} 
} 
 
 
this is against a divide by 0 error which appears at some people when they
try  
to start qtparted. 
 
 
hope you will include it in a next release. 
 
ciao. bold aka achim woessner 

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info





reply via email to

[Prev in Thread] Current Thread [Next in Thread]