bug-parted
[Top][All Lists]
Advanced

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

Re: patch for libparted/linux.c


From: Sven Luther
Subject: Re: patch for libparted/linux.c
Date: Fri, 16 Apr 2004 10:04:33 +0200
User-agent: Mutt/1.5.5.1+cvs20040105i

On Fri, Apr 16, 2004 at 09:46:44AM +1000, Andrew Clausen wrote:
> On Tue, Apr 13, 2004 at 07:55:24PM +0200, bold wrote:
> > 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. 
> 
> I decided to make _device_get_sector_size() always return something
> sane (>0).

Andrew, please have a look at the s390 patch in the 1.6.9-2 debian
packages, it supposedly provides support for bigger than 512byte
sectors, as needed by the S390 DASD (or whatever that was) partition
format. I couldn't test it (obviously), but this was passed on to me by
the debian/s390 folk. I am not sure if it could break something else,
but the patch seems rather conservative.

Friendly,

Sven Luther




reply via email to

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