[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 016/100] vvfat: handle KANJI lead byte 0xe5
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 016/100] vvfat: handle KANJI lead byte 0xe5 |
Date: |
Fri, 7 Jul 2017 19:07:31 +0200 |
From: Hervé Poussineau <address@hidden>
Specification: "FAT: General overview of on-disk format" v1.03, page 23
Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vvfat.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/block/vvfat.c b/block/vvfat.c
index dc9af01..9cb48ef 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -589,6 +589,10 @@ static direntry_t *create_short_filename(BDRVVVFATState *s,
}
}
+ if (entry->name[0] == 0xe5) {
+ entry->name[0] = 0x05;
+ }
+
/* numeric-tail generation */
for (j = 0; j < 8; j++) {
if (entry->name[j] == ' ') {
@@ -709,8 +713,6 @@ static inline void init_fat(BDRVVVFATState* s)
}
-/* TODO: in create_short_filename, 0xe5->0x05 is not yet handled! */
-/* TODO: in parse_short_filename, 0x05->0xe5 is not yet handled! */
static inline direntry_t* create_short_and_long_name(BDRVVVFATState* s,
unsigned int directory_start, const char* filename, int is_dot)
{
@@ -1743,6 +1745,9 @@ static int parse_short_name(BDRVVVFATState* s,
} else
lfn->name[i + j + 1] = '\0';
+ if (lfn->name[0] == 0x05) {
+ lfn->name[0] = 0xe5;
+ }
lfn->len = strlen((char*)lfn->name);
return 0;
--
1.8.3.1
- [Qemu-block] [PULL 005/100] vvfat: fix qemu-img map and qemu-img convert, (continued)
- [Qemu-block] [PULL 005/100] vvfat: fix qemu-img map and qemu-img convert, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 007/100] vvfat: fix typos, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 008/100] vvfat: rename useless enumeration values, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 010/100] vvfat: fix field names in FAT12/FAT16 and FAT32 boot sectors, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 011/100] vvfat: always create . and .. entries at first and in that order, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 012/100] vvfat: correctly create long names for non-ASCII filenames, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 009/100] vvfat: introduce offset_to_bootsector, offset_to_fat and offset_to_root_dir, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 013/100] vvfat: correctly create base short names for non-ASCII filenames, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 014/100] vvfat: correctly generate numeric-tail of short file names, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 015/100] vvfat: limit number of entries in root directory in FAT12/FAT16, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 016/100] vvfat: handle KANJI lead byte 0xe5,
Kevin Wolf <=
- [Qemu-block] [PULL 006/100] vvfat: replace tabs by 8 spaces, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 018/100] qemu-img: drop -e and -6 options from the 'create' & 'convert' commands, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 020/100] blockjob: Track job ratelimits via bytes, not sectors, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 017/100] vvfat: change OEM name to 'MSWIN4.1', Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 019/100] blockdev: Print a warning for legacy drive options that belong to -device, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 022/100] stream: Switch stream_populate() to byte-based, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 021/100] trace: Show blockjob actions via bytes, not sectors, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 023/100] stream: Drop reached_end for stream_complete(), Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 024/100] stream: Switch stream_run() to byte-based, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 025/100] commit: Switch commit_populate() to byte-based, Kevin Wolf, 2017/07/07