From b392bd17c8b094d1f6019bc127560b3f90a28855 Mon Sep 17 00:00:00 2001 From: Yura Pakhuchiy Date: Fri, 7 Sep 2007 15:39:30 +0300 Subject: [PATCH] ntfsmount: Submit inode number during readdir Some broken programs rely on that filesystem will submit inode number during readdir() (what is optional). Make them happy since it is really not a problem. (Ted Anderson, Szaka) --- ntfsprogs/ntfsmount.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsmount.c b/ntfsprogs/ntfsmount.c index 0ac8e278..9848b59a 100644 --- a/ntfsprogs/ntfsmount.c +++ b/ntfsprogs/ntfsmount.c @@ -577,8 +577,11 @@ static int ntfs_fuse_filler(ntfs_fuse_fill_context_t *fill_ctx, free(filename); return 0; } - if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user) - fill_ctx->filler(fill_ctx->buf, filename, NULL, 0); + if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user) { + struct stat st = { .st_ino = MREF(mref) }; + + fill_ctx->filler(fill_ctx->buf, filename, &st, 0); + } free(filename); return 0; }