diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /libtrivfs | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2 hurd-835b293d35a209d38047126443d41fa7090daa4c.zip |
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating
errors much easier.
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/dir-lookup.c | 2 | ||||
-rw-r--r-- | libtrivfs/file-set-size.c | 4 | ||||
-rw-r--r-- | libtrivfs/fsys-getroot.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-async-icky.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-async.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-map.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-modes-get.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-modes-off.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-modes-on.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-modes-set.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-owner-get.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-owner-mod.c | 2 | ||||
-rw-r--r-- | libtrivfs/io-read.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-readable.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-reauthenticate.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-seek.c | 4 | ||||
-rw-r--r-- | libtrivfs/io-select.c | 6 | ||||
-rw-r--r-- | libtrivfs/io-write.c | 4 | ||||
-rw-r--r-- | libtrivfs/startup.c | 2 |
19 files changed, 30 insertions, 30 deletions
diff --git a/libtrivfs/dir-lookup.c b/libtrivfs/dir-lookup.c index 66afac1d..73aff5c4 100644 --- a/libtrivfs/dir-lookup.c +++ b/libtrivfs/dir-lookup.c @@ -16,7 +16,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "priv.h" -#include <assert.h> +#include <assert-backtrace.h> #include <fcntl.h> #include <string.h> diff --git a/libtrivfs/file-set-size.c b/libtrivfs/file-set-size.c index f90ceec6..a2691c85 100644 --- a/libtrivfs/file-set-size.c +++ b/libtrivfs/file-set-size.c @@ -17,13 +17,13 @@ #include "priv.h" #include "trivfs_fs_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_file_set_size (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, off_t size) { - assert (!trivfs_support_write); + assert_backtrace (!trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/fsys-getroot.c b/libtrivfs/fsys-getroot.c index c9b8261e..eac13284 100644 --- a/libtrivfs/fsys-getroot.c +++ b/libtrivfs/fsys-getroot.c @@ -22,7 +22,7 @@ #include "priv.h" #include "fsys_reply_U.h" #include "trivfs_fsys_S.h" -#include <assert.h> +#include <assert-backtrace.h> #include <fcntl.h> #include <string.h> diff --git a/libtrivfs/io-async-icky.c b/libtrivfs/io-async-icky.c index d6313d1c..72569423 100644 --- a/libtrivfs/io-async-icky.c +++ b/libtrivfs/io-async-icky.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_get_icky_async_id (struct trivfs_protid *cred, diff --git a/libtrivfs/io-async.c b/libtrivfs/io-async.c index 5f609561..01a809cf 100644 --- a/libtrivfs/io-async.c +++ b/libtrivfs/io-async.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_async (struct trivfs_protid *cred, diff --git a/libtrivfs/io-map.c b/libtrivfs/io-map.c index 3bf8dabd..958627f6 100644 --- a/libtrivfs/io-map.c +++ b/libtrivfs/io-map.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_map (struct trivfs_protid *cred, diff --git a/libtrivfs/io-modes-get.c b/libtrivfs/io-modes-get.c index b70d94bc..c536732c 100644 --- a/libtrivfs/io-modes-get.c +++ b/libtrivfs/io-modes-get.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_get_openmodes (struct trivfs_protid *cred, diff --git a/libtrivfs/io-modes-off.c b/libtrivfs/io-modes-off.c index 85d18e75..3717470e 100644 --- a/libtrivfs/io-modes-off.c +++ b/libtrivfs/io-modes-off.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_clear_some_openmodes (struct trivfs_protid *cred, @@ -29,6 +29,6 @@ trivfs_S_io_clear_some_openmodes (struct trivfs_protid *cred, mach_msg_type_name_t replytype, int bits) { - assert (!trivfs_support_read && !trivfs_support_write); + assert_backtrace (!trivfs_support_read && !trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/io-modes-on.c b/libtrivfs/io-modes-on.c index f1c6ffb9..b71d21b6 100644 --- a/libtrivfs/io-modes-on.c +++ b/libtrivfs/io-modes-on.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_set_some_openmodes (struct trivfs_protid *cred, @@ -29,6 +29,6 @@ trivfs_S_io_set_some_openmodes (struct trivfs_protid *cred, mach_msg_type_name_t replytype, int bits) { - assert (!trivfs_support_read && !trivfs_support_write); + assert_backtrace (!trivfs_support_read && !trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/io-modes-set.c b/libtrivfs/io-modes-set.c index 1d01b9b5..44846428 100644 --- a/libtrivfs/io-modes-set.c +++ b/libtrivfs/io-modes-set.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> error_t trivfs_S_io_set_all_openmodes (struct trivfs_protid *cred, @@ -29,6 +29,6 @@ trivfs_S_io_set_all_openmodes (struct trivfs_protid *cred, mach_msg_type_name_t replytype, int mode) { - assert (!trivfs_support_read && !trivfs_support_write); + assert_backtrace (!trivfs_support_read && !trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/io-owner-get.c b/libtrivfs/io-owner-get.c index bd490467..8b4791bb 100644 --- a/libtrivfs/io-owner-get.c +++ b/libtrivfs/io-owner-get.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_get_owner (struct trivfs_protid *cred, diff --git a/libtrivfs/io-owner-mod.c b/libtrivfs/io-owner-mod.c index bed9000e..58deb4d7 100644 --- a/libtrivfs/io-owner-mod.c +++ b/libtrivfs/io-owner-mod.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_mod_owner (struct trivfs_protid *cred, diff --git a/libtrivfs/io-read.c b/libtrivfs/io-read.c index 7dfdc190..cd8e2d8b 100644 --- a/libtrivfs/io-read.c +++ b/libtrivfs/io-read.c @@ -17,7 +17,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_read (struct trivfs_protid *cred, @@ -28,6 +28,6 @@ trivfs_S_io_read (struct trivfs_protid *cred, off_t off, mach_msg_type_number_t amt) { - assert (!trivfs_support_read); + assert_backtrace (!trivfs_support_read); return EOPNOTSUPP; } diff --git a/libtrivfs/io-readable.c b/libtrivfs/io-readable.c index 90e66c77..de4d32b8 100644 --- a/libtrivfs/io-readable.c +++ b/libtrivfs/io-readable.c @@ -17,7 +17,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_readable (struct trivfs_protid *cred, @@ -25,6 +25,6 @@ trivfs_S_io_readable (struct trivfs_protid *cred, mach_msg_type_name_t replytype, mach_msg_type_number_t *amount) { - assert (!trivfs_support_read); + assert_backtrace (!trivfs_support_read); return EOPNOTSUPP; } diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c index 72684e35..db8272fb 100644 --- a/libtrivfs/io-reauthenticate.c +++ b/libtrivfs/io-reauthenticate.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> #include <string.h> kern_return_t @@ -49,7 +49,7 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, auth = getauth (); newright = ports_get_send_right (newcred); - assert (newright != MACH_PORT_NULL); + assert_backtrace (newright != MACH_PORT_NULL); err = iohelp_reauth (&newcred->user, auth, rendport, newright, 1); if (!err) diff --git a/libtrivfs/io-seek.c b/libtrivfs/io-seek.c index cfb7f53a..b2ec8f4b 100644 --- a/libtrivfs/io-seek.c +++ b/libtrivfs/io-seek.c @@ -17,7 +17,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_seek (struct trivfs_protid *cred, @@ -27,6 +27,6 @@ trivfs_S_io_seek (struct trivfs_protid *cred, int whence, off_t *newp) { - assert (!trivfs_support_read && !trivfs_support_write); + assert_backtrace (!trivfs_support_read && !trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/io-select.c b/libtrivfs/io-select.c index 0682b2da..668b7a51 100644 --- a/libtrivfs/io-select.c +++ b/libtrivfs/io-select.c @@ -21,7 +21,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> kern_return_t trivfs_S_io_select (struct trivfs_protid *cred, @@ -32,9 +32,9 @@ trivfs_S_io_select (struct trivfs_protid *cred, if (!cred) return EOPNOTSUPP; if (*seltype & (SELECT_READ|SELECT_URG)) - assert (!trivfs_support_read); + assert_backtrace (!trivfs_support_read); if (*seltype & (SELECT_WRITE|SELECT_URG)) - assert (!trivfs_support_write); + assert_backtrace (!trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/io-write.c b/libtrivfs/io-write.c index c479c55b..d5b32524 100644 --- a/libtrivfs/io-write.c +++ b/libtrivfs/io-write.c @@ -17,7 +17,7 @@ #include "priv.h" #include "trivfs_io_S.h" -#include <assert.h> +#include <assert-backtrace.h> #include <fcntl.h> kern_return_t @@ -32,6 +32,6 @@ trivfs_S_io_write (struct trivfs_protid *cred, if (!(trivfs_allow_open & O_WRITE)) return EBADF; - assert (!trivfs_support_write); + assert_backtrace (!trivfs_support_write); return EOPNOTSUPP; } diff --git a/libtrivfs/startup.c b/libtrivfs/startup.c index 4d76d47c..56ef02c4 100644 --- a/libtrivfs/startup.c +++ b/libtrivfs/startup.c @@ -20,7 +20,7 @@ #include <hurd.h> #include <hurd/fsys.h> -#include <assert.h> +#include <assert-backtrace.h> #include "priv.h" |