Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved devfs_install #302

Closed

Conversation

rafalcieslak
Copy link
Contributor

This branch adds an optional DEVFS_INSTALL_FLAG_NUMBERED flag for devfs_install, which allows installing multiple devices sharing the same name into /dev - they will be automatically numbered e.g. /dev/vga (== /dev/vga0), /dev/vga1, /dev/vga2, ... This removes the silly assumption that only the first device of a particular driver may expose a /dev interface.

I've also fixed a potential race condition in devfs_install.

rafalcieslak added a commit to rafalcieslak/mimiker that referenced this pull request May 8, 2017
@cahirwpz
Copy link
Owner

cahirwpz commented May 9, 2017

I've got completely different view on device naming scheme. Name and unit number of a device, according to my understanding of *BSD device drivers, comes from devclass structure. Each device is assigned devclass after it's created and device.nameunit is set to unique identifier (rtc0, video1, tty7, etc.) by calling devclass_add_device.

@cahirwpz
Copy link
Owner

Obsoleted by #344. With addition of device classes (incl. device->d_nameunit field) and rewrite of devfs using (yet to be written) pseudo filesystem framework, we won't need this patch.

@cahirwpz cahirwpz closed this May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants