Whamcloud - gitweb
tune2fs: print error message when closing the fs fails
authorLubomir Rintel <lkundrak@v3.sk>
Fri, 23 Sep 2022 13:28:17 +0000 (15:28 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 Jan 2023 05:58:15 +0000 (00:58 -0500)
commit7c4bbd8f052af2b2be84293ddeff0d36e35b5a8f
treecdb1e0731a7da44cfaa44810e9a29771497d9c47
parent4d2dcb56d276aff8ed0a730152dcbeda32257da8
tune2fs: print error message when closing the fs fails

I encountered an I/O error on writing the superblock on a drive:

  ...
  pwrite64(3, ..., 114688, 97844727808) = 114688
  fsync(3) = -1 EIO (Input/output error)
  close(3) = 0
  ...

The error was silently ignored, only indicated by the exit value. Let's
print an error message.

The error message was taken from mke2fs in order to reuse the
translations.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c