Page MenuHomeFreeBSD

Implement new make_dev_args() API
AbandonedPublic

Authored by hselasky on Nov 2 2015, 3:03 PM.
Tags
None
Referenced Files
F105992822: D4067.diff
Mon, Dec 23, 2:42 PM
Unknown Object (File)
Fri, Dec 13, 12:25 PM
Unknown Object (File)
Sep 24 2024, 3:53 AM
Unknown Object (File)
Sep 20 2024, 5:29 AM
Unknown Object (File)
Sep 16 2024, 9:00 PM
Unknown Object (File)
Sep 15 2024, 1:53 AM
Unknown Object (File)
Sep 11 2024, 5:59 AM
Unknown Object (File)
Sep 11 2024, 5:59 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