summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-03-12 15:44:14 -0700
committerBrian Behlendorf <[email protected]>2009-03-12 15:44:14 -0700
commit82ce8b00f3f147330b77ddaa206a4400604bafd5 (patch)
treea1f6b9101692970af40bf3c956b9e32f82e02138
parent379d9cf34d5902e0109bb4f4fe5be16c06b5b15d (diff)
parent6a5acaa105b26ad12872b79fef4d44f5d5b2d820 (diff)
Merge commit 'refs/top-bases/zfs-branch' into zfs-branch
-rw-r--r--cmd/zdb/zdb.c2
-rw-r--r--cmd/ztest/ztest.c2
-rw-r--r--lib/libzpool/kernel.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index c8076b178..fb9c4be6f 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -1882,7 +1882,7 @@ zdb_dump_block_raw(void *buf, uint64_t size, int flags)
{
if (flags & ZDB_FLAG_BSWAP)
byteswap_uint64_array(buf, size);
- (void) write(2, buf, size);
+ VERIFY(write(fileno(stderr), buf, size) == size);
}
static void
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index fcfeef4da..019c57385 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -1171,7 +1171,7 @@ ztest_vdev_LUN_growth(ztest_args_t *za)
*/
if (fsize < 2 * zopt_vdev_size) {
size_t newsize = fsize + ztest_random(fsize / 32);
- (void) ftruncate(fd, newsize);
+ VERIFY(ftruncate(fd, newsize) == 0);
if (zopt_verbose >= 6) {
(void) printf("%s grew from %lu to %lu bytes\n",
dev_name, (ulong_t)fsize, (ulong_t)newsize);
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index 00e8ad09d..a53ab265d 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -829,7 +829,7 @@ umem_out_of_memory(void)
{
char errmsg[] = "out of memory -- generating core dump\n";
- write(fileno(stderr), errmsg, sizeof (errmsg));
+ (void) fprintf(stderr, "%s", errmsg);
abort();
return (0);
}