reset.c (313B)
1#include "cachepc/uapi.h" 2 3#include <sys/ioctl.h> 4#include <fcntl.h> 5#include <err.h> 6#include <unistd.h> 7 8int 9main(int argc, const char **argv) 10{ 11 int fd, ret; 12 13 fd = open("/dev/kvm", O_RDONLY); 14 if (fd < 0) err(1, "open"); 15 16 ret = ioctl(fd, KVM_CPC_RESET); 17 if (ret) warn("ioctl KVM_CPC_RESET"); 18 19 close(fd); 20}