admin管理员组

文章数量:1336563

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.)

本文标签: Linux 5198 has removed genhdhStack Overflow