summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-27 00:28:01 +0000
committerJeremy Allison <jra@samba.org>2001-03-27 00:28:01 +0000
commitde368e09cb310d4625995f1f47cc992f482d76fa (patch)
tree30680b525f8332077e660c23a9e97cc122b80a2f /source3
parentbcdb9496e81c4d00a522ce57406dec08f6df9b34 (diff)
downloadsamba-de368e09cb310d4625995f1f47cc992f482d76fa.tar.gz
samba-de368e09cb310d4625995f1f47cc992f482d76fa.tar.bz2
samba-de368e09cb310d4625995f1f47cc992f482d76fa.zip
Fix for ENOSPC from DCB.
Jeremy. (This used to be commit 55fcd71eecf4477c56fc4a01bda6d452d3b0caa4)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/nbio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/utils/nbio.c b/source3/utils/nbio.c
index 973f7d0628..4866e52d4e 100644
--- a/source3/utils/nbio.c
+++ b/source3/utils/nbio.c
@@ -128,8 +128,14 @@ void nb_write(int handle, int size, int offset)
return;
}
if (cli_smbwrite(c, ftable[i].fd, buf, offset, size) != size) {
- printf("(%d) write failed on handle %d\n",
- line_count, handle);
+ printf("(%d) write failed on handle %d, fd %d \
+errno %d (%s)\n", line_count, handle, ftable[i].fd, errno, strerror(errno));
+ if (errno == ENOSPC) {
+ printf("Halting.\n");
+ fflush(stdout);
+ fflush(stderr);
+ exit(3);
+ }
}
}
@@ -147,8 +153,8 @@ void nb_read(int handle, int size, int offset)
}
if ((ret=cli_read(c, ftable[i].fd, buf, offset, size)) != size) {
#if NBDEBUG
- printf("(%d) read failed on handle %d ofs=%d size=%d res=%d\n",
- line_count, handle, offset, size, ret);
+ printf("(%d) read failed on handle %d ofs=%d size=%d res=%d fd %d errno %d (%s)\n",
+ line_count, handle, offset, size, ret, ftable[i].fd, errno, strerror(errno));
#endif
}
}