unix: add Linux watchdog structures and missing constants

This CL also adds the type-safe wrappers IoctlGetWatchdogInfo
and IoctlWatchdogKeepalive around the raw ioctl interface.

Change-Id: I98e3970807b28832e49524700b17b6b6f75d91ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259497
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Terin Stock <terinjokes@gmail.com>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Matt Layher
2020-10-04 23:06:29 +00:00
parent fdedc70b46
commit f6757f2700
5 changed files with 45 additions and 1 deletions
+5
View File
@@ -120,6 +120,7 @@ struct termios2 {
#include <linux/stat.h>
#include <linux/taskstats.h>
#include <linux/tipc.h>
#include <linux/watchdog.h>
#include <linux/vm_sockets.h>
// abi/abi.h generated by mkall.go.
@@ -2510,3 +2511,7 @@ const (
CAN_RAW_FD_FRAMES = C.CAN_RAW_FD_FRAMES
CAN_RAW_JOIN_FILTERS = C.CAN_RAW_JOIN_FILTERS
)
// Watchdog API
type WatchdogInfo C.struct_watchdog_info