diff options
| author | Ben Cheng <bccheng@google.com> | 2013-10-16 16:09:24 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@google.com> | 2013-10-16 16:09:24 -0700 |
| commit | 655a7c081f83b8351ed5f11a6c6accd9458293a8 (patch) | |
| tree | 418e77007face85af356f4e7cfc356a7e7125127 /libc/kernel/uapi/linux/virtio_blk.h | |
| parent | f0447ddb042150af0e13a364df98dd11673d95d3 (diff) | |
| download | bionic-655a7c081f83b8351ed5f11a6c6accd9458293a8.zip bionic-655a7c081f83b8351ed5f11a6c6accd9458293a8.tar.gz bionic-655a7c081f83b8351ed5f11a6c6accd9458293a8.tar.bz2 | |
Add processed uapi kernel headers (common and aarch64-specific)
Change-Id: If0be7b83bd8fe7cb02472d173f7c452aabf61124
Diffstat (limited to 'libc/kernel/uapi/linux/virtio_blk.h')
| -rw-r--r-- | libc/kernel/uapi/linux/virtio_blk.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/libc/kernel/uapi/linux/virtio_blk.h b/libc/kernel/uapi/linux/virtio_blk.h new file mode 100644 index 0000000..78ec5e0 --- /dev/null +++ b/libc/kernel/uapi/linux/virtio_blk.h @@ -0,0 +1,85 @@ +/**************************************************************************** + **************************************************************************** + *** + *** 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. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _LINUX_VIRTIO_BLK_H +#define _LINUX_VIRTIO_BLK_H +#include <linux/types.h> +#include <linux/virtio_ids.h> +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#include <linux/virtio_config.h> +#define VIRTIO_BLK_F_BARRIER 0 +#define VIRTIO_BLK_F_SIZE_MAX 1 +#define VIRTIO_BLK_F_SEG_MAX 2 +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define VIRTIO_BLK_F_GEOMETRY 4 +#define VIRTIO_BLK_F_RO 5 +#define VIRTIO_BLK_F_BLK_SIZE 6 +#define VIRTIO_BLK_F_SCSI 7 +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define VIRTIO_BLK_F_WCE 9 +#define VIRTIO_BLK_F_TOPOLOGY 10 +#define VIRTIO_BLK_F_CONFIG_WCE 11 +#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define VIRTIO_BLK_ID_BYTES 20 +struct virtio_blk_config { + __u64 capacity; + __u32 size_max; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 seg_max; + struct virtio_blk_geometry { + __u16 cylinders; + __u8 heads; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u8 sectors; + } geometry; + __u32 blk_size; + __u8 physical_block_exp; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u8 alignment_offset; + __u16 min_io_size; + __u32 opt_io_size; + __u8 wce; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +} __attribute__((packed)); +#define VIRTIO_BLK_T_IN 0 +#define VIRTIO_BLK_T_OUT 1 +#define VIRTIO_BLK_T_SCSI_CMD 2 +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define VIRTIO_BLK_T_FLUSH 4 +#define VIRTIO_BLK_T_GET_ID 8 +#define VIRTIO_BLK_T_BARRIER 0x80000000 +struct virtio_blk_outhdr { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 type; + __u32 ioprio; + __u64 sector; +}; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +struct virtio_scsi_inhdr { + __u32 errors; + __u32 data_len; + __u32 sense_len; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 residual; +}; +#define VIRTIO_BLK_S_OK 0 +#define VIRTIO_BLK_S_IOERR 1 +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define VIRTIO_BLK_S_UNSUPP 2 +#endif |
