blob: aa19a813e2d416579b805f3876452f4a2530cd9a [file] [log] [blame]
Thomas Tuttle1a48b582010-08-02 16:00:59 -07001/****************************************************************************
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_
Ben Cheng4b29af02012-03-07 16:14:53 -080014
Thomas Tuttle1a48b582010-08-02 16:00:59 -070015#include <linux/types.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
Thomas Tuttle1a48b582010-08-02 16:00:59 -070017#define UBLOCK_VERSION 0
Ben Cheng4b29af02012-03-07 16:14:53 -080018
Thomas Tuttle1a48b582010-08-02 16:00:59 -070019enum {
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};
Ben Cheng4b29af02012-03-07 16:14:53 -080029
Thomas Tuttle1a48b582010-08-02 16:00:59 -070030struct ublock_in_header {
31 __u32 seq;
32 __u32 opcode;
33};
Ben Cheng4b29af02012-03-07 16:14:53 -080034
Thomas Tuttle1a48b582010-08-02 16:00:59 -070035struct ublock_out_header {
36 __u32 seq;
37 __u32 opcode;
38};
Ben Cheng4b29af02012-03-07 16:14:53 -080039
Thomas Tuttle1a48b582010-08-02 16:00:59 -070040struct ublock_init_in {
41 __u32 version;
42 __u32 max_buf;
43 __u32 index;
44};
Ben Cheng4b29af02012-03-07 16:14:53 -080045
Thomas Tuttle1a48b582010-08-02 16:00:59 -070046struct ublock_init_out {
47 __u32 version;
48 __u32 max_buf;
49 __u64 size;
50};
Ben Cheng4b29af02012-03-07 16:14:53 -080051
Thomas Tuttle1a48b582010-08-02 16:00:59 -070052struct ublock_ready_in {
53 __u32 _unused;
54};
Ben Cheng4b29af02012-03-07 16:14:53 -080055
Thomas Tuttle1a48b582010-08-02 16:00:59 -070056struct ublock_ready_out {
57 __u32 _unused;
58};
Ben Cheng4b29af02012-03-07 16:14:53 -080059
Thomas Tuttle1a48b582010-08-02 16:00:59 -070060struct ublock_read_in {
61 __u64 offset;
62 __u64 length;
63};
Ben Cheng4b29af02012-03-07 16:14:53 -080064
Thomas Tuttle1a48b582010-08-02 16:00:59 -070065struct ublock_read_out {
66 __s32 status;
67 __u8 data[];
68};
Ben Cheng4b29af02012-03-07 16:14:53 -080069
Thomas Tuttle1a48b582010-08-02 16:00:59 -070070struct ublock_write_in {
71 __u64 offset;
72 __u64 length;
73 __u8 data[];
74};
Ben Cheng4b29af02012-03-07 16:14:53 -080075
Thomas Tuttle1a48b582010-08-02 16:00:59 -070076struct ublock_write_out {
77 __s32 status;
78};
Ben Cheng4b29af02012-03-07 16:14:53 -080079
Thomas Tuttle1a48b582010-08-02 16:00:59 -070080#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080081