aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-03-09 19:15:37 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-03-09 19:15:37 +0000
commit875b0335f995cdba94e83c9b851340d403618149 (patch)
tree5991d951f663e932859acb313b9717b11228e1ae /sys/sys
parent4814d31422aa559d9504149ab1b97db428ac1352 (diff)
downloadsrc-875b0335f995cdba94e83c9b851340d403618149.tar.gz
src-875b0335f995cdba94e83c9b851340d403618149.zip
Hide the DIOCGPART ioctl from userland where it has no decent use.
It's use in the kernel is also highly suspect due to the total absense of any kind of lifetime definition of the passed pointers.
Notes
Notes: svn path=/head/; revision=91951
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/disklabel.h4
-rw-r--r--sys/sys/diskmbr.h4
-rw-r--r--sys/sys/diskpc98.h4
3 files changed, 12 insertions, 0 deletions
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index a3a26890d4da..980e795b27f0 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -333,6 +333,7 @@ struct format_op {
int df_reg[8]; /* result */
};
+#ifdef _KERNEL
/*
* Structure used internally to retrieve information about a partition
* on a disk.
@@ -341,6 +342,7 @@ struct partinfo {
struct disklabel *disklab;
struct partition *part;
};
+#endif
/* DOS partition table -- located in boot block */
@@ -404,7 +406,9 @@ struct dos_partition {
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
+#ifdef _KERNEL
#define DIOCGPART _IOW('d', 104, struct partinfo) /* get partition */
+#endif
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index a3a26890d4da..980e795b27f0 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -333,6 +333,7 @@ struct format_op {
int df_reg[8]; /* result */
};
+#ifdef _KERNEL
/*
* Structure used internally to retrieve information about a partition
* on a disk.
@@ -341,6 +342,7 @@ struct partinfo {
struct disklabel *disklab;
struct partition *part;
};
+#endif
/* DOS partition table -- located in boot block */
@@ -404,7 +406,9 @@ struct dos_partition {
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
+#ifdef _KERNEL
#define DIOCGPART _IOW('d', 104, struct partinfo) /* get partition */
+#endif
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index a3a26890d4da..980e795b27f0 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -333,6 +333,7 @@ struct format_op {
int df_reg[8]; /* result */
};
+#ifdef _KERNEL
/*
* Structure used internally to retrieve information about a partition
* on a disk.
@@ -341,6 +342,7 @@ struct partinfo {
struct disklabel *disklab;
struct partition *part;
};
+#endif
/* DOS partition table -- located in boot block */
@@ -404,7 +406,9 @@ struct dos_partition {
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
+#ifdef _KERNEL
#define DIOCGPART _IOW('d', 104, struct partinfo) /* get partition */
+#endif
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */