• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __UBLOCK_H_
13 #define __UBLOCK_H_
14 
15 #include <linux/types.h>
16 
17 #define UBLOCK_VERSION 0
18 
19 enum {
20  UBLOCK_INIT_IN = 0,
21  UBLOCK_INIT_OUT = 1,
22  UBLOCK_READY_IN = 2,
23  UBLOCK_READY_OUT = 3,
24  UBLOCK_READ_IN = 4,
25  UBLOCK_READ_OUT = 5,
26  UBLOCK_WRITE_IN = 6,
27  UBLOCK_WRITE_OUT = 7,
28 };
29 
30 struct ublock_in_header {
31  __u32 seq;
32  __u32 opcode;
33 };
34 
35 struct ublock_out_header {
36  __u32 seq;
37  __u32 opcode;
38 };
39 
40 struct ublock_init_in {
41  __u32 version;
42  __u32 max_buf;
43  __u32 index;
44 };
45 
46 struct ublock_init_out {
47  __u32 version;
48  __u32 max_buf;
49  __u64 size;
50 };
51 
52 struct ublock_ready_in {
53  __u32 _unused;
54 };
55 
56 struct ublock_ready_out {
57  __u32 _unused;
58 };
59 
60 struct ublock_read_in {
61  __u64 offset;
62  __u64 length;
63 };
64 
65 struct ublock_read_out {
66  __s32 status;
67  __u8 data[];
68 };
69 
70 struct ublock_write_in {
71  __u64 offset;
72  __u64 length;
73  __u8 data[];
74 };
75 
76 struct ublock_write_out {
77  __s32 status;
78 };
79 
80 #endif
81 
82