func open() (*Device, error) {
	f, err := os.OpenFile("/dev/watchdog", os.O_WRONLY, 0)
	if err != nil {
		return nil, err
	}
	info, err := unix.IoctlGetWatchdogInfo(int(f.Fd()))
	if err != nil {
		return nil, err
	}
	return &Device{
		Identity: strings.TrimRight(string(info.Identity[:]), "\x00"),
		f: f,
	}, nil
}
All system calls in this code are part of the Linux watchdog API. For
reference, see:
https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
package watchdog
import (
	"os"
	"strings"
	"time"
	"golang.org/x/sys/unix"
)