From: martynas Date: Wed, 16 Jul 2008 14:49:09 +0000 (+0000) Subject: - err with the pathbuf, if we know it X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=64d7140c5e81454f2282b11f73906bf3c15d4ae5;p=openbsd - err with the pathbuf, if we know it - use tmpdir instead of /tmp ok millert@ --- diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c index 47adbc2b3ed..5988db07729 100644 --- a/usr.bin/mail/edit.c +++ b/usr.bin/mail/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.17 2007/10/17 20:02:33 deraadt Exp $ */ +/* $OpenBSD: edit.c,v 1.18 2008/07/16 14:49:09 martynas Exp $ */ /* $NetBSD: edit.c,v 1.5 1996/06/08 19:48:20 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)edit.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: edit.c,v 1.17 2007/10/17 20:02:33 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: edit.c,v 1.18 2008/07/16 14:49:09 martynas Exp $"; #endif #endif /* not lint */ @@ -129,7 +129,7 @@ edit1(int *msgvec, int type) break; } if (ferror(otf)) - warn("/tmp"); + warn("%s", tmpdir); (void)Fclose(fp); } (void)sigprocmask(SIG_SETMASK, &oset, NULL); diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c index e621bf953a7..524766e9085 100644 --- a/usr.bin/mail/fio.c +++ b/usr.bin/mail/fio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fio.c,v 1.30 2007/10/05 14:39:39 chl Exp $ */ +/* $OpenBSD: fio.c,v 1.31 2008/07/16 14:49:09 martynas Exp $ */ /* $NetBSD: fio.c,v 1.8 1997/07/07 22:57:55 phil Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)fio.c 8.2 (Berkeley) 4/20/95"; #else -static const char rcsid[] = "$OpenBSD: fio.c,v 1.30 2007/10/05 14:39:39 chl Exp $"; +static const char rcsid[] = "$OpenBSD: fio.c,v 1.31 2008/07/16 14:49:09 martynas Exp $"; #endif #endif /* not lint */ @@ -131,7 +131,7 @@ setptr(FILE *ibuf, off_t offset) (void)fwrite(linebuf, sizeof(*linebuf), count, otf); if (ferror(otf)) - err(1, "/tmp"); + err(1, "%s", pathbuf); if (count && linebuf[count - 1] == '\n') linebuf[count - 1] = '\0'; if (maybe && linebuf[0] == 'F' && ishead(linebuf)) {