proposed bio.h change

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Thu, 11 Jun 2009 15:08:00 +0200
I noticed that sys/sys/bio.h unnecessarily exposes various
structures to userland.
If there are no objections I would like to commit the
following change (moving the bio_cmd values up because
they are used by ggatectl)

	cheers
	luigi

Index: head/sys/sys/bio.h
===================================================================
--- head/sys/sys/bio.h	(revision 193988)
+++ head/sys/sys/bio.h	(working copy)
_at__at_ -40,6 +40,17 _at__at_
 
 #include <sys/queue.h>
 
+/* bio_cmd */
+#define BIO_READ	0x01
+#define BIO_WRITE	0x02
+#define BIO_DELETE	0x04
+#define BIO_GETATTR	0x08
+#define BIO_FLUSH	0x10
+#define BIO_CMD0	0x20	/* Available for local hacks */
+#define BIO_CMD1	0x40	/* Available for local hacks */
+#define BIO_CMD2	0x80	/* Available for local hacks */
+
+#ifdef _KERNEL
 struct disk;
 struct bio;
 
_at__at_ -95,22 +106,12 _at__at_
 	daddr_t bio_pblkno;               /* physical block number */
 };
 
-/* bio_cmd */
-#define BIO_READ	0x01
-#define BIO_WRITE	0x02
-#define BIO_DELETE	0x04
-#define BIO_GETATTR	0x08
-#define BIO_FLUSH	0x10
-#define BIO_CMD0	0x20	/* Available for local hacks */
-#define BIO_CMD1	0x40	/* Available for local hacks */
-#define BIO_CMD2	0x80	/* Available for local hacks */
 
 /* bio_flags */
 #define BIO_ERROR	0x01
 #define BIO_DONE	0x02
 #define BIO_ONQUEUE	0x04
 
-#ifdef _KERNEL
 
 struct uio;
 struct devstat;
Received on Thu Jun 11 2009 - 11:22:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC