]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig: split argument parsing and actual execution logic
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Wed, 10 May 2023 09:58:56 +0000 (09:58 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Wed, 10 May 2023 10:39:12 +0000 (10:39 +0000)
commit982cd5ae8ef6541fffcb4251a5a2ab59d706df10
tree3dfd06092fa214c87985efa33262b86b05b7f150
parent3c851dc19bbde2056a9367cc43e935f9a35925a4
ifconfig: split argument parsing and actual execution logic

Reduce the amount of global variables by creating the dedicated
 ifconfig_args structure and use it as a context-passing variable.
Simplify the code by moving all argument preparation code a
 separate function.

Reviewed by: kp (previous version)
Differential Revision: https://reviews.freebsd.org/D39932
MFC after: 2 weeks
sbin/ifconfig/ifconfig.c
sbin/ifconfig/ifconfig.h
sbin/ifconfig/ifmedia.c