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 put utilities into a separate file.
details: https://anonhg.NetBSD.org/src/rev/e48384abaf76
branches: trunk
changeset: 335691:e48384abaf76
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 21 19:23:42 2015 +0000
description:
put utilities into a separate file.
diffstat:
external/bsd/blacklist/bin/Makefile | 10 ++++++----
external/bsd/blacklist/bin/blacklistctl.c | 12 +-----------
2 files changed, 7 insertions(+), 15 deletions(-)
diffs (44 lines):
diff -r 1cd31832d135 -r e48384abaf76 external/bsd/blacklist/bin/Makefile
--- a/external/bsd/blacklist/bin/Makefile Wed Jan 21 16:16:00 2015 +0000
+++ b/external/bsd/blacklist/bin/Makefile Wed Jan 21 19:23:42 2015 +0000
@@ -1,12 +1,14 @@
-# $NetBSD: Makefile,v 1.5 2015/01/21 16:16:00 christos Exp $
+# $NetBSD: Makefile,v 1.6 2015/01/21 19:23:42 christos Exp $
BINDIR=/usr/sbin
PROGS=blacklistd blacklistctl
-MAN=blacklistd.8
+MAN.blacklistd=blacklistd.8
+MAN.blacklistctl=blacklistctl.1
MLINKS=blacklistd.8 blacklistd.conf.5
-SRCS.blacklistd = blacklistd.c conf.c run.c state.c
-SRCS.blacklistctl = blacklistctl.c conf.c state.c
+SRCS.blacklistd = blacklistd.c conf.c run.c state.c util.c
+SRCS.blacklistctl = blacklistctl.c conf.c state.c util.c
+DBG=-g
LDADD+=-lutil
DPADD+=${LIBUTIL}
diff -r 1cd31832d135 -r e48384abaf76 external/bsd/blacklist/bin/blacklistctl.c
--- a/external/bsd/blacklist/bin/blacklistctl.c Wed Jan 21 16:16:00 2015 +0000
+++ b/external/bsd/blacklist/bin/blacklistctl.c Wed Jan 21 19:23:42 2015 +0000
@@ -12,17 +12,7 @@
#include "conf.h"
#include "state.h"
#include "internal.h"
-
-static const char *
-fmttime(char *b, size_t l, time_t t)
-{
- struct tm tm;
- if (localtime_r(&t, &tm) == NULL)
- snprintf(b, l, "*%jd*", (intmax_t)t);
- else
- strftime(b, l, "%Y/%m/%d %H:%M:%S", &tm);
- return b;
-}
+#include "util.h"
int
main(int argc, char *argv[])
Home |
Main Index |
Thread Index |
Old Index