(fatalperror_errno): add a new function with explicit errno parameter

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9802 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-04-24 23:11:05 +00:00
parent adfd8b96e3
commit 56cb680b45

View File

@@ -363,14 +363,20 @@ void fatal(int f, char *msg)
}
void
fatalperror(int f, const char *msg)
fatalperror_errno(int f, const char *msg, int error)
{
char buf[BUFSIZ];
snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(errno));
snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(error));
fatal(f, buf);
}
void
fatalperror(int f, const char *msg)
{
return fatalperror_errno(f, msg, errno);
}
char editedhost[32];
void edithost(char *pat, char *host)