From c63c4eb1cdc25ce67d4f92371711ef643eb146d4 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Fri, 28 Feb 2014 16:14:06 +0000 Subject: ... also check that writing 0 bytes works... --- regress/sys/kern/pwrite/pwrite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'regress') 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 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"); -- cgit v1.2.3