HomeFreeBSD

ifconfig: remove global 'printifname' variable.

Description

ifconfig: remove global 'printifname' variable.

This variable was used to print the created interface name in the
atexit(3) handler. The interface name 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.

Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D40431
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Jun 13 2023, 6:18 AM
Reviewer
kp
Differential Revision
D40431: ifconfig: renove global printifname variable.
Parents
rGc6885dbda739: ifconfig: eliminate global 'verbose' and 'printkey' variables
Branches
Unknown
Tags
Unknown