summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hotplugd
diff options
context:
space:
mode:
authorgrange <grange@openbsd.org>2010-01-10 13:20:41 +0000
committergrange <grange@openbsd.org>2010-01-10 13:20:41 +0000
commitfb3c6b448c6890eb0affa7b0fa2e2471401f88aa (patch)
treef0fe2a4f3f208a14c4abeae350466885733f3bf0 /usr.sbin/hotplugd
parentATI AHCI seems not to put slot number into the command register (diff)
downloadwireguard-openbsd-fb3c6b448c6890eb0affa7b0fa2e2471401f88aa.tar.xz
wireguard-openbsd-fb3c6b448c6890eb0affa7b0fa2e2471401f88aa.zip
Make hotplugd to not complain if any of attach or detach script
doesn't exist. ok stsp@ deraadt@
Diffstat (limited to 'usr.sbin/hotplugd')
-rw-r--r--usr.sbin/hotplugd/hotplugd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/hotplugd/hotplugd.c b/usr.sbin/hotplugd/hotplugd.c
index ba6e83977e2..412b1125474 100644
--- a/usr.sbin/hotplugd/hotplugd.c
+++ b/usr.sbin/hotplugd/hotplugd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hotplugd.c,v 1.11 2009/06/26 01:06:04 kurt Exp $ */
+/* $OpenBSD: hotplugd.c,v 1.12 2010/01/10 13:20:41 grange Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -142,8 +142,9 @@ exec_script(const char *file, int class, char *name)
snprintf(strclass, sizeof(strclass), "%d", class);
- if (access(file, X_OK | R_OK)) {
- syslog(LOG_ERR, "could not access %s", file);
+ if (access(file, X_OK | R_OK) == -1) {
+ if (errno != ENOENT)
+ syslog(LOG_ERR, "%s: %m", file);
return;
}