Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/blacklist/bin FreeBSD patches from Kurt Lidl.
details: https://anonhg.NetBSD.org/src/rev/85b380f9bf08
branches: trunk
changeset: 344560:85b380f9bf08
user: christos <christos%NetBSD.org@localhost>
date: Mon Apr 04 15:52:56 2016 +0000
description:
FreeBSD patches from Kurt Lidl.
diffstat:
external/bsd/blacklist/bin/blacklistctl.c | 7 +++++--
external/bsd/blacklist/bin/blacklistd.c | 7 +++++--
external/bsd/blacklist/bin/conf.c | 17 ++++++++++-------
external/bsd/blacklist/bin/internal.h | 4 ++--
external/bsd/blacklist/bin/run.c | 9 +++++++--
external/bsd/blacklist/bin/state.c | 6 +++---
external/bsd/blacklist/bin/support.c | 6 +++---
external/bsd/blacklist/bin/support.h | 4 ++--
8 files changed, 37 insertions(+), 23 deletions(-)
diffs (223 lines):
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/blacklistctl.c
--- a/external/bsd/blacklist/bin/blacklistctl.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/blacklistctl.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistctl.c,v 1.19 2015/11/04 16:21:52 christos Exp $ */
+/* $NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,10 +33,13 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistctl.c,v 1.19 2015/11/04 16:21:52 christos Exp $");
+__RCSID("$NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $");
#include <stdio.h>
#include <time.h>
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/blacklistd.c
--- a/external/bsd/blacklist/bin/blacklistd.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/blacklistd.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $ */
+/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,12 +32,15 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/queue.h>
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/conf.c
--- a/external/bsd/blacklist/bin/conf.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/conf.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.23 2015/06/03 15:11:40 christos Exp $ */
+/* $NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,9 +33,15 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: conf.c,v 1.23 2015/06/03 15:11:40 christos Exp $");
+__RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $");
#include <stdio.h>
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
+#ifdef HAVE_UTIL_H
+#include <util.h>
+#endif
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
@@ -43,9 +49,6 @@
#include <pwd.h>
#include <syslog.h>
#include <errno.h>
-#ifdef HAVE_UTIL_H
-#include <util.h>
-#endif
#include <stdlib.h>
#include <limits.h>
#include <ifaddrs.h>
@@ -495,8 +498,8 @@
if (debug > 1) {
char b1[256], b2[256];
len <<= 2;
- hexdump(b1, sizeof(b1), "a1", v1, len);
- hexdump(b2, sizeof(b2), "a2", v2, len);
+ blhexdump(b1, sizeof(b1), "a1", v1, len);
+ blhexdump(b2, sizeof(b2), "a2", v2, len);
(*lfun)(LOG_DEBUG, "%s: %s != %s [0x%x]", __func__,
b1, b2, omask);
}
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/internal.h
--- a/external/bsd/blacklist/bin/internal.h Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/internal.h Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: internal.h,v 1.13 2015/10/14 16:01:29 christos Exp $ */
+/* $NetBSD: internal.h,v 1.14 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
#define __syslog__ __printf__
#endif
-void (*lfun)(int, const char *, ...)
+extern void (*lfun)(int, const char *, ...)
__attribute__((__format__(__syslog__, 2, 3)));
#endif /* _INTERNAL_H */
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/run.c
--- a/external/bsd/blacklist/bin/run.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/run.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: run.c,v 1.13 2015/06/02 14:02:10 christos Exp $ */
+/* $NetBSD: run.c,v 1.14 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,9 +33,12 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: run.c,v 1.13 2015/06/02 14:02:10 christos Exp $");
+__RCSID("$NetBSD: run.c,v 1.14 2016/04/04 15:52:56 christos Exp $");
#include <stdio.h>
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
@@ -46,10 +49,12 @@
#include <syslog.h>
#include <string.h>
#include <netinet/in.h>
+#include <net/if.h>
#include "run.h"
#include "conf.h"
#include "internal.h"
+#include "support.h"
extern char **environ;
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/state.c
--- a/external/bsd/blacklist/bin/state.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/state.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: state.c,v 1.17 2015/06/02 14:02:10 christos Exp $ */
+/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: state.c,v 1.17 2015/06/02 14:02:10 christos Exp $");
+__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -103,7 +103,7 @@
dumpkey(const struct conf *k)
{
char buf[10240];
- hexdump(buf, sizeof(buf), __func__, k, sizeof(*k));
+ blhexdump(buf, sizeof(buf), __func__, k, sizeof(*k));
(*lfun)(LOG_DEBUG, "%s", buf);
(*lfun)(LOG_DEBUG, "%s: %s", __func__,
conf_print(buf, sizeof(buf), "", "", k));
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/support.c
--- a/external/bsd/blacklist/bin/support.c Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/support.c Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: support.c,v 1.7 2015/06/02 14:02:10 christos Exp $ */
+/* $NetBSD: support.c,v 1.8 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: support.c,v 1.7 2015/06/02 14:02:10 christos Exp $");
+__RCSID("$NetBSD: support.c,v 1.8 2016/04/04 15:52:56 christos Exp $");
#include <time.h>
#include <string.h>
@@ -133,7 +133,7 @@
}
ssize_t
-hexdump(char *buf, size_t len, const char *str, const void *b, size_t l)
+blhexdump(char *buf, size_t len, const char *str, const void *b, size_t l)
{
size_t z, cz;
int r;
diff -r 8c39ce1ebb5e -r 85b380f9bf08 external/bsd/blacklist/bin/support.h
--- a/external/bsd/blacklist/bin/support.h Mon Apr 04 15:06:16 2016 +0000
+++ b/external/bsd/blacklist/bin/support.h Mon Apr 04 15:52:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: support.h,v 1.6 2015/06/02 14:02:10 christos Exp $ */
+/* $NetBSD: support.h,v 1.7 2016/04/04 15:52:56 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
__attribute__((__format__(__printf__, 2, 0)));
void dlog(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
-ssize_t hexdump(char *, size_t, const char *, const void *, size_t);
+ssize_t blhexdump(char *, size_t, const char *, const void *, size_t);
__END_DECLS
#endif /* _SUPPORT_H */
Home |
Main Index |
Thread Index |
Old Index