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