diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-02-28 16:14:06 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-02-28 16:14:06 +0000 |
commit | c63c4eb1cdc25ce67d4f92371711ef643eb146d4 (patch) | |
tree | e5362c1281083bcc9e260cbd6d2ab942d7f9c22a /regress/sys | |
parent | 7e66fe876d9fe5d08f92d73238f93bec346d8f7d (diff) |
... also check that writing 0 bytes works...
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/kern/pwrite/pwrite.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/sys/kern/pwrite/pwrite.c b/regress/sys/kern/pwrite/pwrite.c index caf0cf7b725..b9a1467aea4 100644 --- a/regress/sys/kern/pwrite/pwrite.c +++ b/regress/sys/kern/pwrite/pwrite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwrite.c,v 1.5 2011/11/06 15:00:34 guenther Exp $ */ +/* $OpenBSD: pwrite.c,v 1.6 2014/02/28 16:14:05 espie Exp $ */ /* * Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain. */ @@ -44,6 +44,9 @@ main(int argc, char *argv[]) if (write(fd, &c, 1) != 1) err(1, "write"); + if (write(fd, &c, 0) != 0) + err(1, "write"); + if (pread(fd, buf, 10, 0) != 10) err(1, "pread"); |