(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:
@@ -363,14 +363,20 @@ void fatal(int f, char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fatalperror(int f, const char *msg)
|
fatalperror_errno(int f, const char *msg, int error)
|
||||||
{
|
{
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(errno));
|
snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(error));
|
||||||
fatal(f, buf);
|
fatal(f, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fatalperror(int f, const char *msg)
|
||||||
|
{
|
||||||
|
return fatalperror_errno(f, msg, errno);
|
||||||
|
}
|
||||||
|
|
||||||
char editedhost[32];
|
char editedhost[32];
|
||||||
|
|
||||||
void edithost(char *pat, char *host)
|
void edithost(char *pat, char *host)
|
||||||
|
Reference in New Issue
Block a user