[U-Boot] [PATCH] tftp: fix type of block arg to store_block
Wolfgang Denk
wd at denx.de
Wed Jun 6 11:53:30 CEST 2012
Dear "Jayachandran C",
In message <1338961566-13389-1-git-send-email-jayachandranc at netlogicmicro.com> you wrote:
> The block argument for store_block can be -1 when the tftp sequence
> number rolls over (i.e TftpBlock == 0), so the first argument to
> store_block has to be of type 'int' instead of 'unsigned'.
What makes you think so?
> -store_block (unsigned block, uchar * src, unsigned len)
> +store_block (int block, uchar * src, unsigned len)
> {
> ulong offset = block * TftpBlkSize + TftpBlockWrapOffset;
Block gets used to compute the offset into the storage area, so it
must never be negative.
I think your analysis must be flawed.
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 at denx.de
Making files is easy under the UNIX operating system. Therefore,
users tend to create numerous files using large amounts of file
space. It has been said that the only standard thing about all UNIX
systems is the message-of-the-day telling users to clean up their
files. - System V.2 administrator's guide
More information about the U-Boot
mailing list