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)
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
Unknown Object (File)
Wed, Oct 8, 11:06 PM
Unknown Object (File)
Mon, Oct 6, 6:57 AM
Unknown Object (File)
Sun, Oct 5, 5:26 AM
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