summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-03-22 10:42:27 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-03-22 10:42:27 +0000
commit0edfaad27bdb3099c712ac86b031ea86eb4cb0ad (patch)
tree7df1d580a36ddb1573d4334e58ecb0afa9c17e9e
parent9bc4827a533425886eb25c3bfd452a50a0a3a7f6 (diff)
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@
-rw-r--r--sbin/unwind/unwind.c5
1 files 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 <florian@openbsd.org>
@@ -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;
}