commit aafa5b9ebad920af7c6ff22c6e16ac75799c7ba4 from: Stefan Sperling date: Thu Oct 10 09:19:57 2024 UTC show a hint when the user tries to re-parent a running vlan interface commit - 21775861a453dd25aacb50e76637bdec1d1a31cf commit + aafa5b9ebad920af7c6ff22c6e16ac75799c7ba4 blob - 031502710a5c7be123a4d9e6bd7367f75378b4f7 blob + 29f1c615442fac653bde22d3c8cf5420169066c4 --- if.c +++ if.c @@ -2374,9 +2374,13 @@ intparent(char *ifname, int ifs, int argc, char **argv return 0; } - if (ioctl(ifs, set ? SIOCSIFPARENT : SIOCDIFPARENT, &ifp) == -1) + if (ioctl(ifs, set ? SIOCSIFPARENT : SIOCDIFPARENT, &ifp) == -1) { printf("%% intparent: SIOC%sIFPARENT: %s\n", set ? "S" : "D", strerror(errno)); + if (errno == EBUSY) + printf("%% 'shutdown %s' required before the parent " + "interface can be changed\n", ifname); + } return 0; }