From owner-p4-projects@FreeBSD.ORG Wed Mar 31 20:19:45 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 79EEE16A4D1; Wed, 31 Mar 2004 20:19:45 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42AAE16A4CF for ; Wed, 31 Mar 2004 20:19:45 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34FB143D45 for ; Wed, 31 Mar 2004 20:19:45 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i314JjGe093598 for ; Wed, 31 Mar 2004 20:19:45 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i314JdNa093595 for perforce@freebsd.org; Wed, 31 Mar 2004 20:19:39 -0800 (PST) (envelope-from marcel@freebsd.org) Date: Wed, 31 Mar 2004 20:19:39 -0800 (PST) Message-Id: <200404010419.i314JdNa093595@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 50098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 04:19:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=50098 Change 50098 by marcel@marcel_nfs on 2004/03/31 20:18:42 IFC @50096 Affected files ... .. //depot/projects/gdb/bin/ps/ps.1#6 integrate .. //depot/projects/gdb/bin/ps/ps.c#6 integrate .. //depot/projects/gdb/contrib/libpcap/.cvsignore#2 integrate .. //depot/projects/gdb/contrib/libpcap/CHANGES#2 integrate .. //depot/projects/gdb/contrib/libpcap/CREDITS#2 integrate .. //depot/projects/gdb/contrib/libpcap/FILES#2 integrate .. //depot/projects/gdb/contrib/libpcap/INSTALL.txt#2 integrate .. //depot/projects/gdb/contrib/libpcap/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/libpcap/README#2 integrate .. //depot/projects/gdb/contrib/libpcap/README.Win32#1 branch .. //depot/projects/gdb/contrib/libpcap/README.aix#2 integrate .. //depot/projects/gdb/contrib/libpcap/README.dag#1 branch .. //depot/projects/gdb/contrib/libpcap/README.hpux#1 branch .. //depot/projects/gdb/contrib/libpcap/VERSION#2 integrate .. //depot/projects/gdb/contrib/libpcap/atmuni31.h#1 branch .. //depot/projects/gdb/contrib/libpcap/bpf/net/bpf.h#2 delete .. //depot/projects/gdb/contrib/libpcap/bpf/net/bpf_filter.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/bpf_dump.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/bpf_image.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/config.guess#2 integrate .. //depot/projects/gdb/contrib/libpcap/config.h.in#2 integrate .. //depot/projects/gdb/contrib/libpcap/config.sub#2 integrate .. //depot/projects/gdb/contrib/libpcap/configure#2 integrate .. //depot/projects/gdb/contrib/libpcap/configure.in#2 integrate .. //depot/projects/gdb/contrib/libpcap/etherent.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/fad-getad.c#1 branch .. //depot/projects/gdb/contrib/libpcap/fad-gifc.c#1 branch .. //depot/projects/gdb/contrib/libpcap/fad-glifc.c#1 branch .. //depot/projects/gdb/contrib/libpcap/fad-null.c#1 branch .. //depot/projects/gdb/contrib/libpcap/fad-win32.c#1 branch .. //depot/projects/gdb/contrib/libpcap/gencode.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/gencode.h#2 integrate .. //depot/projects/gdb/contrib/libpcap/grammar.y#2 integrate .. //depot/projects/gdb/contrib/libpcap/inet.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/lbl/os-aix4.h#1 branch .. //depot/projects/gdb/contrib/libpcap/lbl/os-hpux11.h#1 branch .. //depot/projects/gdb/contrib/libpcap/lbl/os-osf5.h#1 branch .. //depot/projects/gdb/contrib/libpcap/nametoaddr.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/nlpid.h#2 integrate .. //depot/projects/gdb/contrib/libpcap/optimize.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-bpf.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-bpf.h#1 branch .. //depot/projects/gdb/contrib/libpcap/pcap-dag.c#1 branch .. //depot/projects/gdb/contrib/libpcap/pcap-dag.h#1 branch .. //depot/projects/gdb/contrib/libpcap/pcap-dlpi.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-enet.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-int.h#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-linux.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-nit.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-null.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-pf.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-snit.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-snoop.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap-stdinc.h#1 branch .. //depot/projects/gdb/contrib/libpcap/pcap-win32.c#1 branch .. //depot/projects/gdb/contrib/libpcap/pcap.3#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/pcap.h#2 integrate .. //depot/projects/gdb/contrib/libpcap/pf.h#1 branch .. //depot/projects/gdb/contrib/libpcap/rawss7.h#1 branch .. //depot/projects/gdb/contrib/libpcap/savefile.c#2 integrate .. //depot/projects/gdb/contrib/libpcap/scanner.l#2 integrate .. //depot/projects/gdb/contrib/libpcap/sll.h#2 integrate .. //depot/projects/gdb/contrib/libpcap/snprintf.c#1 branch .. //depot/projects/gdb/contrib/libpcap/sunatmpos.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/CHANGES#2 integrate .. //depot/projects/gdb/contrib/tcpdump/CREDITS#2 integrate .. //depot/projects/gdb/contrib/tcpdump/FILES#2 integrate .. //depot/projects/gdb/contrib/tcpdump/INSTALL#2 integrate .. //depot/projects/gdb/contrib/tcpdump/Makefile.in#2 integrate .. //depot/projects/gdb/contrib/tcpdump/README#2 integrate .. //depot/projects/gdb/contrib/tcpdump/Readme.Win32#1 branch .. //depot/projects/gdb/contrib/tcpdump/VERSION#2 integrate .. //depot/projects/gdb/contrib/tcpdump/acconfig.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/addrtoname.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/aodv.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/appletalk.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/arcnet.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/atm.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/atmuni31.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/bootp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/bpf_dump.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/config.guess#2 integrate .. //depot/projects/gdb/contrib/tcpdump/config.h.in#2 integrate .. //depot/projects/gdb/contrib/tcpdump/config.sub#2 integrate .. //depot/projects/gdb/contrib/tcpdump/configure#2 integrate .. //depot/projects/gdb/contrib/tcpdump/configure.in#2 integrate .. //depot/projects/gdb/contrib/tcpdump/decnet.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/enc.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/ether.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ethertype.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/extract.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/fddi.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/gmpls.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/gmpls.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/gmt2local.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/icmp6.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ieee802_11.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/igrp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/interface.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ip.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ip6.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ipfc.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/ipproto.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/ipsec_doi.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ipx.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/isakmp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/lane.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/lbl/os-osf4.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/llc.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/machdep.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/addrinfo.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/addrsize.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/bittypes.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/datalinks.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/missing/dlnames.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/missing/getaddrinfo.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/getnameinfo.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/inet_aton.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/inet_ntop.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/inet_pton.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/resolv6.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/resolv_ext.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/snprintf.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/sockstorage.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/strlcat.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/strlcpy.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/missing/strsep.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/nameser.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/netbios.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/nfs.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/nfsfh.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ntp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/oakley.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ospf.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/ospf6.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/oui.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/oui.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/parsenfsfh.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/pcap-missing.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/pf.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/ppp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-802_11.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ah.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-aodv.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-ap1394.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-arcnet.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-arp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ascii.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-atalk.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-atm.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-beep.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-bfd.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-bgp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-bootp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-cdp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-chdlc.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-cip.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-cnfp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-decnet.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-dhcp6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-domain.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-dvmrp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-egp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-enc.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-esp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ether.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-fddi.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-fr.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-frag6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-gre.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-hsrp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-icmp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-icmp6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-igmp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-igrp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ip.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ip6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ip6opts.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ipcomp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ipfc.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-ipx.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-isakmp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-isoclns.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-krb.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-l2tp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-lane.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-lcp.c#2 delete .. //depot/projects/gdb/contrib/tcpdump/print-ldp.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-llc.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-lwres.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-mobile.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-mobility.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-mpls.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-msdp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-netbios.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-nfs.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ntp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-null.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ospf.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ospf6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-pflog.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-pim.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ppp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-pppoe.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-pptp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-radius.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-raw.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-rip.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-ripng.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-rsvp.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-rt6.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-rx.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-sctp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-sl.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-sll.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-smb.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-snmp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-stp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-sunatm.c#1 branch .. //depot/projects/gdb/contrib/tcpdump/print-sunrpc.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-tcp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-telnet.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-tftp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-timed.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-token.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-udp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-vjc.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-vrrp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-wb.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/print-zephyr.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/route6d.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/rx.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/sctpConstants.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/sctpHeader.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/setsignal.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/sll.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/smb.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/smbutil.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/strcasecmp.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/tcp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/tcpdump-stdinc.h#1 branch .. //depot/projects/gdb/contrib/tcpdump/tcpdump.1#2 integrate .. //depot/projects/gdb/contrib/tcpdump/tcpdump.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/telnet.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/timed.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/token.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/udp.h#2 integrate .. //depot/projects/gdb/contrib/tcpdump/util.c#2 integrate .. //depot/projects/gdb/contrib/tcpdump/vfprintf.c#2 integrate .. //depot/projects/gdb/etc/master.passwd#3 integrate .. //depot/projects/gdb/etc/mtree/BSD.local.dist#4 integrate .. //depot/projects/gdb/etc/mtree/BSD.usr.dist#4 integrate .. //depot/projects/gdb/etc/rc.d/initdiskless#5 integrate .. //depot/projects/gdb/etc/rc.d/ntpdate#5 integrate .. //depot/projects/gdb/lib/libalias/Makefile#3 integrate .. //depot/projects/gdb/lib/libalias/alias.c#4 integrate .. //depot/projects/gdb/lib/libalias/alias_local.h#4 integrate .. //depot/projects/gdb/lib/libalias/alias_pptp.c#4 integrate .. //depot/projects/gdb/lib/libalias/alias_util.c#4 integrate .. //depot/projects/gdb/lib/libc/amd64/gen/makecontext.c#2 integrate .. //depot/projects/gdb/lib/libc/amd64/gen/signalcontext.c#2 integrate .. //depot/projects/gdb/lib/libc/include/nss_tls.h#2 integrate .. //depot/projects/gdb/lib/libc/locale/Makefile.inc#2 integrate .. //depot/projects/gdb/lib/libc/locale/ctype.3#2 integrate .. //depot/projects/gdb/lib/libc/locale/digittoint.3#2 integrate .. //depot/projects/gdb/lib/libc/locale/isdigit.3#2 integrate .. //depot/projects/gdb/lib/libc/locale/isideogram.3#1 branch .. //depot/projects/gdb/lib/libc/locale/isphonogram.3#1 branch .. //depot/projects/gdb/lib/libc/locale/isrune.3#1 branch .. //depot/projects/gdb/lib/libc/locale/isspecial.3#1 branch .. //depot/projects/gdb/lib/libc/locale/isxdigit.3#2 integrate .. //depot/projects/gdb/lib/libc/net/nsdispatch.c#3 integrate .. //depot/projects/gdb/lib/libc/net/nss_compat.c#2 integrate .. //depot/projects/gdb/lib/libdisk/Makefile#3 integrate .. //depot/projects/gdb/lib/libdisk/disk.c#2 integrate .. //depot/projects/gdb/lib/libdisk/libdisk.h#3 integrate .. //depot/projects/gdb/lib/libdisk/open_disk.c#3 integrate .. //depot/projects/gdb/lib/libdisk/rules.c#3 integrate .. //depot/projects/gdb/lib/libdisk/write_i386_disk.c#2 integrate .. //depot/projects/gdb/lib/libdisk/write_pc98_disk.c#2 integrate .. //depot/projects/gdb/lib/libkvm/kvm_proc.c#3 integrate .. //depot/projects/gdb/lib/libpcap/Makefile#2 integrate .. //depot/projects/gdb/lib/libpcap/config.h#2 integrate .. //depot/projects/gdb/lib/libthr/thread/Makefile.inc#3 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_cond.c#3 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_create.c#3 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_detach.c#2 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_exit.c#3 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_gc.c#2 delete .. //depot/projects/gdb/lib/libthr/thread/thr_init.c#3 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_join.c#2 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_mattr_kind_np.c#2 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#4 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_private.h#4 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_sig.c#4 integrate .. //depot/projects/gdb/libexec/fingerd/Makefile#2 integrate .. //depot/projects/gdb/libexec/fingerd/fingerd.c#2 integrate .. //depot/projects/gdb/libexec/rtld-elf/rtld.c#4 integrate .. //depot/projects/gdb/release/doc/en_US.ISO8859-1/errata/article.sgml#4 integrate .. //depot/projects/gdb/sbin/bsdlabel/bsdlabel.8#2 integrate .. //depot/projects/gdb/sbin/bsdlabel/bsdlabel.c#3 integrate .. //depot/projects/gdb/sbin/fsck_ffs/pass5.c#3 integrate .. //depot/projects/gdb/sbin/ifconfig/ifconfig.8#4 integrate .. //depot/projects/gdb/sbin/ifconfig/ifconfig.c#6 integrate .. //depot/projects/gdb/sbin/ifconfig/ifconfig.h#3 integrate .. //depot/projects/gdb/sbin/ifconfig/ifieee80211.c#2 integrate .. //depot/projects/gdb/secure/lib/libcrypto/Makefile.inc#3 integrate .. //depot/projects/gdb/share/man/man4/ieee80211.4#2 integrate .. //depot/projects/gdb/share/man/man4/ng_sppp.4#1 branch .. //depot/projects/gdb/share/man/man4/polling.4#3 integrate .. //depot/projects/gdb/share/man/man5/rc.conf.5#6 integrate .. //depot/projects/gdb/share/man/man9/copy.9#2 integrate .. //depot/projects/gdb/share/man/man9/ieee80211_radiotap.9#2 integrate .. //depot/projects/gdb/share/monetdef/Makefile#4 integrate .. //depot/projects/gdb/share/monetdef/ja_JP.UTF-8.src#1 branch .. //depot/projects/gdb/share/monetdef/ko_KR.UTF-8.src#1 branch .. //depot/projects/gdb/sys/alpha/alpha/vm_machdep.c#3 integrate .. //depot/projects/gdb/sys/alpha/linux/linux_dummy.c#2 integrate .. //depot/projects/gdb/sys/alpha/linux/linux_proto.h#4 integrate .. //depot/projects/gdb/sys/alpha/linux/linux_syscall.h#4 integrate .. //depot/projects/gdb/sys/alpha/linux/linux_sysent.c#4 integrate .. //depot/projects/gdb/sys/alpha/linux/syscalls.master#4 integrate .. //depot/projects/gdb/sys/amd64/amd64/pmap.c#4 integrate .. //depot/projects/gdb/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/gdb/sys/amd64/amd64/vm_machdep.c#5 integrate .. //depot/projects/gdb/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/gdb/sys/compat/linprocfs/linprocfs.c#3 integrate .. //depot/projects/gdb/sys/compat/ndis/kern_ndis.c#8 integrate .. //depot/projects/gdb/sys/compat/ndis/ndis_var.h#4 integrate .. //depot/projects/gdb/sys/compat/ndis/ntoskrnl_var.h#6 integrate .. //depot/projects/gdb/sys/compat/ndis/resource_var.h#2 integrate .. //depot/projects/gdb/sys/conf/NOTES#8 integrate .. //depot/projects/gdb/sys/conf/files.i386#8 integrate .. //depot/projects/gdb/sys/conf/kern.pre.mk#7 integrate .. //depot/projects/gdb/sys/conf/options#9 integrate .. //depot/projects/gdb/sys/contrib/dev/oltr/if_oltr.c#3 integrate .. //depot/projects/gdb/sys/contrib/pf/net/pf.c#3 integrate .. //depot/projects/gdb/sys/contrib/pf/net/pf_ioctl.c#4 integrate .. //depot/projects/gdb/sys/dev/acpica/acpi.c#7 integrate .. //depot/projects/gdb/sys/dev/acpica/acpi_pci.c#3 integrate .. //depot/projects/gdb/sys/dev/acpica/acpi_resource.c#3 integrate .. //depot/projects/gdb/sys/dev/acpica/acpivar.h#5 integrate .. //depot/projects/gdb/sys/dev/ath/if_ath.c#4 integrate .. //depot/projects/gdb/sys/dev/ath/if_athvar.h#2 integrate .. //depot/projects/gdb/sys/dev/if_ndis/if_ndis.c#8 integrate .. //depot/projects/gdb/sys/dev/md/md.c#5 integrate .. //depot/projects/gdb/sys/dev/nge/if_nge.c#3 integrate .. //depot/projects/gdb/sys/dev/sound/pci/ich.c#4 integrate .. //depot/projects/gdb/sys/dev/twa/twa.c#1 branch .. //depot/projects/gdb/sys/dev/twa/twa.h#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_cam.c#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_externs.h#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_freebsd.c#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_fwimg.c#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_globals.c#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_includes.h#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_ioctl.h#1 branch .. //depot/projects/gdb/sys/dev/twa/twa_reg.h#1 branch .. //depot/projects/gdb/sys/dev/wi/if_wi.c#4 integrate .. //depot/projects/gdb/sys/dev/wi/if_wivar.h#2 integrate .. //depot/projects/gdb/sys/fs/fifofs/fifo_vnops.c#2 integrate .. //depot/projects/gdb/sys/fs/portalfs/portal_vnops.c#3 integrate .. //depot/projects/gdb/sys/fs/procfs/procfs_status.c#2 integrate .. //depot/projects/gdb/sys/fs/udf/udf_vfsops.c#2 integrate .. //depot/projects/gdb/sys/fs/udf/udf_vnops.c#3 integrate .. //depot/projects/gdb/sys/fs/umapfs/umap_vnops.c#2 integrate .. //depot/projects/gdb/sys/geom/geom_apple.c#3 integrate .. //depot/projects/gdb/sys/i386/conf/GENERIC#4 integrate .. //depot/projects/gdb/sys/i386/i386/vm_machdep.c#6 integrate .. //depot/projects/gdb/sys/i386/ibcs2/ibcs2_proto.h#3 integrate .. //depot/projects/gdb/sys/i386/ibcs2/ibcs2_syscall.h#3 integrate .. //depot/projects/gdb/sys/i386/ibcs2/ibcs2_sysent.c#3 integrate .. //depot/projects/gdb/sys/i386/ibcs2/syscalls.master#3 integrate .. //depot/projects/gdb/sys/i386/linux/linux_dummy.c#2 integrate .. //depot/projects/gdb/sys/i386/linux/linux_proto.h#4 integrate .. //depot/projects/gdb/sys/i386/linux/linux_syscall.h#4 integrate .. //depot/projects/gdb/sys/i386/linux/linux_sysent.c#4 integrate .. //depot/projects/gdb/sys/i386/linux/syscalls.master#4 integrate .. //depot/projects/gdb/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/gdb/sys/kern/kern_exec.c#5 integrate .. //depot/projects/gdb/sys/kern/kern_proc.c#4 integrate .. //depot/projects/gdb/sys/kern/kern_sig.c#4 integrate .. //depot/projects/gdb/sys/kern/subr_param.c#4 integrate .. //depot/projects/gdb/sys/kern/subr_trap.c#5 integrate .. //depot/projects/gdb/sys/kern/sys_socket.c#2 integrate .. //depot/projects/gdb/sys/kern/uipc_domain.c#2 integrate .. //depot/projects/gdb/sys/kern/uipc_socket.c#4 integrate .. //depot/projects/gdb/sys/kern/uipc_syscalls.c#5 integrate .. //depot/projects/gdb/sys/kern/uipc_usrreq.c#4 integrate .. //depot/projects/gdb/sys/kern/vfs_default.c#2 integrate .. //depot/projects/gdb/sys/kern/vfs_subr.c#5 integrate .. //depot/projects/gdb/sys/libkern/index.c#2 integrate .. //depot/projects/gdb/sys/libkern/rindex.c#2 integrate .. //depot/projects/gdb/sys/modules/Makefile#7 integrate .. //depot/projects/gdb/sys/modules/twa/Makefile#1 branch .. //depot/projects/gdb/sys/net/bpf.h#3 integrate .. //depot/projects/gdb/sys/net/bpfdesc.h#3 integrate .. //depot/projects/gdb/sys/net/if_sl.c#2 integrate .. //depot/projects/gdb/sys/net/if_tun.c#4 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.c#3 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.h#2 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_node.c#2 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_proto.c#2 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_var.h#3 integrate .. //depot/projects/gdb/sys/netinet/ip_input.c#4 integrate .. //depot/projects/gdb/sys/netinet/tcp_usrreq.c#4 integrate .. //depot/projects/gdb/sys/pc98/conf/NOTES#5 integrate .. //depot/projects/gdb/sys/pc98/i386/machdep.c#4 integrate .. //depot/projects/gdb/sys/pc98/pc98/clock.c#3 integrate .. //depot/projects/gdb/sys/pc98/pc98/fd.c#4 integrate .. //depot/projects/gdb/sys/pci/if_sk.c#4 integrate .. //depot/projects/gdb/sys/pci/if_skreg.h#2 integrate .. //depot/projects/gdb/sys/pci/if_ste.c#4 integrate .. //depot/projects/gdb/sys/pci/if_stereg.h#2 integrate .. //depot/projects/gdb/sys/powerpc/powermac/ata_kauai.c#3 integrate .. //depot/projects/gdb/sys/powerpc/powerpc/vm_machdep.c#4 integrate .. //depot/projects/gdb/sys/sparc64/sparc64/vm_machdep.c#4 integrate .. //depot/projects/gdb/sys/sys/mutex.h#3 integrate .. //depot/projects/gdb/sys/sys/proc.h#9 integrate .. //depot/projects/gdb/sys/sys/tree.h#4 integrate .. //depot/projects/gdb/sys/sys/un.h#2 integrate .. //depot/projects/gdb/sys/sys/vnode.h#3 integrate .. //depot/projects/gdb/tools/lib32/README#1 branch .. //depot/projects/gdb/tools/lib32/build32.sh#1 branch .. //depot/projects/gdb/tools/tools/README#2 integrate .. //depot/projects/gdb/tools/tools/gdb_regofs/Makefile#1 branch .. //depot/projects/gdb/tools/tools/gdb_regofs/ia64.c#1 branch .. //depot/projects/gdb/tools/tools/nanobsd/i386.diskimage#3 integrate .. //depot/projects/gdb/tools/tools/tinderbox/tinderbox.pl#5 integrate .. //depot/projects/gdb/usr.bin/calendar/calendar.1#2 integrate .. //depot/projects/gdb/usr.bin/pkill/pkill.c#2 integrate .. //depot/projects/gdb/usr.sbin/adduser/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/adduser/adduser.8#3 integrate .. //depot/projects/gdb/usr.sbin/adduser/adduser.conf.5#1 branch .. //depot/projects/gdb/usr.sbin/adduser/adduser.sh#3 integrate .. //depot/projects/gdb/usr.sbin/diskinfo/diskinfo.8#2 integrate .. //depot/projects/gdb/usr.sbin/diskinfo/diskinfo.c#2 integrate .. //depot/projects/gdb/usr.sbin/fdcontrol/Makefile#3 integrate .. //depot/projects/gdb/usr.sbin/fdformat/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/fdread/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/fdread/fdutil.c#3 integrate .. //depot/projects/gdb/usr.sbin/ndp/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/nfsd/nfsd.8#2 integrate .. //depot/projects/gdb/usr.sbin/pkg_install/info/main.c#2 integrate .. //depot/projects/gdb/usr.sbin/pkg_install/info/pkg_info.1#2 integrate .. //depot/projects/gdb/usr.sbin/setkey/parse.y#3 integrate .. //depot/projects/gdb/usr.sbin/tcpdump/tcpdump/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/tcpdump/tcpdump/config.h#2 integrate Differences ... ==== //depot/projects/gdb/bin/ps/ps.1#6 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 -.\" $FreeBSD: src/bin/ps/ps.1,v 1.72 2004/03/27 18:26:40 gad Exp $ +.\" $FreeBSD: src/bin/ps/ps.1,v 1.73 2004/03/31 23:51:12 gad Exp $ .\" .Dd March 27, 2004 .Dt PS 1 @@ -67,10 +67,9 @@ The .Nm utility -displays a header line followed by lines containing information about your +displays a header line, followed by lines containing information about +all of your processes that have controlling terminals. -This information is sorted by controlling terminal, then by process -.Tn ID . .Pp A different set of processes can be selected for display by using any combination of the @@ -83,6 +82,24 @@ will select all processes which are matched by at least one of the given options. .Pp +For the processes which have been selected for display, +.Nm +will usually display one line per process. +The +.Fl H +option may result in multiple output lines (one line per thread) for +some processes. +By default all of these output lines are sorted first by controlling +terminal, then by process +.Tn ID . +The +.Fl m, r, u, +and +.Fl v +options will change the sort order. +If more than one sorting option was given, then the selected processes +will be sorted by the last sorting option which was specified. +.Pp For the processes which have been selected for display, the information to display is selected based on a set of keywords (see the .Fl L @@ -141,7 +158,11 @@ Print information associated with the following keywords: user, pid, ppid, pgid, jobc, state, tt, time and command. .It Fl L -List the set of available keywords. +List the set of keywords available for the +.Fl O +and +.Fl o +options. .It Fl l Display information associated with the following keywords: uid, pid, ppid, cpu, pri, nice, vsz, rss, mwchan, state, tt, time @@ -150,7 +171,8 @@ Extract values associated with the name list from the specified core instead of the currently running system. .It Fl m -Sort by memory usage, instead of by process +Sort by memory usage, instead of the combination of controlling +terminal and process .Tn ID . .It Fl N Extract the name list from the specified system instead of the default, @@ -177,7 +199,8 @@ Display information about processes which match the specified process .Tn ID(s) . .It Fl r -Sort by current cpu usage, instead of by process +Sort by current cpu usage, instead of the combination of controlling +terminal and process .Tn ID . .It Fl S Change the way the process time is calculated by summing all exited ==== //depot/projects/gdb/bin/ps/ps.c#6 (text+ko) ==== @@ -51,9 +51,10 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.72 2004/03/28 03:00:56 gad Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.84 2004/03/30 04:20:33 gad Exp $"); #include +#include #include #include #include @@ -80,21 +81,36 @@ #define W_SEP " \t" /* "Whitespace" list separators */ #define T_SEP "," /* "Terminate-element" list separators */ -static KINFO *kinfo; +#ifdef LAZY_PS +#define DEF_UREAD 0 +#define OPT_LAZY_f "f" +#else +#define DEF_UREAD 1 /* Always do the more-expensive read. */ +#define OPT_LAZY_f /* I.e., the `-f' option is not added. */ +#endif + +int cflag; /* -c */ +int eval; /* Exit value */ +time_t now; /* Current time(3) value */ +int rawcpu; /* -C */ +int sumrusage; /* -S */ +int termwidth; /* Width of the screen (0 == infinity). */ +int totwidth; /* Calculated-width of requested variables. */ + struct varent *vhead; -int eval; /* exit value */ -int cflag; /* -c */ -int optfatal; /* Fatal error parsing some list-option */ -int rawcpu; /* -C */ -int sumrusage; /* -S */ -int termwidth; /* width of screen (0 == infinity) */ -int totwidth; /* calculated width of requested variables */ +static int forceuread = DEF_UREAD; /* Do extra work to get u-area. */ +static kvm_t *kd; +static KINFO *kinfo; +static int needcomm; /* -o "command" */ +static int needenv; /* -e */ +static int needuser; /* -o "user" */ +static int optfatal; /* Fatal error parsing some list-option. */ -time_t now; /* current time(3) value */ +static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT; struct listinfo; -typedef int addelem_rtn(struct listinfo *_inf, const char *elem); +typedef int addelem_rtn(struct listinfo *_inf, const char *_elem); struct listinfo { int count; @@ -111,48 +127,36 @@ }; }; -static int needuser, needcomm, needenv; - -#ifdef LAZY_PS -static int forceuread = 0; -#define OPT_LAZY_f "f" -#else -static int forceuread = 1; -#define OPT_LAZY_f /* Ie, the `-f' option is not added. */ -#endif - -static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT; - -static const char *fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int), - KINFO *, char *, int); -static char *kludge_oldps_options(char *); -static int pscomp(const void *, const void *); -static void saveuser(KINFO *); -static void scanvars(void); -static void dynsizevars(KINFO *); -static void sizevars(void); -static void usage(void); - static int addelem_gid(struct listinfo *, const char *); static int addelem_pid(struct listinfo *, const char *); static int addelem_tty(struct listinfo *, const char *); static int addelem_uid(struct listinfo *, const char *); static void add_list(struct listinfo *, const char *); +static void dynsizevars(KINFO *); static void *expand_list(struct listinfo *); +static const char * + fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int), + KINFO *, char *, int); static void free_list(struct listinfo *); static void init_list(struct listinfo *, addelem_rtn, int, const char *); +static char *kludge_oldps_options(char *); +static int pscomp(const void *, const void *); +static void saveuser(KINFO *); +static void scanvars(void); +static void sizevars(void); +static void usage(void); static char dfmt[] = "pid,tt,state,time,command"; static char jfmt[] = "user,pid,ppid,pgid,jobc,state,tt,time,command"; -static char lfmt[] = "uid,pid,ppid,cpu,pri,nice,vsz,rss,mwchan,state,tt,time,command"; +static char lfmt[] = "uid,pid,ppid,cpu,pri,nice,vsz,rss,mwchan,state," + "tt,time,command"; static char o1[] = "pid"; static char o2[] = "tt,state,time,command"; static char ufmt[] = "user,pid,%cpu,%mem,vsz,rss,tt,state,start,time,command"; -static char vfmt[] = "pid,state,time,sl,re,pagein,vsz,rss,lim,tsiz,%cpu,%mem,command"; +static char vfmt[] = "pid,state,time,sl,re,pagein,vsz,rss,lim,tsiz," + "%cpu,%mem,command"; static char Zfmt[] = "label"; -static kvm_t *kd; - #define PS_ARGS "AaCc" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" int @@ -163,16 +167,15 @@ struct kinfo_proc *kp; struct varent *vent; struct winsize ws; + const char *cp, *nlistf, *memf; + char *cols; int all, ch, dropgid, elem, flag, _fmt, i, lineno; int nentries, nocludge, nkept, nselectors; int prtheader, showthreads, wflag, what, xkeep, xkeep_implied; - char *cols; char errbuf[_POSIX2_LINE_MAX]; - const char *cp, *nlistf, *memf; (void) setlocale(LC_ALL, ""); - /* Set the time to what it is right now. */ - time(&now); + time(&now); /* Used by routines in print.c. */ if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0') termwidth = atoi(cols); @@ -204,8 +207,9 @@ argv[1] = kludge_oldps_options(argv[1]); } - xkeep = -1; /* Neither -x nor -X */ - all = _fmt = nselectors = prtheader = wflag = xkeep_implied = 0; + all = dropgid = _fmt = nselectors = optfatal = 0; + prtheader = showthreads = wflag = xkeep_implied = 0; + xkeep = -1; /* Neither -x nor -X. */ init_list(&gidlist, addelem_gid, sizeof(gid_t), "group"); init_list(&pgrplist, addelem_pid, sizeof(pid_t), "process group"); init_list(&pidlist, addelem_pid, sizeof(pid_t), "process id"); @@ -213,10 +217,7 @@ init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id"); init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); - dropgid = 0; - optfatal = 0; memf = nlistf = _PATH_DEVNULL; - showthreads = 0; while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch((char)ch) { case 'A': @@ -244,7 +245,7 @@ #ifdef LAZY_PS case 'f': if (getuid() == 0 || getgid() == 0) - forceuread = 1; + forceuread = 1; break; #endif case 'G': @@ -252,17 +253,19 @@ xkeep_implied = 1; nselectors++; break; + case 'g': #if 0 - /* XXX - This SUSv3 option is still under debate. */ - /* (it conflicts with the undocumented `-g' option) */ - case 'g': + /*- + * XXX - This SUSv3 behavior is still under debate + * since it conflicts with the (undocumented) + * `-g' option. So we skip it for now. + */ add_list(&pgrplist, optarg); xkeep_implied = 1; nselectors++; break; #else - case 'g': - /* Historical BSD-ish (from SunOS) option */ + /* The historical BSD-ish (from SunOS) behavior. */ break; /* no-op */ #endif case 'H': @@ -317,9 +320,14 @@ nselectors++; break; #if 0 - /* XXX - This un-standard option is still under debate. */ case 'R': - /* This is what SUSv3 defines as the `-U' option. */ + /*- + * XXX - This un-standard option is still under + * debate. This is what SUSv3 defines as + * the `-U' option, and while it would be + * nice to have, it could cause even more + * confusion to implement it as `-R'. + */ add_list(&ruidlist, optarg); xkeep_implied = 1; nselectors++; @@ -332,10 +340,13 @@ sumrusage = 1; break; #if 0 - /* XXX - This non-standard option is still under debate. */ - /* (it conflicts with `-s' in NetBSD) */ case 's': - /* As seen on Solaris, Linux, IRIX. */ + /*- + * XXX - This non-standard option is still under + * debate. This *is* supported on Solaris, + * Linux, and IRIX, but conflicts with `-s' + * on NetBSD and maybe some older BSD's. + */ add_list(&sesslist, optarg); xkeep_implied = 1; nselectors++; @@ -402,20 +413,17 @@ } argc -= optind; argv += optind; - if (optfatal) - exit(1); /* Error messages already printed */ - - if (xkeep < 0) /* Neither -X nor -x was specified */ + exit(1); /* Error messages already printed. */ + if (xkeep < 0) /* Neither -X nor -x was specified. */ xkeep = xkeep_implied; #define BACKWARD_COMPATIBILITY #ifdef BACKWARD_COMPATIBILITY if (*argv) { nlistf = *argv; - if (*++argv) { + if (*++argv) memf = *argv; - } } #endif /* @@ -472,7 +480,11 @@ what = KERN_PROC_RUID | showthreads; flag = *ruidlist.uids; nselectors = 0; -#if 0 /* XXX - KERN_PROC_SESSION causes error in kvm_getprocs? */ +#if 0 + /*- + * XXX - KERN_PROC_SESSION causes error in kvm_getprocs? + * For now, always do sid-matching in this routine. + */ } else if (sesslist.count == 1) { what = KERN_PROC_SESSION | showthreads; flag = *sesslist.pids; @@ -497,7 +509,7 @@ */ nentries = -1; kp = kvm_getprocs(kd, what, flag, &nentries); - if ((kp == 0 && nentries > 0) || (kp != 0 && nentries < 0)) + if ((kp == NULL && nentries > 0) || (kp != NULL && nentries < 0)) errx(1, "%s", kvm_geterr(kd)); nkept = 0; if (nentries > 0) { @@ -615,9 +627,9 @@ addelem_gid(struct listinfo *inf, const char *elem) { struct group *grp; - intmax_t ltemp; const char *nameorID; char *endp; + u_long bigtemp; if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') @@ -625,7 +637,7 @@ else warnx("%s name too long: %s", inf->lname, elem); optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } /* @@ -640,17 +652,17 @@ grp = NULL; nameorID = "named"; errno = 0; - ltemp = strtol(elem, &endp, 10); - if (errno == 0 && *endp == '\0' && ltemp >= 0 && ltemp <= GID_MAX) { + bigtemp = strtoul(elem, &endp, 10); + if (errno == 0 && *endp == '\0' && bigtemp <= GID_MAX) { nameorID = "name or ID matches"; - grp = getgrgid((gid_t)ltemp); + grp = getgrgid((gid_t)bigtemp); } if (grp == NULL) grp = getgrnam(elem); if (grp == NULL) { warnx("No %s %s '%s'", inf->lname, nameorID, elem); optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } if (inf->count >= inf->maxcount) @@ -659,12 +671,12 @@ return (1); } -#define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h */ +#define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h. */ static int addelem_pid(struct listinfo *inf, const char *elem) { + char *endp; long tempid; - char *endp; if (*elem == '\0') tempid = 0L; @@ -680,7 +692,7 @@ } if (errno == ERANGE) { optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } } @@ -694,9 +706,9 @@ static int addelem_tty(struct listinfo *inf, const char *elem) { + const char *ttypath; + struct stat sb; char pathbuf[PATH_MAX]; - struct stat sb; - const char *ttypath; if (strcmp(elem, "co") == 0) ttypath = strdup(_PATH_CONSOLE); @@ -711,12 +723,12 @@ if (stat(ttypath, &sb) == -1) { warn("%s", ttypath); optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } if (!S_ISCHR(sb.st_mode)) { warn("%s: Not a terminal", ttypath); optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } if (inf->count >= inf->maxcount) @@ -729,8 +741,8 @@ addelem_uid(struct listinfo *inf, const char *elem) { struct passwd *pwd; - intmax_t ltemp; char *endp; + u_long bigtemp; if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') @@ -738,19 +750,18 @@ else warnx("%s name too long: %s", inf->lname, elem); optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } pwd = getpwnam(elem); if (pwd == NULL) { errno = 0; - ltemp = strtol(elem, &endp, 10); - if (errno != 0 || *endp != '\0' || ltemp < 0 || - ltemp > UID_MAX) + bigtemp = strtoul(elem, &endp, 10); + if (errno != 0 || *endp != '\0' || bigtemp > UID_MAX) warnx("No %s named '%s'", inf->lname, elem); else { /* The string is all digits, so it might be a userID. */ - pwd = getpwuid((uid_t)ltemp); + pwd = getpwuid((uid_t)bigtemp); if (pwd == NULL) warnx("No %s name or ID matches '%s'", inf->lname, elem); @@ -763,7 +774,7 @@ * errors (and the command will be aborted). */ optfatal = 1; - return (0); /* Do not add this value */ + return (0); /* Do not add this value. */ } if (inf->count >= inf->maxcount) @@ -775,10 +786,10 @@ static void add_list(struct listinfo *inf, const char *argp) { - char elemcopy[PATH_MAX]; const char *savep; char *cp, *endp; int toolong; + char elemcopy[PATH_MAX]; while (*argp != '\0') { while (*argp != '\0' && strchr(W_SEP, *argp) != NULL) @@ -797,17 +808,24 @@ if (!toolong) { *cp = '\0'; #ifndef ADD_PS_LISTRESET - /* This is how the standard expects lists to be handled. */ + /* + * This is how the standard expects lists to + * be handled. + */ inf->addelem(inf, elemcopy); #else - /* - * This would add a simple non-standard-but-convienent feature. - * - * XXX - Adding this check increased the total size of `ps' by - * 3940 bytes on i386! That's 12% of the entire program! - * The `ps.o' file grew by only about 40 bytes, but the - * final (stripped) executable in /bin/ps grew by 12%. - */ + /*- + * This would add a simple non-standard-but-convienent + * feature. + * + * XXX - The first time I tried to add this check, + * it increased the total size of `ps' by 3940 + * bytes on i386! That's 12% of the entire + * program! The `ps.o' file grew by only about + * 40 bytes, but the final (stripped) executable + * in /bin/ps grew by 12%. I have not had time + * to investigate, so skip the feature for now. >>> TRUNCATED FOR MAIL (1000 lines) <<<