rmd6502

Group: Members
Posts: 2
Joined: Jan. 2007 |
 |
Posted: Feb. 05 2007,18:28 |
 |
Cloop 2.04 builds on 2.6.19.2, once I applied the following patches: *** compressed_loop.c Sun May 14 12:15:32 2006 --- compressed_loop.c.patched Mon Feb 5 10:32:52 2007 *************** *** 34,39 **** --- 34,40 ---- /* #define REDHAT_KERNEL */
#include <linux/kernel.h> + #include <linux/autoconf.h> #include <linux/version.h> #include <linux/module.h> #include <linux/init.h> *************** static int clo_set_file(int cloop_num, s *** 501,507 **** clo->underlying_blksize = block_size(inode->i_bdev); } else ! clo->underlying_blksize = inode->i_blksize; #else /* Get initial block size out of device */ clo->underlying_blksize = get_blksize(dev); --- 502,508 ---- clo->underlying_blksize = block_size(inode->i_bdev); } else ! clo->underlying_blksize = 1UL << inode->i_blkbits; #else /* Get initial block size out of device */ clo->underlying_blksize = get_blksize(dev); *************** static struct block_device_operations cl *** 827,832 **** --- 828,834 ----
 /static int register_cloop_blkdev(int major_nr) { + printk("major_nr %d blockdev name %s\n", major_nr, cloop_name); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) return devfs_register_blkdev(major_nr, cloop_name, &clo_fops); #else *************** static int __init cloop_init(void) *** 900,906 **** clo->disk->first_minor = i; clo->disk->fops = &clo_fops; sprintf(clo->disk->disk_name, "%s%d", cloop_name, i); ! sprintf(clo->disk->devfs_name, "%s/%d", cloop_name, i); clo->disk->private_data = clo; add_disk(clo->disk); } --- 902,908 ---- clo->disk->first_minor = i; clo->disk->fops = &clo_fops; sprintf(clo->disk->disk_name, "%s%d", cloop_name, i); ! //sprintf(clo->disk->devfs_name, "%s/%d", cloop_name, i); clo->disk->private_data = clo; add_disk(clo->disk); }
|