summaryrefslogtreecommitdiff
path: root/usr.bin/sed
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-10-26 22:22:57 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-10-26 22:22:57 +0000
commit28176beb0244666333c820dadb0fbab4a25c3157 (patch)
treeeb6633b7fb9e311b412ef246b3b6e23b0d3bb209 /usr.bin/sed
parent50b582ad363f83ba0c58cd4c51fd1775312f1b8d (diff)
Use error(FATAL) instead of what was previously err(1,...)
ok tobias@
Diffstat (limited to 'usr.bin/sed')
-rw-r--r--usr.bin/sed/main.c8
1 files changed, 4 insertions, 4 deletions
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,