Re: 2.6.0-test3 cannot mount root fs

From: Andrew Morton
Date: Sun Aug 10 2003 - 17:50:08 EST


Norbert Preining <preining@xxxxxxxx> wrote:
>
> I tried as boot cmd line:
> s root=03:41 acpi=off
> and still it didn't work. Same problem.

It is decimal. You want 03:65.


Could you test this patch? It should put things back to the way
they were before this mini-fisaco. root=0341 should work as well.


init/do_mounts.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)

diff -puN init/do_mounts.c~handle-old-dev_t-format init/do_mounts.c
--- 25/init/do_mounts.c~handle-old-dev_t-format 2003-08-09 16:15:24.000000000 -0700
+++ 25-akpm/init/do_mounts.c 2003-08-09 16:17:25.000000000 -0700
@@ -71,13 +71,19 @@ static dev_t __init try_name(char *name,
if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail;
buf[len - 1] = '\0';
- /*
- * The format of dev is now %u:%u -- see print_dev_t()
- */
- if (sscanf(buf, "%u:%u", &maj, &min) == 2)
+ if (sscanf(buf, "%u:%u", &maj, &min) == 2) {
+ /*
+ * Try the %u:%u format -- see print_dev_t()
+ */
res = MKDEV(maj, min);
- else
- goto fail;
+ } else {
+ /*
+ * Nope. Try old-style "0321"
+ */
+ res = (dev_t)simple_strtoul(buf, &s, 16);
+ if (*s)
+ goto fail;
+ }

/* if it's there and we are not looking for a partition - that's it */
if (!part)

_

-
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/