aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d12
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.c14
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.h1
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c7
-rw-r--r--cddl/lib/Makefile49
-rw-r--r--cddl/lib/libnvpair/Makefile2
-rw-r--r--cddl/lib/libuutil/Makefile1
-rw-r--r--cddl/lib/libzpool/Makefile1
-rw-r--r--cddl/sbin/Makefile9
-rw-r--r--cddl/share/Makefile6
-rw-r--r--cddl/usr.bin/Makefile16
-rw-r--r--cddl/usr.bin/zstream/Makefile1
-rw-r--r--cddl/usr.libexec/Makefile7
-rw-r--r--cddl/usr.sbin/Makefile20
-rw-r--r--cddl/usr.sbin/dwatch/dwatch.12
16 files changed, 71 insertions, 79 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
index 59094e3da37f..1c23b2a0b9e0 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
@@ -61,7 +61,7 @@ EOF
sleeper()
{
while true; do
- $longsleep &
+ limits -c unlimited $longsleep &
/bin/sleep 1
kill -SEGV $!
done
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
index cd4715319913..c6bfff2181e6 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
@@ -37,23 +37,23 @@
#pragma D option quiet
-struct input_struct {
+struct dtrace_input_struct {
int ii;
char ic;
};
-struct output_struct {
+struct dtrace_output_struct {
int oi;
char oc;
};
-typedef struct output_struct output_t;
+typedef struct dtrace_output_struct dtrace_output_t;
-translator output_t < struct input_struct *ivar >
+translator dtrace_output_t < struct dtrace_input_struct *ivar >
{
- oi = ((struct input_struct *) ivar)->ii;
- oc = ((struct input_struct *) ivar)->ic;
+ oi = ((struct dtrace_input_struct *) ivar)->ii;
+ oc = ((struct dtrace_input_struct *) ivar)->ic;
};
BEGIN
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.c b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
index e16044a8b672..66296c5b114d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.c
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
@@ -44,6 +44,20 @@ memory_bailout(void)
exit(1);
}
+int
+xasprintf(char **s, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vasprintf(s, fmt, ap);
+ va_end(ap);
+ if (ret == -1)
+ memory_bailout();
+ return (ret);
+}
+
void *
xmalloc(size_t size)
{
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.h b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
index 88ca31bec65a..72706b5f7fdb 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.h
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
@@ -39,6 +39,7 @@
extern "C" {
#endif
+int xasprintf(char **, const char *, ...);
void *xmalloc(size_t);
void *xcalloc(size_t);
char *xstrdup(const char *);
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 2d686e53fed1..67866555ae5d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -618,7 +618,7 @@ tdesc_intr_long(dwarf_t *dw)
* caller can then use the copy as the type for a bitfield structure member.
*/
static tdesc_t *
-tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
+tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz, const char *suffix)
{
tdesc_t *new = xcalloc(sizeof (tdesc_t));
@@ -627,7 +627,7 @@ tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
"unresolved type\n", old->t_id);
}
- new->t_name = xstrdup(old->t_name);
+ xasprintf(&new->t_name, "%s %s", old->t_name, suffix);
new->t_size = old->t_size;
new->t_id = mfgtid_next(dw);
new->t_type = INTRINSIC;
@@ -1158,7 +1158,8 @@ die_sou_resolve(tdesc_t *tdp, tdesc_t **tdpp __unused, void *private)
debug(3, "tdp %u: creating bitfield for %d bits\n",
tdp->t_id, ml->ml_size);
- ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size);
+ ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size,
+ "bitfield");
}
}
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 5ca0d56b291a..e66109a21138 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -2,39 +2,32 @@
.include <src.opts.mk>
-SUBDIR= drti \
- libavl \
+.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes
+SUBDIR= libspl
+.endif
+
+SUBDIR.${MK_DTRACE}+= \
+ drti \
libctf \
- libdtrace \
- ${_libicp} \
- ${_libicp_rescue} \
+ libdtrace
+
+SUBDIR.${MK_TESTS}+= tests
+
+SUBDIR.${MK_ZFS}+= \
+ libavl \
+ libicp \
+ libicp_rescue \
libnvpair \
- libspl \
- ${_libtpool} \
+ libtpool \
libumem \
libuutil \
- ${_libzfs_core} \
- ${_libzfs} \
- ${_libzfsbootenv} \
- ${_libzpool} \
- ${_libzutil} \
- ${_pam_zfs_key}
-
-SUBDIR.${MK_TESTS}+= tests
+ libzfs \
+ libzfs_core \
+ libzfsbootenv \
+ libzpool \
+ libzutil
-.if ${MK_ZFS} != "no"
-_libzfs_core= libzfs_core
-_libicp= libicp
-_libicp_rescue= libicp_rescue
-_libzfs= libzfs
-_libzutil= libzutil
-_libzfsbootenv= libzfsbootenv
-_libzpool= libzpool
-_libtpool= libtpool
-.if ${MK_OPENSSL} != "no"
-_pam_zfs_key= pam_zfs_key
-.endif
-.endif
+SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key
SUBDIR_DEPEND_libavl= libspl
SUBDIR_DEPEND_libctf= libspl
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index aaf76ed3fb28..d436b9b1df27 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -2,12 +2,14 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair
+.PATH: ${SRCTOP}/sys/contrib/openzfs/include
LIB= nvpair
LIBADD= spl
PACKAGE= runtime
# user
+INCS= libnvpair.h
SRCS= libnvpair.c \
libnvpair_json.c \
nvpair_alloc_system.c
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index 169b8d8afe01..fdbac6de2748 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -10,7 +10,6 @@ SRCS=\
uu_ident.c \
uu_list.c \
uu_misc.c \
- uu_pname.c \
uu_string.c
WARNS?= 2
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 92f1bda6d82a..b9ef6575c99a 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -119,7 +119,6 @@ KERNEL_C = \
sha256.c \
skein_zfs.c \
spa.c \
- spa_boot.c \
spa_checkpoint.c \
spa_config.c \
spa_errlog.c \
diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile
index 99c4a91a3e69..2b3dcf886246 100644
--- a/cddl/sbin/Makefile
+++ b/cddl/sbin/Makefile
@@ -2,14 +2,11 @@
.include <src.opts.mk>
-SUBDIR= ${_zfs} ${_zpool}
-
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zfs= zfs
-_zpool= zpool
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zfs \
+ zpool
SUBDIR_PARALLEL=
diff --git a/cddl/share/Makefile b/cddl/share/Makefile
index 68670ffbe7e0..258b60877f75 100644
--- a/cddl/share/Makefile
+++ b/cddl/share/Makefile
@@ -2,11 +2,7 @@
.include <src.opts.mk>
-SUBDIR= ${_zfs}
-
-.if ${MK_ZFS} != "no"
-_zfs= zfs
-.endif
+SUBDIR.${MK_ZFS}+= zfs
SUBDIR_PARALLEL=
diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile
index 10d55215c0b3..97c4639cece0 100644
--- a/cddl/usr.bin/Makefile
+++ b/cddl/usr.bin/Makefile
@@ -2,21 +2,17 @@
.include <src.opts.mk>
-SUBDIR= \
+SUBDIR.${MK_DTRACE}+= \
ctfconvert \
ctfdump \
- ctfmerge \
- ${_zinject} \
- ${_zstream} \
- ${_ztest}
+ ctfmerge
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zinject= zinject
-_ztest= ztest
-_zstream = zstream
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zinject \
+ ztest \
+ zstream
SUBDIR_PARALLEL=
diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index cfcff71a813f..6296390592b3 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -11,6 +11,7 @@ MLINKS= zstream.8 zstreamdump.8
INCS= zstream.h
SRCS= \
zstream.c \
+ zstream_decompress.c \
zstream_dump.c \
zstream_redup.c \
zstream_token.c
diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile
index 6280cbab5766..7b7dfc7bd354 100644
--- a/cddl/usr.libexec/Makefile
+++ b/cddl/usr.libexec/Makefile
@@ -2,11 +2,8 @@
.include <src.opts.mk>
-SUBDIR= ${_zpool_influxdb}
-
-.if ${MK_ZFS} != "no"
-_zpool_influxdb= zpool_influxdb
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zpool_influxdb
SUBDIR_PARALLEL=
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index 4dde136dc412..68dc735b3d1b 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -2,23 +2,19 @@
.include <src.opts.mk>
-SUBDIR= ${_dtrace} \
+SUBDIR.${MK_DTRACE}+= \
+ ${_dtrace} \
${_dwatch} \
${_lockstat} \
- ${_plockstat} \
- ${_zdb} \
- ${_zfsd} \
- ${_zhack}
+ ${_plockstat}
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zdb= zdb
-_zhack= zhack
-. if ${MK_CXX} != "no"
-_zfsd= zfsd
-. endif
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zdb \
+ zhack
+SUBDIR.${MK_ZFS}.${MK_CXX}+= \
+ zfsd
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_dtrace= dtrace
diff --git a/cddl/usr.sbin/dwatch/dwatch.1 b/cddl/usr.sbin/dwatch/dwatch.1
index d5595a530c0e..8714104ca6c8 100644
--- a/cddl/usr.sbin/dwatch/dwatch.1
+++ b/cddl/usr.sbin/dwatch/dwatch.1
@@ -68,7 +68,7 @@ utility uses
.Xr dtrace 1
to display process info when a given DTrace probe point is triggered.
Only the root user or users with
-.Xr sudo 8
+.Xr sudo 8 Pq Pa ports/security/sudo
access can run this command.
.Pp
.Nm