unix: add Linux block device ioctl types and constants

These types and constants are taken from hdreg.h, and will enable
querying and manipulation of block devices on Linux.

Fixes golang/go#24971

Change-Id: Iafe8f81ba7ab9f1e127743dab6a9fb1912874a5c
Reviewed-on: https://go-review.googlesource.com/108455
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Matt Layher
2018-04-20 14:53:19 +00:00
committed by Tobias Klauser
parent a2a45943ae
commit 79b0c68887
24 changed files with 2559 additions and 0 deletions
+9
View File
@@ -68,6 +68,7 @@ package unix
#include <linux/cgroupstats.h>
#include <linux/genetlink.h>
#include <linux/socket.h>
#include <linux/hdreg.h>
// abi/abi.h generated by mkall.go.
#include "abi/abi.h"
@@ -963,3 +964,11 @@ const (
type SockaddrStorage C.struct_sockaddr_storage
type TCPMD5Sig C.struct_tcp_md5sig
// Disk drive operations.
type HDDriveCmdHdr C.struct_hd_drive_cmd_hdr
type HDGeometry C.struct_hd_geometry
type HDDriveID C.struct_hd_driveid