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;
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html