karana
asked on
request function
sir ,
i wrote a block device driver module
************* x.c *****************
struct block_operations bdops ;
// i didnt initialized the bdops fields
major=register_blkdev(0, "sbull" ,&bdops);
printk("<1> %d " ,major);
blk_init_queue(BLK_DEFAULT _QUEUE(maj or) , sbull_request);
// these above codes are in init_module()
void sbull_request(request_queu e_t)
{
printk("hello");
}
************************** ********** ********** ****
//i compiled and insmod ./x.o .
//After the successful module loading .
mknod /dev/kol b major 0
// here major (value) is got from printk function in init_module
//after creating the device when i tried
echo 0 > /dev/kol
// no respons .just waiting in an endless loop .I expected a printing of
// "hello " in console
tell me wer is wrong .wat is the corrrect code .
i wrote a block device driver module
************* x.c *****************
struct block_operations bdops ;
// i didnt initialized the bdops fields
major=register_blkdev(0, "sbull" ,&bdops);
printk("<1> %d " ,major);
blk_init_queue(BLK_DEFAULT
// these above codes are in init_module()
void sbull_request(request_queu
{
printk("hello");
}
**************************
//i compiled and insmod ./x.o .
//After the successful module loading .
mknod /dev/kol b major 0
// here major (value) is got from printk function in init_module
//after creating the device when i tried
echo 0 > /dev/kol
// no respons .just waiting in an endless loop .I expected a printing of
// "hello " in console
tell me wer is wrong .wat is the corrrect code .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.