Module Name:    src
Committed By:   pooka
Date:           Tue Dec 22 18:55:26 UTC 2009

Modified Files:
        src/sys/sys: disklabel.h dkio.h

Log Message:
Limit DIOCGPART and struct partinfo visibility to _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/sys/disklabel.h
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/dkio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/disklabel.h
diff -u src/sys/sys/disklabel.h:1.106 src/sys/sys/disklabel.h:1.107
--- src/sys/sys/disklabel.h:1.106	Fri Nov 20 17:43:35 2009
+++ src/sys/sys/disklabel.h	Tue Dec 22 18:55:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.106 2009/11/20 17:43:35 pooka Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.107 2009/12/22 18:55:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -425,6 +425,7 @@
 	int	 df_reg[8];		/* result */
 };
 
+#ifdef _KERNEL
 /*
  * Structure used internally to retrieve information about a partition
  * on a disk.
@@ -434,8 +435,6 @@
 	struct partition *part;
 };
 
-#ifdef _KERNEL
-
 struct disk;
 
 int disk_read_sectors(void (*)(struct buf *), const struct disklabel *,

Index: src/sys/sys/dkio.h
diff -u src/sys/sys/dkio.h:1.14 src/sys/sys/dkio.h:1.15
--- src/sys/sys/dkio.h:1.14	Fri Aug 17 11:05:03 2007
+++ src/sys/sys/dkio.h	Tue Dec 22 18:55:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkio.h,v 1.14 2007/08/17 11:05:03 pavel Exp $	*/
+/*	$NetBSD: dkio.h,v 1.15 2009/12/22 18:55:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -42,7 +42,10 @@
 #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
 
 #if defined(__HAVE_OLD_DISKLABEL) && defined(_KERNEL)
 #define ODIOCGDINFO	_IOR('d', 101, struct olddisklabel)/* get */

Reply via email to