From 1a48b588c6de8ae43903768adf53b32545f69986 Mon Sep 17 00:00:00 2001 From: Thomas Tuttle Date: Mon, 2 Aug 2010 16:00:59 -0700 Subject: ublock: add cleaned version of linux/ublock.h to libc kernel headers Change-Id: I8ebc7530690ff47f3160c72f42b8e0822f55a57e --- libc/kernel/common/linux/ublock.h | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 libc/kernel/common/linux/ublock.h diff --git a/libc/kernel/common/linux/ublock.h b/libc/kernel/common/linux/ublock.h new file mode 100644 index 0000000..aa19a81 --- /dev/null +++ b/libc/kernel/common/linux/ublock.h @@ -0,0 +1,81 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __UBLOCK_H_ +#define __UBLOCK_H_ + +#include + +#define UBLOCK_VERSION 0 + +enum { + UBLOCK_INIT_IN = 0, + UBLOCK_INIT_OUT = 1, + UBLOCK_READY_IN = 2, + UBLOCK_READY_OUT = 3, + UBLOCK_READ_IN = 4, + UBLOCK_READ_OUT = 5, + UBLOCK_WRITE_IN = 6, + UBLOCK_WRITE_OUT = 7, +}; + +struct ublock_in_header { + __u32 seq; + __u32 opcode; +}; + +struct ublock_out_header { + __u32 seq; + __u32 opcode; +}; + +struct ublock_init_in { + __u32 version; + __u32 max_buf; + __u32 index; +}; + +struct ublock_init_out { + __u32 version; + __u32 max_buf; + __u64 size; +}; + +struct ublock_ready_in { + __u32 _unused; +}; + +struct ublock_ready_out { + __u32 _unused; +}; + +struct ublock_read_in { + __u64 offset; + __u64 length; +}; + +struct ublock_read_out { + __s32 status; + __u8 data[]; +}; + +struct ublock_write_in { + __u64 offset; + __u64 length; + __u8 data[]; +}; + +struct ublock_write_out { + __s32 status; +}; + +#endif + -- cgit v1.1