mirror of git://anongit.mindrot.org/openssh.git
upstream: retire unused API
OpenBSD-Commit-ID: 3e30d7b0615e2707f6bbe70f61b1c2f72f78161b
This commit is contained in:
parent
268c3a7f57
commit
94b9d37100
15
log.c
15
log.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: log.c,v 1.61 2023/12/06 21:06:48 djm Exp $ */
|
/* $OpenBSD: log.c,v 1.62 2024/06/27 22:36:44 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -447,19 +447,6 @@ sshlogdie(const char *file, const char *func, int line, int showfunc,
|
||||||
cleanup_exit(255);
|
cleanup_exit(255);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
sshsigdie(const char *file, const char *func, int line, int showfunc,
|
|
||||||
LogLevel level, const char *suffix, const char *fmt, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
|
||||||
sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
|
|
||||||
suffix, fmt, args);
|
|
||||||
va_end(args);
|
|
||||||
_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sshlogv(const char *file, const char *func, int line, int showfunc,
|
sshlogv(const char *file, const char *func, int line, int showfunc,
|
||||||
LogLevel level, const char *suffix, const char *fmt, va_list args)
|
LogLevel level, const char *suffix, const char *fmt, va_list args)
|
||||||
|
|
9
log.h
9
log.h
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: log.h,v 1.33 2021/04/15 16:24:31 markus Exp $ */
|
/* $OpenBSD: log.h,v 1.34 2024/06/27 22:36:44 djm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
|
@ -72,9 +72,6 @@ void sshlog(const char *, const char *, int, int,
|
||||||
__attribute__((format(printf, 7, 8)));
|
__attribute__((format(printf, 7, 8)));
|
||||||
void sshlogv(const char *, const char *, int, int,
|
void sshlogv(const char *, const char *, int, int,
|
||||||
LogLevel, const char *, const char *, va_list);
|
LogLevel, const char *, const char *, va_list);
|
||||||
void sshsigdie(const char *, const char *, int, int,
|
|
||||||
LogLevel, const char *, const char *, ...) __attribute__((noreturn))
|
|
||||||
__attribute__((format(printf, 7, 8)));
|
|
||||||
void sshlogdie(const char *, const char *, int, int,
|
void sshlogdie(const char *, const char *, int, int,
|
||||||
LogLevel, const char *, const char *, ...) __attribute__((noreturn))
|
LogLevel, const char *, const char *, ...) __attribute__((noreturn))
|
||||||
__attribute__((format(printf, 7, 8)));
|
__attribute__((format(printf, 7, 8)));
|
||||||
|
@ -93,7 +90,6 @@ void sshlogdirect(LogLevel, int, const char *, ...)
|
||||||
#define error(...) sshlog(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
#define error(...) sshlog(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
||||||
#define fatal(...) sshfatal(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_FATAL, NULL, __VA_ARGS__)
|
#define fatal(...) sshfatal(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_FATAL, NULL, __VA_ARGS__)
|
||||||
#define logdie(...) sshlogdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
#define logdie(...) sshlogdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
||||||
#define sigdie(...) sshsigdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
|
||||||
|
|
||||||
/* Variants that prepend the caller's function */
|
/* Variants that prepend the caller's function */
|
||||||
#define do_log2_f(level, ...) sshlog(__FILE__, __func__, __LINE__, 1, level, NULL, __VA_ARGS__)
|
#define do_log2_f(level, ...) sshlog(__FILE__, __func__, __LINE__, 1, level, NULL, __VA_ARGS__)
|
||||||
|
@ -105,7 +101,6 @@ void sshlogdirect(LogLevel, int, const char *, ...)
|
||||||
#define error_f(...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
#define error_f(...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
||||||
#define fatal_f(...) sshfatal(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_FATAL, NULL, __VA_ARGS__)
|
#define fatal_f(...) sshfatal(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_FATAL, NULL, __VA_ARGS__)
|
||||||
#define logdie_f(...) sshlogdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
#define logdie_f(...) sshlogdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
||||||
#define sigdie_f(...) sshsigdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, NULL, __VA_ARGS__)
|
|
||||||
|
|
||||||
/* Variants that appends a ssh_err message */
|
/* Variants that appends a ssh_err message */
|
||||||
#define do_log2_r(r, level, ...) sshlog(__FILE__, __func__, __LINE__, 0, level, ssh_err(r), __VA_ARGS__)
|
#define do_log2_r(r, level, ...) sshlog(__FILE__, __func__, __LINE__, 0, level, ssh_err(r), __VA_ARGS__)
|
||||||
|
@ -117,7 +112,6 @@ void sshlogdirect(LogLevel, int, const char *, ...)
|
||||||
#define error_r(r, ...) sshlog(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
#define error_r(r, ...) sshlog(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
||||||
#define fatal_r(r, ...) sshfatal(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_FATAL, ssh_err(r), __VA_ARGS__)
|
#define fatal_r(r, ...) sshfatal(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_FATAL, ssh_err(r), __VA_ARGS__)
|
||||||
#define logdie_r(r, ...) sshlogdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
#define logdie_r(r, ...) sshlogdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
||||||
#define sigdie_r(r, ...) sshsigdie(__FILE__, __func__, __LINE__, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
|
||||||
#define do_log2_fr(r, level, ...) sshlog(__FILE__, __func__, __LINE__, 1, level, ssh_err(r), __VA_ARGS__)
|
#define do_log2_fr(r, level, ...) sshlog(__FILE__, __func__, __LINE__, 1, level, ssh_err(r), __VA_ARGS__)
|
||||||
#define debug3_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_DEBUG3, ssh_err(r), __VA_ARGS__)
|
#define debug3_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_DEBUG3, ssh_err(r), __VA_ARGS__)
|
||||||
#define debug2_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_DEBUG2, ssh_err(r), __VA_ARGS__)
|
#define debug2_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_DEBUG2, ssh_err(r), __VA_ARGS__)
|
||||||
|
@ -127,6 +121,5 @@ void sshlogdirect(LogLevel, int, const char *, ...)
|
||||||
#define error_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
#define error_fr(r, ...) sshlog(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
||||||
#define fatal_fr(r, ...) sshfatal(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), __VA_ARGS__)
|
#define fatal_fr(r, ...) sshfatal(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), __VA_ARGS__)
|
||||||
#define logdie_fr(r, ...) sshlogdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
#define logdie_fr(r, ...) sshlogdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
||||||
#define sigdie_fr(r, ...) sshsigdie(__FILE__, __func__, __LINE__, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), __VA_ARGS__)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue