Hi, When I execute `ifconfig media XX -mediaopt YY' command, it occured error as below.
$ doas ifconfig em1 media 100baseTX -mediaopt full-duplex ifconfig: may not issue both `media' and `-mediaopt' $ echo $? 1 Does anyone knows this reason? I think following patch is works fine. $ cvs diff ifconfig.c Index: ifconfig.c =================================================================== RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.379 diff -u -p -r1.379 ifconfig.c --- ifconfig.c 30 Sep 2018 18:19:24 -0000 1.379 +++ ifconfig.c 13 Feb 2019 01:58:18 -0000 @@ -2797,10 +2797,6 @@ unsetmediaopt(const char *val, int d) if (actions & A_MEDIAOPTCLR) errx(1, "only one `-mediaopt' command may be issued"); - /* May not issue `media' and `-mediaopt'. */ - if (actions & A_MEDIA) - errx(1, "may not issue both `media' and `-mediaopt'"); - /* * No need to check for A_MEDIAINST, since the test for A_MEDIA * implicitly checks for A_MEDIAINST. -- ASOU Masato