diff options
author | Franck Bui <fbui@suse.com> | 2018-06-13 18:15:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-06-14 10:19:33 +0200 |
commit | 16dc38dd15a69899da58917544cb9680b8c2ff97 (patch) | |
tree | ca8fbc498c51613f3a1960635254260fa8cc79ec | |
parent | timedatectl: add 'show' command to display machine-readable output (diff) | |
download | systemd-16dc38dd15a69899da58917544cb9680b8c2ff97.tar.xz systemd-16dc38dd15a69899da58917544cb9680b8c2ff97.zip |
locale-util: on overlayfs FTW_MOUNT causes nftw(3) to not list *any* files
On overlayfs, FTW_MOUNT causes nftw to not list *any* files because the
condition used by glibc to verify that it's on the same mountpoint doesn't work
on overlayfs, see https://bugzilla.suse.com/show_bug.cgi?id=1096807 for the
details.
However using FTW_MOUNT doesn't seem to be really needed when walking through
the keymap directorie tree. So until the glibc or the kernel is fixed (which
might take some time), let's make localectl works with overlayfs.
There's a small side effect here, by which regular (non-directory) files with
bind mounts will be parsed while they were skipped by the previous logic.
-rw-r--r-- | src/basic/locale-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c index 8b6bc51bda..b382af192d 100644 --- a/src/basic/locale-util.c +++ b/src/basic/locale-util.c @@ -306,7 +306,7 @@ int get_keymaps(char ***ret) { return -ENOMEM; NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) { - r = nftw(dir, nftw_cb, 20, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); + r = nftw(dir, nftw_cb, 20, FTW_PHYS|FTW_ACTIONRETVAL); if (r == FTW_STOP) log_debug("Directory not found %s", dir); |