diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/uapi/linux/blkpg.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/uapi/linux/blkpg.h')
| -rw-r--r-- | include/uapi/linux/blkpg.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/uapi/linux/blkpg.h b/include/uapi/linux/blkpg.h new file mode 100644 index 000000000000..a8519446c111 --- /dev/null +++ b/include/uapi/linux/blkpg.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | #ifndef _LINUX_BLKPG_H | ||
| 2 | #define _LINUX_BLKPG_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Partition table and disk geometry handling | ||
| 6 | * | ||
| 7 | * A single ioctl with lots of subfunctions: | ||
| 8 | * | ||
| 9 | * Device number stuff: | ||
| 10 | * get_whole_disk() (given the device number of a partition, | ||
| 11 | * find the device number of the encompassing disk) | ||
| 12 | * get_all_partitions() (given the device number of a disk, return the | ||
| 13 | * device numbers of all its known partitions) | ||
| 14 | * | ||
| 15 | * Partition stuff: | ||
| 16 | * add_partition() | ||
| 17 | * delete_partition() | ||
| 18 | * test_partition_in_use() (also for test_disk_in_use) | ||
| 19 | * | ||
| 20 | * Geometry stuff: | ||
| 21 | * get_geometry() | ||
| 22 | * set_geometry() | ||
| 23 | * get_bios_drivedata() | ||
| 24 | * | ||
| 25 | * For today, only the partition stuff - aeb, 990515 | ||
| 26 | */ | ||
| 27 | #include <linux/compiler.h> | ||
| 28 | #include <linux/ioctl.h> | ||
| 29 | |||
| 30 | #define BLKPG _IO(0x12,105) | ||
| 31 | |||
| 32 | /* The argument structure */ | ||
| 33 | struct blkpg_ioctl_arg { | ||
| 34 | int op; | ||
| 35 | int flags; | ||
| 36 | int datalen; | ||
| 37 | void __user *data; | ||
| 38 | }; | ||
| 39 | |||
| 40 | /* The subfunctions (for the op field) */ | ||
| 41 | #define BLKPG_ADD_PARTITION 1 | ||
| 42 | #define BLKPG_DEL_PARTITION 2 | ||
| 43 | #define BLKPG_RESIZE_PARTITION 3 | ||
| 44 | |||
| 45 | /* Sizes of name fields. Unused at present. */ | ||
| 46 | #define BLKPG_DEVNAMELTH 64 | ||
| 47 | #define BLKPG_VOLNAMELTH 64 | ||
| 48 | |||
| 49 | /* The data structure for ADD_PARTITION and DEL_PARTITION */ | ||
| 50 | struct blkpg_partition { | ||
| 51 | long long start; /* starting offset in bytes */ | ||
| 52 | long long length; /* length in bytes */ | ||
| 53 | int pno; /* partition number */ | ||
| 54 | char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, | ||
| 55 | to be used in kernel messages */ | ||
| 56 | char volname[BLKPG_VOLNAMELTH]; /* volume label */ | ||
| 57 | }; | ||
| 58 | |||
| 59 | #endif /* _LINUX_BLKPG_H */ | ||
