[Virtio-fs] [virtiofsd] MR merged: Fix st_mode of . and .. directories in readdirplus

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Mon Apr 18 11:50:26 UTC 2022


Generally, `st_mode` (as a field of `struct stat`) is made of `S_IFDIR`,
`S_IFREG`, etc., but `d_type` (as a field of `struct dirent`) is made of
`DT_DIR`, `DT_REG`, etc. But these definitions are differ up to a 12 bit
shift.
It leads to incorrect attributes of `.` and `..` in Windows guest, so fix it.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2074311
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/111



More information about the Virtio-fs mailing list