svn commit: r242954 - in projects/bhyve: . 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/gdb ...
Neel Natu
neel at FreeBSD.org
Tue Nov 13 07:39:06 UTC 2012
Author: neel
Date: Tue Nov 13 07:39:05 2012
New Revision: 242954
URL: http://svnweb.freebsd.org/changeset/base/242954
Log:
IFC @ r242940
Added:
projects/bhyve/cddl/contrib/opensolaris/lib/libdtrace/powerpc/
- copied from r242940, head/cddl/contrib/opensolaris/lib/libdtrace/powerpc/
projects/bhyve/lib/libcrypt/tests/
- copied from r242940, head/lib/libcrypt/tests/
projects/bhyve/share/mk/atf.test.mk
- copied unchanged from r242940, head/share/mk/atf.test.mk
projects/bhyve/share/mk/bsd.test.mk
- copied unchanged from r242940, head/share/mk/bsd.test.mk
projects/bhyve/sys/cddl/contrib/opensolaris/uts/powerpc/
- copied from r242940, head/sys/cddl/contrib/opensolaris/uts/powerpc/
projects/bhyve/sys/cddl/dev/dtrace/powerpc/
- copied from r242940, head/sys/cddl/dev/dtrace/powerpc/
projects/bhyve/sys/dev/ath/if_ath_alq.c
- copied unchanged from r242940, head/sys/dev/ath/if_ath_alq.c
projects/bhyve/sys/dev/ath/if_ath_alq.h
- copied unchanged from r242940, head/sys/dev/ath/if_ath_alq.h
projects/bhyve/tools/regression/bin/sh/builtins/alias3.0
- copied unchanged from r242940, head/tools/regression/bin/sh/builtins/alias3.0
projects/bhyve/tools/regression/bin/sh/builtins/alias3.0.stdout
- copied unchanged from r242940, head/tools/regression/bin/sh/builtins/alias3.0.stdout
projects/bhyve/tools/regression/bin/sh/parser/alias10.0
- copied unchanged from r242940, head/tools/regression/bin/sh/parser/alias10.0
projects/bhyve/tools/regression/bin/sh/parser/alias9.0
- copied unchanged from r242940, head/tools/regression/bin/sh/parser/alias9.0
Modified:
projects/bhyve/Makefile.inc1
projects/bhyve/bin/ls/cmp.c
projects/bhyve/bin/ls/extern.h
projects/bhyve/bin/ls/ls.1
projects/bhyve/bin/ls/ls.c
projects/bhyve/bin/ls/ls.h
projects/bhyve/bin/ls/print.c
projects/bhyve/bin/ls/util.c
projects/bhyve/bin/sh/alias.c
projects/bhyve/bin/sh/input.c
projects/bhyve/bin/sh/input.h
projects/bhyve/cddl/contrib/opensolaris/cmd/ztest/ztest.c
projects/bhyve/cddl/lib/Makefile
projects/bhyve/cddl/lib/libdtrace/Makefile
projects/bhyve/cddl/usr.sbin/Makefile
projects/bhyve/contrib/gdb/gdb/c-valprint.c
projects/bhyve/contrib/gdb/gdb/cp-valprint.c
projects/bhyve/contrib/gdb/gdb/dwarf2loc.c
projects/bhyve/contrib/gdb/gdb/f-valprint.c
projects/bhyve/contrib/gdb/gdb/jv-valprint.c
projects/bhyve/contrib/gdb/gdb/p-valprint.c
projects/bhyve/contrib/gdb/gdb/scm-valprint.c
projects/bhyve/contrib/gdb/gdb/stack.c
projects/bhyve/contrib/gdb/gdb/valprint.c
projects/bhyve/contrib/gdb/gdb/value.h
projects/bhyve/contrib/gdb/gdb/varobj.c
projects/bhyve/contrib/jemalloc/ChangeLog
projects/bhyve/contrib/jemalloc/FREEBSD-diffs
projects/bhyve/contrib/jemalloc/VERSION
projects/bhyve/contrib/jemalloc/doc/jemalloc.3
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/arena.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/chunk.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/ctl.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/extent.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/huge.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/private_namespace.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/prof.h
projects/bhyve/contrib/jemalloc/include/jemalloc/internal/rtree.h
projects/bhyve/contrib/jemalloc/include/jemalloc/jemalloc.h
projects/bhyve/contrib/jemalloc/include/jemalloc/jemalloc_defs.h
projects/bhyve/contrib/jemalloc/src/arena.c
projects/bhyve/contrib/jemalloc/src/base.c
projects/bhyve/contrib/jemalloc/src/chunk.c
projects/bhyve/contrib/jemalloc/src/chunk_dss.c
projects/bhyve/contrib/jemalloc/src/chunk_mmap.c
projects/bhyve/contrib/jemalloc/src/ctl.c
projects/bhyve/contrib/jemalloc/src/huge.c
projects/bhyve/contrib/jemalloc/src/jemalloc.c
projects/bhyve/contrib/jemalloc/src/mutex.c
projects/bhyve/contrib/jemalloc/src/prof.c
projects/bhyve/contrib/jemalloc/src/rtree.c
projects/bhyve/contrib/jemalloc/src/stats.c
projects/bhyve/contrib/jemalloc/src/tcache.c
projects/bhyve/contrib/jemalloc/src/util.c
projects/bhyve/contrib/llvm/lib/Target/X86/X86Subtarget.cpp
projects/bhyve/contrib/top/commands.c
projects/bhyve/contrib/tzdata/asia
projects/bhyve/contrib/tzdata/northamerica
projects/bhyve/etc/pccard_ether
projects/bhyve/lib/Makefile
projects/bhyve/lib/libc/gen/isnan.c
projects/bhyve/lib/libc/stdio/printf.3
projects/bhyve/lib/libproc/proc_bkpt.c
projects/bhyve/lib/libproc/proc_regs.c
projects/bhyve/lib/msun/src/k_rem_pio2.c
projects/bhyve/lib/msun/src/s_isnan.c
projects/bhyve/release/Makefile
projects/bhyve/release/doc/share/xml/release.ent
projects/bhyve/sbin/ifconfig/ifconfig.8
projects/bhyve/secure/usr.bin/bdes/bdes.1
projects/bhyve/share/man/man4/icmp6.4
projects/bhyve/share/man/man4/ipsec.4
projects/bhyve/share/mk/Makefile
projects/bhyve/share/mk/bsd.progs.mk
projects/bhyve/share/mk/bsd.subdir.mk
projects/bhyve/sys/amd64/amd64/identcpu.c
projects/bhyve/sys/arm/arm/machdep.c
projects/bhyve/sys/arm/at91/at91_machdep.c
projects/bhyve/sys/arm/lpc/lpc_gpio.c
projects/bhyve/sys/boot/common/Makefile.inc
projects/bhyve/sys/boot/forth/menu.4th
projects/bhyve/sys/boot/i386/boot2/sio.S
projects/bhyve/sys/boot/i386/loader/Makefile
projects/bhyve/sys/boot/ia64/common/Makefile
projects/bhyve/sys/boot/pc98/Makefile.inc
projects/bhyve/sys/boot/pc98/boot2/Makefile
projects/bhyve/sys/boot/pc98/boot2/boot2.c
projects/bhyve/sys/boot/pc98/btx/btx/btx.S
projects/bhyve/sys/boot/pc98/cdboot/Makefile
projects/bhyve/sys/boot/pc98/libpc98/comconsole.c
projects/bhyve/sys/boot/pc98/loader/Makefile
projects/bhyve/sys/boot/powerpc/ofw/Makefile
projects/bhyve/sys/boot/powerpc/ps3/Makefile
projects/bhyve/sys/boot/sparc64/loader/Makefile
projects/bhyve/sys/cam/scsi/scsi_enc_ses.c
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
projects/bhyve/sys/cddl/dev/lockstat/lockstat.c
projects/bhyve/sys/cddl/dev/profile/profile.c
projects/bhyve/sys/conf/Makefile.pc98
projects/bhyve/sys/conf/files
projects/bhyve/sys/conf/kern.pre.mk
projects/bhyve/sys/dev/aac/aac_debug.c
projects/bhyve/sys/dev/acpica/acpivar.h
projects/bhyve/sys/dev/ahci/ahciem.c
projects/bhyve/sys/dev/asmc/asmc.c
projects/bhyve/sys/dev/ath/ath_hal/ah.h
projects/bhyve/sys/dev/ath/ath_hal/ah_debug.h
projects/bhyve/sys/dev/ath/ath_hal/ah_internal.h
projects/bhyve/sys/dev/ath/if_ath.c
projects/bhyve/sys/dev/ath/if_ath_rx.c
projects/bhyve/sys/dev/ath/if_ath_rx_edma.c
projects/bhyve/sys/dev/ath/if_ath_sysctl.c
projects/bhyve/sys/dev/ath/if_ath_tx.c
projects/bhyve/sys/dev/ath/if_ath_tx_edma.c
projects/bhyve/sys/dev/ath/if_athvar.h
projects/bhyve/sys/dev/bktr/bktr_audio.c
projects/bhyve/sys/dev/ct/bshw_machdep.c
projects/bhyve/sys/dev/ct/ct.c
projects/bhyve/sys/dev/ct/ct_isa.c
projects/bhyve/sys/dev/ct/ct_machdep.h
projects/bhyve/sys/dev/drm/via_dma.c
projects/bhyve/sys/dev/drm/via_dmablit.c
projects/bhyve/sys/dev/etherswitch/arswitch/arswitch.c
projects/bhyve/sys/dev/md/md.c
projects/bhyve/sys/dev/mfi/mfi.c
projects/bhyve/sys/dev/mfi/mfi_cam.c
projects/bhyve/sys/dev/mfi/mfivar.h
projects/bhyve/sys/dev/mn/if_mn.c
projects/bhyve/sys/dev/nve/if_nve.c
projects/bhyve/sys/dev/nxge/xgehal/xgehal-device.c
projects/bhyve/sys/dev/puc/pucdata.c
projects/bhyve/sys/dev/snc/dp83932.c
projects/bhyve/sys/dev/snc/dp83932subr.c
projects/bhyve/sys/dev/snc/if_snc.c
projects/bhyve/sys/dev/snc/if_snc_cbus.c
projects/bhyve/sys/dev/sound/pci/emu10kx.c
projects/bhyve/sys/dev/twa/tw_cl_misc.c
projects/bhyve/sys/dev/usb/controller/dwc_otg.c
projects/bhyve/sys/dev/usb/controller/dwc_otg.h
projects/bhyve/sys/dev/usb/controller/dwc_otgreg.h
projects/bhyve/sys/dev/usb/net/if_udav.c
projects/bhyve/sys/dev/usb/serial/u3g.c
projects/bhyve/sys/dev/usb/serial/usb_serial.c
projects/bhyve/sys/dev/usb/usbdevs
projects/bhyve/sys/dev/xen/netback/netback_unit_tests.c
projects/bhyve/sys/fs/cd9660/cd9660_vfsops.c
projects/bhyve/sys/fs/devfs/devfs_vfsops.c
projects/bhyve/sys/fs/ext2fs/ext2_vfsops.c
projects/bhyve/sys/fs/fdescfs/fdesc_vfsops.c
projects/bhyve/sys/fs/fuse/fuse_file.c
projects/bhyve/sys/fs/fuse/fuse_internal.c
projects/bhyve/sys/fs/fuse/fuse_internal.h
projects/bhyve/sys/fs/fuse/fuse_io.c
projects/bhyve/sys/fs/fuse/fuse_node.c
projects/bhyve/sys/fs/fuse/fuse_node.h
projects/bhyve/sys/fs/fuse/fuse_vfsops.c
projects/bhyve/sys/fs/fuse/fuse_vnops.c
projects/bhyve/sys/fs/msdosfs/msdosfs_vfsops.c
projects/bhyve/sys/fs/nandfs/nandfs_vfsops.c
projects/bhyve/sys/fs/nfsclient/nfs_clvfsops.c
projects/bhyve/sys/fs/nullfs/null_vfsops.c
projects/bhyve/sys/fs/pseudofs/pseudofs.c
projects/bhyve/sys/fs/tmpfs/tmpfs_vfsops.c
projects/bhyve/sys/fs/udf/udf_vfsops.c
projects/bhyve/sys/fs/unionfs/union_vfsops.c
projects/bhyve/sys/fs/unionfs/union_vnops.c
projects/bhyve/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
projects/bhyve/sys/i386/include/vmparam.h
projects/bhyve/sys/i386/xen/clock.c
projects/bhyve/sys/kern/kern_malloc.c
projects/bhyve/sys/kern/kern_mbuf.c
projects/bhyve/sys/kern/sched_ule.c
projects/bhyve/sys/kern/subr_param.c
projects/bhyve/sys/kern/tty.c
projects/bhyve/sys/kern/uipc_mqueue.c
projects/bhyve/sys/kern/vfs_subr.c
projects/bhyve/sys/mips/conf/AP91.hints
projects/bhyve/sys/mips/conf/AP93.hints
projects/bhyve/sys/mips/conf/AP96.hints
projects/bhyve/sys/mips/conf/RSPRO.hints
projects/bhyve/sys/modules/Makefile
projects/bhyve/sys/modules/dtrace/Makefile
projects/bhyve/sys/modules/nxge/Makefile
projects/bhyve/sys/netinet/sctp_constants.h
projects/bhyve/sys/netinet/sctp_indata.c
projects/bhyve/sys/netinet/sctp_input.c
projects/bhyve/sys/netinet/sctp_output.c
projects/bhyve/sys/netinet/sctp_pcb.c
projects/bhyve/sys/netinet/sctp_structs.h
projects/bhyve/sys/netinet/sctp_timer.c
projects/bhyve/sys/netinet/sctputil.c
projects/bhyve/sys/netinet/tcp_output.c
projects/bhyve/sys/netinet/tcp_subr.c
projects/bhyve/sys/netinet/tcp_timewait.c
projects/bhyve/sys/netinet6/in6_src.c
projects/bhyve/sys/netpfil/ipfw/ip_fw_dynamic.c
projects/bhyve/sys/netpfil/pf/if_pfsync.c
projects/bhyve/sys/nfsclient/nfs_vfsops.c
projects/bhyve/sys/ofed/drivers/infiniband/core/cma.c
projects/bhyve/sys/ofed/drivers/infiniband/core/ud_header.c
projects/bhyve/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
projects/bhyve/sys/ofed/include/linux/cdev.h
projects/bhyve/sys/ofed/include/linux/pci.h
projects/bhyve/sys/pc98/include/bus.h
projects/bhyve/sys/pc98/pc98/machdep.c
projects/bhyve/sys/powerpc/aim/locore32.S
projects/bhyve/sys/powerpc/aim/locore64.S
projects/bhyve/sys/powerpc/aim/trap.c
projects/bhyve/sys/powerpc/aim/trap_subr32.S
projects/bhyve/sys/powerpc/aim/trap_subr64.S
projects/bhyve/sys/powerpc/conf/GENERIC
projects/bhyve/sys/powerpc/include/bat.h
projects/bhyve/sys/sys/_mutex.h
projects/bhyve/sys/sys/_rwlock.h
projects/bhyve/sys/sys/mount.h
projects/bhyve/sys/ufs/ffs/ffs_softdep.c
projects/bhyve/sys/ufs/ffs/ffs_vfsops.c
projects/bhyve/sys/vm/vm_map.c
projects/bhyve/usr.bin/calendar/calendars/calendar.history
projects/bhyve/usr.bin/clang/clang/Makefile
projects/bhyve/usr.bin/locale/locale.1
projects/bhyve/usr.bin/locale/locale.c
projects/bhyve/usr.bin/ssh-copy-id/ssh-copy-id.1
projects/bhyve/usr.bin/ssh-copy-id/ssh-copy-id.sh
projects/bhyve/usr.bin/top/machine.c
projects/bhyve/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8
Directory Properties:
projects/bhyve/ (props changed)
projects/bhyve/cddl/contrib/opensolaris/ (props changed)
projects/bhyve/contrib/gdb/ (props changed)
projects/bhyve/contrib/llvm/ (props changed)
projects/bhyve/contrib/top/ (props changed)
projects/bhyve/contrib/tzdata/ (props changed)
projects/bhyve/lib/libc/ (props changed)
projects/bhyve/sbin/ (props changed)
projects/bhyve/share/man/man4/ (props changed)
projects/bhyve/sys/ (props changed)
projects/bhyve/sys/boot/ (props changed)
projects/bhyve/sys/boot/powerpc/ofw/ (props changed)
projects/bhyve/sys/cddl/contrib/opensolaris/ (props changed)
projects/bhyve/sys/conf/ (props changed)
projects/bhyve/usr.bin/calendar/ (props changed)
Modified: projects/bhyve/Makefile.inc1
==============================================================================
--- projects/bhyve/Makefile.inc1 Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/Makefile.inc1 Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/cmp.c
==============================================================================
--- projects/bhyve/bin/ls/cmp.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/cmp.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/extern.h
==============================================================================
--- projects/bhyve/bin/ls/extern.h Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/extern.h Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/ls.1
==============================================================================
--- projects/bhyve/bin/ls/ls.1 Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/ls.1 Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/ls.c
==============================================================================
--- projects/bhyve/bin/ls/ls.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/ls.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/ls.h
==============================================================================
--- projects/bhyve/bin/ls/ls.h Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/ls.h Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/print.c
==============================================================================
--- projects/bhyve/bin/ls/print.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/print.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/ls/util.c
==============================================================================
--- projects/bhyve/bin/ls/util.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/ls/util.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/sh/alias.c
==============================================================================
--- projects/bhyve/bin/sh/alias.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/sh/alias.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/sh/input.c
==============================================================================
--- projects/bhyve/bin/sh/input.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/sh/input.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/bin/sh/input.h
==============================================================================
--- projects/bhyve/bin/sh/input.h Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/bin/sh/input.h Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- projects/bhyve/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/cddl/lib/Makefile
==============================================================================
--- projects/bhyve/cddl/lib/Makefile Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/cddl/lib/Makefile Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/cddl/lib/libdtrace/Makefile
==============================================================================
--- projects/bhyve/cddl/lib/libdtrace/Makefile Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/cddl/lib/libdtrace/Makefile Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/cddl/usr.sbin/Makefile
==============================================================================
--- projects/bhyve/cddl/usr.sbin/Makefile Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/cddl/usr.sbin/Makefile Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/contrib/gdb/gdb/c-valprint.c
==============================================================================
--- projects/bhyve/contrib/gdb/gdb/c-valprint.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/contrib/gdb/gdb/c-valprint.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/contrib/gdb/gdb/cp-valprint.c
==============================================================================
--- projects/bhyve/contrib/gdb/gdb/cp-valprint.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/contrib/gdb/gdb/cp-valprint.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/contrib/gdb/gdb/dwarf2loc.c
==============================================================================
--- projects/bhyve/contrib/gdb/gdb/dwarf2loc.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/contrib/gdb/gdb/dwarf2loc.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/contrib/gdb/gdb/f-valprint.c
==============================================================================
--- projects/bhyve/contrib/gdb/gdb/f-valprint.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/contrib/gdb/gdb/f-valprint.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -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/bhyve/contrib/gdb/gdb/jv-valprint.c
==============================================================================
--- projects/bhyve/contrib/gdb/gdb/jv-valprint.c Tue Nov 13 07:34:46 2012 (r242953)
+++ projects/bhyve/contrib/gdb/gdb/jv-valprint.c Tue Nov 13 07:39:05 2012 (r242954)
@@ -189,8 +189,7 @@ java_value_print (struct value *val, str
else
fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);
- val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0,
- stream, format, 2, 1, pretty);
+ common_val_print (v, stream, format, 2, 1, pretty);
things_printed++;
i += reps;
@@ -242,8 +241,7 @@ java_value_print (struct value *val, str
return 0;
}
- return (val_print (type, VALUE_CONTENTS (val), 0, address,
- stream, format, 1, 0, pretty));
+ return common_val_print (val, stream, format, 1, 0, pretty);
}
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list