From 60b54a0e2d70d765fdc7eacff3d25d38e476538e Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 16 Jul 2010 08:06:00 +0000 Subject: [PATCH] diff exits 2 on error, not 1. OK millert --- usr.bin/diff/diffreg.c | 4 ++-- 1 file 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'; -- 2.20.1