Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPI__LINUX_BLKPG_H
0003 #define _UAPI__LINUX_BLKPG_H
0004 
0005 #include <linux/compiler.h>
0006 #include <linux/ioctl.h>
0007 
0008 #define BLKPG      _IO(0x12,105)
0009 
0010 /* The argument structure */
0011 struct blkpg_ioctl_arg {
0012         int op;
0013         int flags;
0014         int datalen;
0015         void __user *data;
0016 };
0017 
0018 /* The subfunctions (for the op field) */
0019 #define BLKPG_ADD_PARTITION 1
0020 #define BLKPG_DEL_PARTITION 2
0021 #define BLKPG_RESIZE_PARTITION  3
0022 
0023 /* Sizes of name fields. Unused at present. */
0024 #define BLKPG_DEVNAMELTH    64
0025 #define BLKPG_VOLNAMELTH    64
0026 
0027 /* The data structure for ADD_PARTITION and DEL_PARTITION */
0028 struct blkpg_partition {
0029     long long start;        /* starting offset in bytes */
0030     long long length;       /* length in bytes */
0031     int pno;            /* partition number */
0032     char devname[BLKPG_DEVNAMELTH]; /* unused / ignored */
0033     char volname[BLKPG_VOLNAMELTH]; /* unused / ignore */
0034 };
0035 
0036 #endif /* _UAPI__LINUX_BLKPG_H */