linprocfs.c (105663) | linprocfs.c (108172) |
---|---|
1/* 2 * Copyright (c) 2000 Dag-Erling Co�dan Sm�rgrav 3 * Copyright (c) 1999 Pierre Beyssac 4 * Copyright (c) 1993 Jan-Simon Pendry 5 * Copyright (c) 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 40 * | 1/* 2 * Copyright (c) 2000 Dag-Erling Co�dan Sm�rgrav 3 * Copyright (c) 1999 Pierre Beyssac 4 * Copyright (c) 1993 Jan-Simon Pendry 5 * Copyright (c) 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 40 * |
41 * $FreeBSD: head/sys/compat/linprocfs/linprocfs.c 105663 2002-10-21 22:27:36Z julian $ | 41 * $FreeBSD: head/sys/compat/linprocfs/linprocfs.c 108172 2002-12-22 05:35:03Z hsu $ |
42 */ 43 44#include <sys/param.h> 45#include <sys/queue.h> 46#include <sys/blist.h> 47#include <sys/conf.h> 48#include <sys/dkstat.h> 49#include <sys/exec.h> --- 670 unchanged lines hidden (view full) --- 720 char ifname[16]; /* XXX LINUX_IFNAMSIZ */ 721 struct ifnet *ifp; 722 723 sbuf_printf(sb, "%6s|%58s|%s\n%6s|%58s|%58s\n", 724 "Inter-", " Receive", " Transmit", " face", 725 "bytes packets errs drop fifo frame compressed", 726 "bytes packets errs drop fifo frame compressed"); 727 | 42 */ 43 44#include <sys/param.h> 45#include <sys/queue.h> 46#include <sys/blist.h> 47#include <sys/conf.h> 48#include <sys/dkstat.h> 49#include <sys/exec.h> --- 670 unchanged lines hidden (view full) --- 720 char ifname[16]; /* XXX LINUX_IFNAMSIZ */ 721 struct ifnet *ifp; 722 723 sbuf_printf(sb, "%6s|%58s|%s\n%6s|%58s|%58s\n", 724 "Inter-", " Receive", " Transmit", " face", 725 "bytes packets errs drop fifo frame compressed", 726 "bytes packets errs drop fifo frame compressed"); 727 |
728 IFNET_RLOCK(); |
|
728 TAILQ_FOREACH(ifp, &ifnet, if_link) { 729 linux_ifname(ifp, ifname, sizeof ifname); 730 sbuf_printf(sb, "%6.6s:", ifname); 731 sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ", 732 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); 733 sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", 734 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); 735 } | 729 TAILQ_FOREACH(ifp, &ifnet, if_link) { 730 linux_ifname(ifp, ifname, sizeof ifname); 731 sbuf_printf(sb, "%6.6s:", ifname); 732 sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ", 733 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); 734 sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", 735 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); 736 } |
737 IFNET_RUNLOCK(); |
|
736 737 return (0); 738} 739 740#if 0 741extern struct cdevsw *cdevsw[]; 742 743/* --- 111 unchanged lines hidden --- | 738 739 return (0); 740} 741 742#if 0 743extern struct cdevsw *cdevsw[]; 744 745/* --- 111 unchanged lines hidden --- |