|
@@ -73,6 +73,7 @@ package unix
|
|
|
#include <linux/socket.h>
|
|
#include <linux/socket.h>
|
|
|
#include <linux/hdreg.h>
|
|
#include <linux/hdreg.h>
|
|
|
#include <linux/rtc.h>
|
|
#include <linux/rtc.h>
|
|
|
|
|
+#include <linux/blkpg.h>
|
|
|
|
|
|
|
|
// abi/abi.h generated by mkall.go.
|
|
// abi/abi.h generated by mkall.go.
|
|
|
#include "abi/abi.h"
|
|
#include "abi/abi.h"
|
|
@@ -312,6 +313,15 @@ struct ustat {
|
|
|
char f_fpack[6];
|
|
char f_fpack[6];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// my_blkpg_partition is blkpg_partition with unsigned devname & volname.
|
|
|
|
|
+struct my_blkpg_partition {
|
|
|
|
|
+ long long start;
|
|
|
|
|
+ long long length;
|
|
|
|
|
+ int pno;
|
|
|
|
|
+ unsigned char devname[BLKPG_DEVNAMELTH];
|
|
|
|
|
+ unsigned char volname[BLKPG_VOLNAMELTH];
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
*/
|
|
*/
|
|
|
import "C"
|
|
import "C"
|
|
|
|
|
|
|
@@ -1516,3 +1526,16 @@ type RTCTime C.struct_rtc_time
|
|
|
type RTCWkAlrm C.struct_rtc_wkalrm
|
|
type RTCWkAlrm C.struct_rtc_wkalrm
|
|
|
|
|
|
|
|
type RTCPLLInfo C.struct_rtc_pll_info
|
|
type RTCPLLInfo C.struct_rtc_pll_info
|
|
|
|
|
+
|
|
|
|
|
+// BLKPG ioctl:
|
|
|
|
|
+
|
|
|
|
|
+type BlkpgIoctlArg C.struct_blkpg_ioctl_arg
|
|
|
|
|
+
|
|
|
|
|
+type BlkpgPartition C.struct_my_blkpg_partition
|
|
|
|
|
+
|
|
|
|
|
+const (
|
|
|
|
|
+ BLKPG = C.BLKPG
|
|
|
|
|
+ BLKPG_ADD_PARTITION = C.BLKPG_ADD_PARTITION
|
|
|
|
|
+ BLKPG_DEL_PARTITION = C.BLKPG_DEL_PARTITION
|
|
|
|
|
+ BLKPG_RESIZE_PARTITION = C.BLKPG_RESIZE_PARTITION
|
|
|
|
|
+)
|