[Top][All Lists]

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

Re: [PATCH] wrong CHS limit check

From: Robert Millan
Subject: Re: [PATCH] wrong CHS limit check
Date: Sun, 13 Apr 2008 20:29:16 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Mar 21, 2008 at 04:14:46PM +0100, Robert Millan wrote:
> +      soff = sector % data->sectors + 1;
> +      head = sector / data->sectors;

Or rather, as pointed out by Bean on IRC:

  soff = ((grub_uint32_t) sector) % data->sectors + 1;
  head = ((grub_uint32_t) sector) / data->sectors;

to avoid gratuitous 64-bit division where 32-bit is enough.

Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)

reply via email to

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