If we are asked to copy amount of data that is not a multiple of "rwsize", we won't process all "count" bytes, so we should reflect that in the value we return. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- fs/devfs-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/devfs-core.c b/fs/devfs-core.c index 8d5ff71d6..b2f66578d 100644 --- a/fs/devfs-core.c +++ b/fs/devfs-core.c @@ -548,7 +548,7 @@ static ssize_t mem_copy(struct device_d *dev, void *dst, const void *src, rwsize = rwsize >> O_RWSIZE_SHIFT; - count = ALIGN_DOWN(count, rwsize); + count = size = ALIGN_DOWN(count, rwsize); while (count) { switch (rwsize) { -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox