diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/blkpg.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/blkpg.h')
-rw-r--r-- | include/linux/blkpg.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/blkpg.h b/include/linux/blkpg.h new file mode 100644 index 000000000000..be5d0f4ad24c --- /dev/null +++ b/include/linux/blkpg.h | |||
@@ -0,0 +1,57 @@ | |||
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/ioctl.h> | ||
28 | |||
29 | #define BLKPG _IO(0x12,105) | ||
30 | |||
31 | /* The argument structure */ | ||
32 | struct blkpg_ioctl_arg { | ||
33 | int op; | ||
34 | int flags; | ||
35 | int datalen; | ||
36 | void __user *data; | ||
37 | }; | ||
38 | |||
39 | /* The subfunctions (for the op field) */ | ||
40 | #define BLKPG_ADD_PARTITION 1 | ||
41 | #define BLKPG_DEL_PARTITION 2 | ||
42 | |||
43 | /* Sizes of name fields. Unused at present. */ | ||
44 | #define BLKPG_DEVNAMELTH 64 | ||
45 | #define BLKPG_VOLNAMELTH 64 | ||
46 | |||
47 | /* The data structure for ADD_PARTITION and DEL_PARTITION */ | ||
48 | struct blkpg_partition { | ||
49 | long long start; /* starting offset in bytes */ | ||
50 | long long length; /* length in bytes */ | ||
51 | int pno; /* partition number */ | ||
52 | char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, | ||
53 | to be used in kernel messages */ | ||
54 | char volname[BLKPG_VOLNAMELTH]; /* volume label */ | ||
55 | }; | ||
56 | |||
57 | #endif /* _LINUX_BLKPG_H */ | ||