Browse Source

do not use /dev/hotplug for now, only one reader supported yet

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

+ 6
- 1
src/usr.sbin/ntpd/sensors.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: sensors.c,v 1.16 2006/05/29 05:20:42 henning Exp $ */
/* $OpenBSD: sensors.c,v 1.17 2006/06/01 04:44:23 henning Exp $ */
/* /*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org> * Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@ -102,6 +102,7 @@ sensor_add(struct sensor *sensor)
s->next = time(NULL); s->next = time(NULL);
s->weight = cs->weight; s->weight = cs->weight;
s->priority = cs->priority;
if ((s->device = strdup(sensor->device)) == NULL) if ((s->device = strdup(sensor->device)) == NULL)
fatal("sensor_add strdup"); fatal("sensor_add strdup");
s->sensorid = sensor->num; s->sensorid = sensor->num;
@ -173,6 +174,7 @@ sensor_query(struct ntp_sensor *s)
int int
sensor_hotplugfd(void) sensor_hotplugfd(void)
{ {
#ifdef notyet
int fd, flags; int fd, flags;
if ((fd = open(_PATH_DEV_HOTPLUG, O_RDONLY, 0)) == -1) { if ((fd = open(_PATH_DEV_HOTPLUG, O_RDONLY, 0)) == -1) {
@ -187,6 +189,9 @@ sensor_hotplugfd(void)
fatal("fnctl F_SETFL"); fatal("fnctl F_SETFL");
return (fd); return (fd);
#else
return (-1);
#endif
} }
void void


Loading…
Cancel
Save