uml/hostfs: Propagate dirent.d_type to filldir()
Currently the (optional) d_type member in struct dirent is always DT_UNKNOWN on hostfs, which may confuse buggy software using readdir(). Make sure to propagate its value from the underlying filesystem if it's available there. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:

committed by
Richard Weinberger

parent
c0b79a90b1
commit
3ee6bd8e8d
@@ -67,7 +67,8 @@ extern int access_file(char *path, int r, int w, int x);
|
||||
extern int open_file(char *path, int r, int w, int append);
|
||||
extern void *open_dir(char *path, int *err_out);
|
||||
extern char *read_dir(void *stream, unsigned long long *pos,
|
||||
unsigned long long *ino_out, int *len_out);
|
||||
unsigned long long *ino_out, int *len_out,
|
||||
unsigned int *type_out);
|
||||
extern void close_file(void *stream);
|
||||
extern int replace_file(int oldfd, int fd);
|
||||
extern void close_dir(void *stream);
|
||||
|
Reference in New Issue
Block a user