aboutsummaryrefslogtreecommitdiff
path: root/nfs/ops.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /nfs/ops.c
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
downloadhurd-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 'nfs/ops.c')
-rw-r--r--nfs/ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index 33ab38b7..afde0bed 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -608,7 +608,7 @@ verify_nonexistent (struct iouser *cred, struct node *dir,
/* Don't use the lookup cache for this; we want a full sync to
get as close to real exclusive create behavior as possible. */
- assert (protocol_version == 2);
+ assert_backtrace (protocol_version == 2);
p = nfs_initialize_rpc (NFSPROC_LOOKUP (protocol_version),
cred, 0, &rpcbuf, dir, -1);
@@ -1134,8 +1134,8 @@ netfs_attempt_mkfile (struct iouser *cred, struct node *dir,
return err;
}
- assert (!(*newnp)->nn->dead_dir);
- assert (!(*newnp)->nn->dead_name);
+ assert_backtrace (!(*newnp)->nn->dead_dir);
+ assert_backtrace (!(*newnp)->nn->dead_name);
netfs_nref (dir);
(*newnp)->nn->dead_dir = dir;
(*newnp)->nn->dead_name = name;
@@ -1668,7 +1668,7 @@ netfs_report_access (struct iouser *cred,
err = netfs_attempt_read (cred, np, 0, &len, &byte);
if (err)
return;
- assert (len == 1 || len == 0);
+ assert_backtrace (len == 1 || len == 0);
*types |= O_READ | O_EXEC;
@@ -1777,7 +1777,7 @@ fetch_directory (struct iouser *cred, struct node *dir,
char *newbuf;
newbuf = realloc (buf, bufmalloced *= 2);
- assert (newbuf);
+ assert_backtrace (newbuf);
if (newbuf != buf)
bp = newbuf + (bp - buf);
buf = newbuf;