Author: des
Date: Tue Mar 25 15:35:33 2014
New Revision: 263739
URL: http://svnweb.freebsd.org/changeset/base/263739
Log:
MFH (r256768): don't report an error for no-op add / remove
Modified:
stable/9/sbin/ifconfig/ifgroup.c
Directory Properties:
stable/9/sbin/ifconfig/ (props changed)
Modified: stable/9/sbin/ifconfig/ifgroup.c
==============================================================================
--- stable/9/sbin/ifconfig/ifgroup.c Tue Mar 25 15:03:08 2014
(r263738)
+++ stable/9/sbin/ifconfig/ifgroup.c Tue Mar 25 15:35:33 2014
(r263739)
@@ -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");
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"