DragonFly BSD
DragonFly submit List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: src/sys/vfs ANSIfication


From: Chris Pressey <cpressey@xxxxxxxxxxxxxxx>
Date: Mon, 29 Mar 2004 21:33:16 -0800

On Mon, 29 Mar 2004 21:05:31 -0800 (PST)
Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:

>     Kinda huge?  Understatement...  when you commit it, do
>     it one subsystem at a time (e.g. coda, fdesc, etc...).
>     The separate commit emails will be easier for me to
>     post-review after the commit.
> 
>     Actually, if you wouldn't mind, commit one vfs subsystem
>     a day rather then all of them at once.
> 
>     Be careful on this one, a number of commits have been
>     made to vfs/ in recent days.

Definately will do on all counts.

While on the subject, and well before I begin committing these, I should
mention - there are a LOT of function definitions that look like this:

static int
hpfs_ioctl (
	struct vop_ioctl_args /* {
		struct vnode *a_vp;
		u_long a_command;
		caddr_t a_data;
		int a_fflag;
		struct ucred *a_cred;
		struct proc *a_p;
	} */ *ap)

I (perhaps not thinking too clearly) reformatted these like

static int
hpfs_ioctl(struct vop_ioctl_args /* {
		struct vnode *a_vp;
		u_long a_command;
		caddr_t a_data;
		int a_fflag;
		struct ucred *a_cred;
		struct proc *a_p;
	   } */ *ap)

(Notably, I didn't change the indentation of the structure members
unless they were clearly too close (less than 2 spaces) to the left edge
of the 'struct' block.  It didn't occur to me until too late that it
possibly would have been better to leave them the way they were.)

But I realize as well, that Matt has mentioned that comments inline in
argument lists are not the prettiest thing in the world.  And these
ones strike me as particularly clunky-looking...

But I assume the reason there are comments here in the first place is
because these structures (like struct vop_ioctl_args) are not statically
defined, but rather dynamically created as part of the build process.

Is there maybe a better way to do this?  Some way so that we can say

static int
hpfs_ioctl(struct vop_ioctl_args *ap)

in the function, and document the structure of struct vop_ioctl_args
elsewhere?

Just thought I'd raise the question before the bits start flying...

-Chris



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]