From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) Description of problem: If the length of a file loaded from disk is not an integer multiple of 256 bytes in length, the last (file_len modulo 256) bytes are not loaded Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Configure RedBoot to support load from IDE disk 2. Attempt to load a file with a length that is not an even multiple of 256 bytes 3. Note the output of the load command... the number of bytes loaded is rounded down to the nearest 256 byte boundary Actual Results: A file of length 514 bytes only loads the first 512 bytes. Expected Results: All 514 bytes should be loaded Additional info: In the file $ECOS_REPOSITORY/packages/redboot/current/src/fs/disk.c, the function disk_stream_read() contains a line: if ((nread = (file_part->funs->read)(fileptr, buf, size)) != size) { which should be changed to: if ((nread = (file_part->funs->read)(fileptr, buf, size)) < 0) { Since the file system parsing code will not read past EOF but just return a short read instead. The file system parsing code will return a negative number for errors.
This bug has moved to http://bugs.ecos.sourceware.org/show_bug.cgi?id=64418