From cf1ba3ac04fa7e52ac3774a13b018363b7059ce3 Mon Sep 17 00:00:00 2001 From: krw Date: Tue, 6 Feb 2018 05:09:51 +0000 Subject: [PATCH] Fix fprintf() to include "\n" where needed. Prefix "no lease" messages with interface name. Spotted by & ok tb@ --- sbin/dhclient/dhclient.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 16f3e1cc85b..a40a6ab5c76 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.555 2018/02/06 00:25:09 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.556 2018/02/06 05:09:51 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -1336,7 +1336,8 @@ send_discover(struct interface_info *ifi) ifi->interval = 1; else { if (isatty(STDERR_FILENO) != 0) - fprintf(stderr, "no lease .... sleeping\n"); + fprintf(stderr, "%s: no lease .... sleeping\n", + log_procname); go_daemon(); } @@ -1457,7 +1458,8 @@ send_request(struct interface_info *ifi) ifi->interval = 1; else { if (isatty(STDERR_FILENO) != 0) - fprintf(stderr, "no lease .... sleeping"); + fprintf(stderr, "%s: no lease .... sleeping\n", + log_procname); go_daemon(); } -- 2.20.1