Page MenuHomeFreeBSD

ifconfig: renove global printifname variable.
ClosedPublic

Authored by melifaro on Jun 6 2023, 7:37 AM.
Tags
None
Referenced Files
F153056365: D40431.id123137.diff
Sat, Apr 18, 9:26 PM
Unknown Object (File)
Sun, Apr 12, 4:21 PM
Unknown Object (File)
Thu, Apr 9, 6:26 PM
Unknown Object (File)
Wed, Apr 8, 8:58 PM
Unknown Object (File)
Tue, Apr 7, 10:15 AM
Unknown Object (File)
Mon, Apr 6, 7:40 PM
Unknown Object (File)
Mar 18 2026, 2:06 PM
Unknown Object (File)
Mar 5 2026, 4:48 PM
Subscribers

Details

Summary

It was used to print the created interface name in the atexit handler.
It was calculated in the ifclonecreate() by matching old & new names.

This change alter the implementation the following way:

  1. the function responsible for the interface creation (ifcreate_ioctl) updates all necessary state internally. This removes the need for the name manipulation hack in wlan_create().
  2. As atexit(3) handler does not accept any parameters, explicitly store the name to print in the ifname_to_print variable read by the atexit(3) handler.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable