Commit Graph

455 Commits

Author SHA1 Message Date
riastradh
a9ebcda81c Sprinkle some more zfs range lock reference count kasserts.
From a debugging session months ago, might as well share them.
2016-02-29 16:18:37 +00:00
riastradh
0ba9aea45e Cast int64_t to long long before printfing with %lld.
Not doing so broke something months ago and I forgot why.
2016-02-29 16:14:57 +00:00
riastradh
886308980e Add __printflike as appropriate. 2016-02-29 02:19:37 +00:00
christos
042ef76aff - Add missing ioctl.h
- Hide dprintf
2016-02-28 19:10:45 +00:00
christos
91780cc76d hook drti 2016-02-28 19:10:10 +00:00
joerg
f247f26769 Make the default CPP path a list and check if they are access(2)able.
If no match is found, fallback to looking for cpp in PATH.
2016-02-24 21:11:34 +00:00
joerg
5e22f35b4d Keep the if chain going. 2016-02-21 13:33:47 +00:00
joerg
486516affa Clang 3.7 and newer provide the array size via DW_AT_count, not via
DW_AT_upper_bound. Recognize the former as well as the latter.
2016-02-20 23:09:03 +00:00
joerg
4fa4785fa4 Don't nuke input on errors, it makes debugging a nightmare. 2016-02-20 22:08:44 +00:00
joerg
f9442aa68f Shuffle include order to avoid missing free on glibc. 2016-02-20 21:50:02 +00:00
christos
604231c4f0 - don't barf if the object does not have DWARF debug data.
- bump size of types to 1K to avoid string overflow
(both are needed for the new elftoolchain).
2016-02-20 02:39:47 +00:00
joerg
b0b911ff3e Don't use #pragma weak to implicitly change argument types. 2016-02-19 19:25:59 +00:00
joerg
e9ae0934d6 dmu_objset_rename is an alias for dsl_dataset_rename, but differs in
constness of the first argument. Newer clang checks for this and
prohibits it, so just be consistent by constifying the latter.
2016-02-19 19:25:22 +00:00
christos
c628030d37 reduce ifdefs 2016-02-13 21:37:12 +00:00
joerg
66313330f0 SDT is not a disease. Use const consistently. 2016-02-06 18:19:59 +00:00
riastradh
8e1ee72c35 Need nbtool_config.h for __dead in tools. 2016-02-05 20:39:50 +00:00
riastradh
32e3d5d381 Need nbtools_config.h for __unused.
Fixes

.../src/tools/ctfmerge/../../external/cddl/osnet/dist/tools/ctf/common/list.c:73:47: error: expected ';', ',' or ')' before '__unused'
 list_defcmp(void *d1, void *d2, void *private __unused)
                                               ^~~~~~~~

on non-NetBSD systems, where <assert.h>, <stdlib.h>, <stdio.h>, and
<sys/types.h> don't define __unused.
2016-02-05 19:56:00 +00:00
roy
871759c0d7 Fix the actual issue rather than silencing the warning.
Thanks to gson@
2016-02-05 10:14:49 +00:00
roy
f4a5ac8842 Add -Wno-format-nonliteral 2016-02-04 21:26:48 +00:00
roy
5baa0e8c89 dtrace needs Wno-format-security for clang it seems. 2016-02-04 20:06:29 +00:00
roy
a118806971 Add some __printflike and __dead love. Init some structs fully. 2016-02-04 20:05:53 +00:00
roy
80df5a39da Fix build. 2016-02-04 18:47:14 +00:00
roy
440c6b2902 Mark more functions as __printflike and __dead. 2016-02-04 18:46:37 +00:00
roy
5e1375a115 Mark more functions as __dead. 2016-02-04 17:47:43 +00:00
roy
dd3d664f77 Disable -Wformat-nonliteral here to build. 2016-02-04 17:42:34 +00:00
roy
1e48e626cd More printflike and dead fixes. 2016-02-04 17:40:55 +00:00
roy
985adb8dc0 Fix printf formats and casts. 2016-02-04 17:27:32 +00:00
roy
b9ae60933c Correct a prior patch by moving __printflike marking from the .c files
to the .h ones.
2016-02-04 16:58:11 +00:00
roy
b31be80ab9 Mark __printflike and __dead. 2016-02-04 16:48:34 +00:00
roy
c29f38a653 Mark printflike functions as __printflike. 2016-02-04 15:23:29 +00:00
riz
c1e4fb302e Adapt getmajor and getminor signatures for NetBSD. 2016-02-03 17:50:12 +00:00
christos
efcb6e5b0c Split the opensolaris types into opentypes.h because linux includes
sysmacros.h from types.h and we can't interpose ourselves to define
the needed types otherwise.
Disable unused macros, get rid of __APPLE__
2016-02-01 02:12:55 +00:00
christos
d3b8f3fc89 prevent re-defines 2016-02-01 02:09:54 +00:00
christos
117f317b41 define it when we have vaddr_t exposed. 2016-01-31 06:15:39 +00:00
christos
73c5431c9d we don't keed page count in userland. 2016-01-31 05:31:28 +00:00
christos
aa2825fe7d only need pgcnt_t in kernel. 2016-01-31 05:21:53 +00:00
christos
d53e8ce2b1 don't link/depend on libpthread if we are a hostprog.
XXX: should be using -pthread instead?
2016-01-27 18:43:25 +00:00
christos
9a678359e4 sys/conf.h is a kernel only header 2016-01-24 22:00:53 +00:00
christos
ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
riastradh
d604e653d0 Omit spurious include of <sys/isa_defs.h> in dtrace tools build.
Fixes dtrace tools cross-build from architectures with no dtrace
support:

#   compile  libctf/ctf_create.lo
[...]
/export/anoncvs/src/tools/libctf/../../external/cddl/osnet/sys/sys/isa_defs.h:50:2: error: #error "architecture not supported"
 #error "architecture not supported"
  ^
2016-01-23 15:45:42 +00:00
christos
b41dd0142f We don't need to declare clock_gettime if we don't have it and we don't need
to __RENAME if we are not NetBSD.
2015-12-27 21:42:09 +00:00
christos
585cc407b7 Override roundup. 2015-12-27 21:40:21 +00:00
christos
da5e76ddef don't re-define __assert. 2015-12-27 21:39:34 +00:00
christos
81dbb529d3 add nbtool_config.h 2015-12-27 21:39:01 +00:00
christos
d941e4fe7e add return 2015-12-27 21:38:46 +00:00
joerg
08c2098fe3 Our time.h defines clock_gettime with assembler name after including
sys/time.h. The Solaris compat code in sys/time.h wants to use it in an
inline function, but misses a prototype (and the relabeling). As stopgap
for getting consistent defines of clock_gettime duplicate the prototype
here.
2015-12-21 13:28:39 +00:00
christos
952d11cd49 catch up with DIOCGPART -> DIOCGPARTINFO 2015-12-08 20:56:21 +00:00
pgoyette
82344b6ce9 When loading the module, if devsw_attach() fails, call dtrace_unload()
to undo the effects of dtrace_load().  And if dtrace_unload() fails,
panic (since we can't get the system back to its earlier stable state).

When unloading the module, call devsw_detach() first, to lock out any
new access.  Then call dtrace_unload().  If dgtrace_unload() fails,
reattach the devsw, and if that fails, panic.

Implements fixes described in PR kern/43032
2015-11-28 22:41:36 +00:00
riz
d39dd3ba38 Declare variables under the same conditions as their use. 2015-11-12 22:10:48 +00:00
christos
d4aeb196d8 make too many struct or union members non-fatal. 2015-10-21 13:43:49 +00:00