cdev_del(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cdev_del(9)

okay so we're in the Kernel API Manual, bestie, and today's main character is cdev_del(9). This is the page about removing a cdev from the system β€” not deleting your group chat, just one char device. Let's get into it 🫢


✨ NAME ✨

cdev_del β€” remove a cdev from the system

🌸 SYNOPSIS 🌸

void cdev_del (struct cdev *p );

πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” the cdev structure to be removed. That's the one getting sent to the group-chat exit, no hard feelings.

πŸ’– DESCRIPTION πŸ’–

cdev_del removes p from the system, possibly freeing the structure itself. Yep, possibly β€” the structure itself might get freed, so don't go assuming anything extra, bestie. πŸ’…

⚠️ NOTE ⚠️

This guarantees that the cdev device will no longer be able to be opened. Iconic, honestly. πŸ”₯

But highkey important: any cdevs already open will remain, and their fops will still be callable even after cdev_del returns. So like… no cap, this is not a "close every existing file descriptor for you" situation. Already-open stuff stays open, and its fops stay callable. 🫢

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./fs/char_dev.c, plus these absolute legends:


that's the whole vibe πŸ¦‹ this one comes from the ./fs source tree, October 2026 edition β€” mwah, go touch some char devices (responsibly) πŸ’œ

πŸ“¦ where this page comes from