diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-11-28 12:50:25 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-11-28 12:50:25 +0000 |
| commit | 16a2e79f97c1f4c1e45665217b36961cde1c576b (patch) | |
| tree | f8ec8aaf16001003b48e88f837eb6c20f2897856 /usr/src | |
| parent | a434634703d530e1a12fdabde4691c73a93ca8b5 (diff) | |
| parent | 396aa62085ffd432d59ad504f1ac0827512580f4 (diff) | |
| download | illumos-joyent-16a2e79f97c1f4c1e45665217b36961cde1c576b.tar.gz | |
[illumos-gate merge]
commit 396aa62085ffd432d59ad504f1ac0827512580f4
7612 SGSPROTO lacks structure
commit 218912f6649942e736d5234e96f1a5c6367713d1
7575 mdb autoformatter emits an unexpected leading \n when printing large, formatted strings
commit 99aa8b55058e512798eafbd71f72f916bdc10181
7603 xuio_stat_wbuf_* should be declared (void)
commit fce880d1411ac6f72a4f06d50af95f9912093f9f
7526 bzip2 should have way to hide the compression support
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/mdb/common/mdb/mdb_io.c | 11 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/Makefile.com | 13 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/ld/Makefile.com | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/ld/Makefile.targ | 6 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/ldprof/Makefile.com | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libelf/Makefile.targ | 12 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libld/Makefile.targ | 13 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/Makefile.targ | 13 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libldmake/Makefile.com | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/libldstab/Makefile.targ | 7 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/librtld/Makefile.targ | 13 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/link_audit/Makefile.com | 2 | ||||
| -rw-r--r-- | usr/src/common/bzip2/bzlib.c | 66 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/dmu.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/dmu.h | 4 |
16 files changed, 104 insertions, 72 deletions
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_io.c b/usr/src/cmd/mdb/common/mdb/mdb_io.c index 8b4f1aaaef..84e7c92784 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_io.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_io.c @@ -25,6 +25,7 @@ /* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2016 by Delphix. All rights reserved. */ /* @@ -1513,7 +1514,17 @@ iob_doprnt(mdb_iob_t *iob, const char *format, varglist_t *ap) /* * If the string and the option altstr won't fit on this line * and auto-wrap is set (default), skip to the next line. + * If the string contains \n, and the \n terminated substring + * + altstr is shorter than the above, use the shorter lf_len. */ + if (u.str != NULL) { + char *np = strchr(u.str, '\n'); + if (np != NULL) { + int lf_len = (np - u.str) + altlen; + if (lf_len < width) + width = lf_len; + } + } if (IOB_WRAPNOW(iob, width)) mdb_iob_nl(iob); diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile index a583a83fb5..f2128aaaa2 100644 --- a/usr/src/cmd/sgs/Makefile +++ b/usr/src/cmd/sgs/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2016 RackTop Systems. # include $(SRC)/cmd/Makefile.cmd @@ -173,6 +174,9 @@ native-clobber: native-proto: -@mkdir -p proto/$(MACH) + -@mkdir -p proto/$(MACH)/lib + -@mkdir -p proto/$(MACH)/usr + -@mkdir -p proto/$(MACH)/usr/bin FRC: diff --git a/usr/src/cmd/sgs/Makefile.com b/usr/src/cmd/sgs/Makefile.com index 328ccde722..650a93e967 100644 --- a/usr/src/cmd/sgs/Makefile.com +++ b/usr/src/cmd/sgs/Makefile.com @@ -84,6 +84,12 @@ SGSONLD = $(ROOT)/opt/SUNWonld SGSRPATH = /usr/lib SGSRPATH64 = $(SGSRPATH)/$(MACH64) +# Mimic the structure of an installed system. + +SGSLIBDIR = $(SGSPROTO)/lib +SGSPREFIX = $(SGSPROTO)/usr +SGSBINDIR = $(SGSPREFIX)/bin + # # Macros to be used to include link against libconv and include vernote.o # @@ -121,12 +127,13 @@ CHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %) # Native targets should use the minimum of ld(1) flags to allow building on # previous releases. We use mapfiles to scope, but don't bother versioning. -native := DYNFLAGS = -R$(SGSPROTO) -L$(SGSPROTO) $(ZNOVERSION) $(HSONAME) +native := DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \ + $(HSONAME) # Comment out the following two lines to have the sgs built from the system # link-editor, rather than the local proto link-editor. -CC_USE_PROTO = -Yl,$(SGSPROTO) -LD_USE_PROTO = $(SGSPROTO)/ +CC_USE_PROTO = -Yl,$(SGSBINDIR) +LD_USE_PROTO = $(SGSBINDIR)/ # # lint-related stuff diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index 01ba9c1ff1..277b62c95b 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -50,8 +50,8 @@ LINTFLAGS64 += -x $(VAR_LINTFLAGS64) CLEANFILES += $(LINTOUTS) -native := LDFLAGS = -R$(SGSPROTO) $(ZNOVERSION) -native := LDLIBS = -L$(SGSPROTO) $(LD_LIB) -lelf $(CONVLIBDIR) \ +native := LDFLAGS = -R$(SGSLIBDIR) $(ZNOVERSION) +native := LDLIBS = -L$(SGSLIBDIR) $(LD_LIB) -lelf $(CONVLIBDIR) \ $(CONV_LIB) native := CPPFLAGS += -DNATIVE_BUILD diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index debb091dae..42ee9938d6 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # all: $(PROG) @@ -51,9 +51,9 @@ include $(SRC)/cmd/sgs/Makefile.targ # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(PROG) +native: $(SGSBINDIR)/$(PROG) -$(SGSPROTO)/$(PROG) \ +$(SGSBINDIR)/$(PROG) \ $(PROG): $$(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com index f9406e08fc..1e7a111101 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.com +++ b/usr/src/cmd/sgs/ldprof/Makefile.com @@ -34,8 +34,6 @@ include ../../Makefile.com ROOTLIBDIR= $(ROOT)/usr/lib/link_audit -SGSPROTO= ../../proto/$(MACH) - MAPFILES = ../common/mapfile-vers DYNFLAGS += $(CC_USE_PROTO) diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ b/usr/src/cmd/sgs/libelf/Makefile.targ index 0c5f3ce0a7..3c70014e0e 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ +++ b/usr/src/cmd/sgs/libelf/Makefile.targ @@ -20,6 +20,7 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2016 RackTop Systems. # objs/%.o \ @@ -131,14 +132,15 @@ pics/xlate.o: xlate.c # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) + -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) # Derived source and header files (messaging). Make sure that the sgsmsg diff --git a/usr/src/cmd/sgs/libld/Makefile.targ b/usr/src/cmd/sgs/libld/Makefile.targ index b23215ce80..85f71e63c7 100644 --- a/usr/src/cmd/sgs/libld/Makefile.targ +++ b/usr/src/cmd/sgs/libld/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -101,14 +101,15 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - @$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) + @$(RM) $(SGSLIBDIR)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.targ b/usr/src/cmd/sgs/liblddbg/Makefile.targ index 71c17d0bae..d5a7e8f6dd 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.targ +++ b/usr/src/cmd/sgs/liblddbg/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -55,14 +55,15 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) + -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/libldmake/Makefile.com b/usr/src/cmd/sgs/libldmake/Makefile.com index a8ab393d8a..6333a7b795 100644 --- a/usr/src/cmd/sgs/libldmake/Makefile.com +++ b/usr/src/cmd/sgs/libldmake/Makefile.com @@ -34,8 +34,6 @@ include $(SRC)/cmd/sgs/Makefile.com ROOTLIBDIR= $(ROOT)/opt/SUNWonld/lib ROOTLIBDIR64= $(ROOT)/opt/SUNWonld/lib/$(MACH64) -SGSPROTO= ../../proto/$(MACH) - SRCDIR = ../common DYNFLAGS += $(CC_USE_PROTO) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.targ b/usr/src/cmd/sgs/libldstab/Makefile.targ index b20710f983..6b47b4ae2b 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.targ +++ b/usr/src/cmd/sgs/libldstab/Makefile.targ @@ -22,6 +22,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2016 RackTop Systems. +# pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< @@ -39,10 +41,9 @@ delete: # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(DYNLIB) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) diff --git a/usr/src/cmd/sgs/librtld/Makefile.targ b/usr/src/cmd/sgs/librtld/Makefile.targ index 134daba96a..71a73947c8 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.targ +++ b/usr/src/cmd/sgs/librtld/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -38,14 +38,15 @@ delete: # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) + -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/link_audit/Makefile.com b/usr/src/cmd/sgs/link_audit/Makefile.com index c15aa1e204..b5de5f5be8 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.com +++ b/usr/src/cmd/sgs/link_audit/Makefile.com @@ -28,8 +28,6 @@ include ../../Makefile.com NO_ASM_WARN= -erroff=E_ASM_DISABLES_OPTIMIZATION -SGSPROTO= ../../proto/$(MACH) - TRUSSLIB= truss.so.1 TRUSSSRC= truss.c diff --git a/usr/src/common/bzip2/bzlib.c b/usr/src/common/bzip2/bzlib.c index be878f92c4..22e2d8826e 100644 --- a/usr/src/common/bzip2/bzlib.c +++ b/usr/src/common/bzip2/bzlib.c @@ -30,6 +30,7 @@ #include "bzlib_private.h" +#ifndef BZ_NO_COMPRESS /*---------------------------------------------------*/ /*--- Compression stuff ---*/ @@ -85,6 +86,7 @@ void BZ2_bz__AssertH__fail ( int errcode ) } #endif +#endif /* BZ_NO_COMPRESS */ /*---------------------------------------------------*/ static @@ -193,6 +195,7 @@ void default_bzfree ( void* opaque, void* addr ) #endif /* _KERNEL */ /*---------------------------------------------------*/ +#ifndef BZ_NO_COMPRESS static void prepare_new_block ( EState* s ) { @@ -346,34 +349,6 @@ int BZ_API(BZ2_bzCompressReset) ( bz_stream *strm ) return BZ_OK; } -int BZ_API(BZ2_bzDecompressReset) ( bz_stream* strm ) -{ - DState* s = strm->state; - - if (!bz_config_ok()) return BZ_CONFIG_ERROR; - - if (strm == NULL) return BZ_PARAM_ERROR; - - s->strm = strm; - - s->state = BZ_X_MAGIC_1; - s->bsLive = 0; - s->bsBuff = 0; - s->calculatedCombinedCRC = 0; - strm->total_in_lo32 = 0; - strm->total_in_hi32 = 0; - strm->total_out_lo32 = 0; - strm->total_out_hi32 = 0; - - s->ll4 = NULL; - s->ll16 = NULL; - s->tt = NULL; - s->currBlockNo = 0; - - - return BZ_OK; -} - /*---------------------------------------------------*/ static @@ -647,6 +622,7 @@ int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) return BZ_OK; } +#endif /* BZ_NO_COMPRESS */ /*---------------------------------------------------*/ /*--- Decompression stuff ---*/ @@ -691,6 +667,38 @@ int BZ_API(BZ2_bzDecompressInit) return BZ_OK; } +/*---------------------------------------------------*/ +/* + * added to allow reuse of bz_stream without malloc/free + */ +int BZ_API(BZ2_bzDecompressReset) ( bz_stream* strm ) +{ + DState* s = strm->state; + + if (!bz_config_ok()) return BZ_CONFIG_ERROR; + + if (strm == NULL) return BZ_PARAM_ERROR; + + s->strm = strm; + + s->state = BZ_X_MAGIC_1; + s->bsLive = 0; + s->bsBuff = 0; + s->calculatedCombinedCRC = 0; + strm->total_in_lo32 = 0; + strm->total_in_hi32 = 0; + strm->total_out_lo32 = 0; + strm->total_out_hi32 = 0; + + s->ll4 = NULL; + s->ll16 = NULL; + s->tt = NULL; + s->currBlockNo = 0; + + + return BZ_OK; +} + /*---------------------------------------------------*/ /* Return True iff data corruption is discovered. @@ -1043,6 +1051,7 @@ int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) return BZ_OK; } +#ifndef BZ_NO_COMPRESS #ifndef BZ_NO_STDIO /*---------------------------------------------------*/ @@ -1732,6 +1741,7 @@ const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum) } #endif +#endif /* BZ_NO_COMPRESS */ /*-------------------------------------------------------------*/ /*--- end bzlib.c ---*/ diff --git a/usr/src/uts/common/fs/zfs/dmu.c b/usr/src/uts/common/fs/zfs/dmu.c index 20da2d5512..124a61020b 100644 --- a/usr/src/uts/common/fs/zfs/dmu.c +++ b/usr/src/uts/common/fs/zfs/dmu.c @@ -1079,13 +1079,13 @@ xuio_stat_fini(void) } void -xuio_stat_wbuf_copied() +xuio_stat_wbuf_copied(void) { XUIOSTAT_BUMP(xuiostat_wbuf_copied); } void -xuio_stat_wbuf_nocopy() +xuio_stat_wbuf_nocopy(void) { XUIOSTAT_BUMP(xuiostat_wbuf_nocopy); } diff --git a/usr/src/uts/common/fs/zfs/sys/dmu.h b/usr/src/uts/common/fs/zfs/sys/dmu.h index 3e3c654448..3510424250 100644 --- a/usr/src/uts/common/fs/zfs/sys/dmu.h +++ b/usr/src/uts/common/fs/zfs/sys/dmu.h @@ -753,8 +753,8 @@ int dmu_xuio_add(struct xuio *uio, struct arc_buf *abuf, offset_t off, int dmu_xuio_cnt(struct xuio *uio); struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i); void dmu_xuio_clear(struct xuio *uio, int i); -void xuio_stat_wbuf_copied(); -void xuio_stat_wbuf_nocopy(); +void xuio_stat_wbuf_copied(void); +void xuio_stat_wbuf_nocopy(void); extern boolean_t zfs_prefetch_disable; extern int zfs_max_recordsize; |
