diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-21 22:00:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-21 22:00:56 +0000 |
commit | 168660f24dfc46c2702acbe4701a446f42a59578 (patch) | |
tree | f431368afbf6b1b71809cf3fd904d800ea126f4d /fs/isofs | |
parent | 6420f767924fa73b0ea267864d96820815f4ba5a (diff) |
Merge with Linux 2.4.0-test5-pre3.
Diffstat (limited to 'fs/isofs')
-rw-r--r-- | fs/isofs/inode.c | 11 | ||||
-rw-r--r-- | fs/isofs/joliet.c | 27 |
2 files changed, 13 insertions, 25 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 222b5e2bf..157b8ebba 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -415,19 +415,10 @@ static unsigned int isofs_get_last_session(struct super_block *sb,s32 session ) struct cdrom_multisession ms_info; unsigned int vol_desc_start; struct block_device *bdev = sb->s_bdev; - kdev_t dev = sb->s_dev; int i; vol_desc_start=0; ms_info.addr_format=CDROM_LBA; - /* If a minor device was explicitly opened, set session to the - * minor number. For instance, if /dev/hdc1 is mounted, session - * 1 on the CD-ROM is selected. CD_PART_MAX gives access to - * a max of 64 sessions on IDE. SCSI drives must still use - * the session option to mount. - */ - if ((MINOR(dev) % CD_PART_MAX) && (MAJOR(dev) != SCSI_CDROM_MAJOR)) - session = MINOR(dev) % CD_PART_MAX; if(session >= 0 && session <= 99) { struct cdrom_tocentry Te; Te.cdte_track=session; @@ -1420,7 +1411,7 @@ void * leak_check_malloc(unsigned int size){ void leak_check_free_s(void * obj, int size){ check_malloc--; - return kfree_s(obj, size); + return kfree(obj); } struct buffer_head * leak_check_bread(int dev, int block, int size){ diff --git a/fs/isofs/joliet.c b/fs/isofs/joliet.c index 3da5bd04c..009314a82 100644 --- a/fs/isofs/joliet.c +++ b/fs/isofs/joliet.c @@ -15,26 +15,23 @@ * Convert Unicode 16 to UTF8 or ASCII. */ static int -uni16_to_x8(unsigned char *ascii, unsigned char *uni, int len, - struct nls_table *nls) +uni16_to_x8(unsigned char *ascii, u16 *uni, int len, struct nls_table *nls) { - unsigned char *ip, *op; - unsigned char ch, cl; - unsigned char *uni_page; + wchar_t *ip; + unsigned char *op; ip = uni; op = ascii; - while ((*ip || ip[1]) && len) { - ch = *ip++; - cl = *ip++; - - uni_page = nls->page_uni2charset[ch]; - if (uni_page && uni_page[cl]) { - *op++ = uni_page[cl]; - } else { + while (*ip && len) { + int llen; + wchar_t ch = be16_to_cpu(*ip); + if ((llen = nls->uni2char(ch, op, NLS_MAX_CHARSET_SIZE)) > 0) + op += llen; + else *op++ = '?'; - } + ip++; + len--; } *op = 0; @@ -87,7 +84,7 @@ get_joliet_filename(struct iso_directory_record * de, struct inode * inode, len = wcsntombs_be(outname, de->name, de->name_len[0] >> 1, PAGE_SIZE); } else { - len = uni16_to_x8(outname, de->name, + len = uni16_to_x8(outname, (u16 *) de->name, de->name_len[0] >> 1, nls); } if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) { |