From: Jim Gifford <maillist@jg555.com>
To: sparclinux@vger.kernel.org
Subject: Re: More on the Sun Disk Label Issue
Date: Tue, 11 Apr 2006 03:24:40 +0000 [thread overview]
Message-ID: <443B2178.1080000@jg555.com> (raw)
In-Reply-To: <443AE0BA.8070706@jg555.com>
Dave,
They both give the same output exactly.
sizeof: 512
offsetof: info 0
offsetof: spare0 128
offsetof: infos 142
offsetof: spare 174
offsetof: rspeed 420
offsetof: pcylcount 422
offsetof: sparecyl 424
offsetof: spare2 426
offsetof: ilfact 430
offsetof: ncyl 432
offsetof: nacyl 434
offsetof: ntrks 436
offsetof: nsect 438
offsetof: spare3 440
offsetof: partitions 444
offsetof: magic 508
offsetof: csum 510
Test checksum is 0
I think the problem may be with the way fdisk is creating the
labels. Here is how they are doing it.
typedef struct {
unsigned char info[128]; /* Informative text string */
unsigned char spare0[14];
struct sun_info {
unsigned char spare1;
unsigned char id;
unsigned char spare2;
unsigned char flags;
} infos[8];
unsigned char spare1[246]; /* Boot information etc. */
unsigned short rspeed; /* Disk rotational speed */
unsigned short pcylcount; /* Physical cylinder count */
unsigned short sparecyl; /* extra sects per cylinder */
unsigned char spare2[4]; /* More magic... */
unsigned short ilfact; /* Interleave factor */
unsigned short ncyl; /* Data cylinder count */
unsigned short nacyl; /* Alt. cylinder count */
unsigned short ntrks; /* Tracks per cylinder */
unsigned short nsect; /* Sectors per track */
unsigned char spare3[4]; /* Even more magic... */
struct sun_partition {
__u32 start_cylinder;
__u32 num_sectors;
} partitions[8];
unsigned short magic; /* Magic number */
unsigned short csum; /* Label xor'd checksum */
} sun_partition;
next prev parent reply other threads:[~2006-04-11 3:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 22:48 More on the Sun Disk Label Issue Jim Gifford
2006-04-10 23:03 ` David S. Miller
2006-04-11 3:24 ` Jim Gifford [this message]
2006-04-11 6:03 ` David S. Miller
2006-04-11 6:12 ` Jim Gifford
2006-04-11 6:36 ` David S. Miller
2006-04-11 6:42 ` Jim Gifford
2006-04-11 6:52 ` David S. Miller
2006-04-15 0:47 ` Jim Gifford
2006-04-15 2:44 ` David S. Miller
2006-04-15 2:48 ` Jim Gifford
2006-04-15 2:56 ` David S. Miller
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=443B2178.1080000@jg555.com \
--to=maillist@jg555.com \
--cc=sparclinux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.