From 0edfaad27bdb3099c712ac86b031ea86eb4cb0ad Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Fri, 22 Mar 2019 10:42:27 +0000 Subject: No need to log that the DHCP lease file doesn't exist. We still want to log other causes when failing to open the lease file, but then do so with a more helpful error message. ok florian@ --- sbin/unwind/unwind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c index 4d02153fb70..310cc811a74 100644 --- a/sbin/unwind/unwind.c +++ b/sbin/unwind/unwind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.c,v 1.18 2019/03/02 16:11:10 florian Exp $ */ +/* $OpenBSD: unwind.c,v 1.19 2019/03/22 10:42:26 jca Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -882,7 +882,8 @@ open_dhcp_lease(int if_idx) log_debug("lease file name: %s", lease_filename); if ((fd = open(lease_filename, O_RDONLY)) == -1) { - log_warn(NULL); + if (errno != ENOENT) + log_warn("cannot open lease file %s", lease_filename); return; } -- cgit v1.2.3