Re: [PATCH] fix for idiocy in mount_root cleanups.

Pavel Machek (pavel@suse.cz)
Sun, 9 Dec 2001 23:56:22 +0100


Hi!

> OK, for the time being we can simply go with
>
> diff -urN C1-pre7/init/do_mounts.c C1-pre7-fix/init/do_mounts.c
> --- C1-pre7/init/do_mounts.c Fri Dec 7 20:48:43 2001
> +++ C1-pre7-fix/init/do_mounts.c Sat Dec 8 15:54:46 2001
> @@ -351,7 +351,8 @@
> mount("devfs", ".", "devfs", 0, NULL);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> retry:
> for (p = fs_names; *p; p += strlen(p)+1) {
> - err = mount(name,"/root",p,root_mountflags,root_mount_data);
> + int err;
> + err = sys_mount(name,"/root",p,root_mountflags,root_mount_data);
> switch (err) {
> case 0:
> goto done;
>
> Is that OK with you?

Why do you *need* to declare err, when you did not need it before?

[Calling sys_mount is indeed right way to do this. Ouch, and look 4
lines above that. Do I see "mount()" without checking error return?]

Pavel

-- 
"I do not steal MS software. It is not worth it."
                                -- Pavel Kankovsky
-
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/