Page MenuHomeFreeBSD

Implement new make_dev_args() API
AbandonedPublic

Authored by hselasky on Nov 2 2015, 3:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 16, 9:26 AM
Unknown Object (File)
Mon, Apr 14, 6:14 AM
Unknown Object (File)
Mon, Apr 14, 5:52 AM
Unknown Object (File)
Mon, Apr 14, 5:30 AM
Unknown Object (File)
Mon, Apr 14, 5:23 AM
Unknown Object (File)
Mon, Apr 14, 3:13 AM
Unknown Object (File)
Sat, Apr 12, 11:20 PM
Unknown Object (File)
Jan 18 2025, 8:08 PM
Subscribers

Details

Summary

To solve races setting character device variables, a new character device API is adviced.

Example:

struct cdev *pcdev;
int retval;

retval = MAKE_DEV_ARGS(&pcdev, (.si_uid = 0, .si_gid = 0,.si_mode = 0777), "testdev");

#define MAKE_DEV_ARGS(ppdev,args,...) \

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hselasky retitled this revision from to Implement new make_dev_args() API.
hselasky updated this object.
hselasky edited the test plan for this revision. (Show Details)
hselasky added reviewers: kib, rwatson, glebius, jhb.
hselasky set the repository for this revision to rS FreeBSD src repository - subversion.

I am sorry, apparently I missed this review when you posted it.

I did prototyped very similar patch last time we talked. Differences are in the handling of the make_dev_args structure grow, I made it completely automatic without manual checks for the version. Also, I think my handling of (obsoleted) unit numbers is, in some sense, better.

I will put my variation onto review in a second.

UPDATE: D4746