From owner-svn-src-all@FreeBSD.ORG Thu Feb 19 22:42:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC515F81; Thu, 19 Feb 2015 22:42:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C71D8EF4; Thu, 19 Feb 2015 22:42:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1JMgZ4s045924; Thu, 19 Feb 2015 22:42:35 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1JMgY3e045902; Thu, 19 Feb 2015 22:42:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201502192242.t1JMgY3e045902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 19 Feb 2015 22:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279028 - in head/usr.sbin: . ifmcstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 22:42:36 -0000 Author: glebius Date: Thu Feb 19 22:42:33 2015 New Revision: 279028 URL: https://svnweb.freebsd.org/changeset/base/279028 Log: Now that IGMP and MLD sysctls provide a clean API structures that do not leak kernel internal stuff, reconnect ifmcstat(1) back to build. However, disable kvm(3) support in it, since it requires uncovering tons of _KERNEL defined declarations, which can be achieved either uncovering them globally or providing dirty hacks such as _WANT_IFADDR. If anyone demands an ifmcstat-like kvm-based tool, please take the code out of usr.sbin/ifmstat and create a tool in src/tools/tools. Modified: head/usr.sbin/Makefile head/usr.sbin/ifmcstat/Makefile head/usr.sbin/ifmcstat/ifmcstat.c Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Feb 19 22:37:01 2015 (r279027) +++ head/usr.sbin/Makefile Thu Feb 19 22:42:33 2015 (r279028) @@ -94,8 +94,6 @@ SUBDIR= adduser \ watchdogd \ zic -SUBDIR:= ${SUBDIR:Nifmcstat} - # NB: keep these sorted by MK_* knobs .if ${MK_ACCT} != "no" Modified: head/usr.sbin/ifmcstat/Makefile ============================================================================== --- head/usr.sbin/ifmcstat/Makefile Thu Feb 19 22:37:01 2015 (r279027) +++ head/usr.sbin/ifmcstat/Makefile Thu Feb 19 22:42:33 2015 (r279028) @@ -15,9 +15,4 @@ WARNS?= 2 CFLAGS+=-DINET6 .endif -.if ${MK_KVM_SUPPORT} != "no" -CFLAGS+=-DWITH_KVM -LIBADD= kvm -.endif - .include Modified: head/usr.sbin/ifmcstat/ifmcstat.c ============================================================================== --- head/usr.sbin/ifmcstat/ifmcstat.c Thu Feb 19 22:37:01 2015 (r279027) +++ head/usr.sbin/ifmcstat/ifmcstat.c Thu Feb 19 22:42:33 2015 (r279028) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define _WANT_IFADDR #include #include #include @@ -52,20 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define KERNEL -# include -#undef KERNEL -#define _KERNEL -#define SYSCTL_DECL(x) -# include -#undef SYSCTL_DECL -#undef _KERNEL +#include +#include #ifdef INET6 #include -#define _KERNEL -# include -#undef _KERNEL +#include #endif /* INET6 */ #include @@ -82,14 +73,23 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include -#include #include #include -/* XXX: This file currently assumes INET and KVM support in the base system. */ +#ifdef KVM +/* + * Currently the KVM build is broken. To be fixed it requires uncovering + * large amount of _KERNEL code in include files, and it is also very + * tentative to internal kernel ABI changes. If anyone wishes to restore + * it, please move it out of src/usr.sbin to src/tools/tools. + */ +#include +#include +#endif + +/* XXX: This file currently assumes INET support in the base system. */ #ifndef INET #define INET #endif