1. 02 6月, 2012 2 次提交
  2. 01 6月, 2012 1 次提交
  3. 27 11月, 2011 1 次提交
  4. 19 11月, 2011 1 次提交
    • A
      NLS: improve UTF8 -> UTF16 string conversion routine · 0720a06a
      Alan Stern 提交于
      The utf8s_to_utf16s conversion routine needs to be improved.  Unlike
      its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
      the maximum length of the output buffer or the endianness of its
      16-bit output.
      
      This patch (as1501) adds the two missing arguments, and adjusts the
      only two places in the kernel where the function is called.  A
      follow-on patch will add a third caller that does utilize the new
      capabilities.
      
      The two conversion routines are still annoyingly inconsistent in the
      way they handle invalid byte combinations.  But that's a subject for a
      different patch.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0720a06a
  5. 24 9月, 2009 1 次提交
    • T
      fs: Make unload_nls() NULL pointer safe · 6d729e44
      Thomas Gleixner 提交于
      Most call sites of unload_nls() do:
      	if (nls)
      		unload_nls(nls);
      
      Check the pointer inside unload_nls() like we do in kfree() and
      simplify the call sites.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Steve French <sfrench@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6d729e44
  6. 01 8月, 2009 1 次提交
    • O
      fat/nls: Fix handling of utf8 invalid char · 67638e40
      OGAWA Hirofumi 提交于
      With utf8 option, vfat allowed the duplicated filenames.
      
      Normal nls returns -EINVAL for invalid char. But utf8s_to_utf16s()
      skipped the invalid char historically.
      
      So, this changes the utf8s_to_utf16s() directly to return -EINVAL for
      invalid char, because vfat is only user of it.
      
      mkdir /mnt/fatfs
      FILENAME=`echo -ne "invalidutf8char_\\0341_endofchar"`
      echo "Using filename: $FILENAME"
      dd if=/dev/zero of=fatfs bs=512 count=128
      mkdosfs -F 32 fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      umount /mnt/fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      ls -l /mnt/fatfs
      umount /mnt/fatfs
      
      ----  And the output is:
      
      Using filename: invalidutf8char_\0341_endofchar
      128+0 records in
      128+0 records out
      65536 bytes (66 kB) copied, 0.000388118 s, 169 MB/s
      mkdosfs 2.11 (12 Mar 2005)
      total 0
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      Tested-by: NMarton Balint <cus@fazekas.hu>
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      67638e40
  7. 16 6月, 2009 3 次提交
    • A
      NLS: update handling of Unicode · 74675a58
      Alan Stern 提交于
      This patch (as1239) updates the kernel's treatment of Unicode.  The
      character-set conversion routines are well behind the current state of
      the Unicode specification: They don't recognize the existence of code
      points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.
      
      The old wchar_t 16-bit type is retained because it's still used in
      lots of places.  This shouldn't cause any new problems; if a
      conversion now results in an invalid 16-bit code then before it must
      have yielded an undefined code.
      
      Difficult-to-read names like "utf_mbstowcs" are replaced with more
      transparent names like "utf8s_to_utf16s" and the ordering of the
      parameters is rationalized (buffer lengths come immediate after the
      pointers they refer to, and the inputs precede the outputs).
      Fortunately the low-level conversion routines are used in only a few
      places; the interfaces to the higher-level uni2char and char2uni
      methods have been left unchanged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74675a58
    • C
      nls: utf8_wcstombs: fix buffer overflow · 905c02ac
      Clemens Ladisch 提交于
      utf8_wcstombs forgot to include one-byte UTF-8 characters when
      calculating the output buffer size, i.e., theoretically, it was possible
      to overflow the output buffer with an input string that contains enough
      ASCII characters.
      
      In practice, this was no problem because the only user so far (VFAT)
      always uses a big enough output buffer.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      905c02ac
    • C
      nls: utf8_wcstombs: use correct buffer size in error case · e27ecdd9
      Clemens Ladisch 提交于
      When utf8_wcstombs encounters a character that cannot be encoded, we
      must not decrease the remaining output buffer size because nothing has
      been written to the output buffer.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e27ecdd9
  8. 16 10月, 2008 1 次提交
  9. 19 10月, 2007 1 次提交
  10. 17 10月, 2007 2 次提交
  11. 17 7月, 2007 1 次提交
  12. 08 12月, 2006 1 次提交
  13. 04 10月, 2006 1 次提交
  14. 02 10月, 2006 1 次提交
  15. 01 7月, 2006 1 次提交
  16. 24 3月, 2006 1 次提交
  17. 22 3月, 2006 1 次提交
  18. 06 5月, 2005 1 次提交
  19. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4