summaryrefslogtreecommitdiff
path: root/usr.bin/diff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2010-07-16 08:06:01 +0000
committerRay Lai <ray@cvs.openbsd.org>2010-07-16 08:06:01 +0000
commit3a9643bda197c46bb54b94d40b921d5eb545ab21 (patch)
tree3c3a79cf0f75f2d66bf26bb834751f2f101454c6 /usr.bin/diff
parent0cfce9c630ab2f0c32e7e5c9bd84912a95701a8a (diff)
diff exits 2 on error, not 1.
OK millert
Diffstat (limited to 'usr.bin/diff')
-rw-r--r--usr.bin/diff/diffreg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index 56e8ca44925..443d1089430 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffreg.c,v 1.77 2010/07/15 21:32:37 ray Exp $ */
+/* $OpenBSD: diffreg.c,v 1.78 2010/07/16 08:06:00 ray Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -977,7 +977,7 @@ preadline(int fd, size_t rlen, off_t off)
line = xmalloc(rlen + 1);
if ((nr = pread(fd, line, rlen, off)) < 0)
- err(1, "preadline");
+ err(2, "preadline");
if (nr > 0 && line[nr-1] == '\n')
nr--;
line[nr] = '\0';