Date: Thu, 27 Feb 2014 13:08:43 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262556 - stable/10/sbin/ifconfig Message-ID: <201402271308.s1RD8hen055025@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Thu Feb 27 13:08:43 2014 New Revision: 262556 URL: http://svnweb.freebsd.org/changeset/base/262556 Log: MFH (r256768): don't report an error for no-op add / remove Modified: stable/10/sbin/ifconfig/ifgroup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifgroup.c ============================================================================== --- stable/10/sbin/ifconfig/ifgroup.c Thu Feb 27 13:05:56 2014 (r262555) +++ stable/10/sbin/ifconfig/ifgroup.c Thu Feb 27 13:08:43 2014 (r262556) @@ -57,7 +57,7 @@ setifgroup(const char *group_name, int d if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "setifgroup: group name too long"); - if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1 && errno != EEXIST) err(1," SIOCAIFGROUP"); } @@ -75,7 +75,7 @@ unsetifgroup(const char *group_name, int if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ) errx(1, "unsetifgroup: group name too long"); - if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1) + if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1 && errno != ENOENT) err(1, "SIOCDIFGROUP"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402271308.s1RD8hen055025>