From 28176beb0244666333c820dadb0fbab4a25c3157 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Mon, 26 Oct 2015 22:22:57 +0000 Subject: Use error(FATAL) instead of what was previously err(1,...) ok tobias@ --- usr.bin/sed/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/sed') diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 6042d9efbc4..473995567f7 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.29 2015/10/26 14:08:47 mmcc Exp $ */ +/* $OpenBSD: main.c,v 1.30 2015/10/26 22:22:56 jca Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -161,10 +161,10 @@ main(int argc, char *argv[]) if (inplace != NULL) { if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) - error(1, "pledge"); + error(FATAL, "pledge: %s", strerror(errno)); } else { if (pledge("stdio rpath wpath cpath", NULL) == -1) - error(1, "pledge"); + error(FATAL, "pledge: %s", strerror(errno)); } /* First usage case; script is the first arg */ @@ -355,7 +355,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag) fname = files->fname; if (inplace != NULL) { if (lstat(fname, &sb) != 0) - error(1, "%s: %s", fname, + error(FATAL, "%s: %s", fname, strerror(errno ? errno : EIO)); if (!S_ISREG(sb.st_mode)) error(FATAL, "%s: %s %s", fname, -- cgit v1.2.3