From a4fccb01b582ae08ca1ff64c8e5730c138f5e8ed Mon Sep 17 00:00:00 2001 From: Simran Kathpalia Date: Wed, 23 Jun 2021 03:20:11 +0530 Subject: sys/freebsd: added md(4) --- sys/freebsd/dev_md.txt | 34 ++++++++++++++++++++++++++++++++++ sys/freebsd/dev_md.txt.const | 14 ++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 sys/freebsd/dev_md.txt create mode 100644 sys/freebsd/dev_md.txt.const diff --git a/sys/freebsd/dev_md.txt b/sys/freebsd/dev_md.txt new file mode 100644 index 000000000..f09679852 --- /dev/null +++ b/sys/freebsd/dev_md.txt @@ -0,0 +1,34 @@ +# Copyright 2021 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +# Autogenerated by sys2syz + +include +include +include +include + +resource fd_md[fd] + +openat$md(fd const[AT_FDCWD], file ptr[in, string["/dev/mdctl"]], flags flags[open_flags], mode const[0]) fd_md + +ioctl$MDIOCATTACH(fd fd_md, cmd const[MDIOCATTACH], arg ptr[inout, md_ioctl]) +ioctl$MDIOCDETACH(fd fd_md, cmd const[MDIOCDETACH], arg ptr[inout, md_ioctl]) +ioctl$MDIOCQUERY(fd fd_md, cmd const[MDIOCQUERY], arg ptr[inout, md_ioctl]) +ioctl$MDIOCRESIZE(fd fd_md, cmd const[MDIOCRESIZE], arg ptr[inout, md_ioctl]) + +md_ioctl { + md_version int32 + md_unit int32 + md_type flags[md_types_flags, int32] + md_file ptr[in, filename] + md_mediasize int64 + md_sectorsize int32 + md_options int32 + md_base int64 + md_fwheads int32 + md_fwsectors int32 + md_label ptr[in, string] + md_pad array[int32, 96] +} + +md_types_flags = MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL diff --git a/sys/freebsd/dev_md.txt.const b/sys/freebsd/dev_md.txt.const new file mode 100644 index 000000000..06ca527a4 --- /dev/null +++ b/sys/freebsd/dev_md.txt.const @@ -0,0 +1,14 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64 +AT_FDCWD = 18446744073709551516 +MDIOCATTACH = 3250613504 +MDIOCDETACH = 3250613505 +MDIOCQUERY = 3250613506 +MDIOCRESIZE = 3250613508 +MD_MALLOC = 0 +MD_NULL = 4 +MD_PRELOAD = 1 +MD_SWAP = 3 +MD_VNODE = 2 +SYS_ioctl = 54 +SYS_openat = 499 -- cgit mrf-deployment