summaryrefslogtreecommitdiffstats
path: root/common/bootargs.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-21 22:06:24 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-22 08:57:21 +0100
commit17c4b989a5d00fe5fc84c528bbd59583c45d80d0 (patch)
treedbe49644ba01922270c74b85df7f9499cdfe9b40 /common/bootargs.c
parentcee4c2a064796db730c572bf8973e799c1b89b02 (diff)
downloadbarebox-17c4b989a5d00fe5fc84c528bbd59583c45d80d0.tar.gz
barebox-17c4b989a5d00fe5fc84c528bbd59583c45d80d0.tar.xz
block: Do not write past block device boundary during a flush
When calling I/O functions of underlying block device driver we always need to make sure that its size is small enough to not go past device's boundary. Not only in get_chunk() and block_cache(), but in writebuffer_flush() as well. Since the same code is used in three different places, move it into a subroutine and adjust all of the calls to ->write()/->read() accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootargs.c')
0 files changed, 0 insertions, 0 deletions