On Tue, 31 Jan 2012, Sergey Kandaurov wrote:

Log:
 Isolate v_caddr_t in the ie driver.

 Submitted by:  Bruce Evans on net@

Thanks.

...
Modified: head/sys/sys/types.h
==============================================================================
--- head/sys/sys/types.h        Tue Jan 31 12:57:21 2012        (r230807)
+++ head/sys/sys/types.h        Tue Jan 31 13:00:40 2012        (r230808)
@@ -73,7 +73,6 @@ typedef       quad_t *        qaddr_t;

typedef char *          caddr_t;        /* core address */
typedef const char *    c_caddr_t;      /* core address, pointer to const */
-typedef        __volatile char *v_caddr_t;     /* core address, pointer to 
volatile */

#ifndef _BLKSIZE_T_DECLARED
typedef __blksize_t     blksize_t;

c_caddr_t is a bit harder to fix or isolate.  I removed it, then fixed
the things that broke, but only the ones that were used in my normal
kernel (or perhaps GENERIC).  These are most mchain and its uses:
- mbchain.9, mchain.9 (these also have a bogus include of uio.h)
- nwfs_subr.c (remove the bogus casts to c_caddr_t and also many more
  to caddr_t, after fixing APIs).  This is barely maintained, and might
  go away for other reasons (it needs Giant?).
- subr_mchain.c, and headers: change APIs to use const void * instead of
  c_caddr_t, and void * instead of caddr_t; add casts to const char *
  or char * to access or do pointer arithmetic on these void *.
- subr_mbuf.c: like subr_mchain.c, but only 1 place to unbreak.
- ncp_rq.c: like nwfs_subr.c, but less to change.
- smb_subr.c: change just 1 API to take const void * and void * instead
  of c_caddr_t etc., and add casts.  The casts are now to const char **
  and char **.  That's 1 more star than before, so I don't see how this
  worked or works.
- linker.h: the same bugs affect the "opaque" symbol linker_sym_t.  We
  have to peer inside it to know that it is a pointer and modify it
  to make it a pointer to const.  We use c_linker_sym_t for the latter,
  and since it is bogusly a caddr_t, we used c_caddr_t for the latter.
  I changed the latter to use const char *, but didn't try to fix the
  bogus opaqueness.
- mchain.h: one of the headers affected.  Also add a forward
  declaration of struct uio to it, so that uio.h isn't prerequisite,
  and fix the unsorting of the forward declarations.
- types.h: remove c_caddr_t.

Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to