diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-11-24 10:31:17 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-11-24 12:20:50 +0100 |
| commit | d6358a0dc965d89cfca5bc8b9d3d035a894f5212 (patch) | |
| tree | 8bd41ef68341b6b0e169c8b418276ae749f32e25 /sys/linux | |
| parent | 3b903dad230946cfd32b986bc32d44fc23eaafd1 (diff) | |
sys/linux: refine BLKPG ioctl
This ioctl accepts blkpg_partition struct:
https://elixir.bootlin.com/linux/v6.1-rc6/source/block/ioctl.c#L20
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/dev_block.txt | 16 | ||||
| -rw-r--r-- | sys/linux/dev_block.txt.const | 5 |
2 files changed, 18 insertions, 3 deletions
diff --git a/sys/linux/dev_block.txt b/sys/linux/dev_block.txt index 4ce5e5707..34e283164 100644 --- a/sys/linux/dev_block.txt +++ b/sys/linux/dev_block.txt @@ -85,12 +85,22 @@ hd_geometry { } blkpg_ioctl_arg { - op int32 - flags int32 + op flags[blkpg_ioctl_op, int32] + flags const[0, int32] datalen bytesize[data, int32] - data ptr[in, array[int8]] + data ptr[in, blkpg_partition] } +blkpg_partition { + start int64 + length int64 + pno int32[0:20] + devname array[const[0, int8], BLKPG_DEVNAMELTH] + volname array[const[0, int8], BLKPG_VOLNAMELTH] +} + +blkpg_ioctl_op = BLKPG_ADD_PARTITION, BLKPG_DEL_PARTITION, BLKPG_RESIZE_PARTITION + blk_user_trace_setup { name array[const[0, int8], BLKTRACE_BDEV_SIZE] act_mask int16 diff --git a/sys/linux/dev_block.txt.const b/sys/linux/dev_block.txt.const index 379ac8037..fd9879645 100644 --- a/sys/linux/dev_block.txt.const +++ b/sys/linux/dev_block.txt.const @@ -13,6 +13,11 @@ BLKIOMIN = 4728, mips64le:ppc64le:536875640 BLKIOOPT = 4729, mips64le:ppc64le:536875641 BLKPBSZGET = 4731, mips64le:ppc64le:536875643 BLKPG = 4713, mips64le:ppc64le:536875625 +BLKPG_ADD_PARTITION = 1 +BLKPG_DEL_PARTITION = 2 +BLKPG_DEVNAMELTH = 64 +BLKPG_RESIZE_PARTITION = 3 +BLKPG_VOLNAMELTH = 64 BLKRAGET = 4707, mips64le:ppc64le:536875619 BLKREPORTZONE = 3222278786 BLKRESETZONE = 1074795139, mips64le:ppc64le:2148536963 |
