summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}