Page MenuHomeFreeBSD

virtual_oss(8): Fix cuse.ko check
Needs ReviewPublic

Authored by fernape on Sat, Sep 19, 4:43 PM.
Tags
None
Referenced Files
F172756685: D59844.diff
Sun, Sep 20, 7:01 PM
F172681179: D59844.id187239.diff
Sun, Sep 20, 4:30 AM
F172680881: D59844.diff
Sun, Sep 20, 4:27 AM
Unknown Object (File)
Sun, Sep 20, 12:33 AM
Unknown Object (File)
Sun, Sep 20, 12:29 AM
Unknown Object (File)
Sat, Sep 19, 8:58 PM
Subscribers

Details

Reviewers
christos
Group Reviewers
audio
Summary

There is no need at all to load the cuse module to just access the tool help.

kldload always checks for permissions first returning -EPERM if the user can't
load modules and -EEXIST if the user can, but the module is already loaded.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77093
Build 73976: arc lint + arc unit

Event Timeline

usr.sbin/virtual_oss/virtual_oss/main.c
2588

The function name makes it obvious what the code is doing, the comment is redundant.

2590
2593

Also redundant.

LGTM, but don't commit it until we have resolved the discussion in D59621.

This revision is now accepted and ready to land.Sun, Sep 20, 4:25 PM

Reuse variable in error message.

This revision now requires review to proceed.Sun, Sep 20, 4:25 PM
fernape added inline comments.
usr.sbin/virtual_oss/virtual_oss/main.c
2588

Not really. See obiwac comment about it in https://reviews.freebsd.org/D59621

usr.sbin/virtual_oss/virtual_oss/main.c
2588

Minor nit: this could be part of the if above with an additional &&.

Use one single if statement.