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, Jun 10, 8:28 PM
Unknown Object (File)
Sat, Jun 7, 4:31 AM
Unknown Object (File)
Wed, May 14, 8:12 PM
Unknown Object (File)
May 13 2025, 4:03 PM
Unknown Object (File)
May 10 2025, 9:23 PM
Unknown Object (File)
Apr 14 2025, 11:14 AM
Unknown Object (File)
Apr 14 2025, 3:33 AM
Unknown Object (File)
Apr 13 2025, 5:11 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.