From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Cc: josh@utopian.net
Subject: Re: [9fans] p9p vbackup fs type endiannes
Date: Thu, 22 Nov 2007 10:42:40 -0500 [thread overview]
Message-ID: <20071122154230.3E4A01E8C22@holo.morphisms.net> (raw)
In-Reply-To: <562BCA89-2B62-4C7A-A570-69E833A7FE32@utopian.net>
> I'm trying to use p9p's vbackup(8) on a linux powerpc system.
>
> # vbackup -m /boot /dev/hda3
> vbackup: ffsopen: bad magic 0x53ef wanted 0xef53
>
> Linux statfs(2) says 0xef53 is a linux ext2 partition type. There
> is an ext3 partition at /dev/hda3, so vbackup (its call to fsysopen())
> is expecting the right fs type, but seems to be getting the endian
> obverse of that value.
>
> (The kernel is debian's stock 2.6.18-5-powerpc. P9p is dated 11/08
> from http://swtch.com/plan9port/.)
>
> Anyone else attempting to doubly edify linux in this fashion
> and seeing likewise?
I have never tried to run the ext2 reading code on a
little-endian machine. I don't know what changes
and what doesn't. I would have expected that everything
was in native byte order, so that the "load disk contents
into memory and interpret" strategy would have worked
just fine. It's possible that the superblock magic code
is really two bytes and not a short, and that if you change
SUPERMAGIC in src/libdiskfs/ext2.h then everything else
will just work. But it's also possible that you'll have to
fiddle with other fields.
Please let me know what you find out.
Thanks.
Russ
next prev parent reply other threads:[~2007-11-22 15:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 9:01 Joshua Wood
2007-11-22 15:42 ` Russ Cox [this message]
[not found] <9C0A4F7F-8220-43AE-9538-1AB5F56A24A8@utopian.net>
2007-11-27 15:28 ` Russ Cox
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=20071122154230.3E4A01E8C22@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
--cc=josh@utopian.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).