lkml.org 
[lkml]   [2003]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] change get_sb prototype
On Mon, May 26, 2003 at 02:39:59AM +0200, Andries.Brouwer@cwi.nl wrote:
> The boring patch below does not change behaviour.
> It does two things:
>
> (i) The prototypes for free_vfsmnt(), alloc_vfsmnt(), do_kern_mount()
> so far occurred in several individual c files. Now they are in
> <linux/mount.h>.
>
> (ii) do_kern_mount() has a third argument name that is typically
> a constant. It is called with "rootfs", "nfsd", type->name, "capifs",
> "usbdevfs", "binfmt_misc" etc. So, it should have a prototype that
> expresses this:
>
> do_kern_mount(const char *fstype, int flags, const char *name, void *data);
>
> This makes the ugly cast
>
> - return do_kern_mount(type->name, 0, (char *)type->name, NULL);
> + return do_kern_mount(type->name, 0, type->name, NULL);
>
> go away. Now do_kern_mount() calls type->get_sb(), so also get_sb()
> must have a const third argument. That is what the patch below does.

Eeek... What for? It's _much_ easier to kill silly const char * in
struct file_system_type. And no, I don't believe that const is of any
value in that case.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.016 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site