mount-util: clean up get_mount_flags()
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Jan 2020 13:59:41 +0000 (14:59 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 9 Jan 2020 14:05:21 +0000 (15:05 +0100)
commit08b1f5c7d1193dd51eaa9d3db43c65dd1fd71c2c
tree7fe29f3ca4b0fcf273b640002c8e68a21a1e72ad
parent4eaf0d9401ab26609b737fe25aa19dcc1e1aa314
mount-util: clean up get_mount_flags()

This cleans up the function in multiple ways:

- change order of parameters to follow our usualy system of putting
  return parameters last
- rename return parameter "ret" as we usually do
- don't initialize local variables we override immediately anyway
- downgrade log messages to LOG_DEBUG (since we don't log about any
  other errors here above LOG_DEBUG, as this is mostly an "API"-style
  function)
- handle that mnt_fs_get_vfs_options() may return NULL (according to
  docs)
- manually map the ST_xyz to MS_xyz flags on statvfs(), because while
  they are mostly the same, they aren't entirely the same, MS_RELATIME and
  ST_RELATIME are defined differently (sad!)
src/shared/mount-util.c