diff options
author | Lukasz Majewski <lukma@denx.de> | 2017-08-27 13:46:22 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-03 15:30:31 -0400 |
commit | 40fe89c6e83791f1f9cd079d7d6b51598c4a5925 (patch) | |
tree | 17faca41ed0ffab9c1d7f30de4b0b576b950e983 /disk | |
parent | 8f1603bd78a31f52927d398f600e47e2452997a6 (diff) | |
download | u-boot-40fe89c6e83791f1f9cd079d7d6b51598c4a5925.tar.gz |
fix: fw_env: Prevent writing error message on special files, which don't support fsync
According to fsync specification [1] some special files (e.g., a pipe, FIFO,
or socket) don't support synchronization and return either EROFS or EINVAL.
On the linux side the sys_fsync -> do_fsync() checks if the requested file
has f_op->fsync defined. If not it returns EINVAL [2].
This commit prevents writing error messages for files (devices), which
do not support fsync().
[1] - http://man7.org/linux/man-pages/man2/fsync.2.html
[2] - http://elixir.free-electrons.com/linux/v4.13-rc6/source/fs/sync.c#L183
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Michael Heimpold <mhei@heimpold.de>
Diffstat (limited to 'disk')
0 files changed, 0 insertions, 0 deletions