Linux 5.19.8 has removed genhd.h? - Stack Overflow

I'm working on a block device driver kernel module. Most tutorials use the genhd.h header file, bu

I'm working on a block device driver kernel module. Most tutorials use the genhd.h header file, but when I checked my kernel code (version Linux 5.19.8), I couldn't find that header file. How should I proceed? Where has the content of that header file been moved in the newer versions? Or how can I implement the block device driver kernel module without using that header file?

I'm working on a block device driver kernel module. Most tutorials use the genhd.h header file, but when I checked my kernel code (version Linux 5.19.8), I couldn't find that header file. How should I proceed? Where has the content of that header file been moved in the newer versions? Or how can I implement the block device driver kernel module without using that header file?

Share Improve this question asked Nov 20, 2024 at 4:06 BuByBuBy 1
Add a comment  | 

1 Answer 1

Reset to default 0

Apparently genhd.h has been removed; see https://lore.kernel./all/[email protected]/t/

Commit message says:

This patchset removes the <linux/genhd.h> header, which has no clearly split responsibilities from <linux/blkdev.h> and is included by the latter

From that I would infer that the workaround is to #include blkdev.h instead. (Or drop the genhd.h #include entirely if it was redundant.)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742382901a4433474.html

相关推荐

  • Linux 5.19.8 has removed genhd.h? - Stack Overflow

    I'm working on a block device driver kernel module. Most tutorials use the genhd.h header file, bu

    18小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信