Re: root=/dev/sda1 fails but root=0x0801 works...

From: Andrew Morton
Date: Wed Feb 15 2006 - 02:32:00 EST


Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Feb 14, 2006 at 10:59:50PM -0800, Andrew Morton wrote:
> > Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > Read init/do_mounts.c::name_to_dev_t().
> > >
> >
> > I tried to do that a while ago, when I was trying to use it for
> > name_to_dev_t()ing in swsusp somewhere.
> >
> >
> > >From my notes at the time:
> >
> > a) It barfs if /sys is already mounted.
>
> It's called from late boot code.
>
> > b) Fix that, mkdir and mount barf because it needs set_fs(KERNEL_DS)
>
> It's called from late boot code, running as kernel thread.

Well. I was trying to use it for something else...


> > c) Fix that, it barfs because name_to_dev_t is just broken. It is
> > accessing the wrong pathnames in /sys.
>
> Details, please.

I just don't remember, sorry. From inspection it _looks_ OK. But I do
remember getting -ENOENT, looking at the pathnames and deciding that it was
miles off.

swsusp has a habit of leaving a trailing \n at the end of resume_file, but
it was more than that.

And I threw away the patch which exercised this. Oh well.

(Wonders whether software_resume()'s call to name_to_dev_t() can work and
if so, whether all that stuff as well as name_to_dev_t() can become __init).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/