svn commit: r225959 - in projects/virtio: . bin/ls bin/mv bin/ps
cddl/contrib/opensolaris/lib/libzfs/common contrib/llvm
contrib/llvm/lib/Support contrib/llvm/tools/clang
contrib/sendmail/src contr...
Peter Grehan
grehan at FreeBSD.org
Tue Oct 4 04:13:35 UTC 2011
Author: grehan
Date: Tue Oct 4 04:13:34 2011
New Revision: 225959
URL: http://svn.freebsd.org/changeset/base/225959
Log:
IFC @ r225957
Added:
projects/virtio/contrib/llvm/LICENSE.TXT
- copied unchanged from r225957, head/contrib/llvm/LICENSE.TXT
projects/virtio/contrib/llvm/lib/Support/COPYRIGHT.regex
- copied unchanged from r225957, head/contrib/llvm/lib/Support/COPYRIGHT.regex
projects/virtio/contrib/llvm/tools/clang/LICENSE.TXT
- copied unchanged from r225957, head/contrib/llvm/tools/clang/LICENSE.TXT
projects/virtio/share/doc/llvm/
- copied from r225957, head/share/doc/llvm/
Deleted:
projects/virtio/lib/libftpio/
projects/virtio/release/Makefile.inc.docports
projects/virtio/release/Makefile.sysinstall
projects/virtio/release/amd64/boot_crunch.conf
projects/virtio/release/fixit.profile
projects/virtio/release/fixit.services
projects/virtio/release/i386/boot_crunch.conf
projects/virtio/release/i386/fixit_crunch.conf
projects/virtio/release/ia64/boot_crunch.conf
projects/virtio/release/pc98/boot_crunch.conf
projects/virtio/release/pc98/fixit-small_crunch.conf
projects/virtio/release/pc98/fixit_crunch.conf
projects/virtio/release/powerpc/boot_crunch.conf
projects/virtio/release/scripts/base-install.sh
projects/virtio/release/scripts/catpages-install.sh
projects/virtio/release/scripts/catpages-make.sh
projects/virtio/release/scripts/checkindex.pl
projects/virtio/release/scripts/chkINDEX
projects/virtio/release/scripts/commerce-install.sh
projects/virtio/release/scripts/dict-install.sh
projects/virtio/release/scripts/dict-make.sh
projects/virtio/release/scripts/doFS.sh
projects/virtio/release/scripts/doc-install.sh
projects/virtio/release/scripts/doc-make.sh
projects/virtio/release/scripts/games-install.sh
projects/virtio/release/scripts/info-install.sh
projects/virtio/release/scripts/info-make.sh
projects/virtio/release/scripts/info.sh
projects/virtio/release/scripts/kernels-install.sh
projects/virtio/release/scripts/lib32-install.sh
projects/virtio/release/scripts/manpages-install.sh
projects/virtio/release/scripts/manpages-make.sh
projects/virtio/release/scripts/mkpkghier
projects/virtio/release/scripts/mkpkgindex.sh
projects/virtio/release/scripts/package-split.py
projects/virtio/release/scripts/package-trees.sh
projects/virtio/release/scripts/ports-install.sh
projects/virtio/release/scripts/proflibs-install.sh
projects/virtio/release/scripts/proflibs-make.sh
projects/virtio/release/scripts/split-file.sh
projects/virtio/release/scripts/src-install.sh
projects/virtio/release/scripts/tar.sh
projects/virtio/release/scripts/xperimnt-install.sh
projects/virtio/release/sparc64/boot_crunch.conf
projects/virtio/usr.sbin/sysinstall/
Modified:
projects/virtio/MAINTAINERS
projects/virtio/Makefile.inc1
projects/virtio/ObsoleteFiles.inc
projects/virtio/UPDATING
projects/virtio/bin/ls/ls.1
projects/virtio/bin/ls/ls.c
projects/virtio/bin/ls/ls.h
projects/virtio/bin/ls/print.c
projects/virtio/bin/mv/mv.c
projects/virtio/bin/ps/extern.h
projects/virtio/bin/ps/keyword.c
projects/virtio/bin/ps/print.c
projects/virtio/bin/ps/ps.1
projects/virtio/bin/ps/ps.c
projects/virtio/bin/ps/ps.h
projects/virtio/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c
projects/virtio/contrib/sendmail/src/main.c
projects/virtio/contrib/sendmail/src/sendmail.h
projects/virtio/contrib/sendmail/src/usersmtp.c
projects/virtio/crypto/openssh/ssh_namespace.h
projects/virtio/etc/devd.conf
projects/virtio/etc/mtree/BSD.include.dist
projects/virtio/etc/mtree/BSD.usr.dist
projects/virtio/etc/network.subr
projects/virtio/gnu/usr.bin/groff/tmac/mdoc.local
projects/virtio/include/Makefile
projects/virtio/include/iso646.h
projects/virtio/kerberos5/lib/libasn1/Makefile
projects/virtio/kerberos5/lib/libgssapi_krb5/Makefile
projects/virtio/kerberos5/lib/libgssapi_ntlm/Makefile
projects/virtio/kerberos5/lib/libgssapi_spnego/Makefile
projects/virtio/kerberos5/lib/libhdb/Makefile
projects/virtio/kerberos5/lib/libheimntlm/Makefile
projects/virtio/kerberos5/lib/libhx509/Makefile
projects/virtio/kerberos5/lib/libkadm5clnt/Makefile
projects/virtio/kerberos5/lib/libkadm5srv/Makefile
projects/virtio/kerberos5/lib/libkafs5/Makefile
projects/virtio/kerberos5/lib/libkrb5/Makefile
projects/virtio/kerberos5/lib/libroken/Makefile
projects/virtio/lib/Makefile
projects/virtio/lib/libc/gen/ctermid.3
projects/virtio/lib/libc/gen/ctermid.c
projects/virtio/lib/libc/gen/devname.c
projects/virtio/lib/libc/locale/isspace.3
projects/virtio/lib/libfetch/common.c
projects/virtio/lib/libfetch/common.h
projects/virtio/lib/libfetch/fetch.3
projects/virtio/lib/libfetch/fetch.c
projects/virtio/lib/libfetch/fetch.h
projects/virtio/lib/libfetch/file.c
projects/virtio/lib/libfetch/ftp.c
projects/virtio/lib/libfetch/http.c
projects/virtio/lib/libusbhid/data.c
projects/virtio/lib/libusbhid/parse.c
projects/virtio/lib/libusbhid/usbhid.3
projects/virtio/lib/libusbhid/usbhid.h
projects/virtio/libexec/rtld-elf/map_object.c
projects/virtio/sbin/camcontrol/camcontrol.c
projects/virtio/sbin/fsdb/fsdbutil.c
projects/virtio/sbin/hastctl/hastctl.c
projects/virtio/sbin/hastd/activemap.c
projects/virtio/sbin/hastd/control.c
projects/virtio/sbin/hastd/ebuf.c
projects/virtio/sbin/hastd/event.c
projects/virtio/sbin/hastd/hast.conf.5
projects/virtio/sbin/hastd/hast.h
projects/virtio/sbin/hastd/hast_proto.c
projects/virtio/sbin/hastd/hastd.c
projects/virtio/sbin/hastd/hooks.c
projects/virtio/sbin/hastd/metadata.c
projects/virtio/sbin/hastd/nv.c
projects/virtio/sbin/hastd/parse.y
projects/virtio/sbin/hastd/pjdlog.c
projects/virtio/sbin/hastd/primary.c
projects/virtio/sbin/hastd/proto_tcp.c
projects/virtio/sbin/hastd/rangelock.c
projects/virtio/sbin/hastd/secondary.c
projects/virtio/sbin/hastd/subr.c
projects/virtio/sbin/hastd/synch.h
projects/virtio/sbin/hastd/token.l
projects/virtio/share/doc/Makefile
projects/virtio/share/examples/cvsup/stable-supfile
projects/virtio/share/examples/scsi_target/scsi_cmds.c
projects/virtio/share/examples/scsi_target/scsi_target.c
projects/virtio/share/man/man4/smp.4
projects/virtio/share/man/man7/build.7
projects/virtio/share/man/man9/ifnet.9
projects/virtio/share/misc/committers-ports.dot
projects/virtio/share/misc/committers-src.dot
projects/virtio/share/misc/scsi_modes
projects/virtio/sys/amd64/amd64/machdep.c
projects/virtio/sys/amd64/amd64/trap.c
projects/virtio/sys/arm/at91/at91_mci.c
projects/virtio/sys/arm/at91/at91_pio.c
projects/virtio/sys/arm/at91/at91_rtc.c
projects/virtio/sys/arm/at91/at91_spi.c
projects/virtio/sys/arm/at91/at91_ssc.c
projects/virtio/sys/arm/at91/at91_twi.c
projects/virtio/sys/arm/at91/uart_dev_at91usart.c
projects/virtio/sys/arm/econa/if_ece.c
projects/virtio/sys/boot/arm/ixp425/boot2/boot2.c
projects/virtio/sys/cam/cam_ccb.h
projects/virtio/sys/cam/cam_periph.c
projects/virtio/sys/cam/scsi/scsi_all.c
projects/virtio/sys/cam/scsi/scsi_all.h
projects/virtio/sys/cam/scsi/scsi_cd.c
projects/virtio/sys/cam/scsi/scsi_da.c
projects/virtio/sys/cam/scsi/scsi_low.c
projects/virtio/sys/cam/scsi/scsi_sa.c
projects/virtio/sys/cam/scsi/scsi_targ_bh.c
projects/virtio/sys/conf/newvers.sh
projects/virtio/sys/dev/ahci/ahci.c
projects/virtio/sys/dev/ath/ah_osdep.c
projects/virtio/sys/dev/ath/ath_hal/ah_internal.h
projects/virtio/sys/dev/ath/ath_hal/ah_regdomain.c
projects/virtio/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar5212/ar5112.c
projects/virtio/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c
projects/virtio/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c
projects/virtio/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416.h
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
projects/virtio/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
projects/virtio/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
projects/virtio/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
projects/virtio/sys/dev/ath/if_ath.c
projects/virtio/sys/dev/ath/if_athvar.h
projects/virtio/sys/dev/bwi/if_bwi.c
projects/virtio/sys/dev/ciss/ciss.c
projects/virtio/sys/dev/fb/machfb.c
projects/virtio/sys/dev/firewire/sbp.c
projects/virtio/sys/dev/firewire/sbp_targ.c
projects/virtio/sys/dev/iir/iir.c
projects/virtio/sys/dev/iscsi/initiator/iscsi_subr.c
projects/virtio/sys/dev/isp/isp_freebsd.h
projects/virtio/sys/dev/le/lebuffer_sbus.c
projects/virtio/sys/dev/mfi/mfi.c
projects/virtio/sys/dev/mfi/mfivar.h
projects/virtio/sys/dev/mly/mly.c
projects/virtio/sys/dev/mps/mps_sas.c
projects/virtio/sys/dev/mpt/mpt_cam.c
projects/virtio/sys/dev/puc/pucdata.c
projects/virtio/sys/dev/usb/input/uhid.c
projects/virtio/sys/dev/usb/quirk/usb_quirk.c
projects/virtio/sys/dev/usb/storage/umass.c
projects/virtio/sys/dev/usb/usbdevs
projects/virtio/sys/dev/xen/blkfront/blkfront.c
projects/virtio/sys/dev/xen/blkfront/block.h
projects/virtio/sys/dev/xen/control/control.c
projects/virtio/sys/dev/xen/netfront/netfront.c
projects/virtio/sys/i386/i386/machdep.c
projects/virtio/sys/i386/i386/trap.c
projects/virtio/sys/ia64/ia64/pmap.c
projects/virtio/sys/kern/kern_clock.c
projects/virtio/sys/kern/kern_exec.c
projects/virtio/sys/kern/kern_fork.c
projects/virtio/sys/kern/kern_racct.c
projects/virtio/sys/kern/kern_rctl.c
projects/virtio/sys/kern/kern_sig.c
projects/virtio/sys/kern/subr_kdb.c
projects/virtio/sys/kern/subr_syscall.c
projects/virtio/sys/kern/subr_trap.c
projects/virtio/sys/kern/uipc_usrreq.c
projects/virtio/sys/mips/mips/machdep.c
projects/virtio/sys/modules/ipfw/Makefile
projects/virtio/sys/net/if_llatbl.h
projects/virtio/sys/net/radix.h
projects/virtio/sys/net/raw_cb.h
projects/virtio/sys/net/raw_usrreq.c
projects/virtio/sys/net/route.c
projects/virtio/sys/net/route.h
projects/virtio/sys/net/rtsock.c
projects/virtio/sys/net80211/ieee80211_proto.c
projects/virtio/sys/net80211/ieee80211_sta.c
projects/virtio/sys/net80211/ieee80211_tdma.c
projects/virtio/sys/netinet/in.c
projects/virtio/sys/netinet/ipfw/ip_fw_pfil.c
projects/virtio/sys/netinet6/in6.h
projects/virtio/sys/netinet6/nd6.c
projects/virtio/sys/powerpc/booke/pmap.c
projects/virtio/sys/powerpc/ps3/ps3cdrom.c
projects/virtio/sys/sparc64/central/central.c
projects/virtio/sys/sparc64/conf/DEFAULTS
projects/virtio/sys/sparc64/ebus/ebus.c
projects/virtio/sys/sparc64/fhc/fhc.c
projects/virtio/sys/sparc64/include/asmacros.h
projects/virtio/sys/sparc64/include/atomic.h
projects/virtio/sys/sparc64/include/bus.h
projects/virtio/sys/sparc64/include/bus_private.h
projects/virtio/sys/sparc64/pci/apb.c
projects/virtio/sys/sparc64/pci/fire.c
projects/virtio/sys/sparc64/pci/firevar.h
projects/virtio/sys/sparc64/pci/ofw_pcib_subr.c
projects/virtio/sys/sparc64/pci/psycho.c
projects/virtio/sys/sparc64/pci/psychovar.h
projects/virtio/sys/sparc64/pci/sbbc.c
projects/virtio/sys/sparc64/pci/schizo.c
projects/virtio/sys/sparc64/pci/schizovar.h
projects/virtio/sys/sparc64/sbus/dma_sbus.c
projects/virtio/sys/sparc64/sbus/sbus.c
projects/virtio/sys/sparc64/sparc64/bus_machdep.c
projects/virtio/sys/sparc64/sparc64/exception.S
projects/virtio/sys/sparc64/sparc64/genassym.c
projects/virtio/sys/sparc64/sparc64/machdep.c
projects/virtio/sys/sparc64/sparc64/nexus.c
projects/virtio/sys/sparc64/sparc64/pmap.c
projects/virtio/sys/sparc64/sparc64/upa.c
projects/virtio/sys/sys/param.h
projects/virtio/sys/sys/racct.h
projects/virtio/sys/ufs/ffs/ffs_snapshot.c
projects/virtio/sys/ufs/ffs/ffs_softdep.c
projects/virtio/sys/vm/vm_fault.c
projects/virtio/sys/vm/vm_page.c
projects/virtio/sys/vm/vm_page.h
projects/virtio/sys/xen/xenbus/xenbusb.c
projects/virtio/sys/xen/xenbus/xenbusb_back.c
projects/virtio/sys/xen/xenbus/xenbusb_front.c
projects/virtio/sys/xen/xenstore/xenstore.c
projects/virtio/tools/make_libdeps.sh
projects/virtio/usr.bin/calendar/calendars/calendar.freebsd
projects/virtio/usr.bin/compress/zopen.c
projects/virtio/usr.bin/csup/diff.c
projects/virtio/usr.bin/fetch/fetch.1
projects/virtio/usr.bin/fetch/fetch.c
projects/virtio/usr.bin/find/find.1
projects/virtio/usr.bin/find/ls.c
projects/virtio/usr.bin/fstat/fstat.1
projects/virtio/usr.bin/fstat/fstat.c
projects/virtio/usr.bin/gzip/zuncompress.c
projects/virtio/usr.bin/script/script.1
projects/virtio/usr.bin/script/script.c
projects/virtio/usr.bin/usbhidaction/usbhidaction.1
projects/virtio/usr.bin/usbhidaction/usbhidaction.c
projects/virtio/usr.bin/usbhidctl/usbhid.c
projects/virtio/usr.bin/usbhidctl/usbhidctl.1
projects/virtio/usr.sbin/Makefile
projects/virtio/usr.sbin/mfiutil/mfi_show.c
projects/virtio/usr.sbin/pkg_install/add/main.c
projects/virtio/usr.sbin/pstat/pstat.c
Directory Properties:
projects/virtio/ (props changed)
projects/virtio/cddl/contrib/opensolaris/ (props changed)
projects/virtio/contrib/bind9/ (props changed)
projects/virtio/contrib/binutils/ (props changed)
projects/virtio/contrib/bzip2/ (props changed)
projects/virtio/contrib/compiler-rt/ (props changed)
projects/virtio/contrib/dialog/ (props changed)
projects/virtio/contrib/ee/ (props changed)
projects/virtio/contrib/expat/ (props changed)
projects/virtio/contrib/file/ (props changed)
projects/virtio/contrib/gcc/ (props changed)
projects/virtio/contrib/gdb/ (props changed)
projects/virtio/contrib/gdtoa/ (props changed)
projects/virtio/contrib/gnu-sort/ (props changed)
projects/virtio/contrib/groff/ (props changed)
projects/virtio/contrib/less/ (props changed)
projects/virtio/contrib/libpcap/ (props changed)
projects/virtio/contrib/libstdc++/ (props changed)
projects/virtio/contrib/llvm/ (props changed)
projects/virtio/contrib/llvm/tools/clang/ (props changed)
projects/virtio/contrib/ncurses/ (props changed)
projects/virtio/contrib/netcat/ (props changed)
projects/virtio/contrib/ntp/ (props changed)
projects/virtio/contrib/one-true-awk/ (props changed)
projects/virtio/contrib/openbsm/ (props changed)
projects/virtio/contrib/openpam/ (props changed)
projects/virtio/contrib/openresolv/ (props changed)
projects/virtio/contrib/pf/ (props changed)
projects/virtio/contrib/sendmail/ (props changed)
projects/virtio/contrib/tcpdump/ (props changed)
projects/virtio/contrib/tcsh/ (props changed)
projects/virtio/contrib/tnftp/ (props changed)
projects/virtio/contrib/top/ (props changed)
projects/virtio/contrib/top/install-sh (props changed)
projects/virtio/contrib/tzcode/stdtime/ (props changed)
projects/virtio/contrib/tzcode/zic/ (props changed)
projects/virtio/contrib/tzdata/ (props changed)
projects/virtio/contrib/wpa/ (props changed)
projects/virtio/contrib/xz/ (props changed)
projects/virtio/crypto/heimdal/ (props changed)
projects/virtio/crypto/openssh/ (props changed)
projects/virtio/crypto/openssl/ (props changed)
projects/virtio/gnu/lib/ (props changed)
projects/virtio/gnu/usr.bin/binutils/ (props changed)
projects/virtio/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/virtio/gnu/usr.bin/gdb/ (props changed)
projects/virtio/lib/libc/ (props changed)
projects/virtio/lib/libc/stdtime/ (props changed)
projects/virtio/lib/libutil/ (props changed)
projects/virtio/lib/libz/ (props changed)
projects/virtio/sbin/ (props changed)
projects/virtio/sbin/ipfw/ (props changed)
projects/virtio/share/mk/bsd.arch.inc.mk (props changed)
projects/virtio/share/zoneinfo/ (props changed)
projects/virtio/sys/ (props changed)
projects/virtio/sys/amd64/include/xen/ (props changed)
projects/virtio/sys/boot/ (props changed)
projects/virtio/sys/boot/i386/efi/ (props changed)
projects/virtio/sys/boot/ia64/efi/ (props changed)
projects/virtio/sys/boot/ia64/ski/ (props changed)
projects/virtio/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/virtio/sys/boot/powerpc/ofw/ (props changed)
projects/virtio/sys/cddl/contrib/opensolaris/ (props changed)
projects/virtio/sys/conf/ (props changed)
projects/virtio/sys/contrib/dev/acpica/ (props changed)
projects/virtio/sys/contrib/octeon-sdk/ (props changed)
projects/virtio/sys/contrib/pf/ (props changed)
projects/virtio/sys/contrib/x86emu/ (props changed)
projects/virtio/usr.bin/calendar/ (props changed)
projects/virtio/usr.bin/csup/ (props changed)
projects/virtio/usr.bin/procstat/ (props changed)
projects/virtio/usr.sbin/ndiscvt/ (props changed)
projects/virtio/usr.sbin/rtadvctl/ (props changed)
projects/virtio/usr.sbin/rtadvd/ (props changed)
projects/virtio/usr.sbin/rtsold/ (props changed)
projects/virtio/usr.sbin/zic/ (props changed)
Modified: projects/virtio/MAINTAINERS
==============================================================================
--- projects/virtio/MAINTAINERS Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/MAINTAINERS Tue Oct 4 04:13:34 2011 (r225959)
@@ -123,8 +123,6 @@ usr.sbin/zic edwin Heads-up appreciat
maintained by a third party source.
lib/libc/stdtime edwin Heads-up appreciated, since parts of this code
is maintained by a third party source.
-sysinstall randi Please contact about any major changes so that
- they can be co-ordinated.
sbin/routed bms Pre-commit review; notify vendor at rhyolite.com
Following are the entries from the Makefiles, and a few other sources.
Modified: projects/virtio/Makefile.inc1
==============================================================================
--- projects/virtio/Makefile.inc1 Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/Makefile.inc1 Tue Oct 4 04:13:34 2011 (r225959)
@@ -1106,7 +1106,6 @@ build-tools:
${_aicasm} \
usr.bin/awk \
lib/libmagic \
- usr.sbin/sysinstall \
usr.bin/mkesdb_static \
usr.bin/mkcsmapper_static
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
@@ -1218,7 +1217,8 @@ _startup_libs+= lib/libc
gnu/lib/libgcc__L: lib/libc__L
-_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \
+_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \
+ ${_kerberos5_lib_libheimntlm} \
${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
${_kerberos5_lib_libroken} \
lib/libbz2 lib/libcom_err lib/libcrypt \
@@ -1268,6 +1268,19 @@ secure/lib/libssh__L: lib/libgssapi__L k
_secure_lib= secure/lib
.endif
+.if ${MK_KERBEROS} != "no"
+kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L
+kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L
+kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L
+kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ secure/lib/libcrypto__L kerberos5/lib/libroken__L
+kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \
+ kerberos5/lib/libroken__L
+kerberos5/lib/libroken__L: lib/libcrypt__L
+.endif
+
.if ${MK_GSSAPI} != "no"
_lib_libgssapi= lib/libgssapi
.endif
@@ -1279,6 +1292,7 @@ _lib_libipx= lib/libipx
.if ${MK_KERBEROS} != "no"
_kerberos5_lib= kerberos5/lib
_kerberos5_lib_libasn1= kerberos5/lib/libasn1
+_kerberos5_lib_libhdb= kerberos5/lib/libhdb
_kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
_kerberos5_lib_libhx509= kerberos5/lib/libhx509
_kerberos5_lib_libroken= kerberos5/lib/libroken
Modified: projects/virtio/ObsoleteFiles.inc
==============================================================================
--- projects/virtio/ObsoleteFiles.inc Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/ObsoleteFiles.inc Tue Oct 4 04:13:34 2011 (r225959)
@@ -38,6 +38,19 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20110930: sysinstall removed
+OLD_FILES+=usr/sbin/sysinstall
+OLD_FILES+=usr/share/man/man8/sysinstall.8.gz
+OLD_FILES+=usr/lib/libftpio.a
+OLD_FILES+=usr/lib/libftpio.so
+OLD_LIBS+=usr/lib/libftpio.so.8
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_FILES+=usr/lib32/libftpio.a
+OLD_FILES+=usr/lib32/libftpio.so
+OLD_LIBS+=usr/lib32/libftpio.so.8
+.endif
+OLD_FILES+=usr/include/ftpio.h
+OLD_FILES+=usr/share/man/man3/ftpio.3.gz
# 20110915: rename congestion control manpages
OLD_FILES+=usr/share/man/man4/cc.4.gz
OLD_FILES+=usr/share/man/man9/cc.9.gz
@@ -54,7 +67,7 @@ OLD_LIBS+=usr/lib/libdwarf.so.2
OLD_LIBS+=usr/lib/libopie.so.6
OLD_LIBS+=usr/lib/librtld_db.so.1
OLD_LIBS+=usr/lib/libtacplus.so.4
-.if ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_LIBS+=usr/lib32/libcam.so.5
OLD_LIBS+=usr/lib32/libpcap.so.7
OLD_LIBS+=usr/lib32/libufs.so.5
@@ -92,7 +105,7 @@ OLD_FILES+=usr/lib/libpkg.a
OLD_FILES+=usr/lib/libpkg.so
OLD_LIBS+=usr/lib/libpkg.so.0
OLD_FILES+=usr/lib/libpkg_p.a
-.if ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/libpkg.a
OLD_FILES+=usr/lib32/libpkg.so
OLD_LIBS+=usr/lib32/libpkg.so.0
@@ -100,7 +113,7 @@ OLD_FILES+=usr/lib32/libpkg_p.a
.endif
# 20110517: libsbuf version bump
OLD_LIBS+=lib/libsbuf.so.5
-.if ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_LIBS+=usr/lib32/libsbuf.so.5
.endif
# 20110502: new clang import which bumps version from 2.9 to 3.0
@@ -131,7 +144,7 @@ OLD_FILES+=usr/lib/libobjc_p.a
OLD_FILES+=usr/libexec/cc1obj
OLD_LIBS+=usr/lib/libobjc.so.4
OLD_DIRS+=usr/include/objc
-.if ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/libobjc.a
OLD_FILES+=usr/lib32/libobjc.so
OLD_FILES+=usr/lib32/libobjc_p.a
@@ -258,7 +271,7 @@ OLD_FILES+=usr/include/machine/intr.h
.endif
# 20100514: library version bump for versioned symbols for liblzma
OLD_LIBS+=usr/lib/liblzma.so.0
-.if ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_LIBS+=usr/lib32/liblzma.so.0
.endif
# 20100511: move GCC-specific headers to /usr/include/gcc
@@ -2580,7 +2593,7 @@ OLD_FILES+=usr/lib/libpam_ssh.a
OLD_FILES+=usr/lib/libpam_ssh_p.a
OLD_FILES+=usr/bin/help
OLD_FILES+=usr/bin/sccs
-.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "arm" && ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "powerpc"
+.if ${TARGET_ARCH} != "amd64" && ${TARGET} != "arm" && ${TARGET_ARCH} != "i386" && ${TARGET} != "powerpc"
OLD_FILES+=usr/bin/gdbserver
.endif
OLD_FILES+=usr/bin/ssh-keysign
Modified: projects/virtio/UPDATING
==============================================================================
--- projects/virtio/UPDATING Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/UPDATING Tue Oct 4 04:13:34 2011 (r225959)
@@ -9,8 +9,8 @@ handbook.
Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running portupgrade.
-NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
- FreeBSD 9.x has many debugging features turned on, in both the kernel
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
+ FreeBSD 10.x has many debugging features turned on, in both the kernel
and userland. These features attempt to detect incorrect use of
system primitives, and encourage loud failure through extra sanity
checking and fail stop semantics. They also substantially impact
@@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
machines to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20110930:
+ sysinstall has been removed
+
+20110923:
+ The stable/9 branch created in subversion. This corresponds to the
+ RELENG_9 branch in CVS.
+
20110913:
This commit modifies vfs_register() so that it uses a hash
calculation to set vfc_typenum, which is enabled by default.
Modified: projects/virtio/bin/ls/ls.1
==============================================================================
--- projects/virtio/bin/ls/ls.1 Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ls/ls.1 Tue Oct 4 04:13:34 2011 (r225959)
@@ -32,7 +32,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
-.Dd April 4, 2008
+.Dd September 28, 2011
.Dt LS 1
.Os
.Sh NAME
@@ -357,8 +357,7 @@ option is given,
the numeric ID's are displayed.
.Pp
If the file is a character special or block special file,
-the major and minor device numbers for the file are displayed
-in the size field.
+the device number for the file is displayed in the size field.
If the file is a symbolic link the pathname of the
linked-to file is preceded by
.Dq Li -> .
Modified: projects/virtio/bin/ls/ls.c
==============================================================================
--- projects/virtio/bin/ls/ls.c Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ls/ls.c Tue Oct 4 04:13:34 2011 (r225959)
@@ -563,7 +563,7 @@ display(const FTSENT *p, FTSENT *list, i
long maxblock;
u_long btotal, labelstrlen, maxinode, maxlen, maxnlink;
u_long maxlabelstr;
- u_int devstrlen;
+ u_int sizelen;
int maxflags;
gid_t maxgroup;
uid_t maxuser;
@@ -572,7 +572,6 @@ display(const FTSENT *p, FTSENT *list, i
int entries, needstats;
const char *user, *group;
char *flags, *labelstr = NULL;
- char buf[STRBUF_SIZEOF(u_quad_t) + 1];
char ngroup[STRBUF_SIZEOF(uid_t) + 1];
char nuser[STRBUF_SIZEOF(gid_t) + 1];
@@ -656,7 +655,8 @@ display(const FTSENT *p, FTSENT *list, i
MAKENINES(maxsize);
free(jinitmax);
}
- devstrlen = 0;
+ d.s_size = 0;
+ sizelen = 0;
flags = NULL;
for (cur = list, entries = 0; cur; cur = cur->fts_link) {
if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
@@ -796,14 +796,12 @@ label_out:
np->group = &np->data[ulen + 1];
(void)strcpy(np->group, group);
- if ((S_ISCHR(sp->st_mode) ||
- S_ISBLK(sp->st_mode)) &&
- devstrlen < DEVSTR_HEX_LEN) {
- if (minor(sp->st_rdev) > 255 ||
- minor(sp->st_rdev) < 0)
- devstrlen = DEVSTR_HEX_LEN;
- else
- devstrlen = DEVSTR_LEN;
+ if (S_ISCHR(sp->st_mode) ||
+ S_ISBLK(sp->st_mode)) {
+ sizelen = snprintf(NULL, 0,
+ "%#jx", (uintmax_t)sp->st_rdev);
+ if (d.s_size < sizelen)
+ d.s_size = sizelen;
}
if (f_flags) {
@@ -837,23 +835,16 @@ label_out:
d.maxlen = maxlen;
if (needstats) {
d.btotal = btotal;
- (void)snprintf(buf, sizeof(buf), "%lu", maxblock);
- d.s_block = strlen(buf);
+ d.s_block = snprintf(NULL, 0, "%lu", maxblock);
d.s_flags = maxflags;
d.s_label = maxlabelstr;
d.s_group = maxgroup;
- (void)snprintf(buf, sizeof(buf), "%lu", maxinode);
- d.s_inode = strlen(buf);
- (void)snprintf(buf, sizeof(buf), "%lu", maxnlink);
- d.s_nlink = strlen(buf);
- if (f_humanval)
- d.s_size = HUMANVALSTR_LEN;
- else {
- (void)snprintf(buf, sizeof(buf), "%ju", maxsize);
- d.s_size = strlen(buf);
- }
- if (d.s_size < devstrlen)
- d.s_size = devstrlen;
+ d.s_inode = snprintf(NULL, 0, "%lu", maxinode);
+ d.s_nlink = snprintf(NULL, 0, "%lu", maxnlink);
+ sizelen = f_humanval ? HUMANVALSTR_LEN :
+ snprintf(NULL, 0, "%ju", maxsize);
+ if (d.s_size < sizelen)
+ d.s_size = sizelen;
d.s_user = maxuser;
}
printfcn(&d);
Modified: projects/virtio/bin/ls/ls.h
==============================================================================
--- projects/virtio/bin/ls/ls.h Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ls/ls.h Tue Oct 4 04:13:34 2011 (r225959)
@@ -36,8 +36,6 @@
#define NO_PRINT 1
#define HUMANVALSTR_LEN 5
-#define DEVSTR_LEN 8
-#define DEVSTR_HEX_LEN 15
extern long blocksize; /* block size units */
Modified: projects/virtio/bin/ls/print.c
==============================================================================
--- projects/virtio/bin/ls/print.c Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ls/print.c Tue Oct 4 04:13:34 2011 (r225959)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
#include <langinfo.h>
#include <libutil.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -351,16 +352,8 @@ printaname(const FTSENT *p, u_long inode
static void
printdev(size_t width, dev_t dev)
{
- char buf[DEVSTR_HEX_LEN + 1];
- if (minor(dev) > 255 || minor(dev) < 0)
- (void)snprintf(buf, sizeof(buf), "%3d, 0x%08x",
- major(dev), (u_int)minor(dev));
- else
- (void)snprintf(buf, sizeof(buf), "%3d, %3d",
- major(dev), minor(dev));
-
- (void)printf("%*s ", (u_int)width, buf);
+ (void)printf("%#*jx ", (u_int)width, (uintmax_t)dev);
}
static void
Modified: projects/virtio/bin/mv/mv.c
==============================================================================
--- projects/virtio/bin/mv/mv.c Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/mv/mv.c Tue Oct 4 04:13:34 2011 (r225959)
@@ -260,40 +260,34 @@ static int
fastcopy(const char *from, const char *to, struct stat *sbp)
{
struct timeval tval[2];
- static u_int blen;
- static char *bp;
+ static u_int blen = MAXPHYS;
+ static char *bp = NULL;
mode_t oldmode;
int nread, from_fd, to_fd;
if ((from_fd = open(from, O_RDONLY, 0)) < 0) {
- warn("%s", from);
+ warn("fastcopy: open() failed (from): %s", from);
return (1);
}
- if (blen < sbp->st_blksize) {
- if (bp != NULL)
- free(bp);
- if ((bp = malloc((size_t)sbp->st_blksize)) == NULL) {
- blen = 0;
- warnx("malloc failed");
- return (1);
- }
- blen = sbp->st_blksize;
+ if (bp == NULL && (bp = malloc((size_t)blen)) == NULL) {
+ warnx("malloc(%u) failed", blen);
+ return (1);
}
while ((to_fd =
open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0)) < 0) {
if (errno == EEXIST && unlink(to) == 0)
continue;
- warn("%s", to);
+ warn("fastcopy: open() failed (to): %s", to);
(void)close(from_fd);
return (1);
}
while ((nread = read(from_fd, bp, (size_t)blen)) > 0)
if (write(to_fd, bp, (size_t)nread) != nread) {
- warn("%s", to);
+ warn("fastcopy: write() failed: %s", to);
goto err;
}
if (nread < 0) {
- warn("%s", from);
+ warn("fastcopy: read() failed: %s", from);
err: if (unlink(to))
warn("%s: remove", to);
(void)close(from_fd);
Modified: projects/virtio/bin/ps/extern.h
==============================================================================
--- projects/virtio/bin/ps/extern.h Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ps/extern.h Tue Oct 4 04:13:34 2011 (r225959)
@@ -39,63 +39,52 @@ extern fixpt_t ccpu;
extern int cflag, eval, fscale, nlistread, rawcpu;
extern unsigned long mempages;
extern time_t now;
-extern int showthreads, sumrusage, termwidth, totwidth;
+extern int showthreads, sumrusage, termwidth;
extern STAILQ_HEAD(velisthead, varent) varlist;
__BEGIN_DECLS
-void arguments(KINFO *, VARENT *);
-void command(KINFO *, VARENT *);
-void cputime(KINFO *, VARENT *);
+char *arguments(KINFO *, VARENT *);
+char *command(KINFO *, VARENT *);
+char *cputime(KINFO *, VARENT *);
int donlist(void);
-void elapsed(KINFO *, VARENT *);
-void elapseds(KINFO *, VARENT *);
-void emulname(KINFO *, VARENT *);
+char *elapsed(KINFO *, VARENT *);
+char *elapseds(KINFO *, VARENT *);
+char *emulname(KINFO *, VARENT *);
VARENT *find_varentry(VAR *);
const char *fmt_argv(char **, char *, size_t);
double getpcpu(const KINFO *);
-void kvar(KINFO *, VARENT *);
-void label(KINFO *, VARENT *);
-void loginclass(KINFO *, VARENT *);
-void logname(KINFO *, VARENT *);
-void longtname(KINFO *, VARENT *);
-void lstarted(KINFO *, VARENT *);
-void maxrss(KINFO *, VARENT *);
-void lockname(KINFO *, VARENT *);
-void mwchan(KINFO *, VARENT *);
-void nwchan(KINFO *, VARENT *);
-void pagein(KINFO *, VARENT *);
+char *kvar(KINFO *, VARENT *);
+char *label(KINFO *, VARENT *);
+char *loginclass(KINFO *, VARENT *);
+char *logname(KINFO *, VARENT *);
+char *longtname(KINFO *, VARENT *);
+char *lstarted(KINFO *, VARENT *);
+char *maxrss(KINFO *, VARENT *);
+char *lockname(KINFO *, VARENT *);
+char *mwchan(KINFO *, VARENT *);
+char *nwchan(KINFO *, VARENT *);
+char *pagein(KINFO *, VARENT *);
void parsefmt(const char *, int);
-void pcpu(KINFO *, VARENT *);
-void pmem(KINFO *, VARENT *);
-void pri(KINFO *, VARENT *);
+char *pcpu(KINFO *, VARENT *);
+char *pmem(KINFO *, VARENT *);
+char *pri(KINFO *, VARENT *);
void printheader(void);
-void priorityr(KINFO *, VARENT *);
-void egroupname(KINFO *, VARENT *);
-void rgroupname(KINFO *, VARENT *);
-void runame(KINFO *, VARENT *);
-void rvar(KINFO *, VARENT *);
-int s_comm(KINFO *);
-int s_cputime(KINFO *);
-int s_label(KINFO *);
-int s_loginclass(KINFO *);
-int s_logname(KINFO *);
-int s_egroupname(KINFO *);
-int s_rgroupname(KINFO *);
-int s_runame(KINFO *);
-int s_systime(KINFO *);
-int s_uname(KINFO *);
-int s_usertime(KINFO *);
+char *priorityr(KINFO *, VARENT *);
+char *egroupname(KINFO *, VARENT *);
+char *rgroupname(KINFO *, VARENT *);
+char *runame(KINFO *, VARENT *);
+char *rvar(KINFO *, VARENT *);
void showkey(void);
-void started(KINFO *, VARENT *);
-void state(KINFO *, VARENT *);
-void systime(KINFO *, VARENT *);
-void tdev(KINFO *, VARENT *);
-void tdnam(KINFO *, VARENT *);
-void tname(KINFO *, VARENT *);
-void ucomm(KINFO *, VARENT *);
-void uname(KINFO *, VARENT *);
-void upr(KINFO *, VARENT *);
-void usertime(KINFO *, VARENT *);
-void vsize(KINFO *, VARENT *);
-void wchan(KINFO *, VARENT *);
+char *started(KINFO *, VARENT *);
+char *state(KINFO *, VARENT *);
+char *systime(KINFO *, VARENT *);
+char *tdev(KINFO *, VARENT *);
+char *tdnam(KINFO *, VARENT *);
+char *tname(KINFO *, VARENT *);
+char *ucomm(KINFO *, VARENT *);
+char *uname(KINFO *, VARENT *);
+char *upr(KINFO *, VARENT *);
+char *usertime(KINFO *, VARENT *);
+char *vsize(KINFO *, VARENT *);
+char *wchan(KINFO *, VARENT *);
__END_DECLS
Modified: projects/virtio/bin/ps/keyword.c
==============================================================================
--- projects/virtio/bin/ps/keyword.c Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ps/keyword.c Tue Oct 4 04:13:34 2011 (r225959)
@@ -57,178 +57,116 @@ static int vcmp(const void *, const voi
#define KOFF(x) offsetof(struct kinfo_proc, x)
#define ROFF(x) offsetof(struct rusage, x)
-#define EMULLEN 13 /* enough for "FreeBSD ELF32" */
#define LWPFMT "d"
-#define LWPLEN 6
#define NLWPFMT "d"
-#define NLWPLEN 4
#define UIDFMT "u"
-#define UIDLEN 5
#define PIDFMT "d"
-#define PIDLEN 5
-#define USERLEN (MAXLOGNAME - 1)
/* PLEASE KEEP THE TABLE BELOW SORTED ALPHABETICALLY!!! */
static VAR var[] = {
- {"%cpu", "%CPU", NULL, 0, pcpu, NULL, 5, 0, CHAR, NULL, 0},
- {"%mem", "%MEM", NULL, 0, pmem, NULL, 4, 0, CHAR, NULL, 0},
- {"acflag", "ACFLG", NULL, 0, kvar, NULL, 3, KOFF(ki_acflag), USHORT,
- "x", 0},
- {"acflg", "", "acflag", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"args", "COMMAND", NULL, COMM|LJUST|USER, arguments, NULL, 16, 0,
+ {"%cpu", "%CPU", NULL, 0, pcpu, 0, CHAR, NULL, 0},
+ {"%mem", "%MEM", NULL, 0, pmem, 0, CHAR, NULL, 0},
+ {"acflag", "ACFLG", NULL, 0, kvar, KOFF(ki_acflag), USHORT, "x", 0},
+ {"acflg", "", "acflag", 0, NULL, 0, CHAR, NULL, 0},
+ {"args", "COMMAND", NULL, COMM|LJUST|USER, arguments, 0,
CHAR, NULL, 0},
- {"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"class", "CLASS", NULL, LJUST, loginclass, s_loginclass,
- MAXLOGNAME-1, 0, CHAR, NULL, 0},
- {"comm", "COMMAND", NULL, LJUST, ucomm, s_comm,
- COMMLEN + TDNAMLEN + 1, 0, CHAR, NULL, 0},
- {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0,
+ {"blocked", "", "sigmask", 0, NULL, 0, CHAR, NULL, 0},
+ {"caught", "", "sigcatch", 0, NULL, 0, CHAR, NULL, 0},
+ {"class", "CLASS", NULL, LJUST, loginclass, 0, CHAR, NULL, 0},
+ {"comm", "COMMAND", NULL, LJUST, ucomm, 0, CHAR, NULL, 0},
+ {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 0,
CHAR, NULL, 0},
- {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d",
- 0},
- {"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"egid", "", "gid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"egroup", "", "group", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR,
- NULL, 0},
- {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0},
- {"etimes", "ELAPSED", NULL, USER, elapseds, NULL, 12, 0, CHAR, NULL, 0},
- {"euid", "", "uid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"f", "F", NULL, 0, kvar, NULL, 8, KOFF(ki_flag), INT, "x", 0},
- {"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"gid", "GID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_groups),
- UINT, UIDFMT, 0},
- {"group", "GROUP", NULL, LJUST, egroupname, s_egroupname,
- USERLEN, 0, CHAR, NULL, 0},
- {"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"inblk", "INBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_inblock), LONG,
- "ld", 0},
- {"inblock", "", "inblk", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"jid", "JID", NULL, 0, kvar, NULL, 6, KOFF(ki_jid), INT, "d", 0},
- {"jobc", "JOBC", NULL, 0, kvar, NULL, 4, KOFF(ki_jobc), SHORT, "d",
- 0},
- {"ktrace", "KTRACE", NULL, 0, kvar, NULL, 8, KOFF(ki_traceflag), INT,
- "x", 0},
- {"label", "LABEL", NULL, LJUST, label, s_label, SHRT_MAX, 0, CHAR,
- NULL, 0},
- {"lim", "LIM", NULL, 0, maxrss, NULL, 5, 0, CHAR, NULL, 0},
- {"lockname", "LOCK", NULL, LJUST, lockname, NULL, 6, 0, CHAR, NULL,
- 0},
- {"login", "LOGIN", NULL, LJUST, logname, s_logname, MAXLOGNAME-1,
- 0, CHAR, NULL, 0},
- {"logname", "", "login", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"lstart", "STARTED", NULL, LJUST|USER, lstarted, NULL, 28, 0, CHAR,
- NULL, 0},
- {"lwp", "LWP", NULL, 0, kvar, NULL, LWPLEN, KOFF(ki_tid), UINT,
- LWPFMT, 0},
- {"majflt", "MAJFLT", NULL, USER, rvar, NULL, 4, ROFF(ru_majflt),
- LONG, "ld", 0},
- {"minflt", "MINFLT", NULL, USER, rvar, NULL, 4, ROFF(ru_minflt),
- LONG, "ld", 0},
- {"msgrcv", "MSGRCV", NULL, USER, rvar, NULL, 4, ROFF(ru_msgrcv),
- LONG, "ld", 0},
- {"msgsnd", "MSGSND", NULL, USER, rvar, NULL, 4, ROFF(ru_msgsnd),
- LONG, "ld", 0},
- {"mwchan", "MWCHAN", NULL, LJUST, mwchan, NULL, 6, 0, CHAR, NULL, 0},
- {"ni", "", "nice", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"nice", "NI", NULL, 0, kvar, NULL, 2, KOFF(ki_nice), CHAR, "d",
- 0},
- {"nivcsw", "NIVCSW", NULL, USER, rvar, NULL, 5, ROFF(ru_nivcsw),
- LONG, "ld", 0},
- {"nlwp", "NLWP", NULL, 0, kvar, NULL, NLWPLEN, KOFF(ki_numthreads),
- UINT, NLWPFMT, 0},
- {"nsignals", "", "nsigs", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"nsigs", "NSIGS", NULL, USER, rvar, NULL, 4, ROFF(ru_nsignals),
- LONG, "ld", 0},
- {"nswap", "NSWAP", NULL, USER, rvar, NULL, 4, ROFF(ru_nswap),
- LONG, "ld", 0},
- {"nvcsw", "NVCSW", NULL, USER, rvar, NULL, 5, ROFF(ru_nvcsw),
- LONG, "ld", 0},
- {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, sizeof(void *) * 2, 0,
- CHAR, NULL, 0},
- {"oublk", "OUBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_oublock),
- LONG, "ld", 0},
- {"oublock", "", "oublk", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"paddr", "PADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2,
- KOFF(ki_paddr), KPTR, "lx", 0},
- {"pagein", "PAGEIN", NULL, USER, pagein, NULL, 6, 0, CHAR, NULL, 0},
- {"pcpu", "", "%cpu", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"pending", "", "sig", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"pgid", "PGID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_pgid), UINT,
- PIDFMT, 0},
- {"pid", "PID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_pid), UINT,
- PIDFMT, 0},
- {"pmem", "", "%mem", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"ppid", "PPID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_ppid), UINT,
- PIDFMT, 0},
- {"pri", "PRI", NULL, 0, pri, NULL, 3, 0, CHAR, NULL, 0},
- {"re", "RE", NULL, INF127, kvar, NULL, 3, KOFF(ki_swtime), UINT, "d",
- 0},
- {"rgid", "RGID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_rgid),
- UINT, UIDFMT, 0},
- {"rgroup", "RGROUP", NULL, LJUST, rgroupname, s_rgroupname,
- USERLEN, 0, CHAR, NULL, 0},
- {"rss", "RSS", NULL, 0, kvar, NULL, 6, KOFF(ki_rssize), PGTOK, "ld", 0},
- {"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR,
- NULL, 0},
- {"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid),
- UINT, UIDFMT, 0},
- {"ruser", "RUSER", NULL, LJUST, runame, s_runame, USERLEN,
- 0, CHAR, NULL, 0},
- {"sid", "SID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_sid), UINT,
- PIDFMT, 0},
- {"sig", "PENDING", NULL, 0, kvar, NULL, 8, KOFF(ki_siglist), INT,
- "x", 0},
- {"sigcatch", "CAUGHT", NULL, 0, kvar, NULL, 8, KOFF(ki_sigcatch),
- UINT, "x", 0},
- {"sigignore", "IGNORED", NULL, 0, kvar, NULL, 8, KOFF(ki_sigignore),
+ {"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0},
+ {"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0},
+ {"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0},
+ {"egroup", "", "group", 0, NULL, 0, CHAR, NULL, 0},
+ {"emul", "EMUL", NULL, LJUST, emulname, 0, CHAR, NULL, 0},
+ {"etime", "ELAPSED", NULL, USER, elapsed, 0, CHAR, NULL, 0},
+ {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0},
+ {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0},
+ {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0},
+ {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0},
+ {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
+ {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0},
+ {"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0},
+ {"inblk", "INBLK", NULL, USER, rvar, ROFF(ru_inblock), LONG, "ld", 0},
+ {"inblock", "", "inblk", 0, NULL, 0, CHAR, NULL, 0},
+ {"jid", "JID", NULL, 0, kvar, KOFF(ki_jid), INT, "d", 0},
+ {"jobc", "JOBC", NULL, 0, kvar, KOFF(ki_jobc), SHORT, "d", 0},
+ {"ktrace", "KTRACE", NULL, 0, kvar, KOFF(ki_traceflag), INT, "x", 0},
+ {"label", "LABEL", NULL, LJUST, label, 0, CHAR, NULL, 0},
+ {"lim", "LIM", NULL, 0, maxrss, 0, CHAR, NULL, 0},
+ {"lockname", "LOCK", NULL, LJUST, lockname, 0, CHAR, NULL, 0},
+ {"login", "LOGIN", NULL, LJUST, logname, 0, CHAR, NULL, 0},
+ {"logname", "", "login", 0, NULL, 0, CHAR, NULL, 0},
+ {"lstart", "STARTED", NULL, LJUST|USER, lstarted, 0, CHAR, NULL, 0},
+ {"lwp", "LWP", NULL, 0, kvar, KOFF(ki_tid), UINT, LWPFMT, 0},
+ {"majflt", "MAJFLT", NULL, USER, rvar, ROFF(ru_majflt), LONG, "ld", 0},
+ {"minflt", "MINFLT", NULL, USER, rvar, ROFF(ru_minflt), LONG, "ld", 0},
+ {"msgrcv", "MSGRCV", NULL, USER, rvar, ROFF(ru_msgrcv), LONG, "ld", 0},
+ {"msgsnd", "MSGSND", NULL, USER, rvar, ROFF(ru_msgsnd), LONG, "ld", 0},
+ {"mwchan", "MWCHAN", NULL, LJUST, mwchan, 0, CHAR, NULL, 0},
+ {"ni", "", "nice", 0, NULL, 0, CHAR, NULL, 0},
+ {"nice", "NI", NULL, 0, kvar, KOFF(ki_nice), CHAR, "d", 0},
+ {"nivcsw", "NIVCSW", NULL, USER, rvar, ROFF(ru_nivcsw), LONG, "ld", 0},
+ {"nlwp", "NLWP", NULL, 0, kvar, KOFF(ki_numthreads), UINT, NLWPFMT, 0},
+ {"nsignals", "", "nsigs", 0, NULL, 0, CHAR, NULL, 0},
+ {"nsigs", "NSIGS", NULL, USER, rvar, ROFF(ru_nsignals), LONG, "ld", 0},
+ {"nswap", "NSWAP", NULL, USER, rvar, ROFF(ru_nswap), LONG, "ld", 0},
+ {"nvcsw", "NVCSW", NULL, USER, rvar, ROFF(ru_nvcsw), LONG, "ld", 0},
+ {"nwchan", "NWCHAN", NULL, LJUST, nwchan, 0, CHAR, NULL, 0},
+ {"oublk", "OUBLK", NULL, USER, rvar, ROFF(ru_oublock), LONG, "ld", 0},
+ {"oublock", "", "oublk", 0, NULL, 0, CHAR, NULL, 0},
+ {"paddr", "PADDR", NULL, 0, kvar, KOFF(ki_paddr), KPTR, "lx", 0},
+ {"pagein", "PAGEIN", NULL, USER, pagein, 0, CHAR, NULL, 0},
+ {"pcpu", "", "%cpu", 0, NULL, 0, CHAR, NULL, 0},
+ {"pending", "", "sig", 0, NULL, 0, CHAR, NULL, 0},
+ {"pgid", "PGID", NULL, 0, kvar, KOFF(ki_pgid), UINT, PIDFMT, 0},
+ {"pid", "PID", NULL, 0, kvar, KOFF(ki_pid), UINT, PIDFMT, 0},
+ {"pmem", "", "%mem", 0, NULL, 0, CHAR, NULL, 0},
+ {"ppid", "PPID", NULL, 0, kvar, KOFF(ki_ppid), UINT, PIDFMT, 0},
+ {"pri", "PRI", NULL, 0, pri, 0, CHAR, NULL, 0},
+ {"re", "RE", NULL, INF127, kvar, KOFF(ki_swtime), UINT, "d", 0},
+ {"rgid", "RGID", NULL, 0, kvar, KOFF(ki_rgid), UINT, UIDFMT, 0},
+ {"rgroup", "RGROUP", NULL, LJUST, rgroupname, 0, CHAR, NULL, 0},
+ {"rss", "RSS", NULL, 0, kvar, KOFF(ki_rssize), PGTOK, "ld", 0},
+ {"rtprio", "RTPRIO", NULL, 0, priorityr, KOFF(ki_pri), CHAR, NULL, 0},
+ {"ruid", "RUID", NULL, 0, kvar, KOFF(ki_ruid), UINT, UIDFMT, 0},
+ {"ruser", "RUSER", NULL, LJUST, runame, 0, CHAR, NULL, 0},
+ {"sid", "SID", NULL, 0, kvar, KOFF(ki_sid), UINT, PIDFMT, 0},
+ {"sig", "PENDING", NULL, 0, kvar, KOFF(ki_siglist), INT, "x", 0},
+ {"sigcatch", "CAUGHT", NULL, 0, kvar, KOFF(ki_sigcatch), UINT, "x", 0},
+ {"sigignore", "IGNORED", NULL, 0, kvar, KOFF(ki_sigignore),
UINT, "x", 0},
- {"sigmask", "BLOCKED", NULL, 0, kvar, NULL, 8, KOFF(ki_sigmask),
- UINT, "x", 0},
- {"sl", "SL", NULL, INF127, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d",
- 0},
- {"start", "STARTED", NULL, LJUST|USER, started, NULL, 7, 0, CHAR, NULL,
- 0},
- {"stat", "", "state", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"state", "STAT", NULL, 0, state, NULL, 4, 0, CHAR, NULL, 0},
- {"svgid", "SVGID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svgid),
- UINT, UIDFMT, 0},
- {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid),
- UINT, UIDFMT, 0},
- {"systime", "SYSTIME", NULL, USER, systime, s_systime, 15, 0, CHAR,
- NULL, 0},
- {"tdaddr", "TDADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2,
- KOFF(ki_tdaddr), KPTR, "lx", 0},
- {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0},
- {"tdnam", "TDNAM", NULL, LJUST, tdnam, NULL, COMMLEN, 0, CHAR, NULL, 0},
- {"time", "TIME", NULL, USER, cputime, s_cputime, 15, 0, CHAR,
- NULL, 0},
- {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT,
- PIDFMT, 0},
- {"tsid", "TSID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_tsid), UINT,
- PIDFMT, 0},
- {"tsiz", "TSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_tsize), PGTOK, "ld", 0},
- {"tt", "TT ", NULL, 0, tname, NULL, 4, 0, CHAR, NULL, 0},
- {"tty", "TTY", NULL, LJUST, longtname, NULL, 8, 0, CHAR, NULL, 0},
- {"ucomm", "UCOMM", NULL, LJUST, ucomm, s_comm,
- COMMLEN + TDNAMLEN + 1, 0, CHAR, NULL, 0},
- {"uid", "UID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_uid), UINT,
- UIDFMT, 0},
- {"upr", "UPR", NULL, 0, upr, NULL, 3, 0, CHAR, NULL, 0},
- {"uprocp", "UPROCP", NULL, 0, kvar, NULL, sizeof(void *) * 2,
- KOFF(ki_paddr), KPTR, "lx", 0},
- {"user", "USER", NULL, LJUST, uname, s_uname, USERLEN, 0, CHAR,
- NULL, 0},
- {"usertime", "USERTIME", NULL, USER, usertime, s_usertime, 15, 0,
- CHAR, NULL, 0},
- {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
- {"vsz", "VSZ", NULL, 0, vsize, NULL, 6, 0, CHAR, NULL, 0},
- {"wchan", "WCHAN", NULL, LJUST, wchan, NULL, 6, 0, CHAR, NULL, 0},
- {"xstat", "XSTAT", NULL, 0, kvar, NULL, 4, KOFF(ki_xstat), USHORT,
- "x", 0},
- {"", NULL, NULL, 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+ {"sigmask", "BLOCKED", NULL, 0, kvar, KOFF(ki_sigmask), UINT, "x", 0},
+ {"sl", "SL", NULL, INF127, kvar, KOFF(ki_slptime), UINT, "d", 0},
+ {"start", "STARTED", NULL, LJUST|USER, started, 0, CHAR, NULL, 0},
+ {"stat", "", "state", 0, NULL, 0, CHAR, NULL, 0},
+ {"state", "STAT", NULL, LJUST, state, 0, CHAR, NULL, 0},
+ {"svgid", "SVGID", NULL, 0, kvar, KOFF(ki_svgid), UINT, UIDFMT, 0},
+ {"svuid", "SVUID", NULL, 0, kvar, KOFF(ki_svuid), UINT, UIDFMT, 0},
+ {"systime", "SYSTIME", NULL, USER, systime, 0, CHAR, NULL, 0},
+ {"tdaddr", "TDADDR", NULL, 0, kvar, KOFF(ki_tdaddr), KPTR, "lx", 0},
+ {"tdev", "TDEV", NULL, 0, tdev, 0, CHAR, NULL, 0},
+ {"tdnam", "TDNAM", NULL, LJUST, tdnam, 0, CHAR, NULL, 0},
+ {"time", "TIME", NULL, USER, cputime, 0, CHAR, NULL, 0},
+ {"tpgid", "TPGID", NULL, 0, kvar, KOFF(ki_tpgid), UINT, PIDFMT, 0},
+ {"tsid", "TSID", NULL, 0, kvar, KOFF(ki_tsid), UINT, PIDFMT, 0},
+ {"tsiz", "TSIZ", NULL, 0, kvar, KOFF(ki_tsize), PGTOK, "ld", 0},
+ {"tt", "TT ", NULL, 0, tname, 0, CHAR, NULL, 0},
+ {"tty", "TTY", NULL, LJUST, longtname, 0, CHAR, NULL, 0},
+ {"ucomm", "UCOMM", NULL, LJUST, ucomm, 0, CHAR, NULL, 0},
+ {"uid", "UID", NULL, 0, kvar, KOFF(ki_uid), UINT, UIDFMT, 0},
+ {"upr", "UPR", NULL, 0, upr, 0, CHAR, NULL, 0},
+ {"uprocp", "UPROCP", NULL, 0, kvar, KOFF(ki_paddr), KPTR, "lx", 0},
+ {"user", "USER", NULL, LJUST, uname, 0, CHAR, NULL, 0},
+ {"usertime", "USERTIME", NULL, USER, usertime, 0, CHAR, NULL, 0},
+ {"usrpri", "", "upr", 0, NULL, 0, CHAR, NULL, 0},
+ {"vsize", "", "vsz", 0, NULL, 0, CHAR, NULL, 0},
+ {"vsz", "VSZ", NULL, 0, vsize, 0, CHAR, NULL, 0},
+ {"wchan", "WCHAN", NULL, LJUST, wchan, 0, CHAR, NULL, 0},
+ {"xstat", "XSTAT", NULL, 0, kvar, KOFF(ki_xstat), USHORT, "x", 0},
+ {"", NULL, NULL, 0, NULL, 0, CHAR, NULL, 0},
};
void
Modified: projects/virtio/bin/ps/print.c
==============================================================================
--- projects/virtio/bin/ps/print.c Tue Oct 4 04:00:29 2011 (r225958)
+++ projects/virtio/bin/ps/print.c Tue Oct 4 04:13:34 2011 (r225959)
@@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$");
#include "ps.h"
+#define COMMAND_WIDTH 16
+#define ARGUMENTS_WIDTH 16
+
#define ps_pgtok(a) (((a) * getpagesize()) / 1024)
void
@@ -93,53 +96,42 @@ printheader(void)
(void)putchar('\n');
}
-void
+char *
arguments(KINFO *k, VARENT *ve)
{
VAR *v;
- int left;
- char *cp, *vis_args;
+ char *vis_args;
v = ve->var;
if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL)
errx(1, "malloc failed");
strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH);
- if (STAILQ_NEXT(ve, next_ve) == NULL) {
- /* last field */
- if (termwidth == UNLIMITED) {
- (void)printf("%s", vis_args);
- } else {
- left = termwidth - (totwidth - v->width);
- if (left < 1) /* already wrapped, just use std width */
- left = v->width;
- for (cp = vis_args; --left >= 0 && *cp != '\0';)
- (void)putchar(*cp++);
- }
- } else {
- (void)printf("%-*.*s", v->width, v->width, vis_args);
- }
- free(vis_args);
+
+ if (STAILQ_NEXT(ve, next_ve) != NULL && strlen(vis_args) > ARGUMENTS_WIDTH)
+ vis_args[ARGUMENTS_WIDTH] = '\0';
+
+ return (vis_args);
}
-void
+char *
command(KINFO *k, VARENT *ve)
{
VAR *v;
- int left;
- char *cp, *vis_env, *vis_args;
+ char *vis_args, *vis_env, *str;
v = ve->var;
if (cflag) {
/* If it is the last field, then don't pad */
if (STAILQ_NEXT(ve, next_ve) == NULL) {
- if (k->ki_d.prefix)
- (void)printf("%s", k->ki_d.prefix);
- (void)printf("%s", k->ki_p->ki_comm);
- if (showthreads && k->ki_p->ki_numthreads > 1)
- (void)printf("/%s", k->ki_p->ki_tdname);
+ asprintf(&str, "%s%s%s%s",
+ k->ki_d.prefix ? k->ki_d.prefix : "",
+ k->ki_p->ki_comm,
+ (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "",
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "");
} else
- (void)printf("%-*s", v->width, k->ki_p->ki_comm);
- return;
+ str = strdup(k->ki_p->ki_comm);
+
+ return (str);
}
if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL)
errx(1, "malloc failed");
@@ -157,89 +149,84 @@ command(KINFO *k, VARENT *ve)
} else
vis_env = NULL;
- if (termwidth == UNLIMITED) {
- if (k->ki_d.prefix)
- (void)printf("%s", k->ki_d.prefix);
- if (vis_env)
- (void)printf("%s ", vis_env);
- (void)printf("%s", vis_args);
- } else {
- left = termwidth - (totwidth - v->width);
- if (left < 1) /* already wrapped, just use std width */
- left = v->width;
- if ((cp = k->ki_d.prefix) != NULL)
- while (--left >= 0 && *cp)
- (void)putchar(*cp++);
- if ((cp = vis_env) != NULL) {
- while (--left >= 0 && *cp)
- (void)putchar(*cp++);
- if (--left >= 0)
- putchar(' ');
- }
- for (cp = vis_args; --left >= 0 && *cp != '\0';)
- (void)putchar(*cp++);
- }
+ asprintf(&str, "%s%s%s%s",
+ k->ki_d.prefix ? k->ki_d.prefix : "",
+ vis_env ? vis_env : "",
+ vis_env ? " " : "",
+ vis_args);
+
if (vis_env != NULL)
free(vis_env);
- } else
+ free(vis_args);
+ } else {
/* ki_d.prefix & ki_env aren't shown for interim fields */
- (void)printf("%-*.*s", v->width, v->width, vis_args);
- free(vis_args);
+ str = vis_args;
+
+ if (strlen(str) > COMMAND_WIDTH)
+ str[COMMAND_WIDTH] = '\0';
+ }
+
+ return (str);
}
-void
+char *
ucomm(KINFO *k, VARENT *ve)
{
- char tmpbuff[COMMLEN + TDNAMLEN + 2];
VAR *v;
+ char *str;
v = ve->var;
if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */
- if (k->ki_d.prefix)
- (void)printf("%s", k->ki_d.prefix);
- (void)printf("%s", k->ki_p->ki_comm);
- if (showthreads && k->ki_p->ki_numthreads > 1)
- printf("/%s", k->ki_p->ki_tdname);
+ asprintf(&str, "%s%s%s%s",
+ k->ki_d.prefix ? k->ki_d.prefix : "",
+ k->ki_p->ki_comm,
+ (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "",
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "");
} else {
- bzero(tmpbuff, sizeof(tmpbuff));
if (showthreads && k->ki_p->ki_numthreads > 1)
- sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm,
- k->ki_p->ki_tdname);
+ asprintf(&str, "%s/%s", k->ki_p->ki_comm, k->ki_p->ki_tdname);
else
- sprintf(tmpbuff, "%s", k->ki_p->ki_comm);
- (void)printf("%-*s", v->width, tmpbuff);
+ str = strdup(k->ki_p->ki_comm);
}
+ return (str);
}
-void
+char *
tdnam(KINFO *k, VARENT *ve)
{
VAR *v;
+ char *str;
v = ve->var;
if (showthreads && k->ki_p->ki_numthreads > 1)
- (void)printf("%-*s", v->width, k->ki_p->ki_tdname);
+ str = strdup(k->ki_p->ki_tdname);
else
- (void)printf("%-*s", v->width, " ");
+ str = strdup(" ");
+
+ return (str);
}
-void
+char *
logname(KINFO *k, VARENT *ve)
{
VAR *v;
- char *s;
v = ve->var;
- (void)printf("%-*s", v->width, (s = k->ki_p->ki_login, *s) ? s : "-");
+ if (*k->ki_p->ki_login == '\0')
+ return (NULL);
+ return (strdup(k->ki_p->ki_login));
}
-void
+char *
state(KINFO *k, VARENT *ve)
{
int flag, tdflags;
- char *cp;
+ char *cp, *buf;
VAR *v;
- char buf[16];
+
+ buf = malloc(16);
+ if (buf == NULL)
+ errx(1, "malloc failed");
v = ve->var;
flag = k->ki_p->ki_flag;
@@ -301,278 +288,270 @@ state(KINFO *k, VARENT *ve)
if (flag & P_JAILED)
*cp++ = 'J';
*cp = '\0';
- (void)printf("%-*s", v->width, buf);
+ return (buf);
}
#define scalepri(x) ((x) - PZERO)
-void
+char *
pri(KINFO *k, VARENT *ve)
{
VAR *v;
+ char *str;
v = ve->var;
- (void)printf("%*d", v->width, scalepri(k->ki_p->ki_pri.pri_level));
+ asprintf(&str, "%d", scalepri(k->ki_p->ki_pri.pri_level));
+ return (str);
}
-void
+char *
upr(KINFO *k, VARENT *ve)
{
VAR *v;
+ char *str;
v = ve->var;
- (void)printf("%*d", v->width, scalepri(k->ki_p->ki_pri.pri_user));
+ asprintf(&str, "%d", scalepri(k->ki_p->ki_pri.pri_user));
+ return (str);
}
#undef scalepri
-void
+char *
uname(KINFO *k, VARENT *ve)
{
VAR *v;
v = ve->var;
- (void)printf("%-*s", v->width, user_from_uid(k->ki_p->ki_uid, 0));
-}
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list