ssh-keyscan doesn't need it's own sshfatal() definition, it can
authordjm <djm@openbsd.org>
Fri, 18 Oct 2024 05:32:51 +0000 (05:32 +0000)
committerdjm <djm@openbsd.org>
Fri, 18 Oct 2024 05:32:51 +0000 (05:32 +0000)
use the shared one from fatal.c

based on GHPR401 from lengyijun

usr.bin/ssh/ssh-keyscan.c
usr.bin/ssh/ssh-keyscan/Makefile

index 09962b4..e1579b6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.163 2024/10/18 04:14:59 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.164 2024/10/18 05:32:51 djm Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
  *
@@ -628,18 +628,6 @@ do_host(char *host)
        }
 }
 
-void
-sshfatal(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, level, suffix, fmt, args);
-       va_end(args);
-       cleanup_exit(255);
-}
-
 static void
 usage(void)
 {
index 28e5fba..49981aa 100644 (file)
@@ -1,9 +1,9 @@
-#      $OpenBSD: Makefile,v 1.16 2020/01/23 10:24:30 dtucker Exp $
+#      $OpenBSD: Makefile,v 1.17 2024/10/18 05:32:51 djm Exp $
 
 .PATH:         ${.CURDIR}/..
 
 SRCS=  ssh-keyscan.c
-SRCS+= atomicio.c cleanup.c compat.c hostfile.c ssh_api.c dns.c
+SRCS+= atomicio.c cleanup.c compat.c hostfile.c ssh_api.c dns.c fatal.c
 SRCS+= ${SRCS_BASE} ${SRCS_KEX} ${SRCS_KEXC} ${SRCS_KEXS} ${SRCS_KEY} \
        ${SRCS_PKT} ${SRCS_UTL} ${SRCS_SK_CLIENT}
 PROG=  ssh-keyscan