Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 18:25:51 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/fs/nullfs null_vfsops.c src/sys/fs/nwfs  nwfs_vfsops.c src/sys/fs/smbfs smbfs_vfsops.c src/sys/kern  vfs_default.c vfs_vnops.c src/sys/sys mount.h vnode.h src/sys/ufs/ufs quota.h ufs_quota.c ufs_vfsops.c
Message-ID:  <20080226182149.D19847@fledge.watson.org>
In-Reply-To: <200802261819.m1QIJnTO068648@repoman.freebsd.org>
References:  <200802261819.m1QIJnTO068648@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 26 Feb 2008, David E. O'Brien wrote:

>  Modified files:        (Branch: RELENG_6)
>    sys/fs/nullfs        null_vfsops.c
>    sys/fs/nwfs          nwfs_vfsops.c
>    sys/fs/smbfs         smbfs_vfsops.c
>    sys/kern             vfs_default.c vfs_vnops.c
>    sys/sys              mount.h vnode.h
>    sys/ufs/ufs          quota.h ufs_quota.c ufs_vfsops.c
>  Log:
>  Back out MFC of "eradicate caddr_t".
>  Turn's out Kris' suspisions were right - from a suttle code compatability
>  point of view.  Robert Watson found that ARLA code had something like this:
>          typedef int (*foo_t)(caddr_t); ... foo_t fred;
>  The compile gets all snarky when it finds int fred(void *) { .. }.

To be specific, it's about code on the order of the following -- in the 
include file:

   vfs_quotactl_t nnpfs_quotactl;

In the .c file here nnpfs_quotactl is implemented:

   int
   nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg,
       d_thread_t *p)
   {
   	...
   }

In another .c file where nnpfs_quotactl is used:

   	.vfs_quotactl = nnpfs_quotactl,

The compile keels over when it discovers that nnpfs_quotactl doesn't match the 
implementation because it doesn't match the typedef.  So it's actually our 
typedef, not Arla's typedef.

In any case, thanks for backing this out -- while I like the change in 
principle (and am glad it's in newer releases), this was a case of 
compatibility problems outweighing benefits.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080226182149.D19847>