Re: request for test with your quirky drive enclosure
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch, 31. Januar 2007 20:35 schrieb Alan Stern: > On Wed, 31 Jan 2007, Oliver Neukum wrote: > > > > > + if (sdkp->capacity % 63 || sdkp->capacity % 255) > > > > + --sdkp->capacity; > > > > > > This is a strange computation. You avoid decrementing the capacity iff it > > > is already divisible both by 63 and by 255. Maybe you really want to use > > > && rather than || ? The idea being, I presume, that the last partition > > > will extend only as far as a pseudo-cylinder boundary. > > > > Yes, but I am conservative. When in doubt, decrement. > > Now I get it -- 255 heads and 63 sectors/track. So you really should be > checking to see if the capacity is divisible by 63*255 = 16065. The way > you're doing it, a capacity of 5355 would pass the test even though it > shouldn't. Correct. It shall be done. > > This patch is a result of despair, I am running out of solutions. > > Some problems are best left unsolved... Never give up, never surrender :-) Regards Oliver ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel