diff options
| author | pgoyette <pgoyette@NetBSD.org> | 2012-07-19 13:30:01 +0000 |
|---|---|---|
| committer | pgoyette <pgoyette@NetBSD.org> | 2012-07-19 13:30:01 +0000 |
| commit | 04b08ddde06e1171ff5c874bb755d08e743d4b81 (patch) | |
| tree | 266ccef5c87486de1217967c8761ea90a231cfeb /sys/dev/sysmon | |
| parent | 59799fc770621cf27054904c835808f03c89c641 (diff) | |
If previously there was only a dummy event entry (to force refresh for
entropy gathering), allow it to be updated for the current request to
add a real entry.
Diffstat (limited to 'sys/dev/sysmon')
| -rw-r--r-- | sys/dev/sysmon/sysmon_envsys_events.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/sysmon/sysmon_envsys_events.c b/sys/dev/sysmon/sysmon_envsys_events.c index 735574c69e3..1a37e4ca8c6 100644 --- a/sys/dev/sysmon/sysmon_envsys_events.c +++ b/sys/dev/sysmon/sysmon_envsys_events.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.103 2012/07/19 13:30:01 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.103 2012/07/19 13:30:01 pgoyette Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -143,7 +143,8 @@ sme_event_register(prop_dictionary_t sdict, envsys_data_t *edata, LIST_FOREACH(osee, &sme->sme_events_list, see_list) { if (strcmp(edata->desc, osee->see_pes.pes_sensname) != 0) continue; - if (crittype != osee->see_type) + if (crittype != osee->see_type && + osee->see_type != PENVSYS_EVENT_NULL) continue; /* @@ -184,6 +185,9 @@ sme_event_register(prop_dictionary_t sdict, envsys_data_t *edata, props &= ~(PROP_CRITMIN | PROP_BATTCAP); } } + if (props && see->see_type == PENVSYS_EVENT_NULL) + see->see_type = crittype; + break; } if (crittype == PENVSYS_EVENT_NULL && see != NULL) { |
