summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-02-26 04:27:20 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-02-26 04:27:20 (GMT)
commit6884cd4d1f5c224e190e56c6902411376b3a187c (patch)
tree218b98e0f30a01ed8268b0675a10ff303609ca4c
parent1781d2b21fa45b571ead8a612883fb910d5078eb (diff)
downloadvirtio9p-6884cd4d1f5c224e190e56c6902411376b3a187c.zip
virtio9p-6884cd4d1f5c224e190e56c6902411376b3a187c.tar.gz
virtio9p-6884cd4d1f5c224e190e56c6902411376b3a187c.tar.bz2
virtio9p-6884cd4d1f5c224e190e56c6902411376b3a187c.tar.xz
utf.S: use the DOS filename upper case table correctly
-rw-r--r--utf.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/utf.S b/utf.S
index c514ab2..c50099d 100644
--- a/utf.S
+++ b/utf.S
@@ -199,10 +199,16 @@ utf_init_case:
movw %dx,%bx /* Current code page (XXX) */
movw $5,%cx /* Size of buffer */
movw $uctbl,%di
+ movw $0x6504,%ax /* Get filename upper case table */
int $0x21
jc 1f
-
+ cmpb $4,uctbl /* Table ID = 4 */
+ jne 1f
+
lfsw uctbl+1,%si
+ fs lodsw
+ cmpw $128,%ax /* First word is table length = 128 */
+ jne 1f /* If not, assume table is bad */
movw $uctable+128,%di
movw $(128/4),%cx
fs rep movsl