diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-04-04 14:07:56 +0300 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-16 10:12:57 +0200 |
commit | b948c8079622c55a223ceb928610f4609547b35a (patch) | |
tree | 863b065c2f47e71253f124651006e33a000bb726 /src/basic/locale-util.c | |
parent | 06ed8a3ec94d6770a62534a820cec441f90905f0 (diff) |
basic: fallback to fstatat if entry->d_type is DT_UNKNOWN
* tests-functions: improve FSTYPE-support
make clean setup FSTYPE=reiserfs is working fine now :)
* basic: fallback to fstatat if entry->d_type is DT_UNKNOWN
Fixes localectl on reiserfs:
-bash-4.3# mkdir -p /usr/lib/locale
-bash-4.3# stat -f /usr/lib/locale/
File: "/usr/lib/locale/"
ID: bdb0322715b5366e Namelen: 255 Type: reiserfs
Block size: 4096
Blocks: Total: 99835 Free: 60262 Available: 60262
Inodes: Total: 0 Free: 0
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager
-bash-4.3# mount -t tmpfs tmpfs /usr/lib/locale
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager
HeyHo
Diffstat (limited to 'src/basic/locale-util.c')
-rw-r--r-- | src/basic/locale-util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c index cda6b2895..eaad25e65 100644 --- a/src/basic/locale-util.c +++ b/src/basic/locale-util.c @@ -153,6 +153,8 @@ static int add_locales_from_libdir (Set *locales) { FOREACH_DIRENT(entry, dir, return -errno) { char *z; + dirent_ensure_type(dir, entry); + if (entry->d_type != DT_DIR) continue; |