]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hfsplus: emit proper file type from readdir
authorSergei Antonov <saproj@gmail.com>
Thu, 22 May 2014 00:43:58 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:58 +0000 (10:43 +1000)
commitfc516287097aea0a33a3e58a44b542b4e18209e2
tree8a761283db70bc62236561fc5902d1138ecbabee
parent50d064a20f8bd2a36644ef80639f439e7575cccd
hfsplus: emit proper file type from readdir

hfsplus_readdir() incorrectly returned DT_REG for symbolic links and
special files.  Return DT_REG, DT_LNK, DT_FIFO, DT_CHR, DT_BLK, DT_SOCK,
or DT_UNKNOWN according to mode field in catalog record.  Programs relying
on information from readdir will now work correctly with HFS+.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hfsplus/dir.c