diff options
author | Masatake YAMATO <yamato@redhat.com> | 2017-12-02 04:05:25 +0900 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-12-01 22:27:01 +0000 |
commit | 3f20fe4a304c8783f5d6c896104db8a95d4f6110 (patch) | |
tree | 0ae171db9ed87c9c82353cbdcaa217e4b55042de /kvm.c | |
parent | b053dd53ed34142c97943f2a43803075d7ee77f4 (diff) | |
download | strace-3f20fe4a304c8783f5d6c896104db8a95d4f6110.tar.gz |
ioctl: add a stub for decoding kvm related ioctls
* kvm.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h.
* defs.h (kvm_ioctl): New prototype.
* ioctl.c (ioctl_decode) HAVE_LINUX_KVM_H]: Use kvm_ioctl.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Diffstat (limited to 'kvm.c')
-rw-r--r-- | kvm.c | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -0,0 +1,45 @@ +/* + * Support for decoding of KVM_* ioctl commands. + * + * Copyright (c) 2017 Masatake YAMATO <yamato@redhat.com> + * Copyright (c) 2017 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_KVM_H +# include <linux/kvm.h> + +int +kvm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg) +{ + switch (code) { + default: + return RVAL_DECODED; + } +} + +#endif /* HAVE_LINUX_KVM_H */ |