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)
Thu, Dec 19, 4:02 PM
Unknown Object (File)
Oct 8 2024, 1:40 PM
Unknown Object (File)
Oct 8 2024, 1:40 PM
Unknown Object (File)
Oct 8 2024, 1:40 PM
Unknown Object (File)
Oct 8 2024, 1:40 PM
Unknown Object (File)
Oct 8 2024, 1:09 PM
Unknown Object (File)
Sep 26 2024, 7:47 PM
Unknown Object (File)
Sep 23 2024, 4:16 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.