diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2015-10-25 20:18:38 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2015-10-25 20:18:38 +0000 |
commit | e8f985ce964af855e43f6fddbb6ac10bd6bf6925 (patch) | |
tree | 0edb9f1f0df5ddcd3808b7afa6dfa3c77f21dac0 /usr.bin/sed | |
parent | 9605044a4d876e51cb6f3e7f6017bf6abab75560 (diff) |
Write error message instead of duplicated file name on error.
ok deraadt
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 015b8bc119a..7df35bbbd26 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.27 2015/10/10 20:18:30 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.28 2015/10/25 20:18:37 tobias Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -389,7 +389,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag) outfname = "stdout"; } if ((infile = fopen(fname, "r")) == NULL) { - err(WARNING, "%s", fname); + err(WARNING, "%s", strerror(errno)); rval = 1; continue; } |