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)
Sat, Oct 25, 7:19 PM
Unknown Object (File)
Sat, Oct 25, 1:00 AM
Unknown Object (File)
Thu, Oct 23, 10:56 PM
Unknown Object (File)
Tue, Oct 14, 8:29 AM
Unknown Object (File)
Tue, Oct 14, 8:29 AM
Unknown Object (File)
Tue, Oct 14, 8:29 AM
Unknown Object (File)
Tue, Oct 14, 8:29 AM
Unknown Object (File)
Mon, Oct 13, 6:38 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