unix: add Linux blkpg_ioctl_arg and blkpg_partition types
For manipulating Linux partitions with the BLKPG ioctl.
Change-Id: I2196038ccfc39ecd6926817c3b310d0837220095
Reviewed-on: https://go-review.googlesource.com/125642
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go
index cc5ca24..fcb28a1 100644
--- a/unix/ztypes_linux_mipsle.go
+++ b/unix/ztypes_linux_mipsle.go
@@ -1846,3 +1846,26 @@
Negmult int32
Clock int32
}
+
+type BlkpgIoctlArg struct {
+ Op int32
+ Flags int32
+ Datalen int32
+ Data *byte
+}
+
+type BlkpgPartition struct {
+ Start int64
+ Length int64
+ Pno int32
+ Devname [64]uint8
+ Volname [64]uint8
+ _ [4]byte
+}
+
+const (
+ BLKPG = 0x20001269
+ BLKPG_ADD_PARTITION = 0x1
+ BLKPG_DEL_PARTITION = 0x2
+ BLKPG_RESIZE_PARTITION = 0x3
+)