svn commit: r346932 - head/sys/ufs/ufs

Warner Losh imp at bsdimp.com
Tue Apr 30 14:46:18 UTC 2019


On Tue, Apr 30, 2019 at 8:27 AM Mark Johnston <markj at freebsd.org> wrote:

> On Tue, Apr 30, 2019 at 06:08:49AM +0000, Alexey Dokuchaev wrote:
> > On Mon, Apr 29, 2019 at 10:05:26PM +0000, Mark Johnston wrote:
> > > New Revision: 346932
> > > URL: https://svnweb.freebsd.org/changeset/base/346932
> > >
> > > Log:
> > >   Optimize lseek(SEEK_DATA) on UFS.
> > >
> > >   This version fixes the problems identified in r345244.
> > >
> > >   Reviewed by:      kib
> > > @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$");
> > >  #include <ufs/ufs/ufsmount.h>
> > >  #include <ufs/ufs/ufs_extern.h>
> > >
> > > +static ufs_lbn_t lbn_count(struct ufsmount *, int);
> > > +static int readindir(struct vnode *, ufs_lbn_t, ufs2_daddr_t, struct
> buf **);
> >
> > Is the prototype for static readindir() really needed here?
>
> Yes, when using a K&R definition.
>
> > > +static int
> > > +readindir(vp, lbn, daddr, bpp)
> > > +   struct vnode *vp;
> > > +   ufs_lbn_t lbn;
> > > +   ufs2_daddr_t daddr;
> > > +   struct buf **bpp;
> >
> > Don't we prefer ASNI declarations over K&R these days?
>
> Yes, I was just staying consistent with the rest of the file.


For new code, we do prefer ANSI prototypes and function definitions. But
for ufs and friends, we're still using K&R for a variety of reasons.

Warner


More information about the svn-src-all mailing list