mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-27 05:46:36 +08:00
Remove local implementation of err, errx.
We now have a shared implementation in libopenbsd-compat.
This commit is contained in:
parent
eb999a4590
commit
0a45414756
@ -27,34 +27,6 @@
|
||||
#include <errno.h>
|
||||
#include "openbsd-compat/getopt_long.c"
|
||||
|
||||
static void err(int, const char *, ...) __attribute__((format(printf, 2, 3)));
|
||||
static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
|
||||
|
||||
static void
|
||||
err(int r, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
fprintf(stderr, "%s: ", strerror(errno));
|
||||
vfprintf(stderr, fmt, args);
|
||||
fputc('\n', stderr);
|
||||
va_end(args);
|
||||
exit(r);
|
||||
}
|
||||
|
||||
static void
|
||||
errx(int r, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
fputc('\n', stderr);
|
||||
va_end(args);
|
||||
exit(r);
|
||||
}
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user