Skip to contentSkip to conversation

Inline utf16_to_utf8

PATCH In review Vladimir 'phcoder' Serbinenko 1 participant 2 messages Aug 28, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Inline utf16_to_utf8

Needs my usb patch first. Size of cores with filesystems needing UTF-16 doesn't change much (difficult to say if it increases or decreases ecause compression performance varies with other modules (bisdisk vs ata, ...) and even with module order) and decreases th size of core by about 150 bytes if UTF-16 isn't needed

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
commands/usbtest.c +1 -0
index 1c49d81..3405c3b 100644
@@ -19,6 +19,7 @@
 
 #include <grub/types.h>
 #include <grub/misc.h>
+#include <grub/charset.h>
 #include <grub/mm.h>
 #include <grub/err.h>
 #include <grub/dl.h>
fs/fat.c +1 -0
index 8440e43..e4a0729 100644
@@ -25,6 +25,7 @@
 #include <grub/mm.h>
 #include <grub/err.h>
 #include <grub/dl.h>
+#include <grub/charset.h>
 
 #define GRUB_FAT_DIR_ENTRY_SIZE	32
 
fs/hfsplus.c +1 -0
index 5e0ab09..3c2e0c7 100644
@@ -28,6 +28,7 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 #include <grub/hfs.h>
+#include <grub/charset.h>
 
 #define GRUB_HFSPLUS_MAGIC 0x482B
 #define GRUB_HFSPLUSX_MAGIC 0x4858
fs/iso9660.c +1 -0
index 9b7ce76..976222a 100644
@@ -26,6 +26,7 @@
 #include <grub/dl.h>
 #include <grub/types.h>
 #include <grub/fshelp.h>
+#include <grub/charset.h>
 
 #define GRUB_ISO9660_FSTYPE_DIR		0040000
 #define GRUB_ISO9660_FSTYPE_REG		0100000
fs/jfs.c +1 -0
index b73f9bd..589b6ae 100644
@@ -24,6 +24,7 @@
 #include <grub/disk.h>
 #include <grub/dl.h>
 #include <grub/types.h>
+#include <grub/charset.h>
 
 #define GRUB_JFS_MAX_SYMLNK_CNT	8
 #define GRUB_JFS_FILETYPE_MASK	0170000
fs/ntfs.c +1 -0
index 3ff487c..ab75ccc 100644
@@ -24,6 +24,7 @@
 #include <grub/dl.h>
 #include <grub/fshelp.h>
 #include <grub/ntfs.h>
+#include <grub/charset.h>
 
 static grub_dl_t my_mod;
 
include/grub/charset.h new file +84 -0

84 lines not on this page · raw message

include/grub/misc.h +0 -3
index a63a0b4..51a4650 100644
@@ -177,9 +177,6 @@ int EXPORT_FUNC(grub_sprintf) (char *str, const char *fmt, ...) __attribute__ ((
 int EXPORT_FUNC(grub_vsprintf) (char *str, const char *fmt, va_list args);
 void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn));
 void EXPORT_FUNC(grub_abort) (void) __attribute__ ((noreturn));
-grub_uint8_t *EXPORT_FUNC(grub_utf16_to_utf8) (grub_uint8_t *dest,
-					       grub_uint16_t *src,
-					       grub_size_t size);
 grub_ssize_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest,
 					     grub_size_t destsize,
 					     const grub_uint8_t *src,
kern/efi/efi.c +1 -0
index 8e09a90..7be7882 100644
@@ -18,6 +18,7 @@
  */
 
 #include <grub/misc.h>
+#include <grub/charset.h>
 #include <grub/efi/api.h>
 #include <grub/efi/efi.h>
 #include <grub/efi/console_control.h>
kern/misc.c +0 -62

68 lines not on this page · raw message

loader/efi/chainloader.c +1 -0
index 01acc41..9c833e9 100644
@@ -25,6 +25,7 @@
 #include <grub/device.h>
 #include <grub/disk.h>
 #include <grub/misc.h>
+#include <grub/charset.h>
 #include <grub/mm.h>
 #include <grub/types.h>
 #include <grub/dl.h>
#1 lore raw

2009-08-28 Vladimir Serbinenko <[email protected]>

* kern/misc.c (grub_utf16_to_utf8): Move from here ...
* include/grub/charset.h (grub_utf16_to_utf8): ... to here. Inlined. All users updated.
* include/grub/misc.h (grub_utf16_to_utf8): Removed.

Quoted 11 lines · Vladimir 'phcoder' Serbinenko

Needs my usb patch first. Size of cores with filesystems needing UTF-16 doesn't change much (difficult to say if it increases or decreases ecause compression performance varies with other modules (bisdisk vs ata, ...) and even with module order) and decreases th size of core by about 150 bytes if UTF-16 isn't needed --
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git