From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: Problem booting Samsung 164UX ("Ruffian") MB - SOLUTION!
Date: Sun, 11 Oct 1998 13:59:36 -0600 (MDT) [thread overview]
Message-ID: <199810111959.NAA03073@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <199810111936.PAA00624@adder.cs.Virginia.EDU> from "Greg Lindahl" at Oct 11, 98 03:36:00 pm
Greg Lindahl wrote:
>
> > unsigned long hidden; /* hidden sectors (unused) */
> > unsigned long total_sect; /* number of sectors (if sectors == 0) */
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Some days I wonder how anything ever runs on the Alpha!
There is quite a bit of software around written a bit cleaner. :-)
In many cases these cleanup jobs started many years before the first
Alphas showed on a horizon (I know, as I have some personal
contributions into that :-).
Most likely the qouted code is derived from some MS-DOS documentation.
On 16-bit machine if you will declare the above as 'unsigned int'
you will get sizeof 2 and you will come out short (pun intended :-).
A trailing 'unsigned short boot_sign' at the structure end is also not
guaranteed to give you always 16-bits so a signature may end up
in a wrong place even if you have chances of survival on a "little
endian" machine. What is more - without '__atribute__((packed))' you
do not have a shadow of guarantee that a layout of the whole
structure is without holes (C Standard says so and "packed" is GNU-ism)
so you may screw all this up anyway. Linux kernel headers are quite
a bit more careful.
A code with hidden layout assumptions like quoted is a major portability
PITA. Big sigh!
I knew that there was a good reason not to use "mkdosfs" on Alpha
(and not a real need as well :-).
Michal
next prev parent reply other threads:[~1998-10-11 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-11 19:36 Problem booting Samsung 164UX ("Ruffian") MB - SOLUTION! Greg Lindahl
1998-10-11 19:59 ` Michal Jaegermann [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-10-11 17:15 Problem booting Samsung 164UX ("Ruffian") MB Andreas Haumer
1998-10-11 19:28 ` Problem booting Samsung 164UX ("Ruffian") MB - SOLUTION! Andreas Haumer
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox