[Yaffs] Question about yaffs_read()

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sebastian Huber
Date:  
To: yaffs
Subject: [Yaffs] Question about yaffs_read()
Hello,

the yaffs_read() function uses yaffs_file_rd() to obtain the data from the
flash. Lets have a look at yaffs_file_rd() and suppose n_bytes > 0. Thus we
have n > 0. I suppose n_copy is never negative. In the loop n is only
modified via n -= n_copy and thus n_copy must be greater than zero at some time
otherwise we loop for ever. The n_done is only modified via n_done += n_copy
and since n_copy is greater than zero at some time the n_done will be greater
than zero too. Thus the return value of yaffs_file_rd() is greater than zero
iff n_bytes is greater than zero.

This means that the yaffs_read() never returns an error status in case we have
an uncorrectable ECC error on the flash (YAFFS_ECC_RESULT_UNFIXED)?

Kind regards,
    Sebastian


PS: The yaffs_rd_data_obj() returns an error status, but it is discarded in
yaffs_file_rd().

--
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : 
PGP     : Public key available on request.


Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.