Page MenuHomeFreeBSD

LinuxKPI: Improve sysfs support.
ClosedPublic

Authored by johalun on Sep 6 2019, 3:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 25, 9:09 AM
Unknown Object (File)
Mon, Feb 24, 9:30 AM
Unknown Object (File)
Sun, Feb 16, 5:55 PM
Unknown Object (File)
Fri, Feb 14, 12:57 AM
Unknown Object (File)
Sat, Feb 8, 2:22 AM
Unknown Object (File)
Sat, Feb 8, 1:58 AM
Unknown Object (File)
Sat, Feb 1, 4:56 AM
Unknown Object (File)
Sat, Feb 1, 4:53 AM
Subscribers

Details

Summary
  • Add functions for creating and merging sysfs groups.
  • Add sysfs_streq function to compare strings ignoring newline from the sysctl userland call.
  • Add a call to sysfs_create_groups in device_add.
  • Remove duplicate header include.
  • Bump __FreeBSD_version
Test Plan

Tested OK with WIP drm driver update on i915.
mlx* drivers built and loaded OK (but without hardware).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/compat/linuxkpi/common/include/linux/device.h
43 ↗(On Diff #61713)

Why is this header file removed? Does device.h still build standalone?

sys/compat/linuxkpi/common/include/linux/sysfs.h
276 ↗(On Diff #61713)

You should test for l1 != 0 and l2 != 0

Improve strlen safety checks.

Apply reviewer suggestions

sys/compat/linuxkpi/common/include/linux/device.h
43 ↗(On Diff #61713)

This is a duplicate.

sys/compat/linuxkpi/common/include/linux/sysfs.h
276 ↗(On Diff #61713)

Good catch. Fixed.

Make sure:
make buildkernel WITH_OFED=YES

pass.

This revision is now accepted and ready to land.Sep 6 2019, 3:07 PM
This revision was automatically updated to reflect the committed changes.