Page MenuHomeFreeBSD

virtual_oss(8): Fix cuse.ko check
ClosedPublic

Authored by fernape on Sat, Sep 19, 4:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 26, 10:19 PM
Unknown Object (File)
Sat, Sep 26, 5:21 PM
Unknown Object (File)
Sat, Sep 26, 8:55 AM
Unknown Object (File)
Sat, Sep 26, 7:39 AM
Unknown Object (File)
Sat, Sep 26, 7:10 AM
Unknown Object (File)
Sat, Sep 26, 7:10 AM
Unknown Object (File)
Sat, Sep 26, 7:09 AM
Unknown Object (File)
Sat, Sep 26, 7:09 AM
Subscribers

Details

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 77123
Build 74006: 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
2592

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.

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

Please also take care of MFC'ing to stable/15 this at some point, ideally after 1-2 weeks.

This revision is now accepted and ready to land.Tue, Sep 22, 3:33 PM
This revision was automatically updated to reflect the committed changes.