[syslinux] HDT: Doesn't work with syslinux

Jeffrey Hutzelman jhutz at cmu.edu
Tue Mar 31 08:09:17 PDT 2009


--On Monday, March 30, 2009 10:04:07 PM -0400 "Miller, Shao" 
<Shao.Miller at yrdsb.edu.on.ca> wrote:

> Hmm...  If the proposed change below were implemented, what would happen
> on the final iteration?
>
> drive == 0xff
>
> then:
>
> drive++;

Now drive is 0x100, which is not <= 0xff, and the loop ends.

You're probably expecting it to wrap around, because something somewhere 
only has 8 bits to represent this quantity.  But there is nothing magical 
about a variable named "drive" that gives it this property; it's declared 
as an int and so will be at least 16 bits wide.




More information about the Syslinux mailing list