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)
Jan 2 2024, 6:07 PM
Unknown Object (File)
Dec 26 2023, 6:51 AM
Unknown Object (File)
Dec 20 2023, 12:16 AM
Unknown Object (File)
Dec 13 2023, 4:13 PM
Unknown Object (File)
Nov 11 2023, 12:13 PM
Unknown Object (File)
Nov 3 2023, 7:46 AM
Unknown Object (File)
Oct 2 2023, 2:17 AM
Unknown Object (File)
Aug 15 2023, 1:07 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.