wrapper.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) | wrapper.c (634725a92938b0f282b17cec0b007dca77adebd2) |
---|---|
1/* 2 * linux/fs/hfsplus/wrapper.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Handling of HFS wrappers around HFS+ volumes --- 56 unchanged lines hidden (view full) --- 65 if (HFSPLUS_SB(sb).session >= 0) { 66 te.cdte_track = HFSPLUS_SB(sb).session; 67 te.cdte_format = CDROM_LBA; 68 res = ioctl_by_bdev(sb->s_bdev, CDROMREADTOCENTRY, (unsigned long)&te); 69 if (!res && (te.cdte_ctrl & CDROM_DATA_TRACK) == 4) { 70 *start = (sector_t)te.cdte_addr.lba << 2; 71 return 0; 72 } | 1/* 2 * linux/fs/hfsplus/wrapper.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Handling of HFS wrappers around HFS+ volumes --- 56 unchanged lines hidden (view full) --- 65 if (HFSPLUS_SB(sb).session >= 0) { 66 te.cdte_track = HFSPLUS_SB(sb).session; 67 te.cdte_format = CDROM_LBA; 68 res = ioctl_by_bdev(sb->s_bdev, CDROMREADTOCENTRY, (unsigned long)&te); 69 if (!res && (te.cdte_ctrl & CDROM_DATA_TRACK) == 4) { 70 *start = (sector_t)te.cdte_addr.lba << 2; 71 return 0; 72 } |
73 printk(KERN_ERR "HFS: Invalid session number or type of track\n"); | 73 printk(KERN_ERR "hfs: invalid session number or type of track\n"); |
74 return -EINVAL; 75 } 76 ms_info.addr_format = CDROM_LBA; 77 res = ioctl_by_bdev(sb->s_bdev, CDROMMULTISESSION, (unsigned long)&ms_info); 78 if (!res && ms_info.xa_flag) 79 *start = (sector_t)ms_info.addr.lba << 2; 80 return 0; 81} --- 56 unchanged lines hidden (view full) --- 138 HFSPLUS_SB(sb).alloc_blksz_shift++; 139 blocksize = min(HFSPLUS_SB(sb).alloc_blksz, (u32)PAGE_SIZE); 140 141 /* align block size to block offset */ 142 while (part_start & ((blocksize >> HFSPLUS_SECTOR_SHIFT) - 1)) 143 blocksize >>= 1; 144 145 if (sb_set_blocksize(sb, blocksize) != blocksize) { | 74 return -EINVAL; 75 } 76 ms_info.addr_format = CDROM_LBA; 77 res = ioctl_by_bdev(sb->s_bdev, CDROMMULTISESSION, (unsigned long)&ms_info); 78 if (!res && ms_info.xa_flag) 79 *start = (sector_t)ms_info.addr.lba << 2; 80 return 0; 81} --- 56 unchanged lines hidden (view full) --- 138 HFSPLUS_SB(sb).alloc_blksz_shift++; 139 blocksize = min(HFSPLUS_SB(sb).alloc_blksz, (u32)PAGE_SIZE); 140 141 /* align block size to block offset */ 142 while (part_start & ((blocksize >> HFSPLUS_SECTOR_SHIFT) - 1)) 143 blocksize >>= 1; 144 145 if (sb_set_blocksize(sb, blocksize) != blocksize) { |
146 printk("HFS+: unable to blocksize to %u!\n", blocksize); | 146 printk(KERN_ERR "hfs: unable to set blocksize to %u!\n", blocksize); |
147 return -EINVAL; 148 } 149 150 HFSPLUS_SB(sb).blockoffset = part_start >> 151 (sb->s_blocksize_bits - HFSPLUS_SECTOR_SHIFT); 152 HFSPLUS_SB(sb).sect_count = part_size; 153 HFSPLUS_SB(sb).fs_shift = HFSPLUS_SB(sb).alloc_blksz_shift - 154 sb->s_blocksize_bits; --- 16 unchanged lines hidden --- | 147 return -EINVAL; 148 } 149 150 HFSPLUS_SB(sb).blockoffset = part_start >> 151 (sb->s_blocksize_bits - HFSPLUS_SECTOR_SHIFT); 152 HFSPLUS_SB(sb).sect_count = part_size; 153 HFSPLUS_SB(sb).fs_shift = HFSPLUS_SB(sb).alloc_blksz_shift - 154 sb->s_blocksize_bits; --- 16 unchanged lines hidden --- |