
30 Apr
2011
30 Apr
'11
9:14 p.m.
Dear Sergei Shtylyov,
In message 201104122323.59105.sshtylyov@ru.mvista.com you wrote:
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it tries to read the MBR into 512-byte buffer situated on stack. Instead allocate this buffer dynamically to be safe with any large sector size.
Signed-off-by: Sergei Shtylyov sshtylyov@ru.mvista.com
Can we please keep the buffer on the stack as before? There is no need to use malloc() here. It just makes the code slower and more complicated and error prone without neeed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Where shall I begin, please your Majesty?" he asked. "Begin at the
beginning," the King said, gravely, "and go on till you come to the
end: then stop." - Alice's Adventures in Wonderland, Lewis Carroll