blkpg.h 953 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPI__LINUX_BLKPG_H
  3. #define _UAPI__LINUX_BLKPG_H
  4. #include <linux/compiler.h>
  5. #include <linux/ioctl.h>
  6. #define BLKPG _IO(0x12,105)
  7. /* The argument structure */
  8. struct blkpg_ioctl_arg {
  9. int op;
  10. int flags;
  11. int datalen;
  12. void __user *data;
  13. };
  14. /* The subfunctions (for the op field) */
  15. #define BLKPG_ADD_PARTITION 1
  16. #define BLKPG_DEL_PARTITION 2
  17. #define BLKPG_RESIZE_PARTITION 3
  18. /* Sizes of name fields. Unused at present. */
  19. #define BLKPG_DEVNAMELTH 64
  20. #define BLKPG_VOLNAMELTH 64
  21. /* The data structure for ADD_PARTITION and DEL_PARTITION */
  22. struct blkpg_partition {
  23. long long start; /* starting offset in bytes */
  24. long long length; /* length in bytes */
  25. int pno; /* partition number */
  26. char devname[BLKPG_DEVNAMELTH]; /* unused / ignored */
  27. char volname[BLKPG_VOLNAMELTH]; /* unused / ignore */
  28. };
  29. #endif /* _UAPI__LINUX_BLKPG_H */