- 論壇徽章:
- 0
|
RT,注冊(cè)一塊虛擬塊設(shè)備,其他一切正常,在/dev下和/proc/devices下都看到了。
我用fdisk -l為何看不到????
如何才能讓我注冊(cè)的虛擬塊設(shè)備用fdisk -l也能看到啊?
還有關(guān)于struct block_device_operations {
int (*open) (struct inode *, struct file *);
int (*release) (struct inode *, struct file *);
int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
int (*media_changed) (struct gendisk *);
int (*revalidate_disk) (struct gendisk *);
struct module *owner;
};教新的內(nèi)核代碼中有.getgeo ,我實(shí)現(xiàn)這個(gè)函用數(shù)竟然可以fdisk -l看到我塊設(shè)備,老點(diǎn)的內(nèi)核代碼(2.6.16)就沒有函數(shù)getgeo,
那么該如何讓我的虛擬塊設(shè)備用fdisk -l看到呢?
請(qǐng)大家?guī)兔?/td> |
|