libmount: make sure "option=" is used as string
mount(8) cares about case when option specified as "name=" (it means
without data). See for example
727c689908c5e68c92aa1dd65e0d3bdb6d91c1e5.
We need this also for new mount API and use FSCONFIG_SET_STRING rather
than FSCONFIG_SET_FLAG.
strace -e fsconfig ./mount -o usrjquota= /dev/sdc1 /mnt/test
Old:
fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/sdc1", 0) = 0
fsconfig(3, FSCONFIG_SET_FLAG, "usrjquota", NULL, 0) = -1 EINVAL (Invalid argument)
Fixed:
fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/sdc1", 0) = 0
fsconfig(3, FSCONFIG_SET_STRING, "usrjquota", "", 0) = 0
Fixes: https://github.com/util-linux/util-linux/issues/2837
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
0c5485348b155420ecd1bfcdabb1b869ca5ee3c2)