Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH][RFC] Proposal for a new watchdog interface using sysfs | From | Rusty Lynch <> | Date | 12 Feb 2003 23:32:38 -0800 |
| |
On Wed, 2003-02-12 at 20:27, Daniel Pittman wrote: > On 12 Feb 2003, Rusty Lynch wrote: > > The following is a proposal for a new sysfs based watchdog interface > > to be used as a replacement for the current char device w/ ioctl api > > as described in Documentation/watchdog-api.txt. > > [...] > > > Where each these files to the following ==> > > > > start (RO) > > - show: starts watchdog count > > This would be much better as a store -- that way 'cat /.../watchdog0/*' > will not activate the watchdog. A more deliberate action is safer for > forgetful admins, such as me. >
Sounds logical. My reasoning was more of a coin toss.
> [...] > > > status (RO) > > - show: prints the current status value > > > > bootstatus (RO) > > - show: same as 'status', but valid for just after the last reboot. > > [...] > > > enable (RW) > > - show: prints 0 or 1 to indicate if the wdt is enabled > > - store: expects 0 or 1 to disable or enable the wdt > > Isn't this the same information as the 'status' and 'start' members? > > Daniel
Now that think about it, enable really is the same as start/stop, but the status is still something different. I didn't really talk about it, but my intent was to provide the information currently available from the WDIOC_GETSTATUS ioctl, which is a value composed of the following flags:
#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */ #define WDIOF_FANFAULT 0x0002 /* Fan failed */ #define WDIOF_EXTERN1 0x0004 /* External relay 1 */ #define WDIOF_EXTERN2 0x0008 /* External relay 2 */ #define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ #define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ #define WDIOF_POWEROVER 0x0040 /* Power over voltage */ #define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ #define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */
I debated with myself if each of these flags should be broke out into their own file, and I'm still not sure if it is better to keep the status as a single file.
> > -- > A cathedral, a wave of a storm, a dancer's leap, > never turn out to be as high as we had hoped. > -- Marcel Proust > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |