diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-26 15:18:52 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-26 10:22:03 +0200 |
commit | 66f59f040984bef5023fc844097b85bebee88f09 (patch) | |
tree | 9d642302f19c7be7149b6c9e4a8ffbd8a99f9376 /lib/tdb/test/run-corrupt.c | |
parent | d1aeb2d1c3bfb87e9ab4079535867b40fb722fde (diff) | |
download | samba-66f59f040984bef5023fc844097b85bebee88f09.tar.gz samba-66f59f040984bef5023fc844097b85bebee88f09.tar.bz2 samba-66f59f040984bef5023fc844097b85bebee88f09.zip |
tdb: finish weaning off err.h.
Commit 3c4263e7580143c69225729f5b67f09c00add2fd said it removed err.h
from tdb, unfortuntely it didn't: tap-interface.h still included it.
This finishes it properly!
Reported-by:Stefan Metzmacher <metze@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Tue Jun 26 10:22:03 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib/tdb/test/run-corrupt.c')
-rw-r--r-- | lib/tdb/test/run-corrupt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tdb/test/run-corrupt.c b/lib/tdb/test/run-corrupt.c index 584f789bf8..1a3c769183 100644 --- a/lib/tdb/test/run-corrupt.c +++ b/lib/tdb/test/run-corrupt.c @@ -41,11 +41,15 @@ static void tdb_flip_bit(struct tdb_context *tdb, unsigned int bit) ((unsigned char *)tdb->map_ptr)[off] ^= mask; else { unsigned char c; - if (pread(tdb->fd, &c, 1, off) != 1) - err(1, "pread"); + if (pread(tdb->fd, &c, 1, off) != 1) { + fprintf(stderr, "pread: %s\n", strerror(errno)); + exit(1); + } c ^= mask; - if (pwrite(tdb->fd, &c, 1, off) != 1) - err(1, "pwrite"); + if (pwrite(tdb->fd, &c, 1, off) != 1) { + fprintf(stderr, "pwrite: %s\n", strerror(errno)); + exit(1); + } } } |