FAT: Fix file contents listed as directory
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Fri, 20 Jul 2012 03:20:29 +0000 (03:20 +0000)
committerTom Rini <trini@ti.com>
Tue, 18 Sep 2012 19:01:53 +0000 (12:01 -0700)
commit7ee46cebcbee82e3522b84a82041e4aa86760e40
treead6e2e1ec32fd51c31b9c2759e9228e325670440
parentd5370febbcbcee3f554df13ed72b7e2b91e5f66c
FAT: Fix file contents listed as directory

With:
fatls mmc 0 /dir/file
dir: regular directory
file: regular file

The previous code read the contents of file as if it were directory entries to
list. This patch refuses to list file contents as if it were a folder.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
fs/fat/fat.c