Page MenuHomeFreeBSD

Modify ifname_linux_to_bsd() to properly work with Linux loopback interface
ClosedPublic

Authored by dchagin on May 2 2019, 2:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 17, 8:01 PM
Unknown Object (File)
Sat, Feb 15, 9:33 PM
Unknown Object (File)
Sat, Feb 8, 10:36 AM
Unknown Object (File)
Jan 26 2025, 12:07 AM
Unknown Object (File)
Jan 13 2025, 6:58 PM
Unknown Object (File)
Jan 6 2025, 12:39 AM
Unknown Object (File)
Jan 5 2025, 11:27 PM
Unknown Object (File)
Jan 5 2025, 11:01 PM
Subscribers

Details

Summary

Modify ifname_linux_to_bsd() to properly work with Linux loopback
interface (for future use in linsysfs).

Allow NULL bsdname to aviod excess strlcpy if bsdname is not needed
by the caller.

Diff Detail

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

Event Timeline

emaste added inline comments.
sys/compat/linux/linux.c
239 ↗(On Diff #56961)

especially now that is_lo is bool I think the ?: operator is unnecessary obfuscation

dchagin retitled this revision from odify ifname_linux_to_bsd() to properly work with Linux loopback interface to Modify ifname_linux_to_bsd() to properly work with Linux loopback interface.
dchagin marked an inline comment as done.
dchagin added inline comments.
sys/compat/linux/linux.c
239 ↗(On Diff #56961)

Yes, indeed, thank you:)

LGTM

sys/compat/linux/linux.c
234 ↗(On Diff #57020)

lxname[len] == '\0' would be more correct?

This revision is now accepted and ready to land.May 6 2019, 6:26 PM
This revision was automatically updated to reflect the committed changes.
dchagin marked an inline comment as done.