Fix WDOGIOC_GTICKLER for userland ticklers.

This commit is contained in:
simonb 2002-07-31 06:48:58 +00:00
parent ecae279f88
commit 10f735a013
1 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysmon_wdog.c,v 1.3 2001/11/13 06:28:55 lukem Exp $ */
/* $NetBSD: sysmon_wdog.c,v 1.4 2002/07/31 06:48:58 simonb Exp $ */
/*-
* Copyright (c) 2000 Zembu Labs, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysmon_wdog.c,v 1.3 2001/11/13 06:28:55 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysmon_wdog.c,v 1.4 2002/07/31 06:48:58 simonb Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -236,7 +236,10 @@ sysmonioctl_wdog(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
case WDOGIOC_GTICKLER:
*(pid_t *)data = smw->smw_tickler;
if ((smw = sysmon_armed_wdog) != NULL)
*(pid_t *)data = smw->smw_tickler;
else
error = ESRCH;
break;
case WDOGIOC_GWDOGS: