Date: Tue, 13 Nov 2012 15:21:02 +0000 (UTC) From: Aleksandr Rybalko <ray@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r242978 - in projects/efika_mx: . bin/ls bin/sh cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libdtrace/powerpc cddl/lib cddl/lib/libdtrace cddl/usr.sbin contrib/gdb/g... Message-ID: <201211131521.qADFL2Pp069659@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ray Date: Tue Nov 13 15:21:01 2012 New Revision: 242978 URL: http://svnweb.freebsd.org/changeset/base/242978 Log: MFC @r242977. Added: projects/efika_mx/cddl/contrib/opensolaris/lib/libdtrace/powerpc/ - copied from r242977, head/cddl/contrib/opensolaris/lib/libdtrace/powerpc/ projects/efika_mx/lib/libc/gen/waitid.c - copied unchanged from r242977, head/lib/libc/gen/waitid.c projects/efika_mx/lib/libcrypt/tests/ - copied from r242977, head/lib/libcrypt/tests/ projects/efika_mx/share/mk/atf.test.mk - copied unchanged from r242977, head/share/mk/atf.test.mk projects/efika_mx/share/mk/bsd.test.mk - copied unchanged from r242977, head/share/mk/bsd.test.mk projects/efika_mx/sys/cddl/contrib/opensolaris/uts/powerpc/ - copied from r242977, head/sys/cddl/contrib/opensolaris/uts/powerpc/ projects/efika_mx/sys/cddl/dev/dtrace/powerpc/ - copied from r242977, head/sys/cddl/dev/dtrace/powerpc/ projects/efika_mx/sys/dev/ath/if_ath_alq.c - copied unchanged from r242977, head/sys/dev/ath/if_ath_alq.c projects/efika_mx/sys/dev/ath/if_ath_alq.h - copied unchanged from r242977, head/sys/dev/ath/if_ath_alq.h projects/efika_mx/sys/mips/cavium/octeon_pci_console.c - copied unchanged from r242977, head/sys/mips/cavium/octeon_pci_console.c projects/efika_mx/tools/regression/bin/sh/builtins/alias3.0 - copied unchanged from r242977, head/tools/regression/bin/sh/builtins/alias3.0 projects/efika_mx/tools/regression/bin/sh/builtins/alias3.0.stdout - copied unchanged from r242977, head/tools/regression/bin/sh/builtins/alias3.0.stdout projects/efika_mx/tools/regression/bin/sh/parser/alias10.0 - copied unchanged from r242977, head/tools/regression/bin/sh/parser/alias10.0 projects/efika_mx/tools/regression/bin/sh/parser/alias9.0 - copied unchanged from r242977, head/tools/regression/bin/sh/parser/alias9.0 Modified: projects/efika_mx/Makefile.inc1 projects/efika_mx/bin/ls/cmp.c projects/efika_mx/bin/ls/extern.h projects/efika_mx/bin/ls/ls.1 projects/efika_mx/bin/ls/ls.c projects/efika_mx/bin/ls/ls.h projects/efika_mx/bin/ls/print.c projects/efika_mx/bin/ls/util.c projects/efika_mx/bin/sh/alias.c projects/efika_mx/bin/sh/input.c projects/efika_mx/bin/sh/input.h projects/efika_mx/cddl/contrib/opensolaris/cmd/ztest/ztest.c projects/efika_mx/cddl/lib/Makefile projects/efika_mx/cddl/lib/libdtrace/Makefile projects/efika_mx/cddl/usr.sbin/Makefile projects/efika_mx/contrib/gdb/gdb/c-valprint.c projects/efika_mx/contrib/gdb/gdb/cp-valprint.c projects/efika_mx/contrib/gdb/gdb/dwarf2loc.c projects/efika_mx/contrib/gdb/gdb/f-valprint.c projects/efika_mx/contrib/gdb/gdb/frame.c projects/efika_mx/contrib/gdb/gdb/jv-valprint.c projects/efika_mx/contrib/gdb/gdb/p-valprint.c projects/efika_mx/contrib/gdb/gdb/scm-valprint.c projects/efika_mx/contrib/gdb/gdb/stack.c projects/efika_mx/contrib/gdb/gdb/valprint.c projects/efika_mx/contrib/gdb/gdb/value.h projects/efika_mx/contrib/gdb/gdb/varobj.c projects/efika_mx/contrib/jemalloc/ChangeLog projects/efika_mx/contrib/jemalloc/FREEBSD-diffs projects/efika_mx/contrib/jemalloc/VERSION projects/efika_mx/contrib/jemalloc/doc/jemalloc.3 projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/arena.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/chunk.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/ctl.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/extent.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/huge.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/private_namespace.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/prof.h projects/efika_mx/contrib/jemalloc/include/jemalloc/internal/rtree.h projects/efika_mx/contrib/jemalloc/include/jemalloc/jemalloc.h projects/efika_mx/contrib/jemalloc/include/jemalloc/jemalloc_defs.h projects/efika_mx/contrib/jemalloc/src/arena.c projects/efika_mx/contrib/jemalloc/src/base.c projects/efika_mx/contrib/jemalloc/src/chunk.c projects/efika_mx/contrib/jemalloc/src/chunk_dss.c projects/efika_mx/contrib/jemalloc/src/chunk_mmap.c projects/efika_mx/contrib/jemalloc/src/ctl.c projects/efika_mx/contrib/jemalloc/src/huge.c projects/efika_mx/contrib/jemalloc/src/jemalloc.c projects/efika_mx/contrib/jemalloc/src/mutex.c projects/efika_mx/contrib/jemalloc/src/prof.c projects/efika_mx/contrib/jemalloc/src/rtree.c projects/efika_mx/contrib/jemalloc/src/stats.c projects/efika_mx/contrib/jemalloc/src/tcache.c projects/efika_mx/contrib/jemalloc/src/util.c projects/efika_mx/contrib/libc++/include/__config projects/efika_mx/contrib/libc++/include/__functional_base projects/efika_mx/contrib/libc++/include/__functional_base_03 projects/efika_mx/contrib/libc++/include/__locale projects/efika_mx/contrib/libc++/include/__mutex_base projects/efika_mx/contrib/libc++/include/algorithm projects/efika_mx/contrib/libc++/include/cmath projects/efika_mx/contrib/libc++/include/complex projects/efika_mx/contrib/libc++/include/condition_variable projects/efika_mx/contrib/libc++/include/cstddef projects/efika_mx/contrib/libc++/include/ext/__hash projects/efika_mx/contrib/libc++/include/future projects/efika_mx/contrib/libc++/include/ios projects/efika_mx/contrib/libc++/include/istream projects/efika_mx/contrib/libc++/include/iterator projects/efika_mx/contrib/libc++/include/locale projects/efika_mx/contrib/libc++/include/memory projects/efika_mx/contrib/libc++/include/ostream projects/efika_mx/contrib/libc++/include/random projects/efika_mx/contrib/libc++/include/streambuf projects/efika_mx/contrib/libc++/include/string projects/efika_mx/contrib/libc++/include/system_error projects/efika_mx/contrib/libc++/include/tuple projects/efika_mx/contrib/libc++/include/type_traits projects/efika_mx/contrib/libc++/include/utility projects/efika_mx/contrib/libc++/include/valarray projects/efika_mx/contrib/libc++/include/vector projects/efika_mx/contrib/libc++/src/memory.cpp projects/efika_mx/contrib/llvm/lib/Target/X86/X86Subtarget.cpp projects/efika_mx/contrib/top/commands.c projects/efika_mx/contrib/tzdata/asia projects/efika_mx/contrib/tzdata/northamerica projects/efika_mx/etc/atf/FreeBSD.conf projects/efika_mx/etc/atf/common.conf projects/efika_mx/etc/pccard_ether projects/efika_mx/lib/Makefile projects/efika_mx/lib/atf/libatf-c++/Makefile projects/efika_mx/lib/libc/gen/Makefile.inc projects/efika_mx/lib/libc/gen/Symbol.map projects/efika_mx/lib/libc/gen/isnan.c projects/efika_mx/lib/libc/include/namespace.h projects/efika_mx/lib/libc/include/un-namespace.h projects/efika_mx/lib/libc/stdio/printf.3 projects/efika_mx/lib/libc/sys/Makefile.inc projects/efika_mx/lib/libc/sys/Symbol.map projects/efika_mx/lib/libc/sys/wait.2 projects/efika_mx/lib/libproc/proc_bkpt.c projects/efika_mx/lib/libproc/proc_regs.c projects/efika_mx/lib/msun/src/k_rem_pio2.c projects/efika_mx/lib/msun/src/s_isnan.c projects/efika_mx/release/Makefile projects/efika_mx/release/doc/share/xml/release.ent projects/efika_mx/sbin/ifconfig/ifconfig.8 projects/efika_mx/secure/usr.bin/bdes/bdes.1 projects/efika_mx/share/man/man4/icmp6.4 projects/efika_mx/share/man/man4/ipsec.4 projects/efika_mx/share/mk/Makefile projects/efika_mx/share/mk/bsd.progs.mk projects/efika_mx/share/mk/bsd.subdir.mk projects/efika_mx/sys/amd64/amd64/identcpu.c projects/efika_mx/sys/arm/arm/machdep.c projects/efika_mx/sys/arm/at91/at91_machdep.c projects/efika_mx/sys/arm/lpc/lpc_gpio.c projects/efika_mx/sys/boot/common/Makefile.inc projects/efika_mx/sys/boot/forth/menu.4th projects/efika_mx/sys/boot/i386/boot2/sio.S projects/efika_mx/sys/boot/i386/loader/Makefile projects/efika_mx/sys/boot/ia64/common/Makefile projects/efika_mx/sys/boot/pc98/Makefile.inc projects/efika_mx/sys/boot/pc98/boot2/Makefile projects/efika_mx/sys/boot/pc98/boot2/boot2.c projects/efika_mx/sys/boot/pc98/btx/btx/btx.S projects/efika_mx/sys/boot/pc98/cdboot/Makefile projects/efika_mx/sys/boot/pc98/libpc98/comconsole.c projects/efika_mx/sys/boot/pc98/loader/Makefile projects/efika_mx/sys/boot/powerpc/ofw/Makefile projects/efika_mx/sys/boot/powerpc/ps3/Makefile projects/efika_mx/sys/boot/sparc64/loader/Makefile projects/efika_mx/sys/boot/userboot/test/test.c projects/efika_mx/sys/boot/userboot/userboot.h projects/efika_mx/sys/boot/userboot/userboot/main.c projects/efika_mx/sys/bsm/audit_kevents.h projects/efika_mx/sys/cam/scsi/scsi_enc_ses.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h projects/efika_mx/sys/cddl/dev/lockstat/lockstat.c projects/efika_mx/sys/cddl/dev/profile/profile.c projects/efika_mx/sys/compat/freebsd32/freebsd32.h projects/efika_mx/sys/compat/freebsd32/freebsd32_misc.c projects/efika_mx/sys/compat/freebsd32/freebsd32_proto.h projects/efika_mx/sys/compat/freebsd32/freebsd32_syscall.h projects/efika_mx/sys/compat/freebsd32/freebsd32_syscalls.c projects/efika_mx/sys/compat/freebsd32/freebsd32_sysent.c projects/efika_mx/sys/compat/freebsd32/freebsd32_systrace_args.c projects/efika_mx/sys/compat/freebsd32/syscalls.master projects/efika_mx/sys/conf/Makefile.pc98 projects/efika_mx/sys/conf/files projects/efika_mx/sys/conf/kern.pre.mk projects/efika_mx/sys/contrib/octeon-sdk/octeon-pci-console.c projects/efika_mx/sys/dev/aac/aac_debug.c projects/efika_mx/sys/dev/acpica/acpivar.h projects/efika_mx/sys/dev/adb/adb_mouse.c projects/efika_mx/sys/dev/ahci/ahciem.c projects/efika_mx/sys/dev/asmc/asmc.c projects/efika_mx/sys/dev/ath/ath_hal/ah.h projects/efika_mx/sys/dev/ath/ath_hal/ah_debug.h projects/efika_mx/sys/dev/ath/ath_hal/ah_internal.h projects/efika_mx/sys/dev/ath/if_ath.c projects/efika_mx/sys/dev/ath/if_ath_rx.c projects/efika_mx/sys/dev/ath/if_ath_rx_edma.c projects/efika_mx/sys/dev/ath/if_ath_sysctl.c projects/efika_mx/sys/dev/ath/if_ath_tx.c projects/efika_mx/sys/dev/ath/if_ath_tx_edma.c projects/efika_mx/sys/dev/ath/if_athvar.h projects/efika_mx/sys/dev/bktr/bktr_audio.c projects/efika_mx/sys/dev/ct/bshw_machdep.c projects/efika_mx/sys/dev/ct/ct.c projects/efika_mx/sys/dev/ct/ct_isa.c projects/efika_mx/sys/dev/ct/ct_machdep.h projects/efika_mx/sys/dev/drm/via_dma.c projects/efika_mx/sys/dev/drm/via_dmablit.c projects/efika_mx/sys/dev/etherswitch/arswitch/arswitch.c projects/efika_mx/sys/dev/iicbus/iic.c projects/efika_mx/sys/dev/md/md.c projects/efika_mx/sys/dev/mfi/mfi.c projects/efika_mx/sys/dev/mfi/mfi_cam.c projects/efika_mx/sys/dev/mfi/mfi_disk.c projects/efika_mx/sys/dev/mfi/mfi_syspd.c projects/efika_mx/sys/dev/mfi/mfi_tbolt.c projects/efika_mx/sys/dev/mfi/mfivar.h projects/efika_mx/sys/dev/mn/if_mn.c projects/efika_mx/sys/dev/nve/if_nve.c projects/efika_mx/sys/dev/nxge/xgehal/xgehal-device.c projects/efika_mx/sys/dev/puc/pucdata.c projects/efika_mx/sys/dev/snc/dp83932.c projects/efika_mx/sys/dev/snc/dp83932subr.c projects/efika_mx/sys/dev/snc/if_snc.c projects/efika_mx/sys/dev/snc/if_snc_cbus.c projects/efika_mx/sys/dev/sound/pci/emu10kx.c projects/efika_mx/sys/dev/twa/tw_cl_misc.c projects/efika_mx/sys/dev/usb/controller/dwc_otg.c projects/efika_mx/sys/dev/usb/controller/dwc_otg.h projects/efika_mx/sys/dev/usb/controller/dwc_otgreg.h projects/efika_mx/sys/dev/usb/net/if_udav.c projects/efika_mx/sys/dev/usb/serial/u3g.c projects/efika_mx/sys/dev/usb/serial/usb_serial.c projects/efika_mx/sys/dev/usb/usbdevs projects/efika_mx/sys/dev/xen/netback/netback_unit_tests.c projects/efika_mx/sys/fs/cd9660/cd9660_vfsops.c projects/efika_mx/sys/fs/devfs/devfs_vfsops.c projects/efika_mx/sys/fs/ext2fs/ext2_vfsops.c projects/efika_mx/sys/fs/fdescfs/fdesc_vfsops.c projects/efika_mx/sys/fs/fuse/fuse_file.c projects/efika_mx/sys/fs/fuse/fuse_internal.c projects/efika_mx/sys/fs/fuse/fuse_internal.h projects/efika_mx/sys/fs/fuse/fuse_io.c projects/efika_mx/sys/fs/fuse/fuse_node.c projects/efika_mx/sys/fs/fuse/fuse_node.h projects/efika_mx/sys/fs/fuse/fuse_vfsops.c projects/efika_mx/sys/fs/fuse/fuse_vnops.c projects/efika_mx/sys/fs/msdosfs/msdosfs_vfsops.c projects/efika_mx/sys/fs/nandfs/nandfs_vfsops.c projects/efika_mx/sys/fs/nfsclient/nfs_clvfsops.c projects/efika_mx/sys/fs/nullfs/null_vfsops.c projects/efika_mx/sys/fs/pseudofs/pseudofs.c projects/efika_mx/sys/fs/tmpfs/tmpfs_vfsops.c projects/efika_mx/sys/fs/udf/udf_vfsops.c projects/efika_mx/sys/fs/unionfs/union_vfsops.c projects/efika_mx/sys/fs/unionfs/union_vnops.c projects/efika_mx/sys/gnu/fs/reiserfs/reiserfs_vfsops.c projects/efika_mx/sys/i386/include/vmparam.h projects/efika_mx/sys/i386/xen/clock.c projects/efika_mx/sys/kern/init_sysent.c projects/efika_mx/sys/kern/kern_exit.c projects/efika_mx/sys/kern/kern_malloc.c projects/efika_mx/sys/kern/kern_mbuf.c projects/efika_mx/sys/kern/kern_racct.c projects/efika_mx/sys/kern/sched_ule.c projects/efika_mx/sys/kern/subr_param.c projects/efika_mx/sys/kern/sys_procdesc.c projects/efika_mx/sys/kern/syscalls.c projects/efika_mx/sys/kern/syscalls.master projects/efika_mx/sys/kern/systrace_args.c projects/efika_mx/sys/kern/tty.c projects/efika_mx/sys/kern/uipc_mqueue.c projects/efika_mx/sys/kern/vfs_subr.c projects/efika_mx/sys/mips/cavium/files.octeon1 projects/efika_mx/sys/mips/conf/AP91.hints projects/efika_mx/sys/mips/conf/AP93.hints projects/efika_mx/sys/mips/conf/AP96.hints projects/efika_mx/sys/mips/conf/OCTEON1 projects/efika_mx/sys/mips/conf/RSPRO.hints projects/efika_mx/sys/modules/Makefile projects/efika_mx/sys/modules/dtrace/Makefile projects/efika_mx/sys/modules/nxge/Makefile projects/efika_mx/sys/netinet/sctp_constants.h projects/efika_mx/sys/netinet/sctp_indata.c projects/efika_mx/sys/netinet/sctp_input.c projects/efika_mx/sys/netinet/sctp_output.c projects/efika_mx/sys/netinet/sctp_pcb.c projects/efika_mx/sys/netinet/sctp_structs.h projects/efika_mx/sys/netinet/sctp_timer.c projects/efika_mx/sys/netinet/sctputil.c projects/efika_mx/sys/netinet/tcp_output.c projects/efika_mx/sys/netinet/tcp_subr.c projects/efika_mx/sys/netinet/tcp_timewait.c projects/efika_mx/sys/netinet6/in6_src.c projects/efika_mx/sys/netpfil/ipfw/ip_fw_dynamic.c projects/efika_mx/sys/netpfil/pf/if_pfsync.c projects/efika_mx/sys/nfsclient/nfs_vfsops.c projects/efika_mx/sys/ofed/drivers/infiniband/core/cma.c projects/efika_mx/sys/ofed/drivers/infiniband/core/ud_header.c projects/efika_mx/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c projects/efika_mx/sys/ofed/include/linux/cdev.h projects/efika_mx/sys/ofed/include/linux/pci.h projects/efika_mx/sys/pc98/include/bus.h projects/efika_mx/sys/pc98/pc98/machdep.c projects/efika_mx/sys/powerpc/aim/locore32.S projects/efika_mx/sys/powerpc/aim/locore64.S projects/efika_mx/sys/powerpc/aim/trap.c projects/efika_mx/sys/powerpc/aim/trap_subr32.S projects/efika_mx/sys/powerpc/aim/trap_subr64.S projects/efika_mx/sys/powerpc/conf/GENERIC projects/efika_mx/sys/powerpc/include/bat.h projects/efika_mx/sys/sys/_mutex.h projects/efika_mx/sys/sys/_rwlock.h projects/efika_mx/sys/sys/mount.h projects/efika_mx/sys/sys/proc.h projects/efika_mx/sys/sys/resource.h projects/efika_mx/sys/sys/syscall.h projects/efika_mx/sys/sys/syscall.mk projects/efika_mx/sys/sys/syscallsubr.h projects/efika_mx/sys/sys/sysproto.h projects/efika_mx/sys/sys/types.h projects/efika_mx/sys/sys/vmmeter.h projects/efika_mx/sys/sys/wait.h projects/efika_mx/sys/ufs/ffs/ffs_softdep.c projects/efika_mx/sys/ufs/ffs/ffs_vfsops.c projects/efika_mx/sys/vm/vm_fault.c projects/efika_mx/sys/vm/vm_map.c projects/efika_mx/sys/vm/vm_page.c projects/efika_mx/sys/vm/vm_page.h projects/efika_mx/sys/vm/vm_pageout.c projects/efika_mx/usr.bin/calendar/calendars/calendar.history projects/efika_mx/usr.bin/clang/clang/Makefile projects/efika_mx/usr.bin/locale/locale.1 projects/efika_mx/usr.bin/locale/locale.c projects/efika_mx/usr.bin/ssh-copy-id/ssh-copy-id.1 projects/efika_mx/usr.bin/ssh-copy-id/ssh-copy-id.sh projects/efika_mx/usr.bin/top/machine.c projects/efika_mx/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Directory Properties: projects/efika_mx/ (props changed) projects/efika_mx/cddl/contrib/opensolaris/ (props changed) projects/efika_mx/contrib/gdb/ (props changed) projects/efika_mx/contrib/libc++/ (props changed) projects/efika_mx/contrib/llvm/ (props changed) projects/efika_mx/contrib/top/ (props changed) projects/efika_mx/contrib/tzdata/ (props changed) projects/efika_mx/lib/libc/ (props changed) projects/efika_mx/sbin/ (props changed) projects/efika_mx/share/man/man4/ (props changed) projects/efika_mx/sys/ (props changed) projects/efika_mx/sys/boot/ (props changed) projects/efika_mx/sys/boot/powerpc/ofw/ (props changed) projects/efika_mx/sys/cddl/contrib/opensolaris/ (props changed) projects/efika_mx/sys/conf/ (props changed) projects/efika_mx/sys/contrib/octeon-sdk/ (props changed) projects/efika_mx/usr.bin/calendar/ (props changed) Modified: projects/efika_mx/Makefile.inc1 ============================================================================== --- projects/efika_mx/Makefile.inc1 Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/Makefile.inc1 Tue Nov 13 15:21:01 2012 (r242978) @@ -1138,7 +1138,7 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" +.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98") _gcc_tools= gnu/usr.bin/cc/cc_tools .endif @@ -1200,7 +1200,7 @@ _clang= usr.bin/clang _clang_libs= lib/clang .endif -.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" +.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98") _cc= gnu/usr.bin/cc .endif Modified: projects/efika_mx/bin/ls/cmp.c ============================================================================== --- projects/efika_mx/bin/ls/cmp.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/cmp.c Tue Nov 13 15:21:01 2012 (r242978) @@ -78,7 +78,10 @@ modcmp(const FTSENT *a, const FTSENT *b) if (b->fts_statp->st_mtim.tv_nsec < a->fts_statp->st_mtim.tv_nsec) return (-1); - return (strcoll(a->fts_name, b->fts_name)); + if (f_samesort) + return (strcoll(b->fts_name, a->fts_name)); + else + return (strcoll(a->fts_name, b->fts_name)); } int @@ -104,7 +107,10 @@ acccmp(const FTSENT *a, const FTSENT *b) if (b->fts_statp->st_atim.tv_nsec < a->fts_statp->st_atim.tv_nsec) return (-1); - return (strcoll(a->fts_name, b->fts_name)); + if (f_samesort) + return (strcoll(b->fts_name, a->fts_name)); + else + return (strcoll(a->fts_name, b->fts_name)); } int @@ -130,7 +136,10 @@ birthcmp(const FTSENT *a, const FTSENT * if (b->fts_statp->st_birthtim.tv_nsec < a->fts_statp->st_birthtim.tv_nsec) return (-1); - return (strcoll(a->fts_name, b->fts_name)); + if (f_samesort) + return (strcoll(b->fts_name, a->fts_name)); + else + return (strcoll(a->fts_name, b->fts_name)); } int @@ -156,7 +165,10 @@ statcmp(const FTSENT *a, const FTSENT *b if (b->fts_statp->st_ctim.tv_nsec < a->fts_statp->st_ctim.tv_nsec) return (-1); - return (strcoll(a->fts_name, b->fts_name)); + if (f_samesort) + return (strcoll(b->fts_name, a->fts_name)); + else + return (strcoll(a->fts_name, b->fts_name)); } int Modified: projects/efika_mx/bin/ls/extern.h ============================================================================== --- projects/efika_mx/bin/ls/extern.h Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/extern.h Tue Nov 13 15:21:01 2012 (r242978) @@ -55,12 +55,12 @@ int prn_octal(const char *); int prn_printable(const char *); #ifdef COLORLS void parsecolors(const char *cs); -void colorquit(int); +void colorquit(int); -extern char *ansi_fgcol; -extern char *ansi_bgcol; -extern char *ansi_coloff; -extern char *attrs_off; -extern char *enter_bold; +extern char *ansi_fgcol; +extern char *ansi_bgcol; +extern char *ansi_coloff; +extern char *attrs_off; +extern char *enter_bold; #endif extern int termwidth; Modified: projects/efika_mx/bin/ls/ls.1 ============================================================================== --- projects/efika_mx/bin/ls/ls.1 Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/ls.1 Tue Nov 13 15:21:01 2012 (r242978) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd September 28, 2011 +.Dd November 8, 2012 .Dt LS 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd list directory contents .Sh SYNOPSIS .Nm -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1 +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, .Op Fl D Ar format .Op Ar .Sh DESCRIPTION @@ -130,6 +130,8 @@ This option is equivalent to defining .Ev CLICOLOR in the environment. (See below.) +This functionality can be compiled out by removing the definition of +.Ev COLORLS . .It Fl H Symbolic links on the command line are followed. This option is assumed if @@ -249,12 +251,35 @@ subsection below, except (if the long fo the directory totals are not output when the output is in a single column, even if multi-column output is requested. .It Fl t -Sort by time modified (most recently modified -first) before sorting the operands in lexicographical -order. +Sort by descending time modified (most recently modified first). If two files +have the same modification timestamp, sort their names in ascending +lexicographical order. +The +.Fl r +option reverses both of these sort orders. +.Pp +Note that these sort orders are contradictory: the time sequence is in +descending order, the lexicographical sort is in ascending order. +This behavior is mandated by +.St -p1003.2 . +This feature can cause problems listing files stored with sequential names on +FAT file systems, such as from digital cameras, where it is possible to have +more than one image with the same timestamp. +In such a case, the photos cannot be listed in the sequence in which +they were taken. +To ensure the same sort order for time and for lexicographical sorting, set the +environment variable +.Ev LS_SAMESORT +or use the +.Fl y +option. +This causes +.Nm +to reverse the lexicographal sort order when sorting files with the +same modification timestamp. .It Fl u Use time of last access, -instead of last modification +instead of time of last modification of the file for sorting .Pq Fl t or printing @@ -268,6 +293,15 @@ The same as .Fl C , except that the multi-column output is produced with entries sorted across, rather than down, the columns. +.It Fl y +When the +.Fl t +option is set, sort the alphabetical output in the same order as the time output. +This has the same effect as setting +.Ev LS_SAMESORT . +See the description of the +.Fl t +option for more details. .It Fl 1 (The numeric digit .Dq one . ) @@ -275,6 +309,15 @@ Force output to be one entry per line. This is the default when output is not to a terminal. +.It Fl , +(Comma) When the +.Fl l +option is set, print file sizes grouped and separated by thousands using the +non-monetary separator returned by +.Xr localeconv 3 , +typically a comma or period. +If no locale is set, or the locale does not have a non-monetary separator, this +option has no effect. .El .Pp The @@ -529,7 +572,7 @@ variable is defined. .It Ev CLICOLOR_FORCE Color sequences are normally disabled if the output is not directed to a terminal. -This can be overridden by setting this flag. +This can be overridden by setting this variable. The .Ev TERM variable still needs to reference a color capable terminal however @@ -655,6 +698,14 @@ Not all columns have changeable widths. The fields are, in order: inode, block count, number of links, user name, group name, flags, file size, file name. +.It Ev LS_SAMESORT +If this variable is set, the +.Fl t +option sorts the names of files with the same modification timestamp in the same +sense as the time sort. +See the description of the +.Fl t +option for more details. .It Ev TERM The .Ev CLICOLOR @@ -678,6 +729,7 @@ specification. .Xr getfacl 1 , .Xr sort 1 , .Xr xterm 1 , +.Xr localeconv 3 , .Xr strftime 3 , .Xr strmode 3 , .Xr termcap 5 , @@ -716,3 +768,9 @@ option description might be a feature th based on the fact that single-column output usually goes to something other than a terminal. It is debatable whether this is a design bug. +.Pp +.St -p1003.2 +mandates opposite sort orders for files with the same timestamp when +sorting with the +.Fl t +option. Modified: projects/efika_mx/bin/ls/ls.c ============================================================================== --- projects/efika_mx/bin/ls/ls.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/ls.c Tue Nov 13 15:21:01 2012 (r242978) @@ -109,10 +109,11 @@ int termwidth = 80; /* default terminal int f_humanval; /* show human-readable file sizes */ int f_inode; /* print inode */ static int f_kblocks; /* print size in kilobytes */ + int f_label; /* show MAC label */ static int f_listdir; /* list actual directory, not contents */ static int f_listdot; /* list files beginning with . */ -static int f_noautodot; /* do not automatically enable -A for root */ int f_longform; /* long listing format */ +static int f_noautodot; /* do not automatically enable -A for root */ static int f_nofollow; /* don't follow symbolic link arguments */ int f_nonprint; /* show unprintables as ? */ static int f_nosort; /* don't sort output */ @@ -122,19 +123,21 @@ static int f_numericonly; /* don't conve int f_octal_escape; /* like f_octal but use C escapes if possible */ static int f_recursive; /* ls subdirectories also */ static int f_reversesort; /* reverse whatever sort is used */ - int f_sectime; /* print the real time for all files */ + int f_samesort; /* sort time and name in same direction */ + int f_sectime; /* print full time information */ static int f_singlecol; /* use single column output */ int f_size; /* list size in short listing */ +static int f_sizesort; int f_slash; /* similar to f_type, but only for dirs */ int f_sortacross; /* sort across rows, not down columns */ int f_statustime; /* use time of last mode change */ static int f_stream; /* stream the output, separate with commas */ + int f_thousands; /* show file sizes with thousands separators */ + char *f_timeformat; /* user-specified time format */ static int f_timesort; /* sort by time vice name */ - char *f_timeformat; /* user-specified time format */ -static int f_sizesort; int f_type; /* add type character for non-regular files */ static int f_whiteout; /* show whiteout entries */ - int f_label; /* show MAC label */ + #ifdef COLORLS int f_color; /* add type in color for non-regular files */ @@ -180,8 +183,10 @@ main(int argc, char *argv[]) } fts_options = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, - "1ABCD:FGHILPRSTUWZabcdfghiklmnopqrstuwx")) != -1) { + if (getenv("LS_SAMESORT")) + f_samesort = 1; + while ((ch = getopt(argc, argv, + "1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,")) != -1) { switch (ch) { /* * The -1, -C, -x and -l options all override each other so @@ -192,17 +197,9 @@ main(int argc, char *argv[]) f_longform = 0; f_stream = 0; break; - case 'B': - f_nonprint = 0; - f_octal = 1; - f_octal_escape = 0; - break; case 'C': f_sortacross = f_longform = f_singlecol = 0; break; - case 'D': - f_timeformat = optarg; - break; case 'l': f_longform = 1; f_singlecol = 0; @@ -229,16 +226,46 @@ main(int argc, char *argv[]) f_accesstime = 0; f_statustime = 0; break; + case 'a': + fts_options |= FTS_SEEDOT; + /* FALLTHROUGH */ + case 'A': + f_listdot = 1; + break; + /* The -t and -S options override each other. */ + case 'S': + f_sizesort = 1; + f_timesort = 0; + break; + case 't': + f_timesort = 1; + f_sizesort = 0; + break; + /* Other flags. Please keep alphabetic. */ + case ',': + f_thousands = 1; + break; + case 'B': + f_nonprint = 0; + f_octal = 1; + f_octal_escape = 0; + break; + case 'D': + f_timeformat = optarg; + break; case 'F': f_type = 1; f_slash = 0; break; + case 'G': + setenv("CLICOLOR", "", 1); + break; case 'H': fts_options |= FTS_COMFOLLOW; f_nofollow = 0; break; - case 'G': - setenv("CLICOLOR", "", 1); + case 'I': + f_noautodot = 1; break; case 'L': fts_options &= ~FTS_PHYSICAL; @@ -254,14 +281,19 @@ main(int argc, char *argv[]) case 'R': f_recursive = 1; break; - case 'a': - fts_options |= FTS_SEEDOT; - /* FALLTHROUGH */ - case 'A': - f_listdot = 1; + case 'T': + f_sectime = 1; break; - case 'I': - f_noautodot = 1; + case 'W': + f_whiteout = 1; + break; + case 'Z': + f_label = 1; + break; + case 'b': + f_nonprint = 0; + f_octal = 0; + f_octal_escape = 1; break; /* The -d option turns off the -R option. */ case 'd': @@ -309,33 +341,13 @@ main(int argc, char *argv[]) case 's': f_size = 1; break; - case 'T': - f_sectime = 1; - break; - /* The -t and -S options override each other. */ - case 't': - f_timesort = 1; - f_sizesort = 0; - break; - case 'S': - f_sizesort = 1; - f_timesort = 0; - break; - case 'W': - f_whiteout = 1; - break; - case 'b': - f_nonprint = 0; - f_octal = 0; - f_octal_escape = 1; - break; case 'w': f_nonprint = 0; f_octal = 0; f_octal_escape = 0; break; - case 'Z': - f_label = 1; + case 'y': + f_samesort = 1; break; default: case '?': @@ -849,6 +861,8 @@ label_out: d.s_size = sizelen; d.s_user = maxuser; } + if (f_thousands) /* make space for commas */ + d.s_size += (d.s_size - 1) / 3; printfcn(&d); output = 1; Modified: projects/efika_mx/bin/ls/ls.h ============================================================================== --- projects/efika_mx/bin/ls/ls.h Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/ls.h Tue Nov 13 15:21:01 2012 (r242978) @@ -49,12 +49,14 @@ extern int f_longform; /* long listing extern int f_octal; /* print unprintables in octal */ extern int f_octal_escape; /* like f_octal but use C escapes if possible */ extern int f_nonprint; /* show unprintables as ? */ +extern int f_samesort; /* sort time and name in same direction */ extern int f_sectime; /* print the real time for all files */ extern int f_size; /* list size in short listing */ extern int f_slash; /* append a '/' if the file is a directory */ extern int f_sortacross; /* sort across rows, not down columns */ extern int f_statustime; /* use time of last mode change */ -extern char *f_timeformat; /* user-specified time format */ +extern int f_thousands; /* show file sizes with thousands separators */ +extern char *f_timeformat; /* user-specified time format */ extern int f_notabs; /* don't use tab-separated multi-col output */ extern int f_type; /* add type character for non-regular files */ #ifdef COLORLS Modified: projects/efika_mx/bin/ls/print.c ============================================================================== --- projects/efika_mx/bin/ls/print.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/print.c Tue Nov 13 15:21:01 2012 (r242978) @@ -606,6 +606,10 @@ printsize(size_t width, off_t bytes) humanize_number(buf, sizeof(buf), (int64_t)bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%*s ", (u_int)width, buf); + } else if (f_thousands) { /* with commas */ + /* This format assignment needed to work round gcc bug. */ + const char *format = "%*j'd "; + (void)printf(format, (u_int)width, bytes); } else (void)printf("%*jd ", (u_int)width, bytes); } Modified: projects/efika_mx/bin/ls/util.c ============================================================================== --- projects/efika_mx/bin/ls/util.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/ls/util.c Tue Nov 13 15:21:01 2012 (r242978) @@ -132,7 +132,7 @@ prn_printable(const char *s) * to fix this as an efficient fix would involve a lookup table. Same goes * for the rather inelegant code in prn_octal. * - * DES 1998/04/23 + * DES 1998/04/23 */ size_t @@ -175,7 +175,7 @@ prn_octal(const char *s) size_t clen; unsigned char ch; int goodchar, i, len, prtlen; - + memset(&mbs, 0, sizeof(mbs)); len = 0; while ((clen = mbrtowc(&wc, s, MB_LEN_MAX, &mbs)) != 0) { @@ -200,9 +200,9 @@ prn_octal(const char *s) for (i = 0; i < prtlen; i++) { ch = (unsigned char)s[i]; putchar('\\'); - putchar('0' + (ch >> 6)); - putchar('0' + ((ch >> 3) & 7)); - putchar('0' + (ch & 7)); + putchar('0' + (ch >> 6)); + putchar('0' + ((ch >> 3) & 7)); + putchar('0' + (ch & 7)); len += 4; } } @@ -222,9 +222,9 @@ usage(void) { (void)fprintf(stderr, #ifdef COLORLS - "usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1] [-D format]" + "usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format]" #else - "usage: ls [-ABCFHILPRSTUWZabcdfghiklmnopqrstuwx1] [-D format]" + "usage: ls [-ABCFHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format]" #endif " [file ...]\n"); exit(1); Modified: projects/efika_mx/bin/sh/alias.c ============================================================================== --- projects/efika_mx/bin/sh/alias.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/sh/alias.c Tue Nov 13 15:21:01 2012 (r242978) @@ -68,7 +68,18 @@ setalias(const char *name, const char *v if (equal(name, ap->name)) { INTOFF; ckfree(ap->val); + /* See HACK below. */ +#ifdef notyet ap->val = savestr(val); +#else + { + size_t len = strlen(val); + ap->val = ckmalloc(len + 2); + memcpy(ap->val, val, len); + ap->val[len] = ' '; + ap->val[len+1] = '\0'; + } +#endif INTON; return; } Modified: projects/efika_mx/bin/sh/input.c ============================================================================== --- projects/efika_mx/bin/sh/input.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/sh/input.c Tue Nov 13 15:21:01 2012 (r242978) @@ -350,7 +350,7 @@ pungetc(void) * We handle aliases this way. */ void -pushstring(char *s, int len, void *ap) +pushstring(char *s, int len, struct alias *ap) { struct strpush *sp; @@ -365,9 +365,9 @@ pushstring(char *s, int len, void *ap) sp->prevstring = parsenextc; sp->prevnleft = parsenleft; sp->prevlleft = parselleft; - sp->ap = (struct alias *)ap; + sp->ap = ap; if (ap) - ((struct alias *)ap)->flag |= ALIASINUSE; + ap->flag |= ALIASINUSE; parsenextc = s; parsenleft = len; INTON; Modified: projects/efika_mx/bin/sh/input.h ============================================================================== --- projects/efika_mx/bin/sh/input.h Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/bin/sh/input.h Tue Nov 13 15:21:01 2012 (r242978) @@ -45,6 +45,7 @@ extern int parsenleft; /* number of cha extern char *parsenextc; /* next character in input buffer */ extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */ +struct alias; struct parsefile; char *pfgets(char *, int); @@ -52,7 +53,7 @@ int pgetc(void); int preadbuffer(void); int preadateof(void); void pungetc(void); -void pushstring(char *, int, void *); +void pushstring(char *, int, struct alias *); void setinputfile(const char *, int); void setinputfd(int, int); void setinputstring(char *, int); Modified: projects/efika_mx/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- projects/efika_mx/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 13 15:21:01 2012 (r242978) @@ -121,8 +121,8 @@ #include <sys/fs/zfs.h> #include <libnvpair.h> -#define ZTEST_FD_DATA 3 -#define ZTEST_FD_RAND 4 +static int ztest_fd_data = -1; +static int ztest_fd_rand = -1; typedef struct ztest_shared_hdr { uint64_t zh_hdr_size; @@ -710,14 +710,17 @@ process_options(int argc, char **argv) UINT64_MAX >> 2); if (strlen(altdir) > 0) { - char cmd[MAXNAMELEN]; - char realaltdir[MAXNAMELEN]; + char *cmd; + char *realaltdir; char *bin; char *ztest; char *isa; int isalen; - (void) realpath(getexecname(), cmd); + cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + + VERIFY(NULL != realpath(getexecname(), cmd)); if (0 != access(altdir, F_OK)) { ztest_dump_core = B_FALSE; fatal(B_TRUE, "invalid alternate ztest path: %s", @@ -748,6 +751,9 @@ process_options(int argc, char **argv) fatal(B_TRUE, "invalid alternate lib directory %s", zo->zo_alt_libpath); } + + umem_free(cmd, MAXPATHLEN); + umem_free(realaltdir, MAXPATHLEN); } } @@ -764,10 +770,12 @@ ztest_random(uint64_t range) { uint64_t r; + ASSERT3S(ztest_fd_rand, >=, 0); + if (range == 0) return (0); - if (read(ZTEST_FD_RAND, &r, sizeof (r)) != sizeof (r)) + if (read(ztest_fd_rand, &r, sizeof (r)) != sizeof (r)) fatal(1, "short read from /dev/urandom"); return (r % range); @@ -4703,7 +4711,18 @@ ztest_fault_inject(ztest_ds_t *zd, uint6 if (islog) (void) rw_unlock(&ztest_name_lock); } else { + /* + * Ideally we would like to be able to randomly + * call vdev_[on|off]line without holding locks + * to force unpredictable failures but the side + * effects of vdev_[on|off]line prevent us from + * doing so. We grab the ztest_vdev_lock here to + * prevent a race between injection testing and + * aux_vdev removal. + */ + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); (void) vdev_online(spa, guid0, 0, NULL); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } } @@ -5660,29 +5679,16 @@ ztest_init(ztest_shared_t *zs) } static void -setup_fds(void) +setup_data_fd(void) { - int fd; -#ifdef illumos - - char *tmp = tempnam(NULL, NULL); - fd = open(tmp, O_RDWR | O_CREAT, 0700); - ASSERT3U(fd, ==, ZTEST_FD_DATA); - (void) unlink(tmp); - free(tmp); -#else - char tmp[MAXPATHLEN]; - - strlcpy(tmp, ztest_opts.zo_dir, MAXPATHLEN); - strlcat(tmp, "/ztest.XXXXXX", MAXPATHLEN); - fd = mkstemp(tmp); - ASSERT3U(fd, ==, ZTEST_FD_DATA); -#endif + static char ztest_name_data[] = "/tmp/ztest.data.XXXXXX"; - fd = open("/dev/urandom", O_RDONLY); - ASSERT3U(fd, ==, ZTEST_FD_RAND); + ztest_fd_data = mkstemp(ztest_name_data); + ASSERT3S(ztest_fd_data, >=, 0); + (void) unlink(ztest_name_data); } + static int shared_data_size(ztest_shared_hdr_t *hdr) { @@ -5703,15 +5709,11 @@ setup_hdr(void) int size; ztest_shared_hdr_t *hdr; -#ifndef illumos - pwrite(ZTEST_FD_DATA, "", 1, 0); -#endif - hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), - PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); - VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, sizeof (ztest_shared_hdr_t))); + VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t))); hdr->zh_hdr_size = sizeof (ztest_shared_hdr_t); hdr->zh_opts_size = sizeof (ztest_shared_opts_t); @@ -5722,7 +5724,7 @@ setup_hdr(void) hdr->zh_ds_count = ztest_opts.zo_datasets; size = shared_data_size(hdr); - VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, size)); + VERIFY3U(0, ==, ftruncate(ztest_fd_data, size)); (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); } @@ -5735,14 +5737,14 @@ setup_data(void) uint8_t *buf; hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), - PROT_READ, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); size = shared_data_size(hdr); (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()), - PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); buf = (uint8_t *)hdr; @@ -5761,12 +5763,13 @@ exec_child(char *cmd, char *libpath, boo { pid_t pid; int status; - char cmdbuf[MAXPATHLEN]; + char *cmdbuf = NULL; pid = fork(); if (cmd == NULL) { - (void) strlcpy(cmdbuf, getexecname(), sizeof (cmdbuf)); + cmdbuf = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + (void) strlcpy(cmdbuf, getexecname(), MAXPATHLEN); cmd = cmdbuf; } @@ -5775,9 +5778,16 @@ exec_child(char *cmd, char *libpath, boo if (pid == 0) { /* child */ char *emptyargv[2] = { cmd, NULL }; + char fd_data_str[12]; struct rlimit rl = { 1024, 1024 }; (void) setrlimit(RLIMIT_NOFILE, &rl); + + (void) close(ztest_fd_rand); + VERIFY3U(11, >=, + snprintf(fd_data_str, 12, "%d", ztest_fd_data)); + VERIFY0(setenv("ZTEST_FD_DATA", fd_data_str, 1)); + (void) enable_extended_FILE_stdio(-1, -1); if (libpath != NULL) VERIFY(0 == setenv("LD_LIBRARY_PATH", libpath, 1)); @@ -5790,6 +5800,11 @@ exec_child(char *cmd, char *libpath, boo fatal(B_TRUE, "exec failed: %s", cmd); } + if (cmdbuf != NULL) { + umem_free(cmdbuf, MAXPATHLEN); + cmd = NULL; + } + while (waitpid(pid, &status, 0) != pid) continue; if (statusp != NULL) @@ -5854,39 +5869,41 @@ main(int argc, char **argv) char timebuf[100]; char numbuf[6]; spa_t *spa; - char cmd[MAXNAMELEN]; + char *cmd; boolean_t hasalt; - - boolean_t ischild = (0 == lseek(ZTEST_FD_DATA, 0, SEEK_CUR)); - ASSERT(ischild || errno == EBADF); + char *fd_data_str = getenv("ZTEST_FD_DATA"); (void) setvbuf(stdout, NULL, _IOLBF, 0); dprintf_setup(&argc, argv); - if (!ischild) { + ztest_fd_rand = open("/dev/urandom", O_RDONLY); + ASSERT3S(ztest_fd_rand, >=, 0); + + if (!fd_data_str) { process_options(argc, argv); - setup_fds(); + setup_data_fd(); setup_hdr(); setup_data(); bcopy(&ztest_opts, ztest_shared_opts, sizeof (*ztest_shared_opts)); } else { + ztest_fd_data = atoi(fd_data_str); setup_data(); bcopy(ztest_shared_opts, &ztest_opts, sizeof (ztest_opts)); } ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count); /* Override location of zpool.cache */ - (void) asprintf((char **)&spa_config_path, "%s/zpool.cache", - ztest_opts.zo_dir); + VERIFY3U(asprintf((char **)&spa_config_path, "%s/zpool.cache", + ztest_opts.zo_dir), !=, -1); ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t), UMEM_NOFAIL); zs = ztest_shared; - if (ischild) { + if (fd_data_str) { metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; metaslab_df_alloc_threshold = zs->zs_metaslab_df_alloc_threshold; @@ -5909,7 +5926,8 @@ main(int argc, char **argv) (u_longlong_t)ztest_opts.zo_time); } - (void) strlcpy(cmd, getexecname(), sizeof (cmd)); + cmd = umem_alloc(MAXNAMELEN, UMEM_NOFAIL); + (void) strlcpy(cmd, getexecname(), MAXNAMELEN); zs->zs_do_init = B_TRUE; if (strlen(ztest_opts.zo_alt_ztest) != 0) { @@ -6050,5 +6068,7 @@ main(int argc, char **argv) kills, iters - kills, (100.0 * kills) / MAX(1, iters)); } + umem_free(cmd, MAXNAMELEN); + return (0); } Modified: projects/efika_mx/cddl/lib/Makefile ============================================================================== --- projects/efika_mx/cddl/lib/Makefile Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/cddl/lib/Makefile Tue Nov 13 15:21:01 2012 (r242978) @@ -19,7 +19,8 @@ _libzpool= libzpool .endif .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_CPUARCH} == "mips" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" _drti= drti _libdtrace= libdtrace .endif Modified: projects/efika_mx/cddl/lib/libdtrace/Makefile ============================================================================== --- projects/efika_mx/cddl/lib/libdtrace/Makefile Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/cddl/lib/libdtrace/Makefile Tue Nov 13 15:21:01 2012 (r242978) @@ -74,6 +74,10 @@ CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/ut CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips .PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips +.elif ${MACHINE_CPUARCH} == "powerpc" +CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc +.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc +.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/powerpc .else # temporary hack CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel Modified: projects/efika_mx/cddl/usr.sbin/Makefile ============================================================================== --- projects/efika_mx/cddl/usr.sbin/Makefile Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/cddl/usr.sbin/Makefile Tue Nov 13 15:21:01 2012 (r242978) @@ -25,4 +25,10 @@ _lockstat= lockstat _dtrace= dtrace .endif +.if ${MACHINE_CPUARCH} == "powerpc" +_dtrace= dtrace +_dtruss= dtruss +_lockstat= lockstat +.endif + .include <bsd.subdir.mk> Modified: projects/efika_mx/contrib/gdb/gdb/c-valprint.c ============================================================================== --- projects/efika_mx/contrib/gdb/gdb/c-valprint.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/contrib/gdb/gdb/c-valprint.c Tue Nov 13 15:21:01 2012 (r242978) @@ -232,9 +232,8 @@ c_val_print (struct type *type, char *va wtype = TYPE_TARGET_TYPE (type); } vt_val = value_at (wtype, vt_address, NULL); - val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0, - VALUE_ADDRESS (vt_val), stream, format, - deref_ref, recurse + 1, pretty); + common_val_print (vt_val, stream, format, + deref_ref, recurse + 1, pretty); if (pretty) { fprintf_filtered (stream, "\n"); @@ -283,15 +282,8 @@ c_val_print (struct type *type, char *va unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset), NULL); - val_print (VALUE_TYPE (deref_val), - VALUE_CONTENTS (deref_val), - 0, - VALUE_ADDRESS (deref_val), - stream, - format, - deref_ref, - recurse, - pretty); + common_val_print (deref_val, stream, format, deref_ref, + recurse, pretty); } else fputs_filtered ("???", stream); Modified: projects/efika_mx/contrib/gdb/gdb/cp-valprint.c ============================================================================== --- projects/efika_mx/contrib/gdb/gdb/cp-valprint.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/contrib/gdb/gdb/cp-valprint.c Tue Nov 13 15:21:01 2012 (r242978) @@ -361,8 +361,7 @@ cp_print_value_fields (struct type *type (TYPE_FIELD_TYPE (type, i), unpack_field_as_long (type, valaddr + offset, i)); - val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), - 0, 0, stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); } } else @@ -426,8 +425,7 @@ cp_print_value_fields (struct type *type v = value_from_pointer (lookup_pointer_type (builtin_type_unsigned_long), *(unsigned long *) (valaddr + offset)); - val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0, - stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); fields_seen = 1; if (vtblprint) @@ -791,8 +789,7 @@ cp_print_hpacc_virtual_table_entries (st VALUE_TYPE (vf) = VALUE_TYPE (v); /* make it a pointer */ /* print out the entry */ - val_print (VALUE_TYPE (vf), VALUE_CONTENTS (vf), 0, 0, - stream, format, 0, recurse + 1, pretty); + common_val_print (vf, stream, format, 0, recurse + 1, pretty); field_physname = TYPE_FN_FIELD_PHYSNAME (TYPE_FN_FIELDLIST1 (type, fn), oi); /* pai: (temp) FIXME Maybe this should be DMGL_ANSI */ Modified: projects/efika_mx/contrib/gdb/gdb/dwarf2loc.c ============================================================================== --- projects/efika_mx/contrib/gdb/gdb/dwarf2loc.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/contrib/gdb/gdb/dwarf2loc.c Tue Nov 13 15:21:01 2012 (r242978) @@ -492,9 +492,14 @@ loclist_read_variable (struct symbol *sy data = find_location_expression (dlbaton, &size, frame ? get_frame_pc (frame) : 0); if (data == NULL) - error ("Variable \"%s\" is not available.", SYMBOL_NATURAL_NAME (symbol)); - - val = dwarf2_evaluate_loc_desc (symbol, frame, data, size, dlbaton->objfile); + { + val = allocate_value (SYMBOL_TYPE (symbol)); + VALUE_LVAL (val) = not_lval; + VALUE_OPTIMIZED_OUT (val) = 1; + } + else + val = dwarf2_evaluate_loc_desc (symbol, frame, data, size, + dlbaton->objfile); return val; } Modified: projects/efika_mx/contrib/gdb/gdb/f-valprint.c ============================================================================== --- projects/efika_mx/contrib/gdb/gdb/f-valprint.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/contrib/gdb/gdb/f-valprint.c Tue Nov 13 15:21:01 2012 (r242978) @@ -444,15 +444,8 @@ f_val_print (struct type *type, char *va unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset), NULL); - val_print (VALUE_TYPE (deref_val), - VALUE_CONTENTS (deref_val), - 0, - VALUE_ADDRESS (deref_val), - stream, - format, - deref_ref, - recurse, - pretty); + common_val_print (deref_val, stream, format, deref_ref, recurse, + pretty); } else fputs_filtered ("???", stream); Modified: projects/efika_mx/contrib/gdb/gdb/frame.c ============================================================================== --- projects/efika_mx/contrib/gdb/gdb/frame.c Tue Nov 13 15:14:27 2012 (r242977) +++ projects/efika_mx/contrib/gdb/gdb/frame.c Tue Nov 13 15:21:01 2012 (r242978) @@ -1846,6 +1846,23 @@ get_prev_frame (struct frame_info *this_ return NULL; } + /* Assume that the only way to get a zero PC is through something + like a SIGSEGV or a dummy frame, and hence that NORMAL frames + will never unwind a zero PC. */ + if (this_frame->level > 0 + && get_frame_type (this_frame) == NORMAL_FRAME + && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME + && get_frame_pc (this_frame) == 0) + { + if (frame_debug) + { + fprintf_unfiltered (gdb_stdlog, "-> "); + fprint_frame (gdb_stdlog, this_frame->prev); + fprintf_unfiltered (gdb_stdlog, " // zero PC \n"); + } + return NULL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211131521.qADFL2Pp069659>