summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-02-13 11:48:31 +0000
committersobomax <sobomax@FreeBSD.org>2001-02-13 11:48:31 +0000
commit20103ed026e8dba487110d01e4716fa74e2dec76 (patch)
tree59f00b0593083744a3d823b89e9140f9d8c1364b /sys/fs
parent804a116a6d22f0ac5ea681bf4b7a036a5e698760 (diff)
downloadFreeBSD-src-20103ed026e8dba487110d01e4716fa74e2dec76.zip
FreeBSD-src-20103ed026e8dba487110d01e4716fa74e2dec76.tar.gz
Add a hook for loading of a Unicode -> char conversion routine as a kld at a
run-time. This is temporary solution until proper kernel Unicode interfaces are in place and as such was purposely designed to be as tiny as possible (3 lines of the code not counting comments). The port with conversion routines for the most popular single-byte languages will be added later today Reviewed by: bp, "Michael C . Wu" <keichii@iteration.net> Approved by: bp
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cd9660/cd9660_util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_util.c b/sys/fs/cd9660/cd9660_util.c
index 2a11dc2..56279db 100644
--- a/sys/fs/cd9660/cd9660_util.c
+++ b/sys/fs/cd9660/cd9660_util.c
@@ -47,6 +47,14 @@
#include <isofs/cd9660/iso.h>
/*
+ * XXX: limited support for loading of Unicode
+ * conversion routine as a kld at a run-time.
+ * Should be removed when native Unicode kernel
+ * interfaces have been introduced.
+ */
+u_char (*cd9660_wchar2char)(u_int32_t wchar) = NULL;
+
+/*
* Get one character out of an iso filename
* Obey joliet_level
* Return number of bytes consumed
@@ -72,6 +80,10 @@ isochar(isofn, isoend, joliet_level, c)
*c = *isofn;
break;
}
+ /* XXX: if Unicode conversion routine is loaded then use it */
+ if (cd9660_wchar2char != NULL)
+ *c = cd9660_wchar2char((*(isofn - 1) << 8) | *isofn);
+
return 2;
}
OpenPOWER on IntegriCloud