From: Magnus Damm <damm@kieraypc01.p.y.ki.era.ericsson.se>
To: wung_y@263.net
Cc: "linuxppc-dev@lists.linuxppc.org" <linuxppc-dev@lists.linuxppc.org>
Subject: Re: ask for help
Date: Thu, 02 Dec 1999 13:01:34 +0100 [thread overview]
Message-ID: <38465F9E.D9B6FB0F@switchboard.ericsson.se> (raw)
In-Reply-To: 3845CAC4.6C2ED79@263.net
> the code in minix_read_super() (fs/minix/inode.c) is like below:
>
> struct minix_super_block *ms;
> if (!(bh = bread(dev,1,BLOCK_SIZE)))
> goto out_bad_sb;
>
> ms = (struct minix_super_block *) bh->b_data;
> /*
> now ms points to the start of superblock
> that is 0x00000400+baseaddress
> */
> s->s_magic = ms->s_magic;
> s->s_magic is 0x8f13 but not 0x138f due to the endian problem. so
> the magic number is wrong and the root fs mount fail.
>
> if i make a minix fs image in a big endian machine, the image
> should be looked like this:
>
> 00000410h: 8f 13 00 01 00 00 00 00 00 00 00 00 00 00 00 00
>
> is this correct? if yes, there is no problem any more.
Seems correct after a quick glance.
Question 1: Why use minix?
If you really want minix I suggest you to improve
the funcionality of it and add endian macros to it.
If you look at fs/fat/inode.c you see that the fat
code use macros like CF_LE_x to read variables from the structs
that are mapped on the data from the disk.
So does ext2.
The CF_LE_x are translated to lexx_to_cpu in include/linux/msdos_fs.h
where x is the size.
I would use ext2.
Cheers /
magnus
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-12-02 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-01 12:27 re:ask for help Wang Yong
1999-12-01 14:37 ` ask " Magnus Damm
1999-12-02 1:26 ` Wang Yong
1999-12-02 12:01 ` Magnus Damm [this message]
[not found] <3844A63D.E8BA9488@263.net>
1999-12-01 10:42 ` Magnus Damm
-- strict thread matches above, loose matches on Subject: below --
1999-12-01 7:32 Wang Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38465F9E.D9B6FB0F@switchboard.ericsson.se \
--to=damm@kieraypc01.p.y.ki.era.ericsson.se \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=wung_y@263.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).