vvfat: always create . and .. entries at first and in that order
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 22 May 2017 21:11:59 +0000 (23:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 10 Jul 2017 11:18:05 +0000 (13:18 +0200)
commitf82d92bb028a1d674bab4ccc7e6cde6c04956230
treef8778e418c6b5f96c673291829b89efb0b2bd71c
parent92e28d82209b0ff49db801e9a56a400cc1f44967
vvfat: always create . and .. entries at first and in that order

readdir() doesn't always return . and .. entries at first and in that order.
This leads to not creating them at first in the directory, which raises some
errors on file system checking utilities like MS-DOS Scandisk.

Specification: "FAT: General overview of on-disk format" v1.03, page 25

Fixes: https://bugs.launchpad.net/qemu/+bug/1599539
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vvfat.c