procstat_files.c (175515) | procstat_files.c (176107) |
---|---|
1/*- 2 * Copyright (c) 2007 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2007 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.bin/procstat/procstat_files.c 175515 2008-01-20 19:57:33Z rwatson $ | 26 * $FreeBSD: head/usr.bin/procstat/procstat_files.c 176107 2008-02-08 11:03:05Z dwmalone $ |
27 */ 28 29#include <sys/types.h> 30#include <sys/socket.h> 31#include <sys/sysctl.h> 32#include <sys/un.h> 33#include <sys/user.h> 34 --- 94 unchanged lines hidden (view full) --- 129 addr_to_string(ss, addr, sizeof(addr)); 130 printf("%s", addr); 131} 132 133void 134procstat_files(pid_t pid, struct kinfo_proc *kipp) 135{ 136 struct kinfo_file *freep, *kif; | 27 */ 28 29#include <sys/types.h> 30#include <sys/socket.h> 31#include <sys/sysctl.h> 32#include <sys/un.h> 33#include <sys/user.h> 34 --- 94 unchanged lines hidden (view full) --- 129 addr_to_string(ss, addr, sizeof(addr)); 130 printf("%s", addr); 131} 132 133void 134procstat_files(pid_t pid, struct kinfo_proc *kipp) 135{ 136 struct kinfo_file *freep, *kif; |
137 int error, i, name[4]; | 137 int error, name[4]; 138 unsigned int i; |
138 const char *str; 139 size_t len; 140 141 if (!hflag) 142 printf("%5s %-16s %3s %1s %1s %-8s %3s %7s %-3s %-12s\n", 143 "PID", "COMM", "FD", "T", "V", "FLAGS", "REF", "OFFSET", 144 "PRO", "NAME"); 145 --- 165 unchanged lines hidden --- | 139 const char *str; 140 size_t len; 141 142 if (!hflag) 143 printf("%5s %-16s %3s %1s %1s %-8s %3s %7s %-3s %-12s\n", 144 "PID", "COMM", "FD", "T", "V", "FLAGS", "REF", "OFFSET", 145 "PRO", "NAME"); 146 --- 165 unchanged lines hidden --- |