Browse Source

when we cannot open /dev/hotplug, donn't bail, just work without

with ckuethe
OPENBSD_4_0
henning 18 years ago
parent
commit
d4fd11008a
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/usr.sbin/ntpd/sensors.c

+ 5
- 3
src/usr.sbin/ntpd/sensors.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: sensors.c,v 1.15 2006/05/28 20:39:16 henning Exp $ */
/* $OpenBSD: sensors.c,v 1.16 2006/05/29 05:20:42 henning Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@ -175,8 +175,10 @@ sensor_hotplugfd(void)
{
int fd, flags;
if ((fd = open(_PATH_DEV_HOTPLUG, O_RDONLY, 0)) == -1)
fatal(NULL);
if ((fd = open(_PATH_DEV_HOTPLUG, O_RDONLY, 0)) == -1) {
log_warn("open %s", _PATH_DEV_HOTPLUG);
return (-1);
}
if ((flags = fcntl(fd, F_GETFL, 0)) == -1)
fatal("fnctl F_GETFL");


Loading…
Cancel
Save