16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 253bb724fSBrian Norris #ifndef _UAPI__LINUX_BLKPG_H 353bb724fSBrian Norris #define _UAPI__LINUX_BLKPG_H 4607ca46eSDavid Howells 5607ca46eSDavid Howells #include <linux/compiler.h> 6607ca46eSDavid Howells #include <linux/ioctl.h> 7607ca46eSDavid Howells 8607ca46eSDavid Howells #define BLKPG _IO(0x12,105) 9607ca46eSDavid Howells 10607ca46eSDavid Howells /* The argument structure */ 11607ca46eSDavid Howells struct blkpg_ioctl_arg { 12607ca46eSDavid Howells int op; 13607ca46eSDavid Howells int flags; 14607ca46eSDavid Howells int datalen; 15607ca46eSDavid Howells void __user *data; 16607ca46eSDavid Howells }; 17607ca46eSDavid Howells 18607ca46eSDavid Howells /* The subfunctions (for the op field) */ 19607ca46eSDavid Howells #define BLKPG_ADD_PARTITION 1 20607ca46eSDavid Howells #define BLKPG_DEL_PARTITION 2 21607ca46eSDavid Howells #define BLKPG_RESIZE_PARTITION 3 22607ca46eSDavid Howells 23607ca46eSDavid Howells /* Sizes of name fields. Unused at present. */ 24607ca46eSDavid Howells #define BLKPG_DEVNAMELTH 64 25607ca46eSDavid Howells #define BLKPG_VOLNAMELTH 64 26607ca46eSDavid Howells 27607ca46eSDavid Howells /* The data structure for ADD_PARTITION and DEL_PARTITION */ 28607ca46eSDavid Howells struct blkpg_partition { 29607ca46eSDavid Howells long long start; /* starting offset in bytes */ 30607ca46eSDavid Howells long long length; /* length in bytes */ 31607ca46eSDavid Howells int pno; /* partition number */ 32*b9c6cdc3SChristoph Hellwig char devname[BLKPG_DEVNAMELTH]; /* unused / ignored */ 33*b9c6cdc3SChristoph Hellwig char volname[BLKPG_VOLNAMELTH]; /* unused / ignore */ 34607ca46eSDavid Howells }; 35607ca46eSDavid Howells 3653bb724fSBrian Norris #endif /* _UAPI__LINUX_BLKPG_H */ 37