qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] PATCH: block-vvfat.c: fix number_of_entries for filename of


From: Tristan Gingold
Subject: [Qemu-devel] PATCH: block-vvfat.c: fix number_of_entries for filename of length [13]
Date: Tue, 18 Dec 2007 10:46:58 +0100

Hi,

when the length of a LFN is a multiple of 13 (ie 26 bytes), no padding (0x0000 or 0xffff) is added.

[ Linux vfat fs follows this policy: in namei.c:xlat_to_uni
        *longlen = *outlen;
        if (*outlen % 13) {
                *op++ = 0;
                *op++ = 0;
                *outlen += 1;
                if (*outlen % 13) {
                        fill = 13 - (*outlen % 13);
                        for (i = 0; i < fill; i++) {
                                *op++ = 0xff;
                                *op++ = 0xff;
                        }
                        *outlen += fill;
                }
        }
]

This patch fixes this issue.

Tristan.


Attachment: qemu.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]