Details
Details
- Reviewers
christos - Commits
- rGd3efbe0132b2: cdevpriv(9): add iterator
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think it's better if the return value of devfs_foreach_cdevpriv() and the callback return an int. We can have a convention where a non-zero return value from the callback means we want to break out of the loop and return from devfs_foreach_cdevpriv(), which can follow the same convention and return 0 if the loop finished normally, or non-zero if the callback signaled to stop the loop. This would be very useful in the D44411 case.
Comment Actions
Indeed, my bad. However, this change is still good because we can replace the if-statement by using the return value of devfs_foreach_cdevpriv().